LED control interface. More...


Go to the source code of this file.
Data Structures | |
| struct | hw_led_t |
| LED structure definition for hardware control. More... | |
Macros | |
| #define | HW_LED_CTX_SIZE 64 |
| Size of the LED context buffer. | |
Enumerations | |
| enum | hw_led_cap_t { HW_LED_CAP_NONE = 0, HW_LED_CAP_BINARY = (1 << 0), HW_LED_CAP_LINEAR = (1 << 1), HW_LED_CAP_GPIO = (1 << 2) } |
| LED capabilities flags. More... | |
Functions | |
| hw_led_t | hw_led_init (uint8_t gpio, hw_pwm_t *pwm) |
| Initialize an LED unit. More... | |
| uint8_t | hw_led_status_gpio () |
| Return the GPIO pin number for the on-board status LED. More... | |
| void | hw_led_finalize (hw_led_t *led) |
| Finalize and release an LED. More... | |
| bool | hw_led_valid (hw_led_t *led) |
| Check if an LED handle is valid and initialized. More... | |
| hw_led_cap_t | hw_led_capabilities (hw_led_t *led) |
| Return LED capabilities. More... | |
| bool | hw_led_set_state (hw_led_t *led, bool on) |
| Set the LED binary state (full on or off). More... | |
| bool | hw_led_set_brightness (hw_led_t *led, uint8_t brightness) |
| Set the LED brightness (linear LEDs only). More... | |
| bool | hw_led_blink (hw_led_t *led, uint32_t period_ms, bool repeats) |
| Blink the LED (toggle full on/off). More... | |
| bool | hw_led_fade (hw_led_t *led, uint32_t period_ms, bool repeats) |
| Fade (breathe) the LED (PWM LEDs only). More... | |