#pragma once
#include <stdint.h>
#include "esp_err.h"

#ifdef __cplusplus
extern "C" {
#endif

// === Configurações principais ===
#define LED_PIN        18
#define LED_COUNT      60
#define LED_RES_HZ     10000000  // 10 MHz de resolução (0.1 µs por tick)

// === Interface pública ===
esp_err_t led_init(void);
esp_err_t led_clear(void);
esp_err_t led_set(uint16_t index, uint8_t r, uint8_t g, uint8_t b);
esp_err_t led_show(void);
void led_rainbow(uint16_t offset);
void led_spin_to(uint16_t target, uint16_t rounds, uint16_t delay_start, uint16_t delay_end);
void led_idle_animation(void);
#ifdef __cplusplus
}
#endif
