board/io4.c: add configuration section to enable/disable emulation

This commit is contained in:
2020-10-07 17:26:12 +00:00
parent e677a1b4f3
commit cd5ae172b8
9 changed files with 36 additions and 6 deletions

View File

@ -11,6 +11,10 @@ enum {
IO4_BUTTON_SERVICE = 1 << 6,
};
struct io4_config {
bool enable;
};
struct io4_state {
uint16_t adcs[8];
uint16_t spinners[4];
@ -22,4 +26,7 @@ struct io4_ops {
HRESULT (*poll)(void *ctx, struct io4_state *state);
};
HRESULT io4_hook_init(const struct io4_ops *ops, void *ctx);
HRESULT io4_hook_init(
const struct io4_config *cfg,
const struct io4_ops *ops,
void *ctx);