The LEDs API defines a set of functions for accessing LEDs for Contiki plaforms with LEDs.
A platform with LED support must implement this API.
Macros | |
#define | LEDS_ALL (LEDS_GREEN | LEDS_YELLOW | LEDS_RED | LEDS_BLUE) |
#define | LEDS_BLUE LEDS_YELLOW |
#define | LEDS_GREEN 1 |
#define | LEDS_RED 1 |
#define | LEDS_YELLOW 2 |
Functions | |
unsigned char | leds_arch_get (void) |
void | leds_arch_init (void) |
Leds implementation. More... | |
void | leds_arch_set (unsigned char leds) |
void | leds_blink (void) |
Blink all LEDs. More... | |
unsigned char | leds_get (void) |
Returns the current status of all leds (respects invert) More... | |
void | leds_init (void) |
void | leds_invert (unsigned char leds) |
void | leds_off (unsigned char leds) |
void | leds_on (unsigned char leds) |
void | leds_toggle (unsigned char leds) |
#define LEDS_ALL (LEDS_GREEN | LEDS_YELLOW | LEDS_RED | LEDS_BLUE) |
Referenced by leds_arch_set(), main(), PROCESS_THREAD(), and route_callback().
#define LEDS_BLUE LEDS_YELLOW |
#define LEDS_GREEN 1 |
Referenced by PROCESS_THREAD(), and show_leds().
#define LEDS_RED 1 |
Referenced by PROCESS_THREAD(), and show_leds().
#define LEDS_YELLOW 2 |
Referenced by leds_arch_get(), and show_leds().
unsigned char leds_arch_get | ( | void | ) |
References LEDS_YELLOW, and port_pin_get_output_level().
Referenced by leds_get().
void leds_arch_init | ( | void | ) |
Leds implementation.
References port_config::direction, port_get_config_defaults(), PORT_PIN_DIR_OUTPUT, port_pin_set_config(), and port_pin_set_output_level().
Referenced by leds_init().
void leds_arch_set | ( | unsigned char | leds | ) |
References LEDS_ALL, and port_pin_set_output_level().
Referenced by show_leds().
void leds_blink | ( | void | ) |
Blink all LEDs.
References clock_delay(), invert, leds, and leds_invert().
unsigned char leds_get | ( | void | ) |
Returns the current status of all leds (respects invert)
References leds_arch_get().
void leds_init | ( | void | ) |
References invert, leds, and leds_arch_init().
Referenced by main().
void leds_invert | ( | unsigned char | leds | ) |
References invert, and show_leds().
Referenced by leds_blink(), and leds_toggle().
void leds_off | ( | unsigned char | leds | ) |
References leds, and show_leds().
Referenced by main(), PROCESS_THREAD(), and route_callback().
void leds_on | ( | unsigned char | leds | ) |
References leds, and show_leds().
Referenced by main(), and PROCESS_THREAD().
void leds_toggle | ( | unsigned char | leds | ) |
References leds_invert().
Referenced by PROCESS_THREAD().