stm32f469/stm32f469i-disco/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_i2s_ex.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32F4xx_HAL_I2S_EX_H
22 #define STM32F4xx_HAL_I2S_EX_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f4xx_hal_def.h"
30 
34 #if defined(SPI_I2S_FULLDUPLEX_SUPPORT)
35 
39 /* Exported types ------------------------------------------------------------*/
40 /* Exported constants --------------------------------------------------------*/
41 /* Exported macros -----------------------------------------------------------*/
46 #define I2SxEXT(__INSTANCE__) ((__INSTANCE__) == (SPI2)? (SPI_TypeDef *)(I2S2ext_BASE): (SPI_TypeDef *)(I2S3ext_BASE))
47 
52 #define __HAL_I2SEXT_ENABLE(__HANDLE__) (I2SxEXT((__HANDLE__)->Instance)->I2SCFGR |= SPI_I2SCFGR_I2SE)
53 #define __HAL_I2SEXT_DISABLE(__HANDLE__) (I2SxEXT((__HANDLE__)->Instance)->I2SCFGR &= ~SPI_I2SCFGR_I2SE)
54 
64 #define __HAL_I2SEXT_ENABLE_IT(__HANDLE__, __INTERRUPT__) (I2SxEXT((__HANDLE__)->Instance)->CR2 |= (__INTERRUPT__))
65 #define __HAL_I2SEXT_DISABLE_IT(__HANDLE__, __INTERRUPT__) (I2SxEXT((__HANDLE__)->Instance)->CR2 &= ~(__INTERRUPT__))
66 
77 #define __HAL_I2SEXT_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((I2SxEXT((__HANDLE__)->Instance)->CR2\
78  & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
79 
93 #define __HAL_I2SEXT_GET_FLAG(__HANDLE__, __FLAG__) (((I2SxEXT((__HANDLE__)->Instance)->SR) & (__FLAG__)) == (__FLAG__))
94 
99 #define __HAL_I2SEXT_CLEAR_OVRFLAG(__HANDLE__) do{ \
100  __IO uint32_t tmpreg_ovr = 0x00U; \
101  tmpreg_ovr = I2SxEXT((__HANDLE__)->Instance)->DR;\
102  tmpreg_ovr = I2SxEXT((__HANDLE__)->Instance)->SR;\
103  UNUSED(tmpreg_ovr); \
104  }while(0U)
105 
109 #define __HAL_I2SEXT_CLEAR_UDRFLAG(__HANDLE__) do{ \
110  __IO uint32_t tmpreg_udr = 0x00U; \
111  tmpreg_udr = I2SxEXT((__HANDLE__)->Instance)->SR;\
112  UNUSED(tmpreg_udr); \
113  }while(0U)
114 
118 #define __HAL_I2SEXT_FLUSH_RX_DR(__HANDLE__) do{ \
119  __IO uint32_t tmpreg_dr = 0x00U; \
120  tmpreg_dr = I2SxEXT((__HANDLE__)->Instance)->DR; \
121  tmpreg_dr = ((__HANDLE__)->Instance->DR); \
122  UNUSED(tmpreg_dr); \
123  }while(0U)
124 
128 /* Exported functions --------------------------------------------------------*/
137 /* Extended features functions *************************************************/
138 /* Blocking mode: Polling */
139 HAL_StatusTypeDef HAL_I2SEx_TransmitReceive(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData,
140  uint16_t Size, uint32_t Timeout);
141 /* Non-Blocking mode: Interrupt */
142 HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData,
143  uint16_t Size);
144 /* Non-Blocking mode: DMA */
145 HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData,
146  uint16_t Size);
147 /* I2S IRQHandler and Callbacks used in non blocking modes (Interrupt and DMA) */
148 void HAL_I2SEx_FullDuplex_IRQHandler(I2S_HandleTypeDef *hi2s);
158 /* Private types -------------------------------------------------------------*/
159 /* Private variables ---------------------------------------------------------*/
160 /* Private constants ---------------------------------------------------------*/
161 /* Private macros ------------------------------------------------------------*/
162 
167 /* Private functions ---------------------------------------------------------*/
168 
173 #endif /* SPI_I2S_FULLDUPLEX_SUPPORT */
174 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 
183 #endif /* STM32F4xx_HAL_I2S_EX_H */
184 
185 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
I2S_HandleTypeDef
I2S handle Structure definition.
Definition: stm32f7xx_hal_i2s.h:91
HAL_I2SEx_TxRxHalfCpltCallback
void HAL_I2SEx_TxRxHalfCpltCallback(I2S_HandleTypeDef *hi2s)
stm32f4xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_I2SEx_TxRxCpltCallback
void HAL_I2SEx_TxRxCpltCallback(I2S_HandleTypeDef *hi2s)
HAL_I2SEx_TransmitReceive
HAL_StatusTypeDef HAL_I2SEx_TransmitReceive(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, uint16_t Size, uint32_t Timeout)
HAL_I2SEx_TransmitReceive_IT
HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, uint16_t Size)
HAL_I2SEx_TransmitReceive_DMA
HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, uint16_t Size)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:52