54#include <soc/gpio_num.h>
57#define MAX_LED_BRIGHTNESS 8
62typedef struct __attribute__((packed))
62typedef struct __attribute__((packed)) {
…};
69esp_err_t
initLeds(gpio_num_t gpio, gpio_num_t gpioAlt, uint8_t brightness);
uint8_t g
The green component, 0-255.
Definition hdw-led.h:64
void setLedBrightness(uint8_t brightness)
Set the global LED brightness. setLedBrightnessSetting() should be called instead if the new volume s...
Definition hdw-led.c:137
void flushLeds(void)
Wait until any pending LED transactions are finished, then return.
Definition hdw-led.c:191
const led_t * getLedState(void)
Return a pointer to the current LED state, always of length CONFIG_NUM_LEDS
Definition hdw-led.c:183
uint8_t b
The blue component, 0-255.
Definition hdw-led.h:66
uint8_t r
The red component, 0-255.
Definition hdw-led.h:65
esp_err_t initLeds(gpio_num_t gpio, gpio_num_t gpioAlt, uint8_t brightness)
Initialize the RGB LEDs.
Definition hdw-led.c:44
void powerDownLed(void)
Power down the LEDs.
Definition hdw-led.c:103
esp_err_t setLeds(led_t *leds, uint8_t numLeds)
Set the RGB LEDs to the given values.
Definition hdw-led.c:151
void powerUpLed(void)
Power up the LEDs.
Definition hdw-led.c:122
esp_err_t deinitLeds(void)
Deinitialize LEDs.
Definition hdw-led.c:92
LED colors, with red, green, and blue components.
Definition hdw-led.h:63