Skip to content

Commit

Permalink
Fix BBIO_RAWWIRE_BULK_BIT usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Baldanos committed Oct 20, 2020
1 parent bebdf94 commit 7df0995
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/hydrabus/hydrabus_bbio_rawwire.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,6 @@ void bbio_mode_rawwire(t_hydra_console *con)
default:
if ((bbio_subcommand & BBIO_AUX_MASK) == BBIO_AUX_MASK) {
cprintf(con, "%c", bbio_aux(con, bbio_subcommand));
} else if ((bbio_subcommand & BBIO_RAWWIRE_BULK_TRANSFER) == BBIO_RAWWIRE_BULK_TRANSFER) {
// data contains the number of bytes to
// write
data = (bbio_subcommand & 0b1111) + 1;

chnRead(con->sdu, tx_data, data);
cprint(con, "\x01", 1);
for(i=0; i<data; i++) {
rx_data[i] = curmode.write_u8(con, tx_data[i]);
}
cprint(con, (char *)rx_data, data);
} else if ((bbio_subcommand & BBIO_RAWWIRE_BULK_BIT) == BBIO_RAWWIRE_BULK_BIT) {
// data contains the number of bits to
// write
Expand All @@ -155,6 +144,17 @@ void bbio_mode_rawwire(t_hydra_console *con)
}
cprint(con, "\x01", 1);

} else if ((bbio_subcommand & BBIO_RAWWIRE_BULK_TRANSFER) == BBIO_RAWWIRE_BULK_TRANSFER) {
// data contains the number of bytes to
// write
data = (bbio_subcommand & 0b1111) + 1;

chnRead(con->sdu, tx_data, data);
cprint(con, "\x01", 1);
for(i=0; i<data; i++) {
rx_data[i] = curmode.write_u8(con, tx_data[i]);
}
cprint(con, (char *)rx_data, data);
} else if ((bbio_subcommand & BBIO_RAWWIRE_BULK_CLK) == BBIO_RAWWIRE_BULK_CLK) {
// data contains the number of bytes to
// write
Expand Down

0 comments on commit 7df0995

Please sign in to comment.