From caba39843f48c56edf50360b8dee768ffec0dcd4 Mon Sep 17 00:00:00 2001 From: Will Xyen Date: Sun, 2 Aug 2020 23:12:34 -0700 Subject: [PATCH] bio2: bio2_bi2a_state -> bi2a_sdvx_state --- src/main/bio2/bi2a-sdvx.h | 12 ++++++------ src/main/sdvxhook2/bi2a.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/bio2/bi2a-sdvx.h b/src/main/bio2/bi2a-sdvx.h index d75d909..502f36b 100644 --- a/src/main/bio2/bi2a-sdvx.h +++ b/src/main/bio2/bi2a-sdvx.h @@ -31,7 +31,7 @@ struct bi2a_sdvx_buttons2 { uint8_t b_fxr : 1; }; -struct bio2_bi2a_state { +struct bi2a_sdvx_state_in { union { uint16_t raw[8]; struct { @@ -44,7 +44,7 @@ struct bio2_bi2a_state { }; }; -struct bio2_bi2a_state_out { +struct bi2a_sdvx_state_out { uint8_t unk1[2]; uint8_t c_block; uint8_t woof_r; @@ -65,11 +65,11 @@ struct bio2_bi2a_state_out { }; _Static_assert( - sizeof(struct bio2_bi2a_state) == 16, - "bio2_bi2a_state_in is the wrong size"); + sizeof(struct bi2a_sdvx_state_in) == 16, + "bi2a_sdvx_state_in is the wrong size"); _Static_assert( - sizeof(struct bio2_bi2a_state_out) == 40, - "bio2_bi2a_state_out is the wrong size"); + sizeof(struct bi2a_sdvx_state_out) == 40, + "bi2a_sdvx_state_out is the wrong size"); #pragma pack(pop) #endif diff --git a/src/main/sdvxhook2/bi2a.c b/src/main/sdvxhook2/bi2a.c index 4e5a1d9..cab5916 100644 --- a/src/main/sdvxhook2/bi2a.c +++ b/src/main/sdvxhook2/bi2a.c @@ -179,16 +179,16 @@ static void bio2_emu_bi2a_send_state(struct ac_io_emu *emu, const struct ac_io_message *req) { struct ac_io_message resp; - struct bio2_bi2a_state *pin; - struct bio2_bi2a_state_out *pout; + struct bi2a_sdvx_state_in *pin; + struct bi2a_sdvx_state_out *pout; resp.addr = req->addr | AC_IO_RESPONSE_FLAG; resp.cmd.code = req->cmd.code; resp.cmd.seq_no = req->cmd.seq_no; resp.cmd.nbytes = sizeof(*pin); - pout = (struct bio2_bi2a_state_out *) &req->cmd.raw; - pin = (struct bio2_bi2a_state *) &resp.cmd.raw; + pout = (struct bi2a_sdvx_state_out *) &req->cmd.raw; + pin = (struct bi2a_sdvx_state_in *) &resp.cmd.raw; memset(pin, 0, sizeof(*pin)); uint32_t gpio = 0;