segatools/hkbhook/led.h

39 lines
805 B
C

#pragma once
#include <windows.h>
#include <stdbool.h>
#include <stdint.h>
#pragma pack(push, 1)
struct hkb_led_config {
bool enable;
};
struct hbk_led_packet_head {
uint8_t sync;
uint8_t dst;
uint8_t src;
uint8_t len;
};
struct hbk_led_req_header {
struct hbk_led_packet_head head;
uint8_t cmd;
};
struct hbk_led_resp_header {
struct hbk_led_packet_head head;
uint8_t status;
uint8_t cmd;
uint8_t report;
};
struct hbk_led_packet_tail {
uint8_t checksum;
};
struct hbk_led_req_any {
struct hbk_led_req_header header;
struct hbk_led_packet_tail tail;
};
struct hbk_led_resp_any {
struct hbk_led_resp_header header;
struct hbk_led_packet_tail tail;
};
#pragma pack(pop)
HRESULT led_hook_init(const struct hkb_led_config *cfg, uint8_t port);