1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2024-11-24 14:50:10 +01:00

bio2: bio2_bi2a_state -> bi2a_sdvx_state

This commit is contained in:
Will Xyen 2020-08-02 23:12:34 -07:00 committed by adfe3beeadc615e0fa48b493761cc42aae47d399
parent f028bdeb20
commit caba39843f
2 changed files with 10 additions and 10 deletions

View File

@ -31,7 +31,7 @@ struct bi2a_sdvx_buttons2 {
uint8_t b_fxr : 1; uint8_t b_fxr : 1;
}; };
struct bio2_bi2a_state { struct bi2a_sdvx_state_in {
union { union {
uint16_t raw[8]; uint16_t raw[8];
struct { 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 unk1[2];
uint8_t c_block; uint8_t c_block;
uint8_t woof_r; uint8_t woof_r;
@ -65,11 +65,11 @@ struct bio2_bi2a_state_out {
}; };
_Static_assert( _Static_assert(
sizeof(struct bio2_bi2a_state) == 16, sizeof(struct bi2a_sdvx_state_in) == 16,
"bio2_bi2a_state_in is the wrong size"); "bi2a_sdvx_state_in is the wrong size");
_Static_assert( _Static_assert(
sizeof(struct bio2_bi2a_state_out) == 40, sizeof(struct bi2a_sdvx_state_out) == 40,
"bio2_bi2a_state_out is the wrong size"); "bi2a_sdvx_state_out is the wrong size");
#pragma pack(pop) #pragma pack(pop)
#endif #endif

View File

@ -179,16 +179,16 @@ static void
bio2_emu_bi2a_send_state(struct ac_io_emu *emu, const struct ac_io_message *req) bio2_emu_bi2a_send_state(struct ac_io_emu *emu, const struct ac_io_message *req)
{ {
struct ac_io_message resp; struct ac_io_message resp;
struct bio2_bi2a_state *pin; struct bi2a_sdvx_state_in *pin;
struct bio2_bi2a_state_out *pout; struct bi2a_sdvx_state_out *pout;
resp.addr = req->addr | AC_IO_RESPONSE_FLAG; resp.addr = req->addr | AC_IO_RESPONSE_FLAG;
resp.cmd.code = req->cmd.code; resp.cmd.code = req->cmd.code;
resp.cmd.seq_no = req->cmd.seq_no; resp.cmd.seq_no = req->cmd.seq_no;
resp.cmd.nbytes = sizeof(*pin); resp.cmd.nbytes = sizeof(*pin);
pout = (struct bio2_bi2a_state_out *) &req->cmd.raw; pout = (struct bi2a_sdvx_state_out *) &req->cmd.raw;
pin = (struct bio2_bi2a_state *) &resp.cmd.raw; pin = (struct bi2a_sdvx_state_in *) &resp.cmd.raw;
memset(pin, 0, sizeof(*pin)); memset(pin, 0, sizeof(*pin));
uint32_t gpio = 0; uint32_t gpio = 0;