Add WS2812 status module and config

This commit is contained in:
2025-12-13 12:32:15 +02:00
parent 3218e6039f
commit 5b4691dc53
39 changed files with 2538 additions and 3 deletions

20
main/ws2812_status.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include "esp_err.h"
#include "sdkconfig.h"
#ifndef CONFIG_WATCH_WS2812_LED_COUNT
#define CONFIG_WATCH_WS2812_LED_COUNT 5
#endif
#define WS2812_STATUS_LED_COUNT CONFIG_WATCH_WS2812_LED_COUNT
esp_err_t ws2812_status_init(void);
esp_err_t ws2812_status_set_channel_state(size_t channel, bool enabled);
esp_err_t ws2812_status_mark_active(size_t channel);
esp_err_t ws2812_status_clear_active(void);
esp_err_t ws2812_status_set_error(bool has_error);
esp_err_t ws2812_status_refresh_from_dcdc(void);