Functions which handle the leds. More...
Modules | |
Advanced informations | |
Enumerations | |
enum | eLedMask |
clusters bit masks for accessing the leds More... | |
enum | eLed |
clusters boolean values for the leds More... | |
Functions | |
void | leds_set (eLedMask bitmask, uint8_t bool) |
Sets the selected leds on or off. More... | |
eLedMask | leds_get (eLedMask bitmask) |
Returns the current state of the selected leds. More... | |
Functions which handle the leds.
example
enum eLed |
clusters boolean values for the leds
Enumerator | |
---|---|
kLedOff | constant (0x00): turn leds off |
kLedOn | constant (0xFF): turn leds on |
enum eLedMask |
clusters bit masks for accessing the leds
This enum is used for masking the leds in leds_set() and leds_get(). Additionally it is used for storing leds_get()'s result as a bitfield.
Returns the current state of the selected leds.
This function relies directly on the measured state of led pins.
bitmask | bit mask of the selected leds - see also eLedMask The parameter is used to only return the state of the selected leds. All other states(bits) are set to 0. |
void leds_set | ( | eLedMask | bitmask, |
uint8_t bool | |||
) |
Sets the selected leds on or off.
The value parameter is a boolean expression.
This function will set the selected leds immediately.
bitmask | bit mask of the selected leds - see also eLedMask The parameter is used to only change the state of the selected leds. All other leds stay unchanged. |
bool | 8-bit unsigned integer which is boolean - see also eLed |