From c9548daf8c78bd37d2243bdbbdc82355bd2ea599 Mon Sep 17 00:00:00 2001 From: din Date: Sun, 7 Sep 2025 12:33:48 -0500 Subject: [PATCH] rename, add comment for autopoll --- src/main/aciodrv/mdxf.c | 24 +++++++++++++++++++++++- src/main/ddrio-p4io/ddrio.c | 2 +- src/main/p4io/bitinfo.h | 4 ++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/main/aciodrv/mdxf.c b/src/main/aciodrv/mdxf.c index cbd59a8..15f33d6 100644 --- a/src/main/aciodrv/mdxf.c +++ b/src/main/aciodrv/mdxf.c @@ -12,8 +12,30 @@ bool aciodrv_mdxf_init(struct aciodrv_device_ctx *device, uint8_t node_id) { log_assert(device); - + return true; + + /* + struct ac_io_message msg = {0}; + + log_info("starting autopoll mdxf node %d", node_id); + + msg.addr = node_id + 1; + msg.cmd.code = ac_io_u16(AC_IO_CMD_MDXF_AUTO_GET_START); + msg.cmd.nbytes = 2; + + msg.cmd.raw[0] = 0x80; + msg.cmd.raw[1] = 0x02; + + if (aciodrv_send_and_recv( + device, + &msg, + offsetof(struct ac_io_message, cmd.raw) + msg.cmd.nbytes + 1)) { + return true; + } + + return false; + */ } bool aciodrv_mdxf_poll( diff --git a/src/main/ddrio-p4io/ddrio.c b/src/main/ddrio-p4io/ddrio.c index 160d2b7..bd75b13 100644 --- a/src/main/ddrio-p4io/ddrio.c +++ b/src/main/ddrio-p4io/ddrio.c @@ -70,7 +70,7 @@ bool prev_top = false; bool prev_bottom = false; p4io_lights_t light_buff = {0}; -p4io_coin_lights_t coin_buff = {0}; +p4io_coinstock_t coin_buff = {0}; uint32_t jamma[4] = {0}; void ddr_io_set_loggers( diff --git a/src/main/p4io/bitinfo.h b/src/main/p4io/bitinfo.h index b86bd4a..fc2f5e7 100644 --- a/src/main/p4io/bitinfo.h +++ b/src/main/p4io/bitinfo.h @@ -42,9 +42,9 @@ typedef union { bool coin3_7 : 1; } ddr; uint8_t raw[4]; -} p4io_coin_lights_t; +} p4io_coinstock_t; _Static_assert( - sizeof(p4io_coin_lights_t) == 4, "p4io_coin_lights_t is the wrong size"); + sizeof(p4io_coinstock_t) == 4, "p4io_coinstock_t is the wrong size"); typedef union { struct {