2018-11-21 02:27:05 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "board/sg-cmd.h"
|
|
|
|
|
|
|
|
enum {
|
|
|
|
SG_RGB_CMD_SET_COLOR = 0x81,
|
|
|
|
SG_RGB_CMD_RESET = 0xF5,
|
|
|
|
SG_RGB_CMD_GET_INFO = 0xF0,
|
|
|
|
};
|
|
|
|
|
2019-10-27 00:25:04 +02:00
|
|
|
struct sg_led_res_reset {
|
|
|
|
struct sg_res_header res;
|
2018-11-21 02:27:05 +01:00
|
|
|
uint8_t payload;
|
|
|
|
};
|
|
|
|
|
2019-10-27 00:25:04 +02:00
|
|
|
struct sg_led_res_get_info {
|
|
|
|
struct sg_res_header res;
|
2023-12-03 18:45:42 +01:00
|
|
|
char payload[12];
|
2018-11-21 02:27:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct sg_led_req_set_color {
|
|
|
|
struct sg_req_header req;
|
|
|
|
uint8_t payload[3];
|
|
|
|
};
|
|
|
|
|
|
|
|
union sg_led_req_any {
|
|
|
|
uint8_t bytes[256];
|
|
|
|
struct sg_req_header simple;
|
|
|
|
struct sg_led_req_set_color set_color;
|
|
|
|
};
|
|
|
|
|
2019-10-27 00:25:04 +02:00
|
|
|
union sg_led_res_any {
|
2018-11-21 02:27:05 +01:00
|
|
|
uint8_t bytes[256];
|
2019-10-27 00:25:04 +02:00
|
|
|
struct sg_res_header simple;
|
|
|
|
struct sg_led_res_reset reset;
|
|
|
|
struct sg_led_res_get_info get_info;
|
2018-11-21 02:27:05 +01:00
|
|
|
};
|