1
0
mirror of https://gitea.tendokyu.moe/Dniel97/segatools.git synced 2024-11-30 15:54:27 +01:00
segatools-dniel97/board/sg-led-cmd.h
Tau 1630784c3d board/sg-led.c: Implement RGB LED support
Used by AiMe reader, possibly used elsewhere.
2018-11-20 20:33:17 -05:00

40 lines
757 B
C

#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,
};
struct sg_led_resp_reset {
struct sg_resp_header resp;
uint8_t payload;
};
struct sg_led_resp_get_info {
struct sg_resp_header resp;
uint8_t payload[9];
};
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;
};
union sg_led_resp_any {
uint8_t bytes[256];
struct sg_resp_header simple;
struct sg_led_resp_reset reset;
struct sg_led_resp_get_info get_info;
};