Macros | Enumerations | Functions
ev3_led.h File Reference

EV3 LEDs. More...

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define EV3_LED_VAR(decl)   extern decl
 
#define EV3_LED_VAR_INIT(decl, ...)   extern decl
 
#define EV3_LED_INL   inline
 
#define LED_ATTR__COUNT_   5
 

Enumerations

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...
 

Functions

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...
 

Detailed Description

EV3 LEDs.

(ev3_led.yu-h)

Author
Vitaly Kravtsov (in4li.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om)