drivers: spi: stm32h7: Use a better name for ll_func_tx_is_empty

In H7, TXP indicates when its FIFO has room for, at least, one
packet. Thus, rename ll_func_tx_is_empty as ll_func_tx_is_not_full,
to be consistent in all platforms.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
This commit is contained in:
Daniel Gaston Ochoa 2023-09-09 14:38:19 +01:00 committed by Carles Cufí
parent 2effd8cce7
commit 02f46fb1f2
2 changed files with 3 additions and 3 deletions

View file

@ -302,7 +302,7 @@ static void spi_stm32_shift_m(SPI_TypeDef *spi, struct spi_stm32_data *data)
uint16_t tx_frame = SPI_STM32_TX_NOP;
uint16_t rx_frame;
while (!ll_func_tx_is_empty(spi)) {
while (!ll_func_tx_is_not_full(spi)) {
/* NOP */
}
@ -344,7 +344,7 @@ static void spi_stm32_shift_m(SPI_TypeDef *spi, struct spi_stm32_data *data)
/* Shift a SPI frame as slave. */
static void spi_stm32_shift_s(SPI_TypeDef *spi, struct spi_stm32_data *data)
{
if (ll_func_tx_is_empty(spi) && spi_context_tx_on(&data->ctx)) {
if (ll_func_tx_is_not_full(spi) && spi_context_tx_on(&data->ctx)) {
uint16_t tx_frame;
if (SPI_WORD_SIZE_GET(data->ctx.config->operation) == 8) {

View file

@ -94,7 +94,7 @@ static inline uint32_t ll_func_spi_dma_busy(SPI_TypeDef *spi)
}
#endif /* CONFIG_SPI_STM32_DMA */
static inline uint32_t ll_func_tx_is_empty(SPI_TypeDef *spi)
static inline uint32_t ll_func_tx_is_not_full(SPI_TypeDef *spi)
{
#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32h7_spi)
return LL_SPI_IsActiveFlag_TXP(spi);