Go to the documentation of this file.
21 #ifndef STM32F7xx_HAL_SMARTCARD_EX_H
22 #define STM32F7xx_HAL_SMARTCARD_EX_H
49 #if defined(USART_TCBGT_SUPPORT)
50 #define SMARTCARD_TCBGT SMARTCARD_IT_TCBGT
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
80 #if defined(USART_TCBGT_SUPPORT)
81 #define SMARTCARD_FLAG_TCBGT USART_ISR_TCBGT
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
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
142 #define SMARTCARD_CLEAR_RTOF USART_ICR_RTOCF
143 #define SMARTCARD_CLEAR_EOBF USART_ICR_EOBCF
164 #if defined(USART_TCBGT_SUPPORT)
165 #define SMARTCARD_TRANSMISSION_COMPLETION_SETTING(__HANDLE__) \
167 if (HAL_IS_BIT_CLR((__HANDLE__)->AdvancedInit.AdvFeatureInit, SMARTCARD_ADVFEATURE_TXCOMPLETION)) \
169 (__HANDLE__)->AdvancedInit.TxCompletionIndication = SMARTCARD_TC; \
173 assert_param(IS_SMARTCARD_TRANSMISSION_COMPLETION((__HANDLE__)->AdvancedInit.TxCompletionIndication)); \
177 #define SMARTCARD_TRANSMISSION_COMPLETION_SETTING(__HANDLE__) \
179 (__HANDLE__)->AdvancedInit.TxCompletionIndication = SMARTCARD_TC; \
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))
194 #define SMARTCARD_TRANSMISSION_COMPLETION_FLAG(__HANDLE__) (SMARTCARD_FLAG_TC)
202 #if defined(USART_TCBGT_SUPPORT)
203 #define IS_SMARTCARD_TRANSMISSION_COMPLETION(__TXCOMPLETE__) (((__TXCOMPLETE__) == SMARTCARD_TCBGT) || \
204 ((__TXCOMPLETE__) == SMARTCARD_TC))
206 #define IS_SMARTCARD_TRANSMISSION_COMPLETION(__TXCOMPLETE__) ((__TXCOMPLETE__) == SMARTCARD_TC)
HAL_StatusTypeDef
HAL Status structures definition
void HAL_SMARTCARDEx_BlockLength_Config(SMARTCARD_HandleTypeDef *hsmartcard, uint8_t BlockLength)
HAL_StatusTypeDef HAL_SMARTCARDEx_DisableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsmartcard)
HAL_StatusTypeDef HAL_SMARTCARDEx_EnableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsmartcard)
SMARTCARD handle Structure definition.
This file contains HAL common defines, enumeration, macros and structures definitions.
void HAL_SMARTCARDEx_TimeOut_Config(SMARTCARD_HandleTypeDef *hsmartcard, uint32_t TimeOutValue)