mirror of https://github.com/ARMmbed/mbed-os.git
[Kinetis K] K64F and K20D50M - SPI Slave read bug fix
- Spi Slave - read() needs to clear Drain Request flagpull/428/head
parent
5b145e4f6c
commit
afdeba9811
|
@ -165,6 +165,7 @@ int spi_slave_receive(spi_t *obj) {
|
|||
}
|
||||
|
||||
int spi_slave_read(spi_t *obj) {
|
||||
obj->spi->SR |= SPI_SR_RFDF_MASK;
|
||||
return obj->spi->POPR;
|
||||
}
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ int spi_slave_receive(spi_t *obj) {
|
|||
}
|
||||
|
||||
int spi_slave_read(spi_t *obj) {
|
||||
dspi_hal_clear_status_flag(obj->instance, kDspiRxFifoDrainRequest);
|
||||
return dspi_hal_read_data(obj->instance);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue