RTEMS 6.1-rc2
Loading...
Searching...
No Matches
stm32h7xx_hal_smartcard.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef STM32H7xx_HAL_SMARTCARD_H
21#define STM32H7xx_HAL_SMARTCARD_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32h7xx_hal_def.h"
29
38/* Exported types ------------------------------------------------------------*/
47typedef struct
48{
49 uint32_t BaudRate;
54 uint32_t WordLength;
58 uint32_t StopBits;
61 uint16_t Parity;
67 uint16_t Mode;
70 uint16_t CLKPolarity;
73 uint16_t CLKPhase;
76 uint16_t CLKLastBit;
80 uint16_t OneBitSampling;
85 uint8_t Prescaler;
89 uint8_t GuardTime;
91 uint16_t NACKEnable;
95 uint32_t TimeOutEnable;
98 uint32_t TimeOutValue;
102 uint8_t BlockLength;
110 uint32_t ClockPrescaler;
114
118typedef struct
119{
120 uint32_t AdvFeatureInit;
130 uint32_t DataInvert;
134 uint32_t Swap;
137 uint32_t OverrunDisable;
143 uint32_t MSBFirst;
151
193
198{
205 const uint8_t *pTxBuffPtr;
207 uint16_t TxXferSize;
209 __IO uint16_t TxXferCount;
211 uint8_t *pRxBuffPtr;
213 uint16_t RxXferSize;
215 __IO uint16_t RxXferCount;
221 uint32_t FifoMode;
225 void (*RxISR)(struct __SMARTCARD_HandleTypeDef *huart);
227 void (*TxISR)(struct __SMARTCARD_HandleTypeDef *huart);
244 __IO uint32_t ErrorCode;
246#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
247 void (* TxCpltCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
249 void (* RxCpltCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
251 void (* ErrorCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
253 void (* AbortCpltCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
255 void (* AbortTransmitCpltCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
257 void (* AbortReceiveCpltCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
259 void (* RxFifoFullCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
261 void (* TxFifoEmptyCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
263 void (* MspInitCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
265 void (* MspDeInitCallback)(struct __SMARTCARD_HandleTypeDef *hsmartcard);
266#endif /* USE_HAL_SMARTCARD_REGISTER_CALLBACKS */
267
269
270#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
274typedef enum
275{
276 HAL_SMARTCARD_TX_COMPLETE_CB_ID = 0x00U,
277 HAL_SMARTCARD_RX_COMPLETE_CB_ID = 0x01U,
278 HAL_SMARTCARD_ERROR_CB_ID = 0x02U,
279 HAL_SMARTCARD_ABORT_COMPLETE_CB_ID = 0x03U,
280 HAL_SMARTCARD_ABORT_TRANSMIT_COMPLETE_CB_ID = 0x04U,
281 HAL_SMARTCARD_ABORT_RECEIVE_COMPLETE_CB_ID = 0x05U,
282 HAL_SMARTCARD_RX_FIFO_FULL_CB_ID = 0x06U,
283 HAL_SMARTCARD_TX_FIFO_EMPTY_CB_ID = 0x07U,
285 HAL_SMARTCARD_MSPINIT_CB_ID = 0x08U,
286 HAL_SMARTCARD_MSPDEINIT_CB_ID = 0x09U
288} HAL_SMARTCARD_CallbackIDTypeDef;
289
293typedef void (*pSMARTCARD_CallbackTypeDef)(SMARTCARD_HandleTypeDef *hsmartcard);
295#endif /* USE_HAL_SMARTCARD_REGISTER_CALLBACKS */
296
300typedef enum
301{
311
316/* Exported constants --------------------------------------------------------*/
326#define HAL_SMARTCARD_STATE_RESET 0x00000000U
328#define HAL_SMARTCARD_STATE_READY 0x00000020U
331#define HAL_SMARTCARD_STATE_BUSY 0x00000024U
333#define HAL_SMARTCARD_STATE_BUSY_TX 0x00000021U
335#define HAL_SMARTCARD_STATE_BUSY_RX 0x00000022U
337#define HAL_SMARTCARD_STATE_BUSY_TX_RX 0x00000023U
342#define HAL_SMARTCARD_STATE_TIMEOUT 0x000000A0U
344#define HAL_SMARTCARD_STATE_ERROR 0x000000E0U
354#define HAL_SMARTCARD_ERROR_NONE (0x00000000U)
355#define HAL_SMARTCARD_ERROR_PE (0x00000001U)
356#define HAL_SMARTCARD_ERROR_NE (0x00000002U)
357#define HAL_SMARTCARD_ERROR_FE (0x00000004U)
358#define HAL_SMARTCARD_ERROR_ORE (0x00000008U)
359#define HAL_SMARTCARD_ERROR_DMA (0x00000010U)
360#define HAL_SMARTCARD_ERROR_RTO (0x00000020U)
361#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
362#define HAL_SMARTCARD_ERROR_INVALID_CALLBACK (0x00000040U)
363#endif /* USE_HAL_SMARTCARD_REGISTER_CALLBACKS */
372#define SMARTCARD_WORDLENGTH_9B USART_CR1_M0
381#define SMARTCARD_STOPBITS_0_5 USART_CR2_STOP_0
382#define SMARTCARD_STOPBITS_1_5 USART_CR2_STOP
391#define SMARTCARD_PARITY_EVEN USART_CR1_PCE
392#define SMARTCARD_PARITY_ODD (USART_CR1_PCE | USART_CR1_PS)
401#define SMARTCARD_MODE_RX USART_CR1_RE
402#define SMARTCARD_MODE_TX USART_CR1_TE
403#define SMARTCARD_MODE_TX_RX (USART_CR1_TE |USART_CR1_RE)
412#define SMARTCARD_POLARITY_LOW 0x00000000U
413#define SMARTCARD_POLARITY_HIGH USART_CR2_CPOL
422#define SMARTCARD_PHASE_1EDGE 0x00000000U
423#define SMARTCARD_PHASE_2EDGE USART_CR2_CPHA
432#define SMARTCARD_LASTBIT_DISABLE 0x00000000U
433#define SMARTCARD_LASTBIT_ENABLE USART_CR2_LBCL
442#define SMARTCARD_ONE_BIT_SAMPLE_DISABLE 0x00000000U
443#define SMARTCARD_ONE_BIT_SAMPLE_ENABLE USART_CR3_ONEBIT
452#define SMARTCARD_NACK_DISABLE 0x00000000U
453#define SMARTCARD_NACK_ENABLE USART_CR3_NACK
462#define SMARTCARD_TIMEOUT_DISABLE 0x00000000U
463#define SMARTCARD_TIMEOUT_ENABLE USART_CR2_RTOEN
472#define SMARTCARD_PRESCALER_DIV1 0x00000000U
473#define SMARTCARD_PRESCALER_DIV2 0x00000001U
474#define SMARTCARD_PRESCALER_DIV4 0x00000002U
475#define SMARTCARD_PRESCALER_DIV6 0x00000003U
476#define SMARTCARD_PRESCALER_DIV8 0x00000004U
477#define SMARTCARD_PRESCALER_DIV10 0x00000005U
478#define SMARTCARD_PRESCALER_DIV12 0x00000006U
479#define SMARTCARD_PRESCALER_DIV16 0x00000007U
480#define SMARTCARD_PRESCALER_DIV32 0x00000008U
481#define SMARTCARD_PRESCALER_DIV64 0x00000009U
482#define SMARTCARD_PRESCALER_DIV128 0x0000000AU
483#define SMARTCARD_PRESCALER_DIV256 0x0000000BU
492#define SMARTCARD_ADVFEATURE_TXINV_DISABLE 0x00000000U
493#define SMARTCARD_ADVFEATURE_TXINV_ENABLE USART_CR2_TXINV
502#define SMARTCARD_ADVFEATURE_RXINV_DISABLE 0x00000000U
503#define SMARTCARD_ADVFEATURE_RXINV_ENABLE USART_CR2_RXINV
512#define SMARTCARD_ADVFEATURE_DATAINV_DISABLE 0x00000000U
513#define SMARTCARD_ADVFEATURE_DATAINV_ENABLE USART_CR2_DATAINV
522#define SMARTCARD_ADVFEATURE_SWAP_DISABLE 0x00000000U
523#define SMARTCARD_ADVFEATURE_SWAP_ENABLE USART_CR2_SWAP
532#define SMARTCARD_ADVFEATURE_OVERRUN_ENABLE 0x00000000U
533#define SMARTCARD_ADVFEATURE_OVERRUN_DISABLE USART_CR3_OVRDIS
542#define SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR 0x00000000U
543#define SMARTCARD_ADVFEATURE_DMA_DISABLEONRXERROR USART_CR3_DDRE
552#define SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE 0x00000000U
553#define SMARTCARD_ADVFEATURE_MSBFIRST_ENABLE USART_CR2_MSBFIRST
562#define SMARTCARD_RXDATA_FLUSH_REQUEST USART_RQR_RXFRQ
563#define SMARTCARD_TXDATA_FLUSH_REQUEST USART_RQR_TXFRQ
572#define SMARTCARD_IT_MASK 0x001FU
573#define SMARTCARD_CR_MASK 0x00E0U
574#define SMARTCARD_CR_POS 5U
575#define SMARTCARD_ISR_MASK 0x1F00U
576#define SMARTCARD_ISR_POS 8U
585/* Exported macros -----------------------------------------------------------*/
595#if USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1
596#define __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__) do{ \
597 (__HANDLE__)->gState = HAL_SMARTCARD_STATE_RESET; \
598 (__HANDLE__)->RxState = HAL_SMARTCARD_STATE_RESET; \
599 (__HANDLE__)->MspInitCallback = NULL; \
600 (__HANDLE__)->MspDeInitCallback = NULL; \
601 } while(0U)
602#else
603#define __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__) do{ \
604 (__HANDLE__)->gState = HAL_SMARTCARD_STATE_RESET; \
605 (__HANDLE__)->RxState = HAL_SMARTCARD_STATE_RESET; \
606 } while(0U)
607#endif /*USE_HAL_SMARTCARD_REGISTER_CALLBACKS */
608
613#define __HAL_SMARTCARD_FLUSH_DRREGISTER(__HANDLE__) \
614 do{ \
615 SET_BIT((__HANDLE__)->Instance->RQR, SMARTCARD_RXDATA_FLUSH_REQUEST); \
616 SET_BIT((__HANDLE__)->Instance->RQR, SMARTCARD_TXDATA_FLUSH_REQUEST); \
617 } while(0U)
618
635#define __HAL_SMARTCARD_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
636
641#define __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_PEF)
642
647#define __HAL_SMARTCARD_CLEAR_FEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_FEF)
648
653#define __HAL_SMARTCARD_CLEAR_NEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_NEF)
654
659#define __HAL_SMARTCARD_CLEAR_OREFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_OREF)
660
665#define __HAL_SMARTCARD_CLEAR_IDLEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_IDLEF)
666
693#define __HAL_SMARTCARD_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
694
717#define __HAL_SMARTCARD_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((((__INTERRUPT__) & SMARTCARD_CR_MASK) >>\
718 SMARTCARD_CR_POS) == 1U)?\
719 ((__HANDLE__)->Instance->CR1 |= (1UL <<\
720 ((__INTERRUPT__) & SMARTCARD_IT_MASK))):\
721 ((((__INTERRUPT__) & SMARTCARD_CR_MASK) >>\
722 SMARTCARD_CR_POS) == 2U)?\
723 ((__HANDLE__)->Instance->CR2 |= (1UL <<\
724 ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
725 ((__HANDLE__)->Instance->CR3 |= (1UL <<\
726 ((__INTERRUPT__) & SMARTCARD_IT_MASK))))
727
750#define __HAL_SMARTCARD_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((((__INTERRUPT__) & SMARTCARD_CR_MASK) >>\
751 SMARTCARD_CR_POS) == 1U)?\
752 ((__HANDLE__)->Instance->CR1 &= ~ (1U <<\
753 ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
754 ((((__INTERRUPT__) & SMARTCARD_CR_MASK) >>\
755 SMARTCARD_CR_POS) == 2U)?\
756 ((__HANDLE__)->Instance->CR2 &= ~ (1U <<\
757 ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
758 ((__HANDLE__)->Instance->CR3 &= ~ (1U <<\
759 ((__INTERRUPT__) & SMARTCARD_IT_MASK))))
760
783#define __HAL_SMARTCARD_GET_IT(__HANDLE__, __INTERRUPT__) (\
784 (((__HANDLE__)->Instance->ISR & (0x01UL << (((__INTERRUPT__)\
785 & SMARTCARD_ISR_MASK)>> SMARTCARD_ISR_POS)))!= 0U)\
786 ? SET : RESET)
787
810#define __HAL_SMARTCARD_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((((((__INTERRUPT__) & SMARTCARD_CR_MASK) >>\
811 SMARTCARD_CR_POS) == 0x01U)?\
812 (__HANDLE__)->Instance->CR1 : \
813 (((((__INTERRUPT__) & SMARTCARD_CR_MASK) >>\
814 SMARTCARD_CR_POS) == 0x02U)?\
815 (__HANDLE__)->Instance->CR2 : \
816 (__HANDLE__)->Instance->CR3)) &\
817 (0x01UL << (((uint16_t)(__INTERRUPT__))\
818 & SMARTCARD_IT_MASK))) != 0U)\
819 ? SET : RESET)
820
838#define __HAL_SMARTCARD_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR |= (uint32_t)(__IT_CLEAR__))
839
848#define __HAL_SMARTCARD_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))
849
854#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
855
860#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3\
861 &= (uint32_t)~((uint32_t)USART_CR3_ONEBIT))
862
867#define __HAL_SMARTCARD_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
868
873#define __HAL_SMARTCARD_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
874
879/* Private macros -------------------------------------------------------------*/
890#if defined(UART9) && defined(USART10)
891#define SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
892 do { \
893 if ((__HANDLE__)->Instance == USART1) \
894 { \
895 switch (__HAL_RCC_GET_USART1_SOURCE()) \
896 { \
897 case RCC_USART1CLKSOURCE_D2PCLK2: \
898 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK2; \
899 break; \
900 case RCC_USART1CLKSOURCE_PLL2: \
901 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
902 break; \
903 case RCC_USART1CLKSOURCE_PLL3: \
904 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
905 break; \
906 case RCC_USART1CLKSOURCE_HSI: \
907 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
908 break; \
909 case RCC_USART1CLKSOURCE_CSI: \
910 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
911 break; \
912 case RCC_USART1CLKSOURCE_LSE: \
913 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
914 break; \
915 default: \
916 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
917 break; \
918 } \
919 } \
920 else if ((__HANDLE__)->Instance == USART2) \
921 { \
922 switch (__HAL_RCC_GET_USART2_SOURCE()) \
923 { \
924 case RCC_USART2CLKSOURCE_D2PCLK1: \
925 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK1; \
926 break; \
927 case RCC_USART2CLKSOURCE_PLL2: \
928 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
929 break; \
930 case RCC_USART2CLKSOURCE_PLL3: \
931 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
932 break; \
933 case RCC_USART2CLKSOURCE_HSI: \
934 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
935 break; \
936 case RCC_USART2CLKSOURCE_CSI: \
937 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
938 break; \
939 case RCC_USART2CLKSOURCE_LSE: \
940 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
941 break; \
942 default: \
943 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
944 break; \
945 } \
946 } \
947 else if ((__HANDLE__)->Instance == USART3) \
948 { \
949 switch (__HAL_RCC_GET_USART3_SOURCE()) \
950 { \
951 case RCC_USART3CLKSOURCE_D2PCLK1: \
952 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK1; \
953 break; \
954 case RCC_USART3CLKSOURCE_PLL2: \
955 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
956 break; \
957 case RCC_USART3CLKSOURCE_PLL3: \
958 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
959 break; \
960 case RCC_USART3CLKSOURCE_HSI: \
961 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
962 break; \
963 case RCC_USART3CLKSOURCE_CSI: \
964 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
965 break; \
966 case RCC_USART3CLKSOURCE_LSE: \
967 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
968 break; \
969 default: \
970 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
971 break; \
972 } \
973 } \
974 else if ((__HANDLE__)->Instance == USART6) \
975 { \
976 switch (__HAL_RCC_GET_USART6_SOURCE()) \
977 { \
978 case RCC_USART6CLKSOURCE_D2PCLK2: \
979 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK2; \
980 break; \
981 case RCC_USART6CLKSOURCE_PLL2: \
982 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
983 break; \
984 case RCC_USART6CLKSOURCE_PLL3: \
985 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
986 break; \
987 case RCC_USART6CLKSOURCE_HSI: \
988 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
989 break; \
990 case RCC_USART6CLKSOURCE_CSI: \
991 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
992 break; \
993 case RCC_USART6CLKSOURCE_LSE: \
994 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
995 break; \
996 default: \
997 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
998 break; \
999 } \
1000 } \
1001 else if ((__HANDLE__)->Instance == USART10) \
1002 { \
1003 switch (__HAL_RCC_GET_USART10_SOURCE()) \
1004 { \
1005 case RCC_USART10CLKSOURCE_D2PCLK2: \
1006 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK2; \
1007 break; \
1008 case RCC_USART10CLKSOURCE_PLL2: \
1009 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
1010 break; \
1011 case RCC_USART10CLKSOURCE_PLL3: \
1012 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
1013 break; \
1014 case RCC_USART10CLKSOURCE_HSI: \
1015 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
1016 break; \
1017 case RCC_USART10CLKSOURCE_CSI: \
1018 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
1019 break; \
1020 case RCC_USART10CLKSOURCE_LSE: \
1021 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
1022 break; \
1023 default: \
1024 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
1025 break; \
1026 } \
1027 } \
1028 else \
1029 { \
1030 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
1031 } \
1032 } while(0U)
1033#else
1034#define SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \
1035 do { \
1036 if ((__HANDLE__)->Instance == USART1) \
1037 { \
1038 switch (__HAL_RCC_GET_USART1_SOURCE()) \
1039 { \
1040 case RCC_USART1CLKSOURCE_D2PCLK2: \
1041 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK2; \
1042 break; \
1043 case RCC_USART1CLKSOURCE_PLL2: \
1044 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
1045 break; \
1046 case RCC_USART1CLKSOURCE_PLL3: \
1047 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
1048 break; \
1049 case RCC_USART1CLKSOURCE_HSI: \
1050 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
1051 break; \
1052 case RCC_USART1CLKSOURCE_CSI: \
1053 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
1054 break; \
1055 case RCC_USART1CLKSOURCE_LSE: \
1056 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
1057 break; \
1058 default: \
1059 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
1060 break; \
1061 } \
1062 } \
1063 else if ((__HANDLE__)->Instance == USART2) \
1064 { \
1065 switch (__HAL_RCC_GET_USART2_SOURCE()) \
1066 { \
1067 case RCC_USART2CLKSOURCE_D2PCLK1: \
1068 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK1; \
1069 break; \
1070 case RCC_USART2CLKSOURCE_PLL2: \
1071 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
1072 break; \
1073 case RCC_USART2CLKSOURCE_PLL3: \
1074 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
1075 break; \
1076 case RCC_USART2CLKSOURCE_HSI: \
1077 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
1078 break; \
1079 case RCC_USART2CLKSOURCE_CSI: \
1080 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
1081 break; \
1082 case RCC_USART2CLKSOURCE_LSE: \
1083 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
1084 break; \
1085 default: \
1086 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
1087 break; \
1088 } \
1089 } \
1090 else if ((__HANDLE__)->Instance == USART3) \
1091 { \
1092 switch (__HAL_RCC_GET_USART3_SOURCE()) \
1093 { \
1094 case RCC_USART3CLKSOURCE_D2PCLK1: \
1095 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK1; \
1096 break; \
1097 case RCC_USART3CLKSOURCE_PLL2: \
1098 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
1099 break; \
1100 case RCC_USART3CLKSOURCE_PLL3: \
1101 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
1102 break; \
1103 case RCC_USART3CLKSOURCE_HSI: \
1104 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
1105 break; \
1106 case RCC_USART3CLKSOURCE_CSI: \
1107 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
1108 break; \
1109 case RCC_USART3CLKSOURCE_LSE: \
1110 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
1111 break; \
1112 default: \
1113 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
1114 break; \
1115 } \
1116 } \
1117 else if ((__HANDLE__)->Instance == USART6) \
1118 { \
1119 switch (__HAL_RCC_GET_USART6_SOURCE()) \
1120 { \
1121 case RCC_USART6CLKSOURCE_D2PCLK2: \
1122 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_D2PCLK2; \
1123 break; \
1124 case RCC_USART6CLKSOURCE_PLL2: \
1125 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL2Q; \
1126 break; \
1127 case RCC_USART6CLKSOURCE_PLL3: \
1128 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PLL3Q; \
1129 break; \
1130 case RCC_USART6CLKSOURCE_HSI: \
1131 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI; \
1132 break; \
1133 case RCC_USART6CLKSOURCE_CSI: \
1134 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_CSI; \
1135 break; \
1136 case RCC_USART6CLKSOURCE_LSE: \
1137 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE; \
1138 break; \
1139 default: \
1140 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
1141 break; \
1142 } \
1143 } \
1144 else \
1145 { \
1146 (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_UNDEFINED; \
1147 } \
1148 } while(0U)
1149#endif /* UART9 && USART10 */
1150
1157#define IS_SMARTCARD_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 6250001U)
1158
1164#define IS_SMARTCARD_BLOCKLENGTH(__LENGTH__) ((__LENGTH__) <= 0xFFU)
1165
1171#define IS_SMARTCARD_TIMEOUT_VALUE(__TIMEOUTVALUE__) ((__TIMEOUTVALUE__) <= 0xFFFFFFU)
1172
1178#define IS_SMARTCARD_AUTORETRY_COUNT(__COUNT__) ((__COUNT__) <= 0x7U)
1179
1184#define IS_SMARTCARD_WORD_LENGTH(__LENGTH__) ((__LENGTH__) == SMARTCARD_WORDLENGTH_9B)
1185
1190#define IS_SMARTCARD_STOPBITS(__STOPBITS__) (((__STOPBITS__) == SMARTCARD_STOPBITS_0_5) ||\
1191 ((__STOPBITS__) == SMARTCARD_STOPBITS_1_5))
1192
1197#define IS_SMARTCARD_PARITY(__PARITY__) (((__PARITY__) == SMARTCARD_PARITY_EVEN) || \
1198 ((__PARITY__) == SMARTCARD_PARITY_ODD))
1199
1204#define IS_SMARTCARD_MODE(__MODE__) ((((__MODE__) & 0xFFF3U) == 0x00U) && ((__MODE__) != 0x00U))
1205
1210#define IS_SMARTCARD_POLARITY(__CPOL__) (((__CPOL__) == SMARTCARD_POLARITY_LOW)\
1211 || ((__CPOL__) == SMARTCARD_POLARITY_HIGH))
1212
1217#define IS_SMARTCARD_PHASE(__CPHA__) (((__CPHA__) == SMARTCARD_PHASE_1EDGE) || ((__CPHA__) == SMARTCARD_PHASE_2EDGE))
1218
1223#define IS_SMARTCARD_LASTBIT(__LASTBIT__) (((__LASTBIT__) == SMARTCARD_LASTBIT_DISABLE) || \
1224 ((__LASTBIT__) == SMARTCARD_LASTBIT_ENABLE))
1225
1230#define IS_SMARTCARD_ONE_BIT_SAMPLE(__ONEBIT__) (((__ONEBIT__) == SMARTCARD_ONE_BIT_SAMPLE_DISABLE) || \
1231 ((__ONEBIT__) == SMARTCARD_ONE_BIT_SAMPLE_ENABLE))
1232
1237#define IS_SMARTCARD_NACK(__NACK__) (((__NACK__) == SMARTCARD_NACK_ENABLE) || \
1238 ((__NACK__) == SMARTCARD_NACK_DISABLE))
1239
1244#define IS_SMARTCARD_TIMEOUT(__TIMEOUT__) (((__TIMEOUT__) == SMARTCARD_TIMEOUT_DISABLE) || \
1245 ((__TIMEOUT__) == SMARTCARD_TIMEOUT_ENABLE))
1246
1251#define IS_SMARTCARD_CLOCKPRESCALER(__CLOCKPRESCALER__) (((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV1) || \
1252 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV2) || \
1253 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV4) || \
1254 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV6) || \
1255 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV8) || \
1256 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV10) || \
1257 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV12) || \
1258 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV16) || \
1259 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV32) || \
1260 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV64) || \
1261 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV128) || \
1262 ((__CLOCKPRESCALER__) == SMARTCARD_PRESCALER_DIV256))
1263
1268#define IS_SMARTCARD_ADVFEATURE_INIT(__INIT__) ((__INIT__) <= (SMARTCARD_ADVFEATURE_NO_INIT | \
1269 SMARTCARD_ADVFEATURE_TXINVERT_INIT | \
1270 SMARTCARD_ADVFEATURE_RXINVERT_INIT | \
1271 SMARTCARD_ADVFEATURE_DATAINVERT_INIT | \
1272 SMARTCARD_ADVFEATURE_SWAP_INIT | \
1273 SMARTCARD_ADVFEATURE_RXOVERRUNDISABLE_INIT | \
1274 SMARTCARD_ADVFEATURE_DMADISABLEONERROR_INIT | \
1275 SMARTCARD_ADVFEATURE_MSBFIRST_INIT))
1276
1281#define IS_SMARTCARD_ADVFEATURE_TXINV(__TXINV__) (((__TXINV__) == SMARTCARD_ADVFEATURE_TXINV_DISABLE) || \
1282 ((__TXINV__) == SMARTCARD_ADVFEATURE_TXINV_ENABLE))
1283
1288#define IS_SMARTCARD_ADVFEATURE_RXINV(__RXINV__) (((__RXINV__) == SMARTCARD_ADVFEATURE_RXINV_DISABLE) || \
1289 ((__RXINV__) == SMARTCARD_ADVFEATURE_RXINV_ENABLE))
1290
1295#define IS_SMARTCARD_ADVFEATURE_DATAINV(__DATAINV__) (((__DATAINV__) == SMARTCARD_ADVFEATURE_DATAINV_DISABLE) || \
1296 ((__DATAINV__) == SMARTCARD_ADVFEATURE_DATAINV_ENABLE))
1297
1302#define IS_SMARTCARD_ADVFEATURE_SWAP(__SWAP__) (((__SWAP__) == SMARTCARD_ADVFEATURE_SWAP_DISABLE) || \
1303 ((__SWAP__) == SMARTCARD_ADVFEATURE_SWAP_ENABLE))
1304
1309#define IS_SMARTCARD_OVERRUN(__OVERRUN__) (((__OVERRUN__) == SMARTCARD_ADVFEATURE_OVERRUN_ENABLE) || \
1310 ((__OVERRUN__) == SMARTCARD_ADVFEATURE_OVERRUN_DISABLE))
1311
1316#define IS_SMARTCARD_ADVFEATURE_DMAONRXERROR(__DMA__) (((__DMA__) == SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR) || \
1317 ((__DMA__) == SMARTCARD_ADVFEATURE_DMA_DISABLEONRXERROR))
1318
1323#define IS_SMARTCARD_ADVFEATURE_MSBFIRST(__MSBFIRST__) (((__MSBFIRST__) == SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE) || \
1324 ((__MSBFIRST__) == SMARTCARD_ADVFEATURE_MSBFIRST_ENABLE))
1325
1330#define IS_SMARTCARD_REQUEST_PARAMETER(__PARAM__) (((__PARAM__) == SMARTCARD_RXDATA_FLUSH_REQUEST) || \
1331 ((__PARAM__) == SMARTCARD_TXDATA_FLUSH_REQUEST))
1332
1337/* Include SMARTCARD HAL Extended module */
1339
1340/* Exported functions --------------------------------------------------------*/
1345/* Initialization and de-initialization functions ****************************/
1350HAL_StatusTypeDef HAL_SMARTCARD_Init(SMARTCARD_HandleTypeDef *hsmartcard);
1351HAL_StatusTypeDef HAL_SMARTCARD_DeInit(SMARTCARD_HandleTypeDef *hsmartcard);
1352void HAL_SMARTCARD_MspInit(SMARTCARD_HandleTypeDef *hsmartcard);
1353void HAL_SMARTCARD_MspDeInit(SMARTCARD_HandleTypeDef *hsmartcard);
1354
1355#if (USE_HAL_SMARTCARD_REGISTER_CALLBACKS == 1)
1356/* Callbacks Register/UnRegister functions ***********************************/
1357HAL_StatusTypeDef HAL_SMARTCARD_RegisterCallback(SMARTCARD_HandleTypeDef *hsmartcard,
1358 HAL_SMARTCARD_CallbackIDTypeDef CallbackID,
1359 pSMARTCARD_CallbackTypeDef pCallback);
1360HAL_StatusTypeDef HAL_SMARTCARD_UnRegisterCallback(SMARTCARD_HandleTypeDef *hsmartcard,
1361 HAL_SMARTCARD_CallbackIDTypeDef CallbackID);
1362#endif /* USE_HAL_SMARTCARD_REGISTER_CALLBACKS */
1363
1368/* IO operation functions *****************************************************/
1373HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsmartcard, const uint8_t *pData, uint16_t Size,
1374 uint32_t Timeout);
1375HAL_StatusTypeDef HAL_SMARTCARD_Receive(SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size,
1376 uint32_t Timeout);
1377HAL_StatusTypeDef HAL_SMARTCARD_Transmit_IT(SMARTCARD_HandleTypeDef *hsmartcard, const uint8_t *pData, uint16_t Size);
1378HAL_StatusTypeDef HAL_SMARTCARD_Receive_IT(SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size);
1379HAL_StatusTypeDef HAL_SMARTCARD_Transmit_DMA(SMARTCARD_HandleTypeDef *hsmartcard, const uint8_t *pData, uint16_t Size);
1380HAL_StatusTypeDef HAL_SMARTCARD_Receive_DMA(SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size);
1381/* Transfer Abort functions */
1382HAL_StatusTypeDef HAL_SMARTCARD_Abort(SMARTCARD_HandleTypeDef *hsmartcard);
1383HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit(SMARTCARD_HandleTypeDef *hsmartcard);
1384HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive(SMARTCARD_HandleTypeDef *hsmartcard);
1385HAL_StatusTypeDef HAL_SMARTCARD_Abort_IT(SMARTCARD_HandleTypeDef *hsmartcard);
1386HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit_IT(SMARTCARD_HandleTypeDef *hsmartcard);
1387HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive_IT(SMARTCARD_HandleTypeDef *hsmartcard);
1388
1389void HAL_SMARTCARD_IRQHandler(SMARTCARD_HandleTypeDef *hsmartcard);
1390void HAL_SMARTCARD_TxCpltCallback(SMARTCARD_HandleTypeDef *hsmartcard);
1391void HAL_SMARTCARD_RxCpltCallback(SMARTCARD_HandleTypeDef *hsmartcard);
1392void HAL_SMARTCARD_ErrorCallback(SMARTCARD_HandleTypeDef *hsmartcard);
1393void HAL_SMARTCARD_AbortCpltCallback(SMARTCARD_HandleTypeDef *hsmartcard);
1394void HAL_SMARTCARD_AbortTransmitCpltCallback(SMARTCARD_HandleTypeDef *hsmartcard);
1395void HAL_SMARTCARD_AbortReceiveCpltCallback(SMARTCARD_HandleTypeDef *hsmartcard);
1396
1401/* Peripheral State and Error functions ***************************************/
1406HAL_SMARTCARD_StateTypeDef HAL_SMARTCARD_GetState(const SMARTCARD_HandleTypeDef *hsmartcard);
1407uint32_t HAL_SMARTCARD_GetError(const SMARTCARD_HandleTypeDef *hsmartcard);
1408
1425#ifdef __cplusplus
1426}
1427#endif
1428
1429#endif /* STM32H7xx_HAL_SMARTCARD_H */
1430
#define __IO
Definition: core_cm4.h:239
SMARTCARD_ClockSourceTypeDef
SMARTCARD clock sources.
Definition: stm32h7xx_hal_smartcard.h:301
struct __SMARTCARD_HandleTypeDef SMARTCARD_HandleTypeDef
SMARTCARD handle Structure definition.
uint32_t HAL_SMARTCARD_StateTypeDef
HAL SMARTCARD State definition.
Definition: stm32h7xx_hal_smartcard.h:192
@ SMARTCARD_CLOCKSOURCE_PLL2Q
Definition: stm32h7xx_hal_smartcard.h:307
@ SMARTCARD_CLOCKSOURCE_UNDEFINED
Definition: stm32h7xx_hal_smartcard.h:309
@ SMARTCARD_CLOCKSOURCE_HSI
Definition: stm32h7xx_hal_smartcard.h:304
@ SMARTCARD_CLOCKSOURCE_CSI
Definition: stm32h7xx_hal_smartcard.h:305
@ SMARTCARD_CLOCKSOURCE_D2PCLK2
Definition: stm32h7xx_hal_smartcard.h:303
@ SMARTCARD_CLOCKSOURCE_LSE
Definition: stm32h7xx_hal_smartcard.h:306
@ SMARTCARD_CLOCKSOURCE_PLL3Q
Definition: stm32h7xx_hal_smartcard.h:308
@ SMARTCARD_CLOCKSOURCE_D2PCLK1
Definition: stm32h7xx_hal_smartcard.h:302
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32h7xx_hal_def.h:47
HAL_LockTypeDef
HAL Lock structures definition.
Definition: stm32h7xx_hal_def.h:58
Header file of SMARTCARD HAL Extended module.
SMARTCARD advanced features initialization structure definition.
Definition: stm32h7xx_hal_smartcard.h:119
uint32_t DMADisableonRxError
Definition: stm32h7xx_hal_smartcard.h:140
uint16_t TxCompletionIndication
Definition: stm32h7xx_hal_smartcard.h:146
uint32_t AdvFeatureInit
Definition: stm32h7xx_hal_smartcard.h:120
uint32_t Swap
Definition: stm32h7xx_hal_smartcard.h:134
uint32_t DataInvert
Definition: stm32h7xx_hal_smartcard.h:130
uint32_t TxPinLevelInvert
Definition: stm32h7xx_hal_smartcard.h:124
uint32_t MSBFirst
Definition: stm32h7xx_hal_smartcard.h:143
uint32_t RxPinLevelInvert
Definition: stm32h7xx_hal_smartcard.h:127
uint32_t OverrunDisable
Definition: stm32h7xx_hal_smartcard.h:137
SMARTCARD Init Structure definition.
Definition: stm32h7xx_hal_smartcard.h:48
uint8_t BlockLength
Definition: stm32h7xx_hal_smartcard.h:102
uint32_t WordLength
Definition: stm32h7xx_hal_smartcard.h:54
uint16_t OneBitSampling
Definition: stm32h7xx_hal_smartcard.h:80
uint16_t CLKLastBit
Definition: stm32h7xx_hal_smartcard.h:76
uint16_t Parity
Definition: stm32h7xx_hal_smartcard.h:61
uint16_t NACKEnable
Definition: stm32h7xx_hal_smartcard.h:91
uint16_t CLKPhase
Definition: stm32h7xx_hal_smartcard.h:73
uint32_t TimeOutValue
Definition: stm32h7xx_hal_smartcard.h:98
uint8_t AutoRetryCount
Definition: stm32h7xx_hal_smartcard.h:105
uint8_t Prescaler
Definition: stm32h7xx_hal_smartcard.h:85
uint32_t BaudRate
Definition: stm32h7xx_hal_smartcard.h:49
uint32_t ClockPrescaler
Definition: stm32h7xx_hal_smartcard.h:110
uint32_t StopBits
Definition: stm32h7xx_hal_smartcard.h:58
uint16_t CLKPolarity
Definition: stm32h7xx_hal_smartcard.h:70
uint8_t GuardTime
Definition: stm32h7xx_hal_smartcard.h:89
uint16_t Mode
Definition: stm32h7xx_hal_smartcard.h:67
uint32_t TimeOutEnable
Definition: stm32h7xx_hal_smartcard.h:95
Universal Synchronous Asynchronous Receiver Transmitter.
Definition: stm32h723xx.h:1596
DMA handle Structure definition.
Definition: stm32h7xx_hal_dma.h:138
SMARTCARD handle Structure definition.
Definition: stm32h7xx_hal_smartcard.h:198
HAL_LockTypeDef Lock
Definition: stm32h7xx_hal_smartcard.h:233
uint32_t FifoMode
Definition: stm32h7xx_hal_smartcard.h:221
SMARTCARD_InitTypeDef Init
Definition: stm32h7xx_hal_smartcard.h:201
DMA_HandleTypeDef * hdmarx
Definition: stm32h7xx_hal_smartcard.h:231
uint16_t NbTxDataToProcess
Definition: stm32h7xx_hal_smartcard.h:219
__IO uint16_t TxXferCount
Definition: stm32h7xx_hal_smartcard.h:209
SMARTCARD_AdvFeatureInitTypeDef AdvancedInit
Definition: stm32h7xx_hal_smartcard.h:203
uint16_t RxXferSize
Definition: stm32h7xx_hal_smartcard.h:213
uint16_t TxXferSize
Definition: stm32h7xx_hal_smartcard.h:207
uint8_t * pRxBuffPtr
Definition: stm32h7xx_hal_smartcard.h:211
USART_TypeDef * Instance
Definition: stm32h7xx_hal_smartcard.h:199
void(* TxISR)(struct __SMARTCARD_HandleTypeDef *huart)
Definition: stm32h7xx_hal_smartcard.h:227
__IO uint32_t ErrorCode
Definition: stm32h7xx_hal_smartcard.h:244
__IO uint16_t RxXferCount
Definition: stm32h7xx_hal_smartcard.h:215
__IO HAL_SMARTCARD_StateTypeDef gState
Definition: stm32h7xx_hal_smartcard.h:235
const uint8_t * pTxBuffPtr
Definition: stm32h7xx_hal_smartcard.h:205
__IO HAL_SMARTCARD_StateTypeDef RxState
Definition: stm32h7xx_hal_smartcard.h:240
DMA_HandleTypeDef * hdmatx
Definition: stm32h7xx_hal_smartcard.h:229
void(* RxISR)(struct __SMARTCARD_HandleTypeDef *huart)
Definition: stm32h7xx_hal_smartcard.h:225
uint16_t NbRxDataToProcess
Definition: stm32h7xx_hal_smartcard.h:217