stm32f7xx_hal_smartcard_ex.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32F7xx_HAL_SMARTCARD_EX_H
22 #define STM32F7xx_HAL_SMARTCARD_EX_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f7xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
40 /* Exported constants --------------------------------------------------------*/
41 
49 #if defined(USART_TCBGT_SUPPORT)
50 #define SMARTCARD_TCBGT SMARTCARD_IT_TCBGT
51 #endif /* USART_TCBGT_SUPPORT */
52 #define SMARTCARD_TC SMARTCARD_IT_TC
60 #define SMARTCARD_ADVFEATURE_NO_INIT 0x00000000U
61 #define SMARTCARD_ADVFEATURE_TXINVERT_INIT 0x00000001U
62 #define SMARTCARD_ADVFEATURE_RXINVERT_INIT 0x00000002U
63 #define SMARTCARD_ADVFEATURE_DATAINVERT_INIT 0x00000004U
64 #define SMARTCARD_ADVFEATURE_SWAP_INIT 0x00000008U
65 #define SMARTCARD_ADVFEATURE_RXOVERRUNDISABLE_INIT 0x00000010U
66 #define SMARTCARD_ADVFEATURE_DMADISABLEONERROR_INIT 0x00000020U
67 #define SMARTCARD_ADVFEATURE_MSBFIRST_INIT 0x00000080U
68 #if defined(USART_TCBGT_SUPPORT)
69 #define SMARTCARD_ADVFEATURE_TXCOMPLETION 0x00000100U
70 #endif /* USART_TCBGT_SUPPORT */
71 
80 #if defined(USART_TCBGT_SUPPORT)
81 #define SMARTCARD_FLAG_TCBGT USART_ISR_TCBGT
82 #endif /* USART_TCBGT_SUPPORT */
83 #define SMARTCARD_FLAG_TEACK USART_ISR_TEACK
84 #define SMARTCARD_FLAG_BUSY USART_ISR_BUSY
85 #define SMARTCARD_FLAG_EOBF USART_ISR_EOBF
86 #define SMARTCARD_FLAG_RTOF USART_ISR_RTOF
87 #define SMARTCARD_FLAG_TXE USART_ISR_TXE
88 #define SMARTCARD_FLAG_TC USART_ISR_TC
89 #define SMARTCARD_FLAG_RXNE USART_ISR_RXNE
90 #define SMARTCARD_FLAG_IDLE USART_ISR_IDLE
91 #define SMARTCARD_FLAG_ORE USART_ISR_ORE
92 #define SMARTCARD_FLAG_NE USART_ISR_NE
93 #define SMARTCARD_FLAG_FE USART_ISR_FE
94 #define SMARTCARD_FLAG_PE USART_ISR_PE
109 #define SMARTCARD_IT_PE 0x0028U
110 #define SMARTCARD_IT_TXE 0x0727U
111 #define SMARTCARD_IT_TC 0x0626U
112 #define SMARTCARD_IT_RXNE 0x0525U
113 #define SMARTCARD_IT_IDLE 0x0424U
115 #define SMARTCARD_IT_ERR 0x0060U
116 #define SMARTCARD_IT_ORE 0x0300U
117 #define SMARTCARD_IT_NE 0x0200U
118 #define SMARTCARD_IT_FE 0x0100U
120 #define SMARTCARD_IT_EOB 0x0C3BU
121 #define SMARTCARD_IT_RTO 0x0B3AU
122 #if defined(USART_TCBGT_SUPPORT)
123 #define SMARTCARD_IT_TCBGT 0x1978U
124 #endif /* USART_TCBGT_SUPPORT */
125 
133 #define SMARTCARD_CLEAR_PEF USART_ICR_PECF
134 #define SMARTCARD_CLEAR_FEF USART_ICR_FECF
135 #define SMARTCARD_CLEAR_NEF USART_ICR_NCF
136 #define SMARTCARD_CLEAR_OREF USART_ICR_ORECF
137 #define SMARTCARD_CLEAR_IDLEF USART_ICR_IDLECF
138 #define SMARTCARD_CLEAR_TCF USART_ICR_TCCF
139 #if defined(USART_TCBGT_SUPPORT)
140 #define SMARTCARD_CLEAR_TCBGTF USART_ICR_TCBGTCF
141 #endif /* USART_TCBGT_SUPPORT */
142 #define SMARTCARD_CLEAR_RTOF USART_ICR_RTOCF
143 #define SMARTCARD_CLEAR_EOBF USART_ICR_EOBCF
151 /* Exported macros -----------------------------------------------------------*/
152 /* Private macros ------------------------------------------------------------*/
164 #if defined(USART_TCBGT_SUPPORT)
165 #define SMARTCARD_TRANSMISSION_COMPLETION_SETTING(__HANDLE__) \
166  do { \
167  if (HAL_IS_BIT_CLR((__HANDLE__)->AdvancedInit.AdvFeatureInit, SMARTCARD_ADVFEATURE_TXCOMPLETION)) \
168  { \
169  (__HANDLE__)->AdvancedInit.TxCompletionIndication = SMARTCARD_TC; \
170  } \
171  else \
172  { \
173  assert_param(IS_SMARTCARD_TRANSMISSION_COMPLETION((__HANDLE__)->AdvancedInit.TxCompletionIndication)); \
174  } \
175  } while(0U)
176 #else
177 #define SMARTCARD_TRANSMISSION_COMPLETION_SETTING(__HANDLE__) \
178  do { \
179  (__HANDLE__)->AdvancedInit.TxCompletionIndication = SMARTCARD_TC; \
180  } while(0U)
181 #endif /* USART_TCBGT_SUPPORT */
182 
190 #if defined(USART_TCBGT_SUPPORT)
191 #define SMARTCARD_TRANSMISSION_COMPLETION_FLAG(__HANDLE__) \
192  (((__HANDLE__)->AdvancedInit.TxCompletionIndication == SMARTCARD_TC) ? (SMARTCARD_FLAG_TC) : (SMARTCARD_FLAG_TCBGT))
193 #else
194 #define SMARTCARD_TRANSMISSION_COMPLETION_FLAG(__HANDLE__) (SMARTCARD_FLAG_TC)
195 #endif /* USART_TCBGT_SUPPORT */
196 
197 
202 #if defined(USART_TCBGT_SUPPORT)
203 #define IS_SMARTCARD_TRANSMISSION_COMPLETION(__TXCOMPLETE__) (((__TXCOMPLETE__) == SMARTCARD_TCBGT) || \
204  ((__TXCOMPLETE__) == SMARTCARD_TC))
205 #else
206 #define IS_SMARTCARD_TRANSMISSION_COMPLETION(__TXCOMPLETE__) ((__TXCOMPLETE__) == SMARTCARD_TC)
207 #endif /* USART_TCBGT_SUPPORT */
208 
213 /* Exported functions --------------------------------------------------------*/
218 /* Initialization and de-initialization functions ****************************/
219 /* IO operation methods *******************************************************/
220 
225 /* Peripheral Control functions ***********************************************/
226 void HAL_SMARTCARDEx_BlockLength_Config(SMARTCARD_HandleTypeDef *hsmartcard, uint8_t BlockLength);
227 void HAL_SMARTCARDEx_TimeOut_Config(SMARTCARD_HandleTypeDef *hsmartcard, uint32_t TimeOutValue);
230 
235 /* Exported functions --------------------------------------------------------*/
240 /* IO operation functions *****************************************************/
241 
251 /* Private functions ---------------------------------------------------------*/
252 
261 #ifdef __cplusplus
262 }
263 #endif
264 
265 #endif /* STM32F7xx_HAL_SMARTCARD_EX_H */
266 
267 /************************ (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
HAL_SMARTCARDEx_BlockLength_Config
void HAL_SMARTCARDEx_BlockLength_Config(SMARTCARD_HandleTypeDef *hsmartcard, uint8_t BlockLength)
HAL_SMARTCARDEx_DisableReceiverTimeOut
HAL_StatusTypeDef HAL_SMARTCARDEx_DisableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsmartcard)
HAL_SMARTCARDEx_EnableReceiverTimeOut
HAL_StatusTypeDef HAL_SMARTCARDEx_EnableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsmartcard)
__SMARTCARD_HandleTypeDef
SMARTCARD handle Structure definition.
Definition: stm32f4xx_hal_smartcard.h:154
stm32f7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_SMARTCARDEx_TimeOut_Config
void HAL_SMARTCARDEx_TimeOut_Config(SMARTCARD_HandleTypeDef *hsmartcard, uint32_t TimeOutValue)


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