#include "pico/stdlib.h"


enum led_type_gestion_t{
    PAS_DE_GESTION,
    LED_STABLE,
    LED_CLI_RAPIDE,
    LED_CLI_NORMAL,
    LED_CLI_LENT,
    LED_CLI_PANIQUE_1,
    LED_CLI_PANIQUE_2,
    LED_CLI_PANIQUE_3,
    LED_PULSE_RAPIDE,
    LED_PULSE_NORMAL,
    LED_PULSE_LENT
};

void ws2812_init(void);
void ws2812_affiche_buffer(void);
void ws2812_set_buffer_rgb(uint8_t rouge, uint8_t vert, uint8_t bleu, uint8_t index_led);
void ws2812_set_rgb(uint8_t rouge, uint8_t vert, uint8_t bleu, uint8_t index_led);
void ws2812_set_buffer_8bits(uint8_t couleur, uint8_t index_led);
void ws2812_set_buffer(uint32_t couleur, uint8_t index_led);
void ws2812_arc_en_ciel(void);
void ws2812_set_led(uint8_t led, uint32_t couleur);
void ws2812_set_mode(uint8_t led_id, enum led_type_gestion_t led_type_gestion, uint32_t couleur);
void ws2812_gestion(void);
uint32_t ws2812_mix_color(uint32_t couleur1, uint32_t couleur2, float facteur);

#define LED_ID_SD_CARD 0
#define LED_ID_USB 1
#define LED_ID_ASSERV 2
#define LED_ID_DETECTION 3
#define LED_ID_DIVERS 4

#define OFF_24BITS 0, 0, 0
#define ORANGE_24BITS 4, 1, 0
#define BLEU_24BITS 0, 0, 4
#define VERT_24BITS 0, 4, 1
