ACR89U-A1 – Reference Manual
Version 1.04
www.acs.com.hk
Page 56 of 57
4.2.7.2. AS_SetLed
This function enables or disables any of the LEDs of the ACR89.
AS_STATUS AS_DECL
AS_ SetLED
(
IN INT nDevId,
IN PLED pLed);
Parameters:
nDevId
[in] Handle returned by a previous call to
AS_Open
.
pBuzzer
[in] Pointer to a
LED
structure that contains the state to set the LEDs of the ACR89.
See also
Section 4.1.2.9
LED for more information about the
LED
structure.
Return Values:
AS_STATUS
This functions returns different values depending on whether it succeeds or fails.
AS_STATUS.DllError
contains the status as returned by the DLL.
AS_STATUS.W32Error
contains the Win32 error code associated with the DLL
error, if any. See also
Appendix A
for the possible return codes.
Example:
AS_STATUS status;
LED ledStat;
//turn on the LEDs and give them a different color
//assumed is that a connection has already been established
ledStat.cbLedPower = LED_RED;
// Set the Power LED to red
ledStat.cbLedSlot1 = LED_GREEN;
// Set the Slot1 LED to green
ledStat.cbLedSlot2 = LED_YELLOW;
// Set the Slot1 LED to yellow
status = AS_SetLED(nDevId, &ledStat);
return status;