Skip to content

Commit

Permalink
BBIO.SPI: fix bug, set phase value properly
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKalach committed Dec 28, 2020
1 parent 09930be commit bb89408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hydrabus/hydrabus_bbio_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void bbio_mode_spi(t_hydra_console *con)
}
} else if ((bbio_subcommand & BBIO_SPI_CONFIG) == BBIO_SPI_CONFIG) {
proto->config.spi.dev_polarity = (bbio_subcommand & 0b100)?1:0;
proto->config.spi.dev_phase = (bbio_subcommand & 0b10)?0:1;
proto->config.spi.dev_phase = (bbio_subcommand & 0b10)?1:0;
proto->dev_num = (bbio_subcommand & 0b1)?BSP_DEV_SPI1:BSP_DEV_SPI2;
status = bsp_spi_init(proto->dev_num, proto);
if(status == BSP_OK) {
Expand Down

0 comments on commit bb89408

Please sign in to comment.