Adjust the timing around reading the SPI line

This commit is contained in:
Savanni D'Gerinel 2022-06-27 20:03:15 -04:00
parent 6c4055bd0a
commit b6208b0e6d
1 changed files with 1 additions and 1 deletions

View File

@ -44,9 +44,9 @@ uint8_t spi_transfer_byte(spi_t *spi, uint8_t output) {
} }
_delay_us(10); _delay_us(10);
set_line(&spi->clock); set_line(&spi->clock);
_delay_us(10);
input_bit = read_line(&spi->data_in); input_bit = read_line(&spi->data_in);
input = (input << 1) | input_bit; input = (input << 1) | input_bit;
_delay_us(10);
} }
clear_line(&spi->clock); clear_line(&spi->clock);
_delay_us(10); _delay_us(10);