Go to the documentation of this file.
21 #ifndef STM32F7xx_HAL_SMARTCARD_H
22 #define STM32F7xx_HAL_SMARTCARD_H
230 #if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
250 #if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
256 HAL_SMARTCARD_TX_COMPLETE_CB_ID = 0x00U,
257 HAL_SMARTCARD_RX_COMPLETE_CB_ID = 0x01U,
258 HAL_SMARTCARD_ERROR_CB_ID = 0x02U,
259 HAL_SMARTCARD_ABORT_COMPLETE_CB_ID = 0x03U,
260 HAL_SMARTCARD_ABORT_TRANSMIT_COMPLETE_CB_ID = 0x04U,
261 HAL_SMARTCARD_ABORT_RECEIVE_COMPLETE_CB_ID = 0x05U,
263 HAL_SMARTCARD_MSPINIT_CB_ID = 0x08U,
264 HAL_SMARTCARD_MSPDEINIT_CB_ID = 0x09U
266 } HAL_SMARTCARD_CallbackIDTypeDef;
300 #define HAL_SMARTCARD_STATE_RESET 0x00000000U
302 #define HAL_SMARTCARD_STATE_READY 0x00000020U
304 #define HAL_SMARTCARD_STATE_BUSY 0x00000024U
306 #define HAL_SMARTCARD_STATE_BUSY_TX 0x00000021U
308 #define HAL_SMARTCARD_STATE_BUSY_RX 0x00000022U
310 #define HAL_SMARTCARD_STATE_BUSY_TX_RX 0x00000023U
313 #define HAL_SMARTCARD_STATE_TIMEOUT 0x000000A0U
315 #define HAL_SMARTCARD_STATE_ERROR 0x000000E0U
324 #define HAL_SMARTCARD_ERROR_NONE ((uint32_t)0x00000000U)
325 #define HAL_SMARTCARD_ERROR_PE ((uint32_t)0x00000001U)
326 #define HAL_SMARTCARD_ERROR_NE ((uint32_t)0x00000002U)
327 #define HAL_SMARTCARD_ERROR_FE ((uint32_t)0x00000004U)
328 #define HAL_SMARTCARD_ERROR_ORE ((uint32_t)0x00000008U)
329 #define HAL_SMARTCARD_ERROR_DMA ((uint32_t)0x00000010U)
330 #define HAL_SMARTCARD_ERROR_RTO ((uint32_t)0x00000020U)
331 #if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
332 #define HAL_SMARTCARD_ERROR_INVALID_CALLBACK ((uint32_t)0x00000040U)
341 #define SMARTCARD_WORDLENGTH_9B USART_CR1_M0
349 #define SMARTCARD_STOPBITS_0_5 USART_CR2_STOP_0
350 #define SMARTCARD_STOPBITS_1_5 USART_CR2_STOP
358 #define SMARTCARD_PARITY_EVEN USART_CR1_PCE
359 #define SMARTCARD_PARITY_ODD (USART_CR1_PCE | USART_CR1_PS)
367 #define SMARTCARD_MODE_RX USART_CR1_RE
368 #define SMARTCARD_MODE_TX USART_CR1_TE
369 #define SMARTCARD_MODE_TX_RX (USART_CR1_TE |USART_CR1_RE)
377 #define SMARTCARD_POLARITY_LOW 0x00000000U
378 #define SMARTCARD_POLARITY_HIGH USART_CR2_CPOL
386 #define SMARTCARD_PHASE_1EDGE 0x00000000U
387 #define SMARTCARD_PHASE_2EDGE USART_CR2_CPHA
395 #define SMARTCARD_LASTBIT_DISABLE 0x00000000U
396 #define SMARTCARD_LASTBIT_ENABLE USART_CR2_LBCL
404 #define SMARTCARD_ONE_BIT_SAMPLE_DISABLE 0x00000000U
405 #define SMARTCARD_ONE_BIT_SAMPLE_ENABLE USART_CR3_ONEBIT
413 #define SMARTCARD_NACK_DISABLE 0x00000000U
414 #define SMARTCARD_NACK_ENABLE USART_CR3_NACK
422 #define SMARTCARD_TIMEOUT_DISABLE 0x00000000U
423 #define SMARTCARD_TIMEOUT_ENABLE USART_CR2_RTOEN
431 #define SMARTCARD_ADVFEATURE_TXINV_DISABLE 0x00000000U
432 #define SMARTCARD_ADVFEATURE_TXINV_ENABLE USART_CR2_TXINV
440 #define SMARTCARD_ADVFEATURE_RXINV_DISABLE 0x00000000U
441 #define SMARTCARD_ADVFEATURE_RXINV_ENABLE USART_CR2_RXINV
449 #define SMARTCARD_ADVFEATURE_DATAINV_DISABLE 0x00000000U
450 #define SMARTCARD_ADVFEATURE_DATAINV_ENABLE USART_CR2_DATAINV
458 #define SMARTCARD_ADVFEATURE_SWAP_DISABLE 0x00000000U
459 #define SMARTCARD_ADVFEATURE_SWAP_ENABLE USART_CR2_SWAP
467 #define SMARTCARD_ADVFEATURE_OVERRUN_ENABLE 0x00000000U
468 #define SMARTCARD_ADVFEATURE_OVERRUN_DISABLE USART_CR3_OVRDIS
476 #define SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR 0x00000000U
477 #define SMARTCARD_ADVFEATURE_DMA_DISABLEONRXERROR USART_CR3_DDRE
485 #define SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE 0x00000000U
486 #define SMARTCARD_ADVFEATURE_MSBFIRST_ENABLE USART_CR2_MSBFIRST
494 #define SMARTCARD_RXDATA_FLUSH_REQUEST USART_RQR_RXFRQ
495 #define SMARTCARD_TXDATA_FLUSH_REQUEST USART_RQR_TXFRQ
503 #define SMARTCARD_IT_MASK 0x001FU
504 #define SMARTCARD_CR_MASK 0x00E0U
505 #define SMARTCARD_CR_POS 5U
506 #define SMARTCARD_ISR_MASK 0x1F00U
507 #define SMARTCARD_ISR_POS 8U
525 #if USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1
526 #define __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__) do{ \
527 (__HANDLE__)->gState = HAL_SMARTCARD_STATE_RESET; \
528 (__HANDLE__)->RxState = HAL_SMARTCARD_STATE_RESET; \
529 (__HANDLE__)->MspInitCallback = NULL; \
530 (__HANDLE__)->MspDeInitCallback = NULL; \
533 #define __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__) do{ \
534 (__HANDLE__)->gState = HAL_SMARTCARD_STATE_RESET; \
535 (__HANDLE__)->RxState = HAL_SMARTCARD_STATE_RESET; \
543 #define __HAL_SMARTCARD_FLUSH_DRREGISTER(__HANDLE__) \
545 SET_BIT((__HANDLE__)->Instance->RQR, SMARTCARD_RXDATA_FLUSH_REQUEST); \
546 SET_BIT((__HANDLE__)->Instance->RQR, SMARTCARD_TXDATA_FLUSH_REQUEST); \
564 #define __HAL_SMARTCARD_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
570 #define __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_PEF)
576 #define __HAL_SMARTCARD_CLEAR_FEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_FEF)
582 #define __HAL_SMARTCARD_CLEAR_NEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_NEF)
588 #define __HAL_SMARTCARD_CLEAR_OREFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_OREF)
594 #define __HAL_SMARTCARD_CLEAR_IDLEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_IDLEF)
615 #define __HAL_SMARTCARD_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
632 #define __HAL_SMARTCARD_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((((__INTERRUPT__) & SMARTCARD_CR_MASK) >> SMARTCARD_CR_POS) == 1U)? ((__HANDLE__)->Instance->CR1 |= ((uint32_t)1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
633 ((((__INTERRUPT__) & SMARTCARD_CR_MASK) >> SMARTCARD_CR_POS) == 2U)? ((__HANDLE__)->Instance->CR2 |= ((uint32_t)1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
634 ((__HANDLE__)->Instance->CR3 |= ((uint32_t)1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))))
651 #define __HAL_SMARTCARD_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((((__INTERRUPT__) & SMARTCARD_CR_MASK) >> SMARTCARD_CR_POS) == 1U)? ((__HANDLE__)->Instance->CR1 &= ~ ((uint32_t)1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
652 ((((__INTERRUPT__) & SMARTCARD_CR_MASK) >> SMARTCARD_CR_POS) == 2U)? ((__HANDLE__)->Instance->CR2 &= ~ ((uint32_t)1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
653 ((__HANDLE__)->Instance->CR3 &= ~ ((uint32_t)1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))))
670 #define __HAL_SMARTCARD_GET_IT(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->ISR\
671 & ((uint32_t)0x01U << (((__INTERRUPT__) & SMARTCARD_ISR_MASK)>> SMARTCARD_ISR_POS))) != 0U) ? SET : RESET)
688 #define __HAL_SMARTCARD_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((((((__INTERRUPT__) & SMARTCARD_CR_MASK) >> SMARTCARD_CR_POS) == 0x01U)? (__HANDLE__)->Instance->CR1 : \
689 (((((__INTERRUPT__) & SMARTCARD_CR_MASK) >> SMARTCARD_CR_POS) == 0x02U)? (__HANDLE__)->Instance->CR2 : \
690 (__HANDLE__)->Instance->CR3)) & ((uint32_t)0x01U << (((uint16_t)(__INTERRUPT__)) & SMARTCARD_IT_MASK))) != 0U) ? SET : RESET)
708 #define __HAL_SMARTCARD_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR |= (uint32_t)(__IT_CLEAR__))
718 #define __HAL_SMARTCARD_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))
724 #define __HAL_SMARTCARD_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
730 #define __HAL_SMARTCARD_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3\
731 &= (uint32_t)~((uint32_t)USART_CR3_ONEBIT))
737 #define __HAL_SMARTCARD_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
743 #define __HAL_SMARTCARD_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
759 #define SMARTCARD_GETCLOCKSOURCE(__HANDLE__, __CLOCKSOURCE__) \
761 if((__HANDLE__)->Instance == USART1) \
763 switch(__HAL_RCC_GET_USART1_SOURCE()) \
765 case RCC_USART1CLKSOURCE_PCLK2: \
766 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2; \
768 case RCC_USART1CLKSOURCE_HSI: \
769 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
771 case RCC_USART1CLKSOURCE_SYSCLK: \
772 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
774 case RCC_USART1CLKSOURCE_LSE: \
775 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
778 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
782 else if((__HANDLE__)->Instance == USART2) \
784 switch(__HAL_RCC_GET_USART2_SOURCE()) \
786 case RCC_USART2CLKSOURCE_PCLK1: \
787 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
789 case RCC_USART2CLKSOURCE_HSI: \
790 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
792 case RCC_USART2CLKSOURCE_SYSCLK: \
793 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
795 case RCC_USART2CLKSOURCE_LSE: \
796 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
799 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
803 else if((__HANDLE__)->Instance == USART3) \
805 switch(__HAL_RCC_GET_USART3_SOURCE()) \
807 case RCC_USART3CLKSOURCE_PCLK1: \
808 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1; \
810 case RCC_USART3CLKSOURCE_HSI: \
811 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
813 case RCC_USART3CLKSOURCE_SYSCLK: \
814 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
816 case RCC_USART3CLKSOURCE_LSE: \
817 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
820 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
824 else if((__HANDLE__)->Instance == USART6) \
826 switch(__HAL_RCC_GET_USART6_SOURCE()) \
828 case RCC_USART6CLKSOURCE_PCLK2: \
829 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2; \
831 case RCC_USART6CLKSOURCE_HSI: \
832 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
834 case RCC_USART6CLKSOURCE_SYSCLK: \
835 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK; \
837 case RCC_USART6CLKSOURCE_LSE: \
838 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
841 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
847 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
857 #define IS_SMARTCARD_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 13500001U)
864 #define IS_SMARTCARD_BLOCKLENGTH(__LENGTH__) ((__LENGTH__) <= 0xFFU)
871 #define IS_SMARTCARD_TIMEOUT_VALUE(__TIMEOUTVALUE__) ((__TIMEOUTVALUE__) <= 0xFFFFFFU)
878 #define IS_SMARTCARD_AUTORETRY_COUNT(__COUNT__) ((__COUNT__) <= 0x7U)
884 #define IS_SMARTCARD_WORD_LENGTH(__LENGTH__) ((__LENGTH__) == SMARTCARD_WORDLENGTH_9B)
890 #define IS_SMARTCARD_STOPBITS(__STOPBITS__) (((__STOPBITS__) == SMARTCARD_STOPBITS_0_5) ||\
891 ((__STOPBITS__) == SMARTCARD_STOPBITS_1_5))
897 #define IS_SMARTCARD_PARITY(__PARITY__) (((__PARITY__) == SMARTCARD_PARITY_EVEN) || \
898 ((__PARITY__) == SMARTCARD_PARITY_ODD))
904 #define IS_SMARTCARD_MODE(__MODE__) ((((__MODE__) & 0xFFF3U) == 0x00U) && ((__MODE__) != 0x00U))
910 #define IS_SMARTCARD_POLARITY(__CPOL__) (((__CPOL__) == SMARTCARD_POLARITY_LOW)\
911 || ((__CPOL__) == SMARTCARD_POLARITY_HIGH))
917 #define IS_SMARTCARD_PHASE(__CPHA__) (((__CPHA__) == SMARTCARD_PHASE_1EDGE) || ((__CPHA__) == SMARTCARD_PHASE_2EDGE))
923 #define IS_SMARTCARD_LASTBIT(__LASTBIT__) (((__LASTBIT__) == SMARTCARD_LASTBIT_DISABLE) || \
924 ((__LASTBIT__) == SMARTCARD_LASTBIT_ENABLE))
930 #define IS_SMARTCARD_ONE_BIT_SAMPLE(__ONEBIT__) (((__ONEBIT__) == SMARTCARD_ONE_BIT_SAMPLE_DISABLE) || \
931 ((__ONEBIT__) == SMARTCARD_ONE_BIT_SAMPLE_ENABLE))
937 #define IS_SMARTCARD_NACK(__NACK__) (((__NACK__) == SMARTCARD_NACK_ENABLE) || \
938 ((__NACK__) == SMARTCARD_NACK_DISABLE))
944 #define IS_SMARTCARD_TIMEOUT(__TIMEOUT__) (((__TIMEOUT__) == SMARTCARD_TIMEOUT_DISABLE) || \
945 ((__TIMEOUT__) == SMARTCARD_TIMEOUT_ENABLE))
951 #define IS_SMARTCARD_ADVFEATURE_INIT(__INIT__) ((__INIT__) <= (SMARTCARD_ADVFEATURE_NO_INIT | \
952 SMARTCARD_ADVFEATURE_TXINVERT_INIT | \
953 SMARTCARD_ADVFEATURE_RXINVERT_INIT | \
954 SMARTCARD_ADVFEATURE_DATAINVERT_INIT | \
955 SMARTCARD_ADVFEATURE_SWAP_INIT | \
956 SMARTCARD_ADVFEATURE_RXOVERRUNDISABLE_INIT | \
957 SMARTCARD_ADVFEATURE_DMADISABLEONERROR_INIT | \
958 SMARTCARD_ADVFEATURE_MSBFIRST_INIT))
964 #define IS_SMARTCARD_ADVFEATURE_TXINV(__TXINV__) (((__TXINV__) == SMARTCARD_ADVFEATURE_TXINV_DISABLE) || \
965 ((__TXINV__) == SMARTCARD_ADVFEATURE_TXINV_ENABLE))
971 #define IS_SMARTCARD_ADVFEATURE_RXINV(__RXINV__) (((__RXINV__) == SMARTCARD_ADVFEATURE_RXINV_DISABLE) || \
972 ((__RXINV__) == SMARTCARD_ADVFEATURE_RXINV_ENABLE))
978 #define IS_SMARTCARD_ADVFEATURE_DATAINV(__DATAINV__) (((__DATAINV__) == SMARTCARD_ADVFEATURE_DATAINV_DISABLE) || \
979 ((__DATAINV__) == SMARTCARD_ADVFEATURE_DATAINV_ENABLE))
985 #define IS_SMARTCARD_ADVFEATURE_SWAP(__SWAP__) (((__SWAP__) == SMARTCARD_ADVFEATURE_SWAP_DISABLE) || \
986 ((__SWAP__) == SMARTCARD_ADVFEATURE_SWAP_ENABLE))
992 #define IS_SMARTCARD_OVERRUN(__OVERRUN__) (((__OVERRUN__) == SMARTCARD_ADVFEATURE_OVERRUN_ENABLE) || \
993 ((__OVERRUN__) == SMARTCARD_ADVFEATURE_OVERRUN_DISABLE))
999 #define IS_SMARTCARD_ADVFEATURE_DMAONRXERROR(__DMA__) (((__DMA__) == SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR) || \
1000 ((__DMA__) == SMARTCARD_ADVFEATURE_DMA_DISABLEONRXERROR))
1006 #define IS_SMARTCARD_ADVFEATURE_MSBFIRST(__MSBFIRST__) (((__MSBFIRST__) == SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE) || \
1007 ((__MSBFIRST__) == SMARTCARD_ADVFEATURE_MSBFIRST_ENABLE))
1013 #define IS_SMARTCARD_REQUEST_PARAMETER(__PARAM__) (((__PARAM__) == SMARTCARD_RXDATA_FLUSH_REQUEST) || \
1014 ((__PARAM__) == SMARTCARD_TXDATA_FLUSH_REQUEST))
1038 #if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1041 HAL_SMARTCARD_CallbackIDTypeDef CallbackID, pSMARTCARD_CallbackTypeDef pCallback);
1043 HAL_SMARTCARD_CallbackIDTypeDef CallbackID);
Header file of SMARTCARD HAL Extended module.
__IO uint16_t RxXferCount
__IO HAL_SMARTCARD_StateTypeDef gState
HAL_StatusTypeDef
HAL Status structures definition
Universal Synchronous Asynchronous Receiver Transmitter.
HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout)
DMA handle Structure definition.
SMARTCARD_AdvFeatureInitTypeDef AdvancedInit
void HAL_SMARTCARD_AbortReceiveCpltCallback(SMARTCARD_HandleTypeDef *hsc)
void HAL_SMARTCARD_MspDeInit(SMARTCARD_HandleTypeDef *hsc)
HAL_SMARTCARD_StateTypeDef HAL_SMARTCARD_GetState(SMARTCARD_HandleTypeDef *hsmartcard)
@ SMARTCARD_CLOCKSOURCE_PCLK2
void HAL_SMARTCARD_RxCpltCallback(SMARTCARD_HandleTypeDef *hsc)
void HAL_SMARTCARD_ErrorCallback(SMARTCARD_HandleTypeDef *hsc)
HAL_StatusTypeDef HAL_SMARTCARD_Abort_IT(SMARTCARD_HandleTypeDef *hsc)
@ SMARTCARD_CLOCKSOURCE_HSI
SMARTCARD advanced features initalization structure definition.
@ SMARTCARD_CLOCKSOURCE_UNDEFINED
HAL_StatusTypeDef HAL_SMARTCARD_Transmit_DMA(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
HAL_LockTypeDef
HAL Lock structures definition
DMA_HandleTypeDef * hdmarx
uint32_t TxPinLevelInvert
@ SMARTCARD_CLOCKSOURCE_PCLK1
uint32_t HAL_SMARTCARD_GetError(SMARTCARD_HandleTypeDef *hsmartcard)
HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit(SMARTCARD_HandleTypeDef *hsc)
void(* RxISR)(struct __SMARTCARD_HandleTypeDef *huart)
HAL_StatusTypeDef HAL_SMARTCARD_Receive_IT(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
@ SMARTCARD_CLOCKSOURCE_LSE
uint32_t RxPinLevelInvert
HAL_StatusTypeDef HAL_SMARTCARD_Init(SMARTCARD_HandleTypeDef *hsc)
void HAL_SMARTCARD_AbortCpltCallback(SMARTCARD_HandleTypeDef *hsc)
SMARTCARD handle Structure definition.
void(* TxISR)(struct __SMARTCARD_HandleTypeDef *huart)
@ SMARTCARD_CLOCKSOURCE_SYSCLK
HAL_StatusTypeDef HAL_SMARTCARD_Abort(SMARTCARD_HandleTypeDef *hsc)
void HAL_SMARTCARD_AbortTransmitCpltCallback(SMARTCARD_HandleTypeDef *hsc)
SMARTCARD Init Structure definition.
HAL_StatusTypeDef HAL_SMARTCARD_Transmit_IT(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
__IO HAL_SMARTCARD_StateTypeDef RxState
HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive(SMARTCARD_HandleTypeDef *hsc)
HAL_StatusTypeDef HAL_SMARTCARD_Receive_DMA(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
HAL_StatusTypeDef HAL_SMARTCARD_Receive(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout)
HAL_SMARTCARD_StateTypeDef
HAL SMARTCARD State structures definition.
void HAL_SMARTCARD_TxCpltCallback(SMARTCARD_HandleTypeDef *hsc)
DMA_HandleTypeDef * hdmatx
This file contains HAL common defines, enumeration, macros and structures definitions.
void HAL_SMARTCARD_IRQHandler(SMARTCARD_HandleTypeDef *hsc)
HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive_IT(SMARTCARD_HandleTypeDef *hsc)
HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit_IT(SMARTCARD_HandleTypeDef *hsc)
uint16_t TxCompletionIndication
uint32_t DMADisableonRxError
__IO uint16_t TxXferCount
SMARTCARD_InitTypeDef Init
HAL_StatusTypeDef HAL_SMARTCARD_DeInit(SMARTCARD_HandleTypeDef *hsc)
void HAL_SMARTCARD_MspInit(SMARTCARD_HandleTypeDef *hsc)
struct __SMARTCARD_HandleTypeDef SMARTCARD_HandleTypeDef
SMARTCARD handle Structure definition.
uint32_t HAL_SMARTCARD_StateTypeDef
HAL SMARTCARD State definition.
SMARTCARD_ClockSourceTypeDef
SMARTCARD clock sources.