21 lines
623 B
C
21 lines
623 B
C
#ifndef LED_STRIP_H
|
|
#define LED_STRIP_H
|
|
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
|
|
// LED configuration for SparkFun ESP32-S3 Thing Plus
|
|
#define LED_STRIP_GPIO 46
|
|
#define LED_STRIP_LED_COUNT 1
|
|
|
|
// Simple LED strip driver
|
|
typedef struct led_strip_t led_strip_t;
|
|
|
|
// LED strip functions
|
|
led_strip_t* led_strip_init(uint8_t gpio, uint16_t led_count);
|
|
esp_err_t led_strip_set_pixel(led_strip_t *strip, uint16_t index, uint8_t red, uint8_t green, uint8_t blue);
|
|
esp_err_t led_strip_refresh(led_strip_t *strip);
|
|
esp_err_t led_strip_clear(led_strip_t *strip);
|
|
void led_strip_deinit(led_strip_t *strip);
|
|
|
|
#endif // LED_STRIP_H
|