/*
 * rgbled.h
 *
 *  Created on: Oct 13, 2024
 *      Author: true
 */

#ifndef USER_LED_RGBLED_H_
#define USER_LED_RGBLED_H_



#include <stdint.h>

#include "hsv2rgb.h"

#include "../comm/i2c.h"

#include "../hw/ch32sub.h"



#define RGB_EDGE_COUNT          10



typedef struct LedProgram {
    char *name;
    void (*prog)(uint8_t *, uint16_t);
} LedProgram;



extern const uint8_t edge_map[10];
extern const LedProgram edge_pgm[6];

extern       color_hsv  hsv_edge[RGB_EDGE_COUNT];



void rgbled_init();

void rgb_edge_update(uint8_t idx);



#endif /* USER_LED_RGBLED_H_ */

