Skip to content

Commit

Permalink
drivers: spi: stm32 spi driver using ll_func as defined in the header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FRASTM authored and carlescufi committed Dec 20, 2021
1 parent 4f8f55e commit 188c8c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi_ll_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 188c8c4

Please sign in to comment.