Adjust the timing around reading the SPI line
This commit is contained in:
parent
6c4055bd0a
commit
b6208b0e6d
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue