25 lines
813 B
C
25 lines
813 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.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_set_ack_state(size_t channel, bool received);
|
|
esp_err_t ws2812_status_indicate_polling(size_t channel, uint32_t duration_ms);
|
|
esp_err_t ws2812_status_refresh_from_dcdc(void);
|
|
esp_err_t ws2812_status_play_bringup_animation(size_t cycles, uint32_t step_delay_ms);
|