Access macros and functions to control the on-board LEDs.
More...
Access macros and functions to control the on-board LEDs.
This header contains a set of macros for controlling the on-board LEDs of a board. The LEDs are enumerated, starting from LED0 to LED7. As most platforms have a different number of LEDs, the existing ones are mapped onto the lowest LED numbers, while the higher LED numbers will simply be empty defines. This ensures, that the LED macros are portable to any platform with any number of LEDs.
Providing access macros to 8 LEDs is a random decision, as currently 8 is the maximum number of on-board LEDs found on any board in RIOT (stm32f3discovery).
|
| file | led.h |
| | Macros and inline functions for controlling the on-board LEDs.
|
| |
|
| static void | led_on (unsigned id) |
| | Turn on an LED.
|
| |
| static void | led_off (unsigned id) |
| | Turn off an LED.
|
| |
| static void | led_toggle (unsigned id) |
| | Toggle an LED.
|
| |
| #define | LED_ON(id) |
| | Turn on an LED.
|
| |
| #define | LED_OFF(id) |
| | Turn off an LED.
|
| |
| #define | LED_TOGGLE(id) |
| | Toggle an LED.
|
| |
◆ LED0_OFF
defined empty
Definition at line 43 of file led.h.
◆ LED0_ON
defined empty
Definition at line 42 of file led.h.
◆ LED0_TOGGLE
defined empty
Definition at line 44 of file led.h.
◆ LED1_OFF
defined empty
Definition at line 51 of file led.h.
◆ LED1_ON
defined empty
Definition at line 50 of file led.h.
◆ LED1_TOGGLE
defined empty
Definition at line 52 of file led.h.
◆ LED2_OFF
defined empty
Definition at line 59 of file led.h.
◆ LED2_ON
defined empty
Definition at line 58 of file led.h.
◆ LED2_TOGGLE
defined empty
Definition at line 60 of file led.h.
◆ LED3_OFF
defined empty
Definition at line 67 of file led.h.
◆ LED3_ON
defined empty
Definition at line 66 of file led.h.
◆ LED3_TOGGLE
defined empty
Definition at line 68 of file led.h.
◆ LED4_OFF
defined empty
Definition at line 75 of file led.h.
◆ LED4_ON
defined empty
Definition at line 74 of file led.h.
◆ LED4_TOGGLE
defined empty
Definition at line 76 of file led.h.
◆ LED5_OFF
defined empty
Definition at line 83 of file led.h.
◆ LED5_ON
defined empty
Definition at line 82 of file led.h.
◆ LED5_TOGGLE
defined empty
Definition at line 84 of file led.h.
◆ LED6_OFF
defined empty
Definition at line 91 of file led.h.
◆ LED6_ON
defined empty
Definition at line 90 of file led.h.
◆ LED6_TOGGLE
defined empty
Definition at line 92 of file led.h.
◆ LED7_OFF
defined empty
Definition at line 99 of file led.h.
◆ LED7_ON
defined empty
Definition at line 98 of file led.h.
◆ LED7_TOGGLE
defined empty
Definition at line 100 of file led.h.
◆ LED_NUMOF
Number of LEDs available on the current board.
Definition at line 125 of file led.h.
◆ LED_OFF
Value:
Turn off an LED.
Definition at line 135 of file led.h.
◆ LED_ON
Value:
Turn on an LED.
Definition at line 134 of file led.h.
◆ LED_TOGGLE
Value:
Toggle an LED.
Definition at line 136 of file led.h.
◆ led_off()
| static void led_off |
( |
unsigned | id | ) |
|
|
inlinestatic |
Turn off an LED.
- Note
- If id is a compile-time constant, consider using LED_OFF(id) instead.
- Parameters
-
| id | id of LED between 0 and 7 |
Definition at line 166 of file led.h.
◆ led_on()
| static void led_on |
( |
unsigned | id | ) |
|
|
inlinestatic |
Turn on an LED.
- Note
- If id is a compile-time constant, consider using LED_ON(id) instead.
- Parameters
-
| id | id of LED between 0 and 7 |
Definition at line 145 of file led.h.
◆ led_toggle()
| static void led_toggle |
( |
unsigned | id | ) |
|
|
inlinestatic |
Toggle an LED.
- Note
- If id is a compile-time constant, consider using LED_TOGGLE(id) instead.
- Parameters
-
| id | id of LED between 0 and 7 |
Definition at line 187 of file led.h.