19 #define HW_LED_CTX_SIZE 64 #define HW_LED_CTX_SIZE
Size of the LED context buffer.
Pulse Width Modulation (PWM) interface.
hw_led_cap_t
LED capabilities flags.
hw_led_t hw_led_init(uint8_t gpio, hw_pwm_t *pwm)
Initialize an LED unit.
void hw_led_finalize(hw_led_t *led)
Finalize and release an LED.
uint8_t hw_led_status_gpio()
Return the GPIO pin number for the on-board status LED.
Supports linear brightness control via PWM.
uint8_t gpio
GPIO pin number for the LED.
PWM structure representing a PWM instance.
hw_pwm_t * pwm
Optional pointer to a PWM structure for linear control.
bool hw_led_set_brightness(hw_led_t *led, uint8_t brightness)
Set the LED brightness (linear LEDs only).
bool hw_led_blink(hw_led_t *led, uint32_t period_ms, bool repeats)
Blink the LED (toggle full on/off).
hw_led_cap_t hw_led_capabilities(hw_led_t *led)
Return LED capabilities.
bool hw_led_fade(hw_led_t *led, uint32_t period_ms, bool repeats)
Fade (breathe) the LED (PWM LEDs only).
Supports binary on/off control.
bool hw_led_valid(hw_led_t *led)
Check if an LED handle is valid and initialized.
bool hw_led_set_state(hw_led_t *led, bool on)
Set the LED binary state (full on or off).
LED structure definition for hardware control.