mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-30 15:54:27 +01:00
2cbb18604b
No way to return it to the host application anyway since this command is unacknowledged.
31 lines
567 B
C
31 lines
567 B
C
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "hook/iobuf.h"
|
|
|
|
struct sg_led_ops {
|
|
HRESULT (*reset)(void *ctx);
|
|
void (*set_color)(void *ctx, uint8_t r, uint8_t g, uint8_t b);
|
|
};
|
|
|
|
struct sg_led {
|
|
const struct sg_led_ops *ops;
|
|
void *ops_ctx;
|
|
uint8_t addr;
|
|
};
|
|
|
|
void sg_led_init(
|
|
struct sg_led *led,
|
|
uint8_t addr,
|
|
const struct sg_led_ops *ops,
|
|
void *ctx);
|
|
|
|
void sg_led_transact(
|
|
struct sg_led *led,
|
|
struct iobuf *resp_frame,
|
|
const void *req_bytes,
|
|
size_t req_nbytes);
|