Elatec GmbH
Page 42 of 50
7.2.5.3 Accessing LEDs
void LEDSet(byte LEDs, byte Status)
Set the state of the red and/or the green LED.
Parameters:
byte
LEDs
Binary or of the LEDs to be switched. The green LED is represented by
the constant
GREEN
, the red LED is represented by the constant
RED
.
byte
Status
The new status for the LEDs specified by
LEDs
. It may be either one of
the following constants:
OFF
:
Turn off
ON
:
Turn on
BLINK
:
Blink
TOGGLE
:
Toggle on/off state. This has no
influence on a blinking LED
Return:
None.
Examples:
LEDSet(GREEN | RED,ON); // Turn on both green and red LED
LEDSet(GREEN,BLINK); // Let the green LED blink
byte LEDGet(byte LED)
Get the current status of a LED. Only the status of one LED can be retrieved at a time.
Parameter:
byte
LED
Specifies either the value for the green (constant
GREEN
) or the red
(constant
RED
) LED.
Return:
The current status of the LED specified by
LED.
OFF
:
The LED is off
ON
:
The LED is on
BLINK
:
The LED is blinking