stm32h7: spi: Use TXC instead of EOT
Check the TXC flag instead of EOT for the case of endless transactions (TSIZE = 0), which in this case is always as the stm32 SPI driver doesn't set TSIZE. Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
This commit is contained in:
parent
d4e1b186ee
commit
d434693c15
|
@ -177,7 +177,11 @@ static inline void ll_func_disable_int_errors(SPI_TypeDef *spi)
|
|||
static inline uint32_t ll_func_spi_is_busy(SPI_TypeDef *spi)
|
||||
{
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32h7_spi)
|
||||
return LL_SPI_IsActiveFlag_EOT(spi);
|
||||
if (LL_SPI_GetTransferSize(spi) == 0) {
|
||||
return LL_SPI_IsActiveFlag_TXC(spi) == 0;
|
||||
} else {
|
||||
return LL_SPI_IsActiveFlag_EOT(spi) == 0;
|
||||
}
|
||||
#else
|
||||
return LL_SPI_IsActiveFlag_BSY(spi);
|
||||
#endif /* st_stm32h7_spi */
|
||||
|
|
Loading…
Reference in a new issue