Access to EV3 LEDs.
More...
|
#define | LED_ATTR__COUNT_ 5 |
|
|
enum | {
EV3_LEFT_GREEN,
EV3_RIGHT_GREEN,
EV3_LEFT_RED,
EV3_RIGHT_RED,
LED_OUTA,
LED_OUTB,
LED_OUTC,
LED_OUTD,
LED__COUNT_
} |
| Identifiers of LEDs. More...
|
|
enum | {
TRIGGER_NONE,
TRIGGER_MMC0,
TRIGGER_TIMER,
TRIGGER_HEARTBEAT,
TRIGGER_DEFAULT_ON,
TRIGGER_TRANSIENT,
TRIGGER_LEGOEV3_BATTERY_CHARGING_OR_FULL,
TRIGGER_LEGOEV3_BATTERY_CHARGING,
TRIGGER_LEGOEV3_BATTERY_FULL,
TRIGGER_LEGOEV3_BATTERY_CHARGING_BLINK_FULL_SOLID,
TRIGGER_RFKILL0,
TRIGGER_PHY0RX,
TRIGGER_PHY0TX,
TRIGGER_PHY0ASSOC,
TRIGGER_PHY0RADIO,
TRIGGER_RFKILL1,
TRIGGER__COUNT_
} |
| Triggers identifiers of LEDs. More...
|
|
|
size_t | get_led_brightness (uint8_t inx, byte *buf) |
| Read "brightness" attribute of the LED. More...
|
|
size_t | set_led_brightness (uint8_t inx, byte value) |
| Write "brightness" attribute of the LED. More...
|
|
size_t | get_led_delay_off (uint8_t inx, int *buf) |
| Read "delay_off" attribute of the LED. More...
|
|
size_t | set_led_delay_off (uint8_t inx, int value) |
| Write "delay_off" attribute of the LED. More...
|
|
size_t | get_led_delay_on (uint8_t inx, int *buf) |
| Read "delay_on" attribute of the LED. More...
|
|
size_t | set_led_delay_on (uint8_t inx, int value) |
| Write "delay_on" attribute of the LED. More...
|
|
size_t | get_led_max_brightness (uint8_t inx, byte *buf) |
| Read "max_brightness" attribute of the LED. More...
|
|
size_t | get_led_trigger (uint8_t inx, char *buf, size_t sz) |
| Read "trigger" attribute of the LED. More...
|
|
size_t | set_led_trigger (uint8_t inx, char *value) |
| Write "trigger" attribute of the LED. More...
|
|
INX_T | get_led_trigger_inx (uint8_t inx) |
| Read "trigger" attribute of the LED and get the index. More...
|
|
size_t | set_led_trigger_inx (uint8_t inx, INX_T trigger_inx) |
| Write "trigger" attribute of the LED by the index. More...
|
|
const char * | ev3_led_trigger (INX_T trigger_inx) |
| Get name of the specified LED trigger. More...
|
|
Access to EV3 LEDs.
Identifiers of LEDs.
Enumerator |
---|
LED__COUNT_ |
Count of EV3 LEDs.
|
Triggers identifiers of LEDs.
Enumerator |
---|
TRIGGER__COUNT_ |
Count of EV3 triggers.
|
const char* ev3_led_trigger |
( |
INX_T |
trigger_inx | ) |
|
Get name of the specified LED trigger.
- Parameters
-
trigger_inx | Index of the trigger. |
- Returns
- Requested value.
size_t get_led_brightness |
( |
uint8_t |
inx, |
|
|
byte * |
buf |
|
) |
| |
Read "brightness" attribute of the LED.
- Parameters
-
| inx | Index of the LED. |
[out] | buf | Buffer for result. |
- Returns
- Count of read bytes.
size_t get_led_delay_off |
( |
uint8_t |
inx, |
|
|
int * |
buf |
|
) |
| |
Read "delay_off" attribute of the LED.
- Parameters
-
| inx | Index of the LED. |
[out] | buf | Buffer for result. |
- Returns
- Count of read bytes.
size_t get_led_delay_on |
( |
uint8_t |
inx, |
|
|
int * |
buf |
|
) |
| |
Read "delay_on" attribute of the LED.
- Parameters
-
| inx | Index of the LED. |
[out] | buf | Buffer for result. |
- Returns
- Count of read bytes.
size_t get_led_max_brightness |
( |
uint8_t |
inx, |
|
|
byte * |
buf |
|
) |
| |
Read "max_brightness" attribute of the LED.
- Parameters
-
| inx | Index of the LED. |
[out] | buf | Buffer for result. |
- Returns
- Count of read bytes.
size_t get_led_trigger |
( |
uint8_t |
inx, |
|
|
char * |
buf, |
|
|
size_t |
sz |
|
) |
| |
Read "trigger" attribute of the LED.
- Parameters
-
| inx | Index of the LED. |
[out] | buf | Buffer for result. |
| sz | Buffer size. |
- Returns
- Count of read bytes.
INX_T get_led_trigger_inx |
( |
uint8_t |
inx | ) |
|
Read "trigger" attribute of the LED and get the index.
- Parameters
-
- Returns
- Index of trigger or TRIGGER__COUNT_ - error has occurred.
size_t set_led_brightness |
( |
uint8_t |
inx, |
|
|
byte |
value |
|
) |
| |
Write "brightness" attribute of the LED.
- Parameters
-
inx | Index of the LED. |
value | Attribute value. |
- Returns
- Count of written bytes.
size_t set_led_delay_off |
( |
uint8_t |
inx, |
|
|
int |
value |
|
) |
| |
Write "delay_off" attribute of the LED.
- Parameters
-
inx | Index of the LED. |
value | Attribute value. |
- Returns
- Count of written bytes.
size_t set_led_delay_on |
( |
uint8_t |
inx, |
|
|
int |
value |
|
) |
| |
Write "delay_on" attribute of the LED.
- Parameters
-
inx | Index of the LED. |
value | Attribute value. |
- Returns
- Count of written bytes.
size_t set_led_trigger |
( |
uint8_t |
inx, |
|
|
char * |
value |
|
) |
| |
Write "trigger" attribute of the LED.
- Parameters
-
inx | Index of the LED. |
value | Attribute value. |
- Returns
- Count of written bytes.
size_t set_led_trigger_inx |
( |
uint8_t |
inx, |
|
|
INX_T |
trigger_inx |
|
) |
| |
Write "trigger" attribute of the LED by the index.
- Parameters
-
inx | Index of the LED. |
trigger_inx | Index of the trigger. |
- Returns
- Count of written bytes.