software/liblitesdcard: Add missing SPI_DONE mask on read status.
This commit is contained in:
parent
61bbfa3eaa
commit
a56a178768
|
@ -64,7 +64,7 @@ static uint8_t spi_xfer(uint8_t byte) {
|
||||||
/* Initiate SPI Xfer */
|
/* Initiate SPI Xfer */
|
||||||
spisdcard_control_write(8*SPI_LENGTH | SPI_START);
|
spisdcard_control_write(8*SPI_LENGTH | SPI_START);
|
||||||
/* Wait SPI Xfer to be done */
|
/* Wait SPI Xfer to be done */
|
||||||
while(spisdcard_status_read() != SPI_DONE);
|
while((spisdcard_status_read() & SPI_DONE) != SPI_DONE);
|
||||||
/* Read MISO and return it */
|
/* Read MISO and return it */
|
||||||
return spisdcard_miso_read();
|
return spisdcard_miso_read();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue