| * Copyright (c) 2018 STMicroelectronics |
| * SPDX-License-Identifier: Apache-2.0 |
| /* Minimal ring buffer implementation */ |
| /* Device constant configuration parameters */ |
| const struct stm32_pclken *pclken; |
| const struct pinctrl_dev_config *pcfg; |
| void (*irq_config)(const struct device *dev); |
| const struct device *dev_dma; |
| struct dma_config dma_cfg; |
| struct ring_buf mem_block_queue; |
| int (*stream_start)(struct stream *, const struct device *dev); |
| void (*stream_disable)(struct stream *, const struct device *dev); |
| void (*queue_drop)(struct stream *); |
| /* Device run time data */ |
| /* checks that DMA Tx packet is fully transmitted over the I2S */ |
| static inline uint32_t ll_func_i2s_dma_busy(SPI_TypeDef *i2s) |
| #if DT_HAS_COMPAT_STATUS_OKAY(st_stm32h7_i2s) |
| return LL_SPI_IsActiveFlag_TXC(i2s) == 0; |
| /* the I2S Tx empty and busy flags are needed */ |
| return (LL_SPI_IsActiveFlag_TXE(i2s) && |
| !LL_SPI_IsActiveFlag_BSY(i2s)); |
| #endif /* _STM32_I2S_H_ */ |