STM32F4xx HAL Driver
master
STM32CubeF4 HAL / LL Drivers API Reference
Toggle main menu visibility
Loading...
Searching...
No Matches
stm32f4xx_hal_i2s_ex.h
Go to the documentation of this file.
1
18
19
/* Define to prevent recursive inclusion -------------------------------------*/
20
#ifndef STM32F4xx_HAL_I2S_EX_H
21
#define STM32F4xx_HAL_I2S_EX_H
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
/* Includes ------------------------------------------------------------------*/
28
#include "
stm32f4xx_hal_def.h
"
29
33
#if defined(SPI_I2S_FULLDUPLEX_SUPPORT)
37
38
/* Exported types ------------------------------------------------------------*/
39
/* Exported constants --------------------------------------------------------*/
40
/* Exported macros -----------------------------------------------------------*/
44
45
#define I2SxEXT(__INSTANCE__) ((__INSTANCE__) == (SPI2)? (SPI_TypeDef *)(I2S2ext_BASE): (SPI_TypeDef *)(I2S3ext_BASE))
46
51
#define __HAL_I2SEXT_ENABLE(__HANDLE__) (I2SxEXT((__HANDLE__)->Instance)->I2SCFGR |= SPI_I2SCFGR_I2SE)
52
#define __HAL_I2SEXT_DISABLE(__HANDLE__) (I2SxEXT((__HANDLE__)->Instance)->I2SCFGR &= ~SPI_I2SCFGR_I2SE)
53
63
#define __HAL_I2SEXT_ENABLE_IT(__HANDLE__, __INTERRUPT__) (I2SxEXT((__HANDLE__)->Instance)->CR2 |= (__INTERRUPT__))
64
#define __HAL_I2SEXT_DISABLE_IT(__HANDLE__, __INTERRUPT__) (I2SxEXT((__HANDLE__)->Instance)->CR2 &= ~(__INTERRUPT__))
65
76
#define __HAL_I2SEXT_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((I2SxEXT((__HANDLE__)->Instance)->CR2\
77
& (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
78
92
#define __HAL_I2SEXT_GET_FLAG(__HANDLE__, __FLAG__) (((I2SxEXT((__HANDLE__)->Instance)->SR) & (__FLAG__)) == (__FLAG__))
93
98
#define __HAL_I2SEXT_CLEAR_OVRFLAG(__HANDLE__) do{ \
99
__IO uint32_t tmpreg_ovr = 0x00U; \
100
tmpreg_ovr = I2SxEXT((__HANDLE__)->Instance)->DR;\
101
tmpreg_ovr = I2SxEXT((__HANDLE__)->Instance)->SR;\
102
UNUSED(tmpreg_ovr); \
103
}while(0U)
108
#define __HAL_I2SEXT_CLEAR_UDRFLAG(__HANDLE__) do{ \
109
__IO uint32_t tmpreg_udr = 0x00U; \
110
tmpreg_udr = I2SxEXT((__HANDLE__)->Instance)->SR;\
111
UNUSED(tmpreg_udr); \
112
}while(0U)
117
#define __HAL_I2SEXT_FLUSH_RX_DR(__HANDLE__) do{ \
118
__IO uint32_t tmpreg_dr = 0x00U; \
119
tmpreg_dr = I2SxEXT((__HANDLE__)->Instance)->DR; \
120
tmpreg_dr = ((__HANDLE__)->Instance->DR); \
121
UNUSED(tmpreg_dr); \
122
}while(0U)
126
127
/* Exported functions --------------------------------------------------------*/
131
135
136
/* Extended features functions *************************************************/
137
/* Blocking mode: Polling */
138
HAL_StatusTypeDef
HAL_I2SEx_TransmitReceive(
I2S_HandleTypeDef
*hi2s, uint16_t *pTxData, uint16_t *pRxData,
139
uint16_t Size, uint32_t Timeout);
140
/* Non-Blocking mode: Interrupt */
141
HAL_StatusTypeDef
HAL_I2SEx_TransmitReceive_IT(
I2S_HandleTypeDef
*hi2s, uint16_t *pTxData, uint16_t *pRxData,
142
uint16_t Size);
143
/* Non-Blocking mode: DMA */
144
HAL_StatusTypeDef
HAL_I2SEx_TransmitReceive_DMA(
I2S_HandleTypeDef
*hi2s, uint16_t *pTxData, uint16_t *pRxData,
145
uint16_t Size);
146
/* I2S IRQHandler and Callbacks used in non blocking modes (Interrupt and DMA) */
147
void
HAL_I2SEx_FullDuplex_IRQHandler(
I2S_HandleTypeDef
*hi2s);
148
void
HAL_I2SEx_TxRxHalfCpltCallback(
I2S_HandleTypeDef
*hi2s);
149
void
HAL_I2SEx_TxRxCpltCallback(
I2S_HandleTypeDef
*hi2s);
153
157
/* Private types -------------------------------------------------------------*/
158
/* Private variables ---------------------------------------------------------*/
159
/* Private constants ---------------------------------------------------------*/
160
/* Private macros ------------------------------------------------------------*/
161
165
166
/* Private functions ---------------------------------------------------------*/
167
171
172
#endif
/* SPI_I2S_FULLDUPLEX_SUPPORT */
176
177
#ifdef __cplusplus
178
}
179
#endif
180
181
182
#endif
/* STM32F4xx_HAL_I2S_EX_H */
183
I2S_HandleTypeDef
struct __I2S_HandleTypeDef I2S_HandleTypeDef
I2S handle Structure definition.
stm32f4xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition.
Definition
stm32f4xx_hal_def.h:39
hal-driver
Inc
stm32f4xx_hal_i2s_ex.h
Generated by
1.17.0