drivers: spi: stm32 spi driver using ll_func as defined in the header

Instead of checking the SPI register flags, the spi_ll_stm32.h
has dedicated functions for that purpose.
They are abstracting the STM32 registers of SPI instance.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-12-16 16:37:06 +01:00 committed by Carles Cufí
commit 188c8c47a8

View file

@ -757,11 +757,11 @@ static int transceive_dma(const struct device *dev,
#endif
/* wait until TX buffer is really empty */
while (LL_SPI_IsActiveFlag_TXE(spi) == 0) {
while (ll_func_tx_is_empty(spi) == 0) {
}
/* wait until hardware is really ready */
while (LL_SPI_IsActiveFlag_BSY(spi) == 1) {
while (ll_func_spi_is_busy(spi) == 1) {
}
LL_SPI_DisableDMAReq_TX(spi);