RTEMS 6.1-rc5
Loading...
Searching...
No Matches
stm32h7xx_hal_uart.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef STM32H7xx_HAL_UART_H
21#define STM32H7xx_HAL_UART_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;
67 uint32_t WordLength;
70 uint32_t StopBits;
73 uint32_t Parity;
80 uint32_t Mode;
83 uint32_t HwFlowCtl;
87 uint32_t OverSampling;
91 uint32_t OneBitSampling;
95 uint32_t ClockPrescaler;
99
103typedef struct
104{
105 uint32_t AdvFeatureInit;
116 uint32_t DataInvert;
120 uint32_t Swap;
123 uint32_t OverrunDisable;
136 uint32_t MSBFirst;
139
180typedef uint32_t HAL_UART_StateTypeDef;
181
185typedef enum
186{
197
207typedef uint32_t HAL_UART_RxTypeTypeDef;
208
219
224{
231 const uint8_t *pTxBuffPtr;
233 uint16_t TxXferSize;
235 __IO uint16_t TxXferCount;
237 uint8_t *pRxBuffPtr;
239 uint16_t RxXferSize;
241 __IO uint16_t RxXferCount;
243 uint16_t Mask;
245 uint32_t FifoMode;
256 void (*RxISR)(struct __UART_HandleTypeDef *huart);
258 void (*TxISR)(struct __UART_HandleTypeDef *huart);
273 __IO uint32_t ErrorCode;
275#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
276 void (* TxHalfCpltCallback)(struct __UART_HandleTypeDef *huart);
277 void (* TxCpltCallback)(struct __UART_HandleTypeDef *huart);
278 void (* RxHalfCpltCallback)(struct __UART_HandleTypeDef *huart);
279 void (* RxCpltCallback)(struct __UART_HandleTypeDef *huart);
280 void (* ErrorCallback)(struct __UART_HandleTypeDef *huart);
281 void (* AbortCpltCallback)(struct __UART_HandleTypeDef *huart);
282 void (* AbortTransmitCpltCallback)(struct __UART_HandleTypeDef *huart);
283 void (* AbortReceiveCpltCallback)(struct __UART_HandleTypeDef *huart);
284 void (* WakeupCallback)(struct __UART_HandleTypeDef *huart);
285 void (* RxFifoFullCallback)(struct __UART_HandleTypeDef *huart);
286 void (* TxFifoEmptyCallback)(struct __UART_HandleTypeDef *huart);
287 void (* RxEventCallback)(struct __UART_HandleTypeDef *huart, uint16_t Pos);
289 void (* MspInitCallback)(struct __UART_HandleTypeDef *huart);
290 void (* MspDeInitCallback)(struct __UART_HandleTypeDef *huart);
291#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
292
294
295#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
299typedef enum
300{
301 HAL_UART_TX_HALFCOMPLETE_CB_ID = 0x00U,
302 HAL_UART_TX_COMPLETE_CB_ID = 0x01U,
303 HAL_UART_RX_HALFCOMPLETE_CB_ID = 0x02U,
304 HAL_UART_RX_COMPLETE_CB_ID = 0x03U,
305 HAL_UART_ERROR_CB_ID = 0x04U,
306 HAL_UART_ABORT_COMPLETE_CB_ID = 0x05U,
307 HAL_UART_ABORT_TRANSMIT_COMPLETE_CB_ID = 0x06U,
308 HAL_UART_ABORT_RECEIVE_COMPLETE_CB_ID = 0x07U,
309 HAL_UART_WAKEUP_CB_ID = 0x08U,
310 HAL_UART_RX_FIFO_FULL_CB_ID = 0x09U,
311 HAL_UART_TX_FIFO_EMPTY_CB_ID = 0x0AU,
313 HAL_UART_MSPINIT_CB_ID = 0x0BU,
314 HAL_UART_MSPDEINIT_CB_ID = 0x0CU
316} HAL_UART_CallbackIDTypeDef;
317
321typedef void (*pUART_CallbackTypeDef)(UART_HandleTypeDef *huart);
322typedef void (*pUART_RxEventCallbackTypeDef)
323(struct __UART_HandleTypeDef *huart, uint16_t Pos);
325#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
326
331/* Exported constants --------------------------------------------------------*/
341#define HAL_UART_STATE_RESET 0x00000000U
343#define HAL_UART_STATE_READY 0x00000020U
345#define HAL_UART_STATE_BUSY 0x00000024U
347#define HAL_UART_STATE_BUSY_TX 0x00000021U
349#define HAL_UART_STATE_BUSY_RX 0x00000022U
351#define HAL_UART_STATE_BUSY_TX_RX 0x00000023U
354#define HAL_UART_STATE_TIMEOUT 0x000000A0U
356#define HAL_UART_STATE_ERROR 0x000000E0U
366#define HAL_UART_ERROR_NONE (0x00000000U)
367#define HAL_UART_ERROR_PE (0x00000001U)
368#define HAL_UART_ERROR_NE (0x00000002U)
369#define HAL_UART_ERROR_FE (0x00000004U)
370#define HAL_UART_ERROR_ORE (0x00000008U)
371#define HAL_UART_ERROR_DMA (0x00000010U)
372#define HAL_UART_ERROR_RTO (0x00000020U)
374#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
375#define HAL_UART_ERROR_INVALID_CALLBACK (0x00000040U)
376#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
385#define UART_STOPBITS_0_5 USART_CR2_STOP_0
386#define UART_STOPBITS_1 0x00000000U
387#define UART_STOPBITS_1_5 (USART_CR2_STOP_0 | USART_CR2_STOP_1)
388#define UART_STOPBITS_2 USART_CR2_STOP_1
397#define UART_PARITY_NONE 0x00000000U
398#define UART_PARITY_EVEN USART_CR1_PCE
399#define UART_PARITY_ODD (USART_CR1_PCE | USART_CR1_PS)
408#define UART_HWCONTROL_NONE 0x00000000U
409#define UART_HWCONTROL_RTS USART_CR3_RTSE
410#define UART_HWCONTROL_CTS USART_CR3_CTSE
411#define UART_HWCONTROL_RTS_CTS (USART_CR3_RTSE | USART_CR3_CTSE)
420#define UART_MODE_RX USART_CR1_RE
421#define UART_MODE_TX USART_CR1_TE
422#define UART_MODE_TX_RX (USART_CR1_TE |USART_CR1_RE)
431#define UART_STATE_DISABLE 0x00000000U
432#define UART_STATE_ENABLE USART_CR1_UE
441#define UART_OVERSAMPLING_16 0x00000000U
442#define UART_OVERSAMPLING_8 USART_CR1_OVER8
451#define UART_ONE_BIT_SAMPLE_DISABLE 0x00000000U
452#define UART_ONE_BIT_SAMPLE_ENABLE USART_CR3_ONEBIT
461#define UART_PRESCALER_DIV1 0x00000000U
462#define UART_PRESCALER_DIV2 0x00000001U
463#define UART_PRESCALER_DIV4 0x00000002U
464#define UART_PRESCALER_DIV6 0x00000003U
465#define UART_PRESCALER_DIV8 0x00000004U
466#define UART_PRESCALER_DIV10 0x00000005U
467#define UART_PRESCALER_DIV12 0x00000006U
468#define UART_PRESCALER_DIV16 0x00000007U
469#define UART_PRESCALER_DIV32 0x00000008U
470#define UART_PRESCALER_DIV64 0x00000009U
471#define UART_PRESCALER_DIV128 0x0000000AU
472#define UART_PRESCALER_DIV256 0x0000000BU
481#define UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT 0x00000000U
483#define UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE USART_CR2_ABRMODE_0
485#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X7FFRAME USART_CR2_ABRMODE_1
487#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME USART_CR2_ABRMODE
497#define UART_RECEIVER_TIMEOUT_DISABLE 0x00000000U
498#define UART_RECEIVER_TIMEOUT_ENABLE USART_CR2_RTOEN
507#define UART_LIN_DISABLE 0x00000000U
508#define UART_LIN_ENABLE USART_CR2_LINEN
517#define UART_LINBREAKDETECTLENGTH_10B 0x00000000U
518#define UART_LINBREAKDETECTLENGTH_11B USART_CR2_LBDL
527#define UART_DMA_TX_DISABLE 0x00000000U
528#define UART_DMA_TX_ENABLE USART_CR3_DMAT
537#define UART_DMA_RX_DISABLE 0x00000000U
538#define UART_DMA_RX_ENABLE USART_CR3_DMAR
547#define UART_HALF_DUPLEX_DISABLE 0x00000000U
548#define UART_HALF_DUPLEX_ENABLE USART_CR3_HDSEL
557#define UART_WAKEUPMETHOD_IDLELINE 0x00000000U
558#define UART_WAKEUPMETHOD_ADDRESSMARK USART_CR1_WAKE
567#define UART_AUTOBAUD_REQUEST USART_RQR_ABRRQ
568#define UART_SENDBREAK_REQUEST USART_RQR_SBKRQ
569#define UART_MUTE_MODE_REQUEST USART_RQR_MMRQ
570#define UART_RXDATA_FLUSH_REQUEST USART_RQR_RXFRQ
571#define UART_TXDATA_FLUSH_REQUEST USART_RQR_TXFRQ
580#define UART_ADVFEATURE_NO_INIT 0x00000000U
581#define UART_ADVFEATURE_TXINVERT_INIT 0x00000001U
582#define UART_ADVFEATURE_RXINVERT_INIT 0x00000002U
583#define UART_ADVFEATURE_DATAINVERT_INIT 0x00000004U
584#define UART_ADVFEATURE_SWAP_INIT 0x00000008U
585#define UART_ADVFEATURE_RXOVERRUNDISABLE_INIT 0x00000010U
586#define UART_ADVFEATURE_DMADISABLEONERROR_INIT 0x00000020U
587#define UART_ADVFEATURE_AUTOBAUDRATE_INIT 0x00000040U
588#define UART_ADVFEATURE_MSBFIRST_INIT 0x00000080U
597#define UART_ADVFEATURE_TXINV_DISABLE 0x00000000U
598#define UART_ADVFEATURE_TXINV_ENABLE USART_CR2_TXINV
607#define UART_ADVFEATURE_RXINV_DISABLE 0x00000000U
608#define UART_ADVFEATURE_RXINV_ENABLE USART_CR2_RXINV
617#define UART_ADVFEATURE_DATAINV_DISABLE 0x00000000U
618#define UART_ADVFEATURE_DATAINV_ENABLE USART_CR2_DATAINV
627#define UART_ADVFEATURE_SWAP_DISABLE 0x00000000U
628#define UART_ADVFEATURE_SWAP_ENABLE USART_CR2_SWAP
637#define UART_ADVFEATURE_OVERRUN_ENABLE 0x00000000U
638#define UART_ADVFEATURE_OVERRUN_DISABLE USART_CR3_OVRDIS
647#define UART_ADVFEATURE_AUTOBAUDRATE_DISABLE 0x00000000U
648#define UART_ADVFEATURE_AUTOBAUDRATE_ENABLE USART_CR2_ABREN
657#define UART_ADVFEATURE_DMA_ENABLEONRXERROR 0x00000000U
658#define UART_ADVFEATURE_DMA_DISABLEONRXERROR USART_CR3_DDRE
667#define UART_ADVFEATURE_MSBFIRST_DISABLE 0x00000000U
669#define UART_ADVFEATURE_MSBFIRST_ENABLE USART_CR2_MSBFIRST
679#define UART_ADVFEATURE_STOPMODE_DISABLE 0x00000000U
680#define UART_ADVFEATURE_STOPMODE_ENABLE USART_CR1_UESM
689#define UART_ADVFEATURE_MUTEMODE_DISABLE 0x00000000U
690#define UART_ADVFEATURE_MUTEMODE_ENABLE USART_CR1_MME
699#define UART_CR2_ADDRESS_LSB_POS 24U
708#define UART_WAKEUP_ON_ADDRESS 0x00000000U
709#define UART_WAKEUP_ON_STARTBIT USART_CR3_WUS_1
710#define UART_WAKEUP_ON_READDATA_NONEMPTY USART_CR3_WUS
720#define UART_DE_POLARITY_HIGH 0x00000000U
721#define UART_DE_POLARITY_LOW USART_CR3_DEP
730#define UART_CR1_DEAT_ADDRESS_LSB_POS 21U
740#define UART_CR1_DEDT_ADDRESS_LSB_POS 16U
750#define UART_IT_MASK 0x001FU
759#define HAL_UART_TIMEOUT_VALUE 0x1FFFFFFU
770#define UART_FLAG_TXFT USART_ISR_TXFT
771#define UART_FLAG_RXFT USART_ISR_RXFT
772#define UART_FLAG_RXFF USART_ISR_RXFF
773#define UART_FLAG_TXFE USART_ISR_TXFE
774#define UART_FLAG_REACK USART_ISR_REACK
775#define UART_FLAG_TEACK USART_ISR_TEACK
776#define UART_FLAG_WUF USART_ISR_WUF
777#define UART_FLAG_RWU USART_ISR_RWU
778#define UART_FLAG_SBKF USART_ISR_SBKF
779#define UART_FLAG_CMF USART_ISR_CMF
780#define UART_FLAG_BUSY USART_ISR_BUSY
781#define UART_FLAG_ABRF USART_ISR_ABRF
782#define UART_FLAG_ABRE USART_ISR_ABRE
783#define UART_FLAG_RTOF USART_ISR_RTOF
784#define UART_FLAG_CTS USART_ISR_CTS
785#define UART_FLAG_CTSIF USART_ISR_CTSIF
786#define UART_FLAG_LBDF USART_ISR_LBDF
787#define UART_FLAG_TXE USART_ISR_TXE_TXFNF
788#define UART_FLAG_TXFNF USART_ISR_TXE_TXFNF
789#define UART_FLAG_TC USART_ISR_TC
790#define UART_FLAG_RXNE USART_ISR_RXNE_RXFNE
791#define UART_FLAG_RXFNE USART_ISR_RXNE_RXFNE
792#define UART_FLAG_IDLE USART_ISR_IDLE
793#define UART_FLAG_ORE USART_ISR_ORE
794#define UART_FLAG_NE USART_ISR_NE
795#define UART_FLAG_FE USART_ISR_FE
796#define UART_FLAG_PE USART_ISR_PE
820#define UART_IT_PE 0x0028U
821#define UART_IT_TXE 0x0727U
822#define UART_IT_TXFNF 0x0727U
823#define UART_IT_TC 0x0626U
824#define UART_IT_RXNE 0x0525U
825#define UART_IT_RXFNE 0x0525U
826#define UART_IT_IDLE 0x0424U
827#define UART_IT_LBD 0x0846U
828#define UART_IT_CTS 0x096AU
829#define UART_IT_CM 0x112EU
830#define UART_IT_WUF 0x1476U
831#define UART_IT_RXFF 0x183FU
832#define UART_IT_TXFE 0x173EU
833#define UART_IT_RXFT 0x1A7CU
834#define UART_IT_TXFT 0x1B77U
835#define UART_IT_RTO 0x0B3AU
837#define UART_IT_ERR 0x0060U
839#define UART_IT_ORE 0x0300U
840#define UART_IT_NE 0x0200U
841#define UART_IT_FE 0x0100U
850#define UART_CLEAR_PEF USART_ICR_PECF
851#define UART_CLEAR_FEF USART_ICR_FECF
852#define UART_CLEAR_NEF USART_ICR_NECF
853#define UART_CLEAR_OREF USART_ICR_ORECF
854#define UART_CLEAR_IDLEF USART_ICR_IDLECF
855#define UART_CLEAR_TXFECF USART_ICR_TXFECF
856#define UART_CLEAR_TCF USART_ICR_TCCF
857#define UART_CLEAR_LBDF USART_ICR_LBDCF
858#define UART_CLEAR_CTSF USART_ICR_CTSCF
859#define UART_CLEAR_CMF USART_ICR_CMCF
860#define UART_CLEAR_WUF USART_ICR_WUCF
861#define UART_CLEAR_RTOF USART_ICR_RTOCF
870#define HAL_UART_RECEPTION_STANDARD (0x00000000U)
871#define HAL_UART_RECEPTION_TOIDLE (0x00000001U)
872#define HAL_UART_RECEPTION_TORTO (0x00000002U)
873#define HAL_UART_RECEPTION_TOCHARMATCH (0x00000003U)
882#define HAL_UART_RXEVENT_TC (0x00000000U)
883#define HAL_UART_RXEVENT_HT (0x00000001U)
884#define HAL_UART_RXEVENT_IDLE (0x00000002U)
893/* Exported macros -----------------------------------------------------------*/
903#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
904#define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) do{ \
905 (__HANDLE__)->gState = HAL_UART_STATE_RESET; \
906 (__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
907 (__HANDLE__)->MspInitCallback = NULL; \
908 (__HANDLE__)->MspDeInitCallback = NULL; \
909 } while(0U)
910#else
911#define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) do{ \
912 (__HANDLE__)->gState = HAL_UART_STATE_RESET; \
913 (__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
914 } while(0U)
915#endif /*USE_HAL_UART_REGISTER_CALLBACKS */
916
921#define __HAL_UART_FLUSH_DRREGISTER(__HANDLE__) \
922 do{ \
923 SET_BIT((__HANDLE__)->Instance->RQR, UART_RXDATA_FLUSH_REQUEST); \
924 SET_BIT((__HANDLE__)->Instance->RQR, UART_TXDATA_FLUSH_REQUEST); \
925 } while(0U)
926
945#define __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
946
951#define __HAL_UART_CLEAR_PEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_PEF)
952
957#define __HAL_UART_CLEAR_FEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_FEF)
958
963#define __HAL_UART_CLEAR_NEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_NEF)
964
969#define __HAL_UART_CLEAR_OREFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_OREF)
970
975#define __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_IDLEF)
976
981#define __HAL_UART_CLEAR_TXFECF(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_TXFECF)
982
1015#define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
1016
1040#define __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__) (\
1041 ((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U)?\
1042 ((__HANDLE__)->Instance->CR1 |= (1U <<\
1043 ((__INTERRUPT__) & UART_IT_MASK))): \
1044 ((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U)?\
1045 ((__HANDLE__)->Instance->CR2 |= (1U <<\
1046 ((__INTERRUPT__) & UART_IT_MASK))): \
1047 ((__HANDLE__)->Instance->CR3 |= (1U <<\
1048 ((__INTERRUPT__) & UART_IT_MASK))))
1049
1073#define __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__) (\
1074 ((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U)?\
1075 ((__HANDLE__)->Instance->CR1 &= ~ (1U <<\
1076 ((__INTERRUPT__) & UART_IT_MASK))): \
1077 ((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U)?\
1078 ((__HANDLE__)->Instance->CR2 &= ~ (1U <<\
1079 ((__INTERRUPT__) & UART_IT_MASK))): \
1080 ((__HANDLE__)->Instance->CR3 &= ~ (1U <<\
1081 ((__INTERRUPT__) & UART_IT_MASK))))
1082
1106#define __HAL_UART_GET_IT(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->ISR\
1107 & (1U << ((__INTERRUPT__)>> 8U))) != RESET) ? SET : RESET)
1108
1132#define __HAL_UART_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U) ?\
1133 (__HANDLE__)->Instance->CR1 : \
1134 (((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U) ?\
1135 (__HANDLE__)->Instance->CR2 : \
1136 (__HANDLE__)->Instance->CR3)) & (1U <<\
1137 (((uint16_t)(__INTERRUPT__)) &\
1138 UART_IT_MASK))) != RESET) ? SET : RESET)
1139
1159#define __HAL_UART_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__))
1160
1172#define __HAL_UART_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))
1173
1178#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
1179
1184#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= ~USART_CR3_ONEBIT)
1185
1190#define __HAL_UART_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
1191
1196#define __HAL_UART_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
1197
1211#define __HAL_UART_HWCONTROL_CTS_ENABLE(__HANDLE__) \
1212 do{ \
1213 ATOMIC_SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
1214 (__HANDLE__)->Init.HwFlowCtl |= USART_CR3_CTSE; \
1215 } while(0U)
1216
1230#define __HAL_UART_HWCONTROL_CTS_DISABLE(__HANDLE__) \
1231 do{ \
1232 ATOMIC_CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
1233 (__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_CTSE); \
1234 } while(0U)
1235
1249#define __HAL_UART_HWCONTROL_RTS_ENABLE(__HANDLE__) \
1250 do{ \
1251 ATOMIC_SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE); \
1252 (__HANDLE__)->Init.HwFlowCtl |= USART_CR3_RTSE; \
1253 } while(0U)
1254
1268#define __HAL_UART_HWCONTROL_RTS_DISABLE(__HANDLE__) \
1269 do{ \
1270 ATOMIC_CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE);\
1271 (__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_RTSE); \
1272 } while(0U)
1277/* Private macros --------------------------------------------------------*/
1286#define UART_GET_DIV_FACTOR(__CLOCKPRESCALER__) \
1287 (((__CLOCKPRESCALER__) == UART_PRESCALER_DIV1) ? 1U : \
1288 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV2) ? 2U : \
1289 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV4) ? 4U : \
1290 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV6) ? 6U : \
1291 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV8) ? 8U : \
1292 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV10) ? 10U : \
1293 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV12) ? 12U : \
1294 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV16) ? 16U : \
1295 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV32) ? 32U : \
1296 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV64) ? 64U : \
1297 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV128) ? 128U : \
1298 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV256) ? 256U : 1U)
1299
1306#define UART_DIV_LPUART(__PCLK__, __BAUD__, __CLOCKPRESCALER__) \
1307 ((uint32_t)((((((uint64_t)(__PCLK__))/(UARTPrescTable[(__CLOCKPRESCALER__)]))*256U)+ \
1308 (uint32_t)((__BAUD__)/2U)) / (__BAUD__)) \
1309 )
1310
1317#define UART_DIV_SAMPLING8(__PCLK__, __BAUD__, __CLOCKPRESCALER__) \
1318 (((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)])*2U) + ((__BAUD__)/2U)) / (__BAUD__))
1319
1326#define UART_DIV_SAMPLING16(__PCLK__, __BAUD__, __CLOCKPRESCALER__) \
1327 ((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)]) + ((__BAUD__)/2U)) / (__BAUD__))
1328
1333#define UART_INSTANCE_LOWPOWER(__HANDLE__) (IS_LPUART_INSTANCE((__HANDLE__)->Instance))
1334
1341#define IS_UART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 12500001U)
1342
1347#define IS_UART_ASSERTIONTIME(__TIME__) ((__TIME__) <= 0x1FU)
1348
1353#define IS_UART_DEASSERTIONTIME(__TIME__) ((__TIME__) <= 0x1FU)
1354
1360#define IS_UART_STOPBITS(__STOPBITS__) (((__STOPBITS__) == UART_STOPBITS_0_5) || \
1361 ((__STOPBITS__) == UART_STOPBITS_1) || \
1362 ((__STOPBITS__) == UART_STOPBITS_1_5) || \
1363 ((__STOPBITS__) == UART_STOPBITS_2))
1364
1370#define IS_LPUART_STOPBITS(__STOPBITS__) (((__STOPBITS__) == UART_STOPBITS_1) || \
1371 ((__STOPBITS__) == UART_STOPBITS_2))
1372
1378#define IS_UART_PARITY(__PARITY__) (((__PARITY__) == UART_PARITY_NONE) || \
1379 ((__PARITY__) == UART_PARITY_EVEN) || \
1380 ((__PARITY__) == UART_PARITY_ODD))
1381
1387#define IS_UART_HARDWARE_FLOW_CONTROL(__CONTROL__)\
1388 (((__CONTROL__) == UART_HWCONTROL_NONE) || \
1389 ((__CONTROL__) == UART_HWCONTROL_RTS) || \
1390 ((__CONTROL__) == UART_HWCONTROL_CTS) || \
1391 ((__CONTROL__) == UART_HWCONTROL_RTS_CTS))
1392
1398#define IS_UART_MODE(__MODE__) ((((__MODE__) & (~((uint32_t)(UART_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))
1399
1405#define IS_UART_STATE(__STATE__) (((__STATE__) == UART_STATE_DISABLE) || \
1406 ((__STATE__) == UART_STATE_ENABLE))
1407
1413#define IS_UART_OVERSAMPLING(__SAMPLING__) (((__SAMPLING__) == UART_OVERSAMPLING_16) || \
1414 ((__SAMPLING__) == UART_OVERSAMPLING_8))
1415
1421#define IS_UART_ONE_BIT_SAMPLE(__ONEBIT__) (((__ONEBIT__) == UART_ONE_BIT_SAMPLE_DISABLE) || \
1422 ((__ONEBIT__) == UART_ONE_BIT_SAMPLE_ENABLE))
1423
1429#define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(__MODE__) (((__MODE__) == UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT) || \
1430 ((__MODE__) == UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE) || \
1431 ((__MODE__) == UART_ADVFEATURE_AUTOBAUDRATE_ON0X7FFRAME) || \
1432 ((__MODE__) == UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME))
1433
1439#define IS_UART_RECEIVER_TIMEOUT(__TIMEOUT__) (((__TIMEOUT__) == UART_RECEIVER_TIMEOUT_DISABLE) || \
1440 ((__TIMEOUT__) == UART_RECEIVER_TIMEOUT_ENABLE))
1441
1447#define IS_UART_RECEIVER_TIMEOUT_VALUE(__TIMEOUTVALUE__) ((__TIMEOUTVALUE__) <= 0xFFFFFFU)
1448
1454#define IS_UART_LIN(__LIN__) (((__LIN__) == UART_LIN_DISABLE) || \
1455 ((__LIN__) == UART_LIN_ENABLE))
1456
1462#define IS_UART_LIN_BREAK_DETECT_LENGTH(__LENGTH__) (((__LENGTH__) == UART_LINBREAKDETECTLENGTH_10B) || \
1463 ((__LENGTH__) == UART_LINBREAKDETECTLENGTH_11B))
1464
1470#define IS_UART_DMA_TX(__DMATX__) (((__DMATX__) == UART_DMA_TX_DISABLE) || \
1471 ((__DMATX__) == UART_DMA_TX_ENABLE))
1472
1478#define IS_UART_DMA_RX(__DMARX__) (((__DMARX__) == UART_DMA_RX_DISABLE) || \
1479 ((__DMARX__) == UART_DMA_RX_ENABLE))
1480
1486#define IS_UART_HALF_DUPLEX(__HDSEL__) (((__HDSEL__) == UART_HALF_DUPLEX_DISABLE) || \
1487 ((__HDSEL__) == UART_HALF_DUPLEX_ENABLE))
1488
1494#define IS_UART_WAKEUPMETHOD(__WAKEUP__) (((__WAKEUP__) == UART_WAKEUPMETHOD_IDLELINE) || \
1495 ((__WAKEUP__) == UART_WAKEUPMETHOD_ADDRESSMARK))
1496
1502#define IS_UART_REQUEST_PARAMETER(__PARAM__) (((__PARAM__) == UART_AUTOBAUD_REQUEST) || \
1503 ((__PARAM__) == UART_SENDBREAK_REQUEST) || \
1504 ((__PARAM__) == UART_MUTE_MODE_REQUEST) || \
1505 ((__PARAM__) == UART_RXDATA_FLUSH_REQUEST) || \
1506 ((__PARAM__) == UART_TXDATA_FLUSH_REQUEST))
1507
1513#define IS_UART_ADVFEATURE_INIT(__INIT__) ((__INIT__) <= (UART_ADVFEATURE_NO_INIT | \
1514 UART_ADVFEATURE_TXINVERT_INIT | \
1515 UART_ADVFEATURE_RXINVERT_INIT | \
1516 UART_ADVFEATURE_DATAINVERT_INIT | \
1517 UART_ADVFEATURE_SWAP_INIT | \
1518 UART_ADVFEATURE_RXOVERRUNDISABLE_INIT | \
1519 UART_ADVFEATURE_DMADISABLEONERROR_INIT | \
1520 UART_ADVFEATURE_AUTOBAUDRATE_INIT | \
1521 UART_ADVFEATURE_MSBFIRST_INIT))
1522
1528#define IS_UART_ADVFEATURE_TXINV(__TXINV__) (((__TXINV__) == UART_ADVFEATURE_TXINV_DISABLE) || \
1529 ((__TXINV__) == UART_ADVFEATURE_TXINV_ENABLE))
1530
1536#define IS_UART_ADVFEATURE_RXINV(__RXINV__) (((__RXINV__) == UART_ADVFEATURE_RXINV_DISABLE) || \
1537 ((__RXINV__) == UART_ADVFEATURE_RXINV_ENABLE))
1538
1544#define IS_UART_ADVFEATURE_DATAINV(__DATAINV__) (((__DATAINV__) == UART_ADVFEATURE_DATAINV_DISABLE) || \
1545 ((__DATAINV__) == UART_ADVFEATURE_DATAINV_ENABLE))
1546
1552#define IS_UART_ADVFEATURE_SWAP(__SWAP__) (((__SWAP__) == UART_ADVFEATURE_SWAP_DISABLE) || \
1553 ((__SWAP__) == UART_ADVFEATURE_SWAP_ENABLE))
1554
1560#define IS_UART_OVERRUN(__OVERRUN__) (((__OVERRUN__) == UART_ADVFEATURE_OVERRUN_ENABLE) || \
1561 ((__OVERRUN__) == UART_ADVFEATURE_OVERRUN_DISABLE))
1562
1568#define IS_UART_ADVFEATURE_AUTOBAUDRATE(__AUTOBAUDRATE__) (((__AUTOBAUDRATE__) == \
1569 UART_ADVFEATURE_AUTOBAUDRATE_DISABLE) || \
1570 ((__AUTOBAUDRATE__) == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE))
1571
1577#define IS_UART_ADVFEATURE_DMAONRXERROR(__DMA__) (((__DMA__) == UART_ADVFEATURE_DMA_ENABLEONRXERROR) || \
1578 ((__DMA__) == UART_ADVFEATURE_DMA_DISABLEONRXERROR))
1579
1585#define IS_UART_ADVFEATURE_MSBFIRST(__MSBFIRST__) (((__MSBFIRST__) == UART_ADVFEATURE_MSBFIRST_DISABLE) || \
1586 ((__MSBFIRST__) == UART_ADVFEATURE_MSBFIRST_ENABLE))
1587
1593#define IS_UART_ADVFEATURE_STOPMODE(__STOPMODE__) (((__STOPMODE__) == UART_ADVFEATURE_STOPMODE_DISABLE) || \
1594 ((__STOPMODE__) == UART_ADVFEATURE_STOPMODE_ENABLE))
1595
1601#define IS_UART_MUTE_MODE(__MUTE__) (((__MUTE__) == UART_ADVFEATURE_MUTEMODE_DISABLE) || \
1602 ((__MUTE__) == UART_ADVFEATURE_MUTEMODE_ENABLE))
1603
1609#define IS_UART_WAKEUP_SELECTION(__WAKE__) (((__WAKE__) == UART_WAKEUP_ON_ADDRESS) || \
1610 ((__WAKE__) == UART_WAKEUP_ON_STARTBIT) || \
1611 ((__WAKE__) == UART_WAKEUP_ON_READDATA_NONEMPTY))
1612
1618#define IS_UART_DE_POLARITY(__POLARITY__) (((__POLARITY__) == UART_DE_POLARITY_HIGH) || \
1619 ((__POLARITY__) == UART_DE_POLARITY_LOW))
1620
1626#define IS_UART_PRESCALER(__CLOCKPRESCALER__) (((__CLOCKPRESCALER__) == UART_PRESCALER_DIV1) || \
1627 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV2) || \
1628 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV4) || \
1629 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV6) || \
1630 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV8) || \
1631 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV10) || \
1632 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV12) || \
1633 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV16) || \
1634 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV32) || \
1635 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV64) || \
1636 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV128) || \
1637 ((__CLOCKPRESCALER__) == UART_PRESCALER_DIV256))
1638
1643/* Include UART HAL Extended module */
1644#include "stm32h7xx_hal_uart_ex.h"
1645
1646/* Exported functions --------------------------------------------------------*/
1655/* Initialization and de-initialization functions ****************************/
1656HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart);
1657HAL_StatusTypeDef HAL_HalfDuplex_Init(UART_HandleTypeDef *huart);
1658HAL_StatusTypeDef HAL_LIN_Init(UART_HandleTypeDef *huart, uint32_t BreakDetectLength);
1659HAL_StatusTypeDef HAL_MultiProcessor_Init(UART_HandleTypeDef *huart, uint8_t Address, uint32_t WakeUpMethod);
1660HAL_StatusTypeDef HAL_UART_DeInit(UART_HandleTypeDef *huart);
1661void HAL_UART_MspInit(UART_HandleTypeDef *huart);
1662void HAL_UART_MspDeInit(UART_HandleTypeDef *huart);
1663
1664/* Callbacks Register/UnRegister functions ***********************************/
1665#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
1666HAL_StatusTypeDef HAL_UART_RegisterCallback(UART_HandleTypeDef *huart, HAL_UART_CallbackIDTypeDef CallbackID,
1667 pUART_CallbackTypeDef pCallback);
1668HAL_StatusTypeDef HAL_UART_UnRegisterCallback(UART_HandleTypeDef *huart, HAL_UART_CallbackIDTypeDef CallbackID);
1669
1670HAL_StatusTypeDef HAL_UART_RegisterRxEventCallback(UART_HandleTypeDef *huart, pUART_RxEventCallbackTypeDef pCallback);
1671HAL_StatusTypeDef HAL_UART_UnRegisterRxEventCallback(UART_HandleTypeDef *huart);
1672#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
1673
1682/* IO operation functions *****************************************************/
1683HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout);
1684HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);
1685HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size);
1686HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
1687HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size);
1688HAL_StatusTypeDef HAL_UART_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
1689HAL_StatusTypeDef HAL_UART_DMAPause(UART_HandleTypeDef *huart);
1690HAL_StatusTypeDef HAL_UART_DMAResume(UART_HandleTypeDef *huart);
1691HAL_StatusTypeDef HAL_UART_DMAStop(UART_HandleTypeDef *huart);
1692/* Transfer Abort functions */
1693HAL_StatusTypeDef HAL_UART_Abort(UART_HandleTypeDef *huart);
1694HAL_StatusTypeDef HAL_UART_AbortTransmit(UART_HandleTypeDef *huart);
1695HAL_StatusTypeDef HAL_UART_AbortReceive(UART_HandleTypeDef *huart);
1696HAL_StatusTypeDef HAL_UART_Abort_IT(UART_HandleTypeDef *huart);
1697HAL_StatusTypeDef HAL_UART_AbortTransmit_IT(UART_HandleTypeDef *huart);
1698HAL_StatusTypeDef HAL_UART_AbortReceive_IT(UART_HandleTypeDef *huart);
1699
1700void HAL_UART_IRQHandler(UART_HandleTypeDef *huart);
1701void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *huart);
1702void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart);
1703void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart);
1704void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart);
1705void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart);
1706void HAL_UART_AbortCpltCallback(UART_HandleTypeDef *huart);
1707void HAL_UART_AbortTransmitCpltCallback(UART_HandleTypeDef *huart);
1708void HAL_UART_AbortReceiveCpltCallback(UART_HandleTypeDef *huart);
1709
1710void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size);
1711
1720/* Peripheral Control functions ************************************************/
1721void HAL_UART_ReceiverTimeout_Config(UART_HandleTypeDef *huart, uint32_t TimeoutValue);
1722HAL_StatusTypeDef HAL_UART_EnableReceiverTimeout(UART_HandleTypeDef *huart);
1723HAL_StatusTypeDef HAL_UART_DisableReceiverTimeout(UART_HandleTypeDef *huart);
1724
1725HAL_StatusTypeDef HAL_LIN_SendBreak(UART_HandleTypeDef *huart);
1726HAL_StatusTypeDef HAL_MultiProcessor_EnableMuteMode(UART_HandleTypeDef *huart);
1727HAL_StatusTypeDef HAL_MultiProcessor_DisableMuteMode(UART_HandleTypeDef *huart);
1728void HAL_MultiProcessor_EnterMuteMode(UART_HandleTypeDef *huart);
1729HAL_StatusTypeDef HAL_HalfDuplex_EnableTransmitter(UART_HandleTypeDef *huart);
1730HAL_StatusTypeDef HAL_HalfDuplex_EnableReceiver(UART_HandleTypeDef *huart);
1731
1740/* Peripheral State and Errors functions **************************************************/
1741HAL_UART_StateTypeDef HAL_UART_GetState(const UART_HandleTypeDef *huart);
1742uint32_t HAL_UART_GetError(const UART_HandleTypeDef *huart);
1743
1752/* Private functions -----------------------------------------------------------*/
1756#if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
1757void UART_InitCallbacksToDefault(UART_HandleTypeDef *huart);
1758#endif /* USE_HAL_UART_REGISTER_CALLBACKS */
1759HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart);
1760HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart);
1761HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status,
1762 uint32_t Tickstart, uint32_t Timeout);
1763void UART_AdvFeatureConfig(UART_HandleTypeDef *huart);
1764HAL_StatusTypeDef UART_Start_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
1765HAL_StatusTypeDef UART_Start_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
1766
1771/* Private variables -----------------------------------------------------------*/
1776/* Prescaler Table used in BRR computation macros.
1777 Declared as extern here to allow use of private UART macros, outside of HAL UART functions */
1778extern const uint16_t UARTPrescTable[12];
1791#ifdef __cplusplus
1792}
1793#endif
1794
1795#endif /* STM32H7xx_HAL_UART_H */
1796
#define __IO
Definition: core_cm4.h:239
struct __UART_HandleTypeDef UART_HandleTypeDef
UART handle Structure definition.
uint32_t HAL_UART_StateTypeDef
HAL UART State definition.
Definition: stm32h7xx_hal_uart.h:180
uint32_t HAL_UART_RxTypeTypeDef
HAL UART Reception type definition.
Definition: stm32h7xx_hal_uart.h:207
UART_ClockSourceTypeDef
UART clock sources definition.
Definition: stm32h7xx_hal_uart.h:186
uint32_t HAL_UART_RxEventTypeTypeDef
HAL UART Rx Event type definition.
Definition: stm32h7xx_hal_uart.h:218
@ UART_CLOCKSOURCE_PLL3
Definition: stm32h7xx_hal_uart.h:191
@ UART_CLOCKSOURCE_D2PCLK2
Definition: stm32h7xx_hal_uart.h:188
@ UART_CLOCKSOURCE_PLL2
Definition: stm32h7xx_hal_uart.h:190
@ UART_CLOCKSOURCE_D3PCLK1
Definition: stm32h7xx_hal_uart.h:189
@ UART_CLOCKSOURCE_CSI
Definition: stm32h7xx_hal_uart.h:193
@ UART_CLOCKSOURCE_UNDEFINED
Definition: stm32h7xx_hal_uart.h:195
@ UART_CLOCKSOURCE_LSE
Definition: stm32h7xx_hal_uart.h:194
@ UART_CLOCKSOURCE_D2PCLK1
Definition: stm32h7xx_hal_uart.h:187
@ UART_CLOCKSOURCE_HSI
Definition: stm32h7xx_hal_uart.h:192
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 UART HAL Extended module.
UART Advanced Features initialization structure definition.
Definition: stm32h7xx_hal_uart.h:104
uint32_t Swap
Definition: stm32h7xx_hal_uart.h:120
uint32_t AutoBaudRateMode
Definition: stm32h7xx_hal_uart.h:132
uint32_t AdvFeatureInit
Definition: stm32h7xx_hal_uart.h:105
uint32_t DMADisableonRxError
Definition: stm32h7xx_hal_uart.h:126
uint32_t MSBFirst
Definition: stm32h7xx_hal_uart.h:136
uint32_t RxPinLevelInvert
Definition: stm32h7xx_hal_uart.h:113
uint32_t AutoBaudRateEnable
Definition: stm32h7xx_hal_uart.h:129
uint32_t TxPinLevelInvert
Definition: stm32h7xx_hal_uart.h:110
uint32_t DataInvert
Definition: stm32h7xx_hal_uart.h:116
uint32_t OverrunDisable
Definition: stm32h7xx_hal_uart.h:123
UART Init Structure definition.
Definition: stm32h7xx_hal_uart.h:48
uint32_t WordLength
Definition: stm32h7xx_hal_uart.h:67
uint32_t OneBitSampling
Definition: stm32h7xx_hal_uart.h:91
uint32_t StopBits
Definition: stm32h7xx_hal_uart.h:70
uint32_t OverSampling
Definition: stm32h7xx_hal_uart.h:87
uint32_t Mode
Definition: stm32h7xx_hal_uart.h:80
uint32_t HwFlowCtl
Definition: stm32h7xx_hal_uart.h:83
uint32_t Parity
Definition: stm32h7xx_hal_uart.h:73
uint32_t BaudRate
Definition: stm32h7xx_hal_uart.h:49
uint32_t ClockPrescaler
Definition: stm32h7xx_hal_uart.h:95
Universal Synchronous Asynchronous Receiver Transmitter.
Definition: stm32h723xx.h:1596
DMA handle Structure definition.
Definition: stm32h7xx_hal_dma.h:138
UART handle Structure definition.
Definition: stm32h7xx_hal_uart.h:224
__IO HAL_UART_RxEventTypeTypeDef RxEventType
Definition: stm32h7xx_hal_uart.h:254
__IO uint32_t ErrorCode
Definition: stm32h7xx_hal_uart.h:273
__IO uint16_t RxXferCount
Definition: stm32h7xx_hal_uart.h:241
__IO HAL_UART_StateTypeDef gState
Definition: stm32h7xx_hal_uart.h:266
__IO HAL_UART_StateTypeDef RxState
Definition: stm32h7xx_hal_uart.h:270
uint16_t TxXferSize
Definition: stm32h7xx_hal_uart.h:233
HAL_LockTypeDef Lock
Definition: stm32h7xx_hal_uart.h:264
void(* TxISR)(struct __UART_HandleTypeDef *huart)
Definition: stm32h7xx_hal_uart.h:258
uint8_t * pRxBuffPtr
Definition: stm32h7xx_hal_uart.h:237
uint16_t Mask
Definition: stm32h7xx_hal_uart.h:243
UART_InitTypeDef Init
Definition: stm32h7xx_hal_uart.h:227
__IO uint16_t TxXferCount
Definition: stm32h7xx_hal_uart.h:235
void(* RxISR)(struct __UART_HandleTypeDef *huart)
Definition: stm32h7xx_hal_uart.h:256
UART_AdvFeatureInitTypeDef AdvancedInit
Definition: stm32h7xx_hal_uart.h:229
DMA_HandleTypeDef * hdmarx
Definition: stm32h7xx_hal_uart.h:262
USART_TypeDef * Instance
Definition: stm32h7xx_hal_uart.h:225
uint32_t FifoMode
Definition: stm32h7xx_hal_uart.h:245
const uint8_t * pTxBuffPtr
Definition: stm32h7xx_hal_uart.h:231
uint16_t NbRxDataToProcess
Definition: stm32h7xx_hal_uart.h:248
__IO HAL_UART_RxTypeTypeDef ReceptionType
Definition: stm32h7xx_hal_uart.h:252
uint16_t RxXferSize
Definition: stm32h7xx_hal_uart.h:239
uint16_t NbTxDataToProcess
Definition: stm32h7xx_hal_uart.h:250
DMA_HandleTypeDef * hdmatx
Definition: stm32h7xx_hal_uart.h:260