From b6208b0e6dadc22caaa4d48273533b7b570f91ec Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Mon, 27 Jun 2022 20:03:15 -0400 Subject: [PATCH] Adjust the timing around reading the SPI line --- spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spi/spi.c b/spi/spi.c index 82f2bb8..00c044d 100644 --- a/spi/spi.c +++ b/spi/spi.c @@ -44,9 +44,9 @@ uint8_t spi_transfer_byte(spi_t *spi, uint8_t output) { } _delay_us(10); set_line(&spi->clock); - _delay_us(10); input_bit = read_line(&spi->data_in); input = (input << 1) | input_bit; + _delay_us(10); } clear_line(&spi->clock); _delay_us(10);