Driver for LEDS connected to the reference platform used for demo purposes. More...
|
Enumerations | |
| enum | led_name { LED_RED, LED_GREEN, LED_MAX } |
List of available leds. More... | |
Functions | |
| void | led_enable () |
| Enable the control of the LEDs. | |
| void | led_disable () |
| Disable the control of the LEDs. | |
| void | led_set (enum led_name led, int state) |
| Set the state of a LED. | |
| void | led_toggle (enum led_name led) |
| Toggle the state of a LED. | |
| void | led_blink (enum led_name led_idx, int period_ms) |
| Set the state of the green LED. | |
Driver for LEDS connected to the reference platform used for demo purposes.
Two LEDS are available (red and green).
| enum led_name |
| void led_blink | ( | enum led_name | led_idx, | |
| int | period_ms | |||
| ) |
Set the state of the green LED.
Blink a LED indefinitely until led_set or led_toggle is called. The led will be switched on for half the period and switched off for the rest. This used software timer, so period lower limit is 100ms.
| [in] | led_idx | Led id |
| [in] | period_ms | Blink period in ms (minimum 100) |
| void led_disable | ( | ) |
Disable the control of the LEDs.
| void led_enable | ( | ) |
Enable the control of the LEDs.
This function activates the GPIO outputs controlling the LEDs. This function shall be called prior to play with the red and green LED state
| void led_set | ( | enum led_name | led, | |
| int | state | |||
| ) |
Set the state of a LED.
| [in] | led_idx | Led id |
| [in] | state | Set to 1 to switch on LED, and to 0 to switch it off |
| void led_toggle | ( | enum led_name | led | ) |
Toggle the state of a LED.
| [in] | led_idx | Led id |
1.6.1