stm32f4xx_ll_usart.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32F4xx_LL_USART_H
22 #define __STM32F4xx_LL_USART_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f4xx.h"
30 
35 #if defined (USART1) || defined (USART2) || defined (USART3) || defined (USART6) || defined (UART4) || defined (UART5) || defined (UART7) || defined (UART8) || defined (UART9) || defined (UART10)
36 
41 /* Private types -------------------------------------------------------------*/
42 /* Private variables ---------------------------------------------------------*/
43 
44 /* Private constants ---------------------------------------------------------*/
49 /* Defines used for the bit position in the register and perform offsets*/
50 #define USART_POSITION_GTPR_GT USART_GTPR_GT_Pos
51 
55 /* Private macros ------------------------------------------------------------*/
56 #if defined(USE_FULL_LL_DRIVER)
57 
63 #endif /*USE_FULL_LL_DRIVER*/
64 
65 /* Exported types ------------------------------------------------------------*/
66 #if defined(USE_FULL_LL_DRIVER)
67 
74 typedef struct
75 {
76  uint32_t BaudRate;
80  uint32_t DataWidth;
85  uint32_t StopBits;
90  uint32_t Parity;
95  uint32_t TransferDirection;
100  uint32_t HardwareFlowControl;
105  uint32_t OverSampling;
110 } LL_USART_InitTypeDef;
111 
115 typedef struct
116 {
117  uint32_t ClockOutput;
124  uint32_t ClockPolarity;
130  uint32_t ClockPhase;
136  uint32_t LastBitClockPulse;
143 } LL_USART_ClockInitTypeDef;
144 
148 #endif /* USE_FULL_LL_DRIVER */
149 
150 /* Exported constants --------------------------------------------------------*/
159 #define LL_USART_SR_PE USART_SR_PE
160 #define LL_USART_SR_FE USART_SR_FE
161 #define LL_USART_SR_NE USART_SR_NE
162 #define LL_USART_SR_ORE USART_SR_ORE
163 #define LL_USART_SR_IDLE USART_SR_IDLE
164 #define LL_USART_SR_RXNE USART_SR_RXNE
165 #define LL_USART_SR_TC USART_SR_TC
166 #define LL_USART_SR_TXE USART_SR_TXE
167 #define LL_USART_SR_LBD USART_SR_LBD
168 #define LL_USART_SR_CTS USART_SR_CTS
177 #define LL_USART_CR1_IDLEIE USART_CR1_IDLEIE
178 #define LL_USART_CR1_RXNEIE USART_CR1_RXNEIE
179 #define LL_USART_CR1_TCIE USART_CR1_TCIE
180 #define LL_USART_CR1_TXEIE USART_CR1_TXEIE
181 #define LL_USART_CR1_PEIE USART_CR1_PEIE
182 #define LL_USART_CR2_LBDIE USART_CR2_LBDIE
183 #define LL_USART_CR3_EIE USART_CR3_EIE
184 #define LL_USART_CR3_CTSIE USART_CR3_CTSIE
192 #define LL_USART_DIRECTION_NONE 0x00000000U
193 #define LL_USART_DIRECTION_RX USART_CR1_RE
194 #define LL_USART_DIRECTION_TX USART_CR1_TE
195 #define LL_USART_DIRECTION_TX_RX (USART_CR1_TE |USART_CR1_RE)
203 #define LL_USART_PARITY_NONE 0x00000000U
204 #define LL_USART_PARITY_EVEN USART_CR1_PCE
205 #define LL_USART_PARITY_ODD (USART_CR1_PCE | USART_CR1_PS)
213 #define LL_USART_WAKEUP_IDLELINE 0x00000000U
214 #define LL_USART_WAKEUP_ADDRESSMARK USART_CR1_WAKE
222 #define LL_USART_DATAWIDTH_8B 0x00000000U
223 #define LL_USART_DATAWIDTH_9B USART_CR1_M
231 #define LL_USART_OVERSAMPLING_16 0x00000000U
232 #define LL_USART_OVERSAMPLING_8 USART_CR1_OVER8
237 #if defined(USE_FULL_LL_DRIVER)
238 
242 #define LL_USART_CLOCK_DISABLE 0x00000000U
243 #define LL_USART_CLOCK_ENABLE USART_CR2_CLKEN
247 #endif /*USE_FULL_LL_DRIVER*/
248 
252 #define LL_USART_LASTCLKPULSE_NO_OUTPUT 0x00000000U
253 #define LL_USART_LASTCLKPULSE_OUTPUT USART_CR2_LBCL
261 #define LL_USART_PHASE_1EDGE 0x00000000U
262 #define LL_USART_PHASE_2EDGE USART_CR2_CPHA
270 #define LL_USART_POLARITY_LOW 0x00000000U
271 #define LL_USART_POLARITY_HIGH USART_CR2_CPOL
279 #define LL_USART_STOPBITS_0_5 USART_CR2_STOP_0
280 #define LL_USART_STOPBITS_1 0x00000000U
281 #define LL_USART_STOPBITS_1_5 (USART_CR2_STOP_0 | USART_CR2_STOP_1)
282 #define LL_USART_STOPBITS_2 USART_CR2_STOP_1
290 #define LL_USART_HWCONTROL_NONE 0x00000000U
291 #define LL_USART_HWCONTROL_RTS USART_CR3_RTSE
292 #define LL_USART_HWCONTROL_CTS USART_CR3_CTSE
293 #define LL_USART_HWCONTROL_RTS_CTS (USART_CR3_RTSE | USART_CR3_CTSE)
301 #define LL_USART_IRDA_POWER_NORMAL 0x00000000U
302 #define LL_USART_IRDA_POWER_LOW USART_CR3_IRLP
310 #define LL_USART_LINBREAK_DETECT_10B 0x00000000U
311 #define LL_USART_LINBREAK_DETECT_11B USART_CR2_LBDL
320 /* Exported macro ------------------------------------------------------------*/
321 
336 #define LL_USART_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
337 
344 #define LL_USART_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
345 
360 #define __LL_USART_DIV_SAMPLING8_100(__PERIPHCLK__, __BAUDRATE__) ((uint32_t)((((uint64_t)(__PERIPHCLK__))*25)/(2*((uint64_t)(__BAUDRATE__)))))
361 #define __LL_USART_DIVMANT_SAMPLING8(__PERIPHCLK__, __BAUDRATE__) (__LL_USART_DIV_SAMPLING8_100((__PERIPHCLK__), (__BAUDRATE__))/100)
362 #define __LL_USART_DIVFRAQ_SAMPLING8(__PERIPHCLK__, __BAUDRATE__) ((((__LL_USART_DIV_SAMPLING8_100((__PERIPHCLK__), (__BAUDRATE__)) - (__LL_USART_DIVMANT_SAMPLING8((__PERIPHCLK__), (__BAUDRATE__)) * 100)) * 8) + 50) / 100)
363 /* UART BRR = mantissa + overflow + fraction
364  = (UART DIVMANT << 4) + ((UART DIVFRAQ & 0xF8) << 1) + (UART DIVFRAQ & 0x07) */
365 #define __LL_USART_DIV_SAMPLING8(__PERIPHCLK__, __BAUDRATE__) (((__LL_USART_DIVMANT_SAMPLING8((__PERIPHCLK__), (__BAUDRATE__)) << 4) + \
366  ((__LL_USART_DIVFRAQ_SAMPLING8((__PERIPHCLK__), (__BAUDRATE__)) & 0xF8) << 1)) + \
367  (__LL_USART_DIVFRAQ_SAMPLING8((__PERIPHCLK__), (__BAUDRATE__)) & 0x07))
368 
376 #define __LL_USART_DIV_SAMPLING16_100(__PERIPHCLK__, __BAUDRATE__) ((uint32_t)((((uint64_t)(__PERIPHCLK__))*25)/(4*((uint64_t)(__BAUDRATE__)))))
377 #define __LL_USART_DIVMANT_SAMPLING16(__PERIPHCLK__, __BAUDRATE__) (__LL_USART_DIV_SAMPLING16_100((__PERIPHCLK__), (__BAUDRATE__))/100)
378 #define __LL_USART_DIVFRAQ_SAMPLING16(__PERIPHCLK__, __BAUDRATE__) ((((__LL_USART_DIV_SAMPLING16_100((__PERIPHCLK__), (__BAUDRATE__)) - (__LL_USART_DIVMANT_SAMPLING16((__PERIPHCLK__), (__BAUDRATE__)) * 100)) * 16) + 50) / 100)
379 /* USART BRR = mantissa + overflow + fraction
380  = (USART DIVMANT << 4) + (USART DIVFRAQ & 0xF0) + (USART DIVFRAQ & 0x0F) */
381 #define __LL_USART_DIV_SAMPLING16(__PERIPHCLK__, __BAUDRATE__) (((__LL_USART_DIVMANT_SAMPLING16((__PERIPHCLK__), (__BAUDRATE__)) << 4) + \
382  (__LL_USART_DIVFRAQ_SAMPLING16((__PERIPHCLK__), (__BAUDRATE__)) & 0xF0)) + \
383  (__LL_USART_DIVFRAQ_SAMPLING16((__PERIPHCLK__), (__BAUDRATE__)) & 0x0F))
384 
393 /* Exported functions --------------------------------------------------------*/
394 
409 __STATIC_INLINE void LL_USART_Enable(USART_TypeDef *USARTx)
410 {
411  SET_BIT(USARTx->CR1, USART_CR1_UE);
412 }
413 
423 __STATIC_INLINE void LL_USART_Disable(USART_TypeDef *USARTx)
424 {
425  CLEAR_BIT(USARTx->CR1, USART_CR1_UE);
426 }
427 
434 __STATIC_INLINE uint32_t LL_USART_IsEnabled(USART_TypeDef *USARTx)
435 {
436  return (READ_BIT(USARTx->CR1, USART_CR1_UE) == (USART_CR1_UE));
437 }
438 
445 __STATIC_INLINE void LL_USART_EnableDirectionRx(USART_TypeDef *USARTx)
446 {
447  SET_BIT(USARTx->CR1, USART_CR1_RE);
448 }
449 
456 __STATIC_INLINE void LL_USART_DisableDirectionRx(USART_TypeDef *USARTx)
457 {
458  CLEAR_BIT(USARTx->CR1, USART_CR1_RE);
459 }
460 
467 __STATIC_INLINE void LL_USART_EnableDirectionTx(USART_TypeDef *USARTx)
468 {
469  SET_BIT(USARTx->CR1, USART_CR1_TE);
470 }
471 
478 __STATIC_INLINE void LL_USART_DisableDirectionTx(USART_TypeDef *USARTx)
479 {
480  CLEAR_BIT(USARTx->CR1, USART_CR1_TE);
481 }
482 
496 __STATIC_INLINE void LL_USART_SetTransferDirection(USART_TypeDef *USARTx, uint32_t TransferDirection)
497 {
498  MODIFY_REG(USARTx->CR1, USART_CR1_RE | USART_CR1_TE, TransferDirection);
499 }
500 
512 __STATIC_INLINE uint32_t LL_USART_GetTransferDirection(USART_TypeDef *USARTx)
513 {
514  return (uint32_t)(READ_BIT(USARTx->CR1, USART_CR1_RE | USART_CR1_TE));
515 }
516 
531 __STATIC_INLINE void LL_USART_SetParity(USART_TypeDef *USARTx, uint32_t Parity)
532 {
533  MODIFY_REG(USARTx->CR1, USART_CR1_PS | USART_CR1_PCE, Parity);
534 }
535 
546 __STATIC_INLINE uint32_t LL_USART_GetParity(USART_TypeDef *USARTx)
547 {
548  return (uint32_t)(READ_BIT(USARTx->CR1, USART_CR1_PS | USART_CR1_PCE));
549 }
550 
560 __STATIC_INLINE void LL_USART_SetWakeUpMethod(USART_TypeDef *USARTx, uint32_t Method)
561 {
562  MODIFY_REG(USARTx->CR1, USART_CR1_WAKE, Method);
563 }
564 
573 __STATIC_INLINE uint32_t LL_USART_GetWakeUpMethod(USART_TypeDef *USARTx)
574 {
575  return (uint32_t)(READ_BIT(USARTx->CR1, USART_CR1_WAKE));
576 }
577 
587 __STATIC_INLINE void LL_USART_SetDataWidth(USART_TypeDef *USARTx, uint32_t DataWidth)
588 {
589  MODIFY_REG(USARTx->CR1, USART_CR1_M, DataWidth);
590 }
591 
600 __STATIC_INLINE uint32_t LL_USART_GetDataWidth(USART_TypeDef *USARTx)
601 {
602  return (uint32_t)(READ_BIT(USARTx->CR1, USART_CR1_M));
603 }
604 
614 __STATIC_INLINE void LL_USART_SetOverSampling(USART_TypeDef *USARTx, uint32_t OverSampling)
615 {
616  MODIFY_REG(USARTx->CR1, USART_CR1_OVER8, OverSampling);
617 }
618 
627 __STATIC_INLINE uint32_t LL_USART_GetOverSampling(USART_TypeDef *USARTx)
628 {
629  return (uint32_t)(READ_BIT(USARTx->CR1, USART_CR1_OVER8));
630 }
631 
643 __STATIC_INLINE void LL_USART_SetLastClkPulseOutput(USART_TypeDef *USARTx, uint32_t LastBitClockPulse)
644 {
645  MODIFY_REG(USARTx->CR2, USART_CR2_LBCL, LastBitClockPulse);
646 }
647 
659 __STATIC_INLINE uint32_t LL_USART_GetLastClkPulseOutput(USART_TypeDef *USARTx)
660 {
661  return (uint32_t)(READ_BIT(USARTx->CR2, USART_CR2_LBCL));
662 }
663 
675 __STATIC_INLINE void LL_USART_SetClockPhase(USART_TypeDef *USARTx, uint32_t ClockPhase)
676 {
677  MODIFY_REG(USARTx->CR2, USART_CR2_CPHA, ClockPhase);
678 }
679 
690 __STATIC_INLINE uint32_t LL_USART_GetClockPhase(USART_TypeDef *USARTx)
691 {
692  return (uint32_t)(READ_BIT(USARTx->CR2, USART_CR2_CPHA));
693 }
694 
706 __STATIC_INLINE void LL_USART_SetClockPolarity(USART_TypeDef *USARTx, uint32_t ClockPolarity)
707 {
708  MODIFY_REG(USARTx->CR2, USART_CR2_CPOL, ClockPolarity);
709 }
710 
721 __STATIC_INLINE uint32_t LL_USART_GetClockPolarity(USART_TypeDef *USARTx)
722 {
723  return (uint32_t)(READ_BIT(USARTx->CR2, USART_CR2_CPOL));
724 }
725 
749 __STATIC_INLINE void LL_USART_ConfigClock(USART_TypeDef *USARTx, uint32_t Phase, uint32_t Polarity, uint32_t LBCPOutput)
750 {
751  MODIFY_REG(USARTx->CR2, USART_CR2_CPHA | USART_CR2_CPOL | USART_CR2_LBCL, Phase | Polarity | LBCPOutput);
752 }
753 
762 __STATIC_INLINE void LL_USART_EnableSCLKOutput(USART_TypeDef *USARTx)
763 {
764  SET_BIT(USARTx->CR2, USART_CR2_CLKEN);
765 }
766 
775 __STATIC_INLINE void LL_USART_DisableSCLKOutput(USART_TypeDef *USARTx)
776 {
777  CLEAR_BIT(USARTx->CR2, USART_CR2_CLKEN);
778 }
779 
788 __STATIC_INLINE uint32_t LL_USART_IsEnabledSCLKOutput(USART_TypeDef *USARTx)
789 {
790  return (READ_BIT(USARTx->CR2, USART_CR2_CLKEN) == (USART_CR2_CLKEN));
791 }
792 
804 __STATIC_INLINE void LL_USART_SetStopBitsLength(USART_TypeDef *USARTx, uint32_t StopBits)
805 {
806  MODIFY_REG(USARTx->CR2, USART_CR2_STOP, StopBits);
807 }
808 
819 __STATIC_INLINE uint32_t LL_USART_GetStopBitsLength(USART_TypeDef *USARTx)
820 {
821  return (uint32_t)(READ_BIT(USARTx->CR2, USART_CR2_STOP));
822 }
823 
849 __STATIC_INLINE void LL_USART_ConfigCharacter(USART_TypeDef *USARTx, uint32_t DataWidth, uint32_t Parity,
850  uint32_t StopBits)
851 {
852  MODIFY_REG(USARTx->CR1, USART_CR1_PS | USART_CR1_PCE | USART_CR1_M, Parity | DataWidth);
853  MODIFY_REG(USARTx->CR2, USART_CR2_STOP, StopBits);
854 }
855 
865 __STATIC_INLINE void LL_USART_SetNodeAddress(USART_TypeDef *USARTx, uint32_t NodeAddress)
866 {
867  MODIFY_REG(USARTx->CR2, USART_CR2_ADD, (NodeAddress & USART_CR2_ADD));
868 }
869 
877 __STATIC_INLINE uint32_t LL_USART_GetNodeAddress(USART_TypeDef *USARTx)
878 {
879  return (uint32_t)(READ_BIT(USARTx->CR2, USART_CR2_ADD));
880 }
881 
890 __STATIC_INLINE void LL_USART_EnableRTSHWFlowCtrl(USART_TypeDef *USARTx)
891 {
892  SET_BIT(USARTx->CR3, USART_CR3_RTSE);
893 }
894 
903 __STATIC_INLINE void LL_USART_DisableRTSHWFlowCtrl(USART_TypeDef *USARTx)
904 {
905  CLEAR_BIT(USARTx->CR3, USART_CR3_RTSE);
906 }
907 
916 __STATIC_INLINE void LL_USART_EnableCTSHWFlowCtrl(USART_TypeDef *USARTx)
917 {
918  SET_BIT(USARTx->CR3, USART_CR3_CTSE);
919 }
920 
929 __STATIC_INLINE void LL_USART_DisableCTSHWFlowCtrl(USART_TypeDef *USARTx)
930 {
931  CLEAR_BIT(USARTx->CR3, USART_CR3_CTSE);
932 }
933 
948 __STATIC_INLINE void LL_USART_SetHWFlowCtrl(USART_TypeDef *USARTx, uint32_t HardwareFlowControl)
949 {
950  MODIFY_REG(USARTx->CR3, USART_CR3_RTSE | USART_CR3_CTSE, HardwareFlowControl);
951 }
952 
966 __STATIC_INLINE uint32_t LL_USART_GetHWFlowCtrl(USART_TypeDef *USARTx)
967 {
968  return (uint32_t)(READ_BIT(USARTx->CR3, USART_CR3_RTSE | USART_CR3_CTSE));
969 }
970 
977 __STATIC_INLINE void LL_USART_EnableOneBitSamp(USART_TypeDef *USARTx)
978 {
979  SET_BIT(USARTx->CR3, USART_CR3_ONEBIT);
980 }
981 
988 __STATIC_INLINE void LL_USART_DisableOneBitSamp(USART_TypeDef *USARTx)
989 {
990  CLEAR_BIT(USARTx->CR3, USART_CR3_ONEBIT);
991 }
992 
999 __STATIC_INLINE uint32_t LL_USART_IsEnabledOneBitSamp(USART_TypeDef *USARTx)
1000 {
1001  return (READ_BIT(USARTx->CR3, USART_CR3_ONEBIT) == (USART_CR3_ONEBIT));
1002 }
1003 
1019 __STATIC_INLINE void LL_USART_SetBaudRate(USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t OverSampling,
1020  uint32_t BaudRate)
1021 {
1022  if (OverSampling == LL_USART_OVERSAMPLING_8)
1023  {
1024  USARTx->BRR = (uint16_t)(__LL_USART_DIV_SAMPLING8(PeriphClk, BaudRate));
1025  }
1026  else
1027  {
1028  USARTx->BRR = (uint16_t)(__LL_USART_DIV_SAMPLING16(PeriphClk, BaudRate));
1029  }
1030 }
1031 
1044 __STATIC_INLINE uint32_t LL_USART_GetBaudRate(USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t OverSampling)
1045 {
1046  register uint32_t usartdiv = 0x0U;
1047  register uint32_t brrresult = 0x0U;
1048 
1049  usartdiv = USARTx->BRR;
1050 
1051  if (OverSampling == LL_USART_OVERSAMPLING_8)
1052  {
1053  if ((usartdiv & 0xFFF7U) != 0U)
1054  {
1055  usartdiv = (uint16_t)((usartdiv & 0xFFF0U) | ((usartdiv & 0x0007U) << 1U)) ;
1056  brrresult = (PeriphClk * 2U) / usartdiv;
1057  }
1058  }
1059  else
1060  {
1061  if ((usartdiv & 0xFFFFU) != 0U)
1062  {
1063  brrresult = PeriphClk / usartdiv;
1064  }
1065  }
1066  return (brrresult);
1067 }
1068 
1085 __STATIC_INLINE void LL_USART_EnableIrda(USART_TypeDef *USARTx)
1086 {
1087  SET_BIT(USARTx->CR3, USART_CR3_IREN);
1088 }
1089 
1098 __STATIC_INLINE void LL_USART_DisableIrda(USART_TypeDef *USARTx)
1099 {
1100  CLEAR_BIT(USARTx->CR3, USART_CR3_IREN);
1101 }
1102 
1111 __STATIC_INLINE uint32_t LL_USART_IsEnabledIrda(USART_TypeDef *USARTx)
1112 {
1113  return (READ_BIT(USARTx->CR3, USART_CR3_IREN) == (USART_CR3_IREN));
1114 }
1115 
1127 __STATIC_INLINE void LL_USART_SetIrdaPowerMode(USART_TypeDef *USARTx, uint32_t PowerMode)
1128 {
1129  MODIFY_REG(USARTx->CR3, USART_CR3_IRLP, PowerMode);
1130 }
1131 
1142 __STATIC_INLINE uint32_t LL_USART_GetIrdaPowerMode(USART_TypeDef *USARTx)
1143 {
1144  return (uint32_t)(READ_BIT(USARTx->CR3, USART_CR3_IRLP));
1145 }
1146 
1157 __STATIC_INLINE void LL_USART_SetIrdaPrescaler(USART_TypeDef *USARTx, uint32_t PrescalerValue)
1158 {
1159  MODIFY_REG(USARTx->GTPR, USART_GTPR_PSC, PrescalerValue);
1160 }
1161 
1171 __STATIC_INLINE uint32_t LL_USART_GetIrdaPrescaler(USART_TypeDef *USARTx)
1172 {
1173  return (uint32_t)(READ_BIT(USARTx->GTPR, USART_GTPR_PSC));
1174 }
1175 
1192 __STATIC_INLINE void LL_USART_EnableSmartcardNACK(USART_TypeDef *USARTx)
1193 {
1194  SET_BIT(USARTx->CR3, USART_CR3_NACK);
1195 }
1196 
1205 __STATIC_INLINE void LL_USART_DisableSmartcardNACK(USART_TypeDef *USARTx)
1206 {
1207  CLEAR_BIT(USARTx->CR3, USART_CR3_NACK);
1208 }
1209 
1218 __STATIC_INLINE uint32_t LL_USART_IsEnabledSmartcardNACK(USART_TypeDef *USARTx)
1219 {
1220  return (READ_BIT(USARTx->CR3, USART_CR3_NACK) == (USART_CR3_NACK));
1221 }
1222 
1231 __STATIC_INLINE void LL_USART_EnableSmartcard(USART_TypeDef *USARTx)
1232 {
1233  SET_BIT(USARTx->CR3, USART_CR3_SCEN);
1234 }
1235 
1244 __STATIC_INLINE void LL_USART_DisableSmartcard(USART_TypeDef *USARTx)
1245 {
1246  CLEAR_BIT(USARTx->CR3, USART_CR3_SCEN);
1247 }
1248 
1257 __STATIC_INLINE uint32_t LL_USART_IsEnabledSmartcard(USART_TypeDef *USARTx)
1258 {
1259  return (READ_BIT(USARTx->CR3, USART_CR3_SCEN) == (USART_CR3_SCEN));
1260 }
1261 
1272 __STATIC_INLINE void LL_USART_SetSmartcardPrescaler(USART_TypeDef *USARTx, uint32_t PrescalerValue)
1273 {
1274  MODIFY_REG(USARTx->GTPR, USART_GTPR_PSC, PrescalerValue);
1275 }
1276 
1286 __STATIC_INLINE uint32_t LL_USART_GetSmartcardPrescaler(USART_TypeDef *USARTx)
1287 {
1288  return (uint32_t)(READ_BIT(USARTx->GTPR, USART_GTPR_PSC));
1289 }
1290 
1301 __STATIC_INLINE void LL_USART_SetSmartcardGuardTime(USART_TypeDef *USARTx, uint32_t GuardTime)
1302 {
1303  MODIFY_REG(USARTx->GTPR, USART_GTPR_GT, GuardTime << USART_POSITION_GTPR_GT);
1304 }
1305 
1315 __STATIC_INLINE uint32_t LL_USART_GetSmartcardGuardTime(USART_TypeDef *USARTx)
1316 {
1317  return (uint32_t)(READ_BIT(USARTx->GTPR, USART_GTPR_GT) >> USART_POSITION_GTPR_GT);
1318 }
1319 
1336 __STATIC_INLINE void LL_USART_EnableHalfDuplex(USART_TypeDef *USARTx)
1337 {
1338  SET_BIT(USARTx->CR3, USART_CR3_HDSEL);
1339 }
1340 
1349 __STATIC_INLINE void LL_USART_DisableHalfDuplex(USART_TypeDef *USARTx)
1350 {
1351  CLEAR_BIT(USARTx->CR3, USART_CR3_HDSEL);
1352 }
1353 
1362 __STATIC_INLINE uint32_t LL_USART_IsEnabledHalfDuplex(USART_TypeDef *USARTx)
1363 {
1364  return (READ_BIT(USARTx->CR3, USART_CR3_HDSEL) == (USART_CR3_HDSEL));
1365 }
1366 
1386 __STATIC_INLINE void LL_USART_SetLINBrkDetectionLen(USART_TypeDef *USARTx, uint32_t LINBDLength)
1387 {
1388  MODIFY_REG(USARTx->CR2, USART_CR2_LBDL, LINBDLength);
1389 }
1390 
1401 __STATIC_INLINE uint32_t LL_USART_GetLINBrkDetectionLen(USART_TypeDef *USARTx)
1402 {
1403  return (uint32_t)(READ_BIT(USARTx->CR2, USART_CR2_LBDL));
1404 }
1405 
1414 __STATIC_INLINE void LL_USART_EnableLIN(USART_TypeDef *USARTx)
1415 {
1416  SET_BIT(USARTx->CR2, USART_CR2_LINEN);
1417 }
1418 
1427 __STATIC_INLINE void LL_USART_DisableLIN(USART_TypeDef *USARTx)
1428 {
1429  CLEAR_BIT(USARTx->CR2, USART_CR2_LINEN);
1430 }
1431 
1440 __STATIC_INLINE uint32_t LL_USART_IsEnabledLIN(USART_TypeDef *USARTx)
1441 {
1442  return (READ_BIT(USARTx->CR2, USART_CR2_LINEN) == (USART_CR2_LINEN));
1443 }
1444 
1478 __STATIC_INLINE void LL_USART_ConfigAsyncMode(USART_TypeDef *USARTx)
1479 {
1480  /* In Asynchronous mode, the following bits must be kept cleared:
1481  - LINEN, CLKEN bits in the USART_CR2 register,
1482  - SCEN, IREN and HDSEL bits in the USART_CR3 register.*/
1485 }
1486 
1514 __STATIC_INLINE void LL_USART_ConfigSyncMode(USART_TypeDef *USARTx)
1515 {
1516  /* In Synchronous mode, the following bits must be kept cleared:
1517  - LINEN bit in the USART_CR2 register,
1518  - SCEN, IREN and HDSEL bits in the USART_CR3 register.*/
1519  CLEAR_BIT(USARTx->CR2, (USART_CR2_LINEN));
1521  /* set the UART/USART in Synchronous mode */
1522  SET_BIT(USARTx->CR2, USART_CR2_CLKEN);
1523 }
1524 
1554 __STATIC_INLINE void LL_USART_ConfigLINMode(USART_TypeDef *USARTx)
1555 {
1556  /* In LIN mode, the following bits must be kept cleared:
1557  - STOP and CLKEN bits in the USART_CR2 register,
1558  - IREN, SCEN and HDSEL bits in the USART_CR3 register.*/
1561  /* Set the UART/USART in LIN mode */
1562  SET_BIT(USARTx->CR2, USART_CR2_LINEN);
1563 }
1564 
1592 __STATIC_INLINE void LL_USART_ConfigHalfDuplexMode(USART_TypeDef *USARTx)
1593 {
1594  /* In Half Duplex mode, the following bits must be kept cleared:
1595  - LINEN and CLKEN bits in the USART_CR2 register,
1596  - SCEN and IREN bits in the USART_CR3 register.*/
1599  /* set the UART/USART in Half Duplex mode */
1600  SET_BIT(USARTx->CR3, USART_CR3_HDSEL);
1601 }
1602 
1632 __STATIC_INLINE void LL_USART_ConfigSmartcardMode(USART_TypeDef *USARTx)
1633 {
1634  /* In Smartcard mode, the following bits must be kept cleared:
1635  - LINEN bit in the USART_CR2 register,
1636  - IREN and HDSEL bits in the USART_CR3 register.*/
1637  CLEAR_BIT(USARTx->CR2, (USART_CR2_LINEN));
1639  /* Configure Stop bits to 1.5 bits */
1640  /* Synchronous mode is activated by default */
1642  /* set the UART/USART in Smartcard mode */
1643  SET_BIT(USARTx->CR3, USART_CR3_SCEN);
1644 }
1645 
1675 __STATIC_INLINE void LL_USART_ConfigIrdaMode(USART_TypeDef *USARTx)
1676 {
1677  /* In IRDA mode, the following bits must be kept cleared:
1678  - LINEN, STOP and CLKEN bits in the USART_CR2 register,
1679  - SCEN and HDSEL bits in the USART_CR3 register.*/
1682  /* set the UART/USART in IRDA mode */
1683  SET_BIT(USARTx->CR3, USART_CR3_IREN);
1684 }
1685 
1713 __STATIC_INLINE void LL_USART_ConfigMultiProcessMode(USART_TypeDef *USARTx)
1714 {
1715  /* In Multi Processor mode, the following bits must be kept cleared:
1716  - LINEN and CLKEN bits in the USART_CR2 register,
1717  - IREN, SCEN and HDSEL bits in the USART_CR3 register.*/
1720 }
1721 
1736 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_PE(USART_TypeDef *USARTx)
1737 {
1738  return (READ_BIT(USARTx->SR, USART_SR_PE) == (USART_SR_PE));
1739 }
1740 
1747 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_FE(USART_TypeDef *USARTx)
1748 {
1749  return (READ_BIT(USARTx->SR, USART_SR_FE) == (USART_SR_FE));
1750 }
1751 
1758 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_NE(USART_TypeDef *USARTx)
1759 {
1760  return (READ_BIT(USARTx->SR, USART_SR_NE) == (USART_SR_NE));
1761 }
1762 
1769 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_ORE(USART_TypeDef *USARTx)
1770 {
1771  return (READ_BIT(USARTx->SR, USART_SR_ORE) == (USART_SR_ORE));
1772 }
1773 
1780 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_IDLE(USART_TypeDef *USARTx)
1781 {
1782  return (READ_BIT(USARTx->SR, USART_SR_IDLE) == (USART_SR_IDLE));
1783 }
1784 
1791 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_RXNE(USART_TypeDef *USARTx)
1792 {
1793  return (READ_BIT(USARTx->SR, USART_SR_RXNE) == (USART_SR_RXNE));
1794 }
1795 
1802 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TC(USART_TypeDef *USARTx)
1803 {
1804  return (READ_BIT(USARTx->SR, USART_SR_TC) == (USART_SR_TC));
1805 }
1806 
1813 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_TXE(USART_TypeDef *USARTx)
1814 {
1815  return (READ_BIT(USARTx->SR, USART_SR_TXE) == (USART_SR_TXE));
1816 }
1817 
1826 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_LBD(USART_TypeDef *USARTx)
1827 {
1828  return (READ_BIT(USARTx->SR, USART_SR_LBD) == (USART_SR_LBD));
1829 }
1830 
1839 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_nCTS(USART_TypeDef *USARTx)
1840 {
1841  return (READ_BIT(USARTx->SR, USART_SR_CTS) == (USART_SR_CTS));
1842 }
1843 
1850 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_SBK(USART_TypeDef *USARTx)
1851 {
1852  return (READ_BIT(USARTx->CR1, USART_CR1_SBK) == (USART_CR1_SBK));
1853 }
1854 
1861 __STATIC_INLINE uint32_t LL_USART_IsActiveFlag_RWU(USART_TypeDef *USARTx)
1862 {
1863  return (READ_BIT(USARTx->CR1, USART_CR1_RWU) == (USART_CR1_RWU));
1864 }
1865 
1876 __STATIC_INLINE void LL_USART_ClearFlag_PE(USART_TypeDef *USARTx)
1877 {
1878  __IO uint32_t tmpreg;
1879  tmpreg = USARTx->SR;
1880  (void) tmpreg;
1881  tmpreg = USARTx->DR;
1882  (void) tmpreg;
1883 }
1884 
1895 __STATIC_INLINE void LL_USART_ClearFlag_FE(USART_TypeDef *USARTx)
1896 {
1897  __IO uint32_t tmpreg;
1898  tmpreg = USARTx->SR;
1899  (void) tmpreg;
1900  tmpreg = USARTx->DR;
1901  (void) tmpreg;
1902 }
1903 
1914 __STATIC_INLINE void LL_USART_ClearFlag_NE(USART_TypeDef *USARTx)
1915 {
1916  __IO uint32_t tmpreg;
1917  tmpreg = USARTx->SR;
1918  (void) tmpreg;
1919  tmpreg = USARTx->DR;
1920  (void) tmpreg;
1921 }
1922 
1933 __STATIC_INLINE void LL_USART_ClearFlag_ORE(USART_TypeDef *USARTx)
1934 {
1935  __IO uint32_t tmpreg;
1936  tmpreg = USARTx->SR;
1937  (void) tmpreg;
1938  tmpreg = USARTx->DR;
1939  (void) tmpreg;
1940 }
1941 
1952 __STATIC_INLINE void LL_USART_ClearFlag_IDLE(USART_TypeDef *USARTx)
1953 {
1954  __IO uint32_t tmpreg;
1955  tmpreg = USARTx->SR;
1956  (void) tmpreg;
1957  tmpreg = USARTx->DR;
1958  (void) tmpreg;
1959 }
1960 
1967 __STATIC_INLINE void LL_USART_ClearFlag_TC(USART_TypeDef *USARTx)
1968 {
1969  WRITE_REG(USARTx->SR, ~(USART_SR_TC));
1970 }
1971 
1978 __STATIC_INLINE void LL_USART_ClearFlag_RXNE(USART_TypeDef *USARTx)
1979 {
1980  WRITE_REG(USARTx->SR, ~(USART_SR_RXNE));
1981 }
1982 
1991 __STATIC_INLINE void LL_USART_ClearFlag_LBD(USART_TypeDef *USARTx)
1992 {
1993  WRITE_REG(USARTx->SR, ~(USART_SR_LBD));
1994 }
1995 
2004 __STATIC_INLINE void LL_USART_ClearFlag_nCTS(USART_TypeDef *USARTx)
2005 {
2006  WRITE_REG(USARTx->SR, ~(USART_SR_CTS));
2007 }
2008 
2023 __STATIC_INLINE void LL_USART_EnableIT_IDLE(USART_TypeDef *USARTx)
2024 {
2025  SET_BIT(USARTx->CR1, USART_CR1_IDLEIE);
2026 }
2027 
2034 __STATIC_INLINE void LL_USART_EnableIT_RXNE(USART_TypeDef *USARTx)
2035 {
2036  SET_BIT(USARTx->CR1, USART_CR1_RXNEIE);
2037 }
2038 
2045 __STATIC_INLINE void LL_USART_EnableIT_TC(USART_TypeDef *USARTx)
2046 {
2047  SET_BIT(USARTx->CR1, USART_CR1_TCIE);
2048 }
2049 
2056 __STATIC_INLINE void LL_USART_EnableIT_TXE(USART_TypeDef *USARTx)
2057 {
2058  SET_BIT(USARTx->CR1, USART_CR1_TXEIE);
2059 }
2060 
2067 __STATIC_INLINE void LL_USART_EnableIT_PE(USART_TypeDef *USARTx)
2068 {
2069  SET_BIT(USARTx->CR1, USART_CR1_PEIE);
2070 }
2071 
2080 __STATIC_INLINE void LL_USART_EnableIT_LBD(USART_TypeDef *USARTx)
2081 {
2082  SET_BIT(USARTx->CR2, USART_CR2_LBDIE);
2083 }
2084 
2095 __STATIC_INLINE void LL_USART_EnableIT_ERROR(USART_TypeDef *USARTx)
2096 {
2097  SET_BIT(USARTx->CR3, USART_CR3_EIE);
2098 }
2099 
2108 __STATIC_INLINE void LL_USART_EnableIT_CTS(USART_TypeDef *USARTx)
2109 {
2110  SET_BIT(USARTx->CR3, USART_CR3_CTSIE);
2111 }
2112 
2119 __STATIC_INLINE void LL_USART_DisableIT_IDLE(USART_TypeDef *USARTx)
2120 {
2121  CLEAR_BIT(USARTx->CR1, USART_CR1_IDLEIE);
2122 }
2123 
2130 __STATIC_INLINE void LL_USART_DisableIT_RXNE(USART_TypeDef *USARTx)
2131 {
2132  CLEAR_BIT(USARTx->CR1, USART_CR1_RXNEIE);
2133 }
2134 
2141 __STATIC_INLINE void LL_USART_DisableIT_TC(USART_TypeDef *USARTx)
2142 {
2143  CLEAR_BIT(USARTx->CR1, USART_CR1_TCIE);
2144 }
2145 
2152 __STATIC_INLINE void LL_USART_DisableIT_TXE(USART_TypeDef *USARTx)
2153 {
2154  CLEAR_BIT(USARTx->CR1, USART_CR1_TXEIE);
2155 }
2156 
2163 __STATIC_INLINE void LL_USART_DisableIT_PE(USART_TypeDef *USARTx)
2164 {
2165  CLEAR_BIT(USARTx->CR1, USART_CR1_PEIE);
2166 }
2167 
2176 __STATIC_INLINE void LL_USART_DisableIT_LBD(USART_TypeDef *USARTx)
2177 {
2178  CLEAR_BIT(USARTx->CR2, USART_CR2_LBDIE);
2179 }
2180 
2191 __STATIC_INLINE void LL_USART_DisableIT_ERROR(USART_TypeDef *USARTx)
2192 {
2193  CLEAR_BIT(USARTx->CR3, USART_CR3_EIE);
2194 }
2195 
2204 __STATIC_INLINE void LL_USART_DisableIT_CTS(USART_TypeDef *USARTx)
2205 {
2206  CLEAR_BIT(USARTx->CR3, USART_CR3_CTSIE);
2207 }
2208 
2215 __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_IDLE(USART_TypeDef *USARTx)
2216 {
2217  return (READ_BIT(USARTx->CR1, USART_CR1_IDLEIE) == (USART_CR1_IDLEIE));
2218 }
2219 
2226 __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_RXNE(USART_TypeDef *USARTx)
2227 {
2228  return (READ_BIT(USARTx->CR1, USART_CR1_RXNEIE) == (USART_CR1_RXNEIE));
2229 }
2230 
2237 __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TC(USART_TypeDef *USARTx)
2238 {
2239  return (READ_BIT(USARTx->CR1, USART_CR1_TCIE) == (USART_CR1_TCIE));
2240 }
2241 
2248 __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_TXE(USART_TypeDef *USARTx)
2249 {
2250  return (READ_BIT(USARTx->CR1, USART_CR1_TXEIE) == (USART_CR1_TXEIE));
2251 }
2252 
2259 __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_PE(USART_TypeDef *USARTx)
2260 {
2261  return (READ_BIT(USARTx->CR1, USART_CR1_PEIE) == (USART_CR1_PEIE));
2262 }
2263 
2272 __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_LBD(USART_TypeDef *USARTx)
2273 {
2274  return (READ_BIT(USARTx->CR2, USART_CR2_LBDIE) == (USART_CR2_LBDIE));
2275 }
2276 
2283 __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_ERROR(USART_TypeDef *USARTx)
2284 {
2285  return (READ_BIT(USARTx->CR3, USART_CR3_EIE) == (USART_CR3_EIE));
2286 }
2287 
2296 __STATIC_INLINE uint32_t LL_USART_IsEnabledIT_CTS(USART_TypeDef *USARTx)
2297 {
2298  return (READ_BIT(USARTx->CR3, USART_CR3_CTSIE) == (USART_CR3_CTSIE));
2299 }
2300 
2315 __STATIC_INLINE void LL_USART_EnableDMAReq_RX(USART_TypeDef *USARTx)
2316 {
2317  SET_BIT(USARTx->CR3, USART_CR3_DMAR);
2318 }
2319 
2326 __STATIC_INLINE void LL_USART_DisableDMAReq_RX(USART_TypeDef *USARTx)
2327 {
2328  CLEAR_BIT(USARTx->CR3, USART_CR3_DMAR);
2329 }
2330 
2337 __STATIC_INLINE uint32_t LL_USART_IsEnabledDMAReq_RX(USART_TypeDef *USARTx)
2338 {
2339  return (READ_BIT(USARTx->CR3, USART_CR3_DMAR) == (USART_CR3_DMAR));
2340 }
2341 
2348 __STATIC_INLINE void LL_USART_EnableDMAReq_TX(USART_TypeDef *USARTx)
2349 {
2350  SET_BIT(USARTx->CR3, USART_CR3_DMAT);
2351 }
2352 
2359 __STATIC_INLINE void LL_USART_DisableDMAReq_TX(USART_TypeDef *USARTx)
2360 {
2361  CLEAR_BIT(USARTx->CR3, USART_CR3_DMAT);
2362 }
2363 
2370 __STATIC_INLINE uint32_t LL_USART_IsEnabledDMAReq_TX(USART_TypeDef *USARTx)
2371 {
2372  return (READ_BIT(USARTx->CR3, USART_CR3_DMAT) == (USART_CR3_DMAT));
2373 }
2374 
2382 __STATIC_INLINE uint32_t LL_USART_DMA_GetRegAddr(USART_TypeDef *USARTx)
2383 {
2384  /* return address of DR register */
2385  return ((uint32_t) & (USARTx->DR));
2386 }
2387 
2402 __STATIC_INLINE uint8_t LL_USART_ReceiveData8(USART_TypeDef *USARTx)
2403 {
2404  return (uint8_t)(READ_BIT(USARTx->DR, USART_DR_DR));
2405 }
2406 
2413 __STATIC_INLINE uint16_t LL_USART_ReceiveData9(USART_TypeDef *USARTx)
2414 {
2415  return (uint16_t)(READ_BIT(USARTx->DR, USART_DR_DR));
2416 }
2417 
2425 __STATIC_INLINE void LL_USART_TransmitData8(USART_TypeDef *USARTx, uint8_t Value)
2426 {
2427  USARTx->DR = Value;
2428 }
2429 
2437 __STATIC_INLINE void LL_USART_TransmitData9(USART_TypeDef *USARTx, uint16_t Value)
2438 {
2439  USARTx->DR = Value & 0x1FFU;
2440 }
2441 
2456 __STATIC_INLINE void LL_USART_RequestBreakSending(USART_TypeDef *USARTx)
2457 {
2458  SET_BIT(USARTx->CR1, USART_CR1_SBK);
2459 }
2460 
2467 __STATIC_INLINE void LL_USART_RequestEnterMuteMode(USART_TypeDef *USARTx)
2468 {
2469  SET_BIT(USARTx->CR1, USART_CR1_RWU);
2470 }
2471 
2478 __STATIC_INLINE void LL_USART_RequestExitMuteMode(USART_TypeDef *USARTx)
2479 {
2480  CLEAR_BIT(USARTx->CR1, USART_CR1_RWU);
2481 }
2482 
2487 #if defined(USE_FULL_LL_DRIVER)
2488 
2491 ErrorStatus LL_USART_DeInit(USART_TypeDef *USARTx);
2492 ErrorStatus LL_USART_Init(USART_TypeDef *USARTx, LL_USART_InitTypeDef *USART_InitStruct);
2493 void LL_USART_StructInit(LL_USART_InitTypeDef *USART_InitStruct);
2494 ErrorStatus LL_USART_ClockInit(USART_TypeDef *USARTx, LL_USART_ClockInitTypeDef *USART_ClockInitStruct);
2495 void LL_USART_ClockStructInit(LL_USART_ClockInitTypeDef *USART_ClockInitStruct);
2499 #endif /* USE_FULL_LL_DRIVER */
2500 
2509 #endif /* USART1 || USART2 || USART3 || USART6 || UART4 || UART5 || UART7 || UART8 || UART9 || UART10 */
2510 
2515 #ifdef __cplusplus
2516 }
2517 #endif
2518 
2519 #endif /* __STM32F4xx_LL_USART_H */
2520 
2521 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
USART_SR_CTS
#define USART_SR_CTS
Definition: stm32f407xx.h:12487
USART_SR_PE
#define USART_SR_PE
Definition: stm32f407xx.h:12460
USART_CR1_OVER8
#define USART_CR1_OVER8
Definition: stm32f407xx.h:12547
__IO
#define __IO
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:237
USART_CR1_M
#define USART_CR1_M
Definition: stm32f407xx.h:12541
USART_CR2_LBCL
#define USART_CR2_LBCL
Definition: stm32f407xx.h:12561
USART_TypeDef
Universal Synchronous Asynchronous Receiver Transmitter.
Definition: stm32f407xx.h:758
USART_SR_IDLE
#define USART_SR_IDLE
Definition: stm32f407xx.h:12472
USART_CR3_SCEN
#define USART_CR3_SCEN
Definition: stm32f407xx.h:12600
USART_DR_DR
#define USART_DR_DR
Definition: stm32f407xx.h:12492
USART_CR2_ADD
#define USART_CR2_ADD
Definition: stm32f407xx.h:12552
USART_CR3_HDSEL
#define USART_CR3_HDSEL
Definition: stm32f407xx.h:12594
USART_TypeDef::SR
__IO uint32_t SR
Definition: stm32f407xx.h:760
USART_CR1_TXEIE
#define USART_CR1_TXEIE
Definition: stm32f407xx.h:12526
USART_TypeDef::DR
__IO uint32_t DR
Definition: stm32f407xx.h:761
USART_CR3_DMAT
#define USART_CR3_DMAT
Definition: stm32f407xx.h:12606
USART_TypeDef::CR1
__IO uint32_t CR1
Definition: stm32f407xx.h:763
CLEAR_BIT
#define CLEAR_BIT(REG, BIT)
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:214
USART_CR2_STOP_1
#define USART_CR2_STOP_1
Definition: stm32f407xx.h:12576
USART_CR3_RTSE
#define USART_CR3_RTSE
Definition: stm32f407xx.h:12609
USART_GTPR_PSC
#define USART_GTPR_PSC
Definition: stm32f407xx.h:12623
USART_CR3_CTSE
#define USART_CR3_CTSE
Definition: stm32f407xx.h:12612
USART_SR_LBD
#define USART_SR_LBD
Definition: stm32f407xx.h:12484
USART_CR1_RWU
#define USART_CR1_RWU
Definition: stm32f407xx.h:12508
USART_TypeDef::GTPR
__IO uint32_t GTPR
Definition: stm32f407xx.h:766
USART_CR1_PCE
#define USART_CR1_PCE
Definition: stm32f407xx.h:12535
USART_SR_ORE
#define USART_SR_ORE
Definition: stm32f407xx.h:12469
USART_CR2_STOP
#define USART_CR2_STOP
Definition: stm32f407xx.h:12574
__STATIC_INLINE
#define __STATIC_INLINE
Definition: imxrt1050/imxrt1050-evkb/CMSIS/cmsis_armcc.h:63
USART_CR2_CLKEN
#define USART_CR2_CLKEN
Definition: stm32f407xx.h:12570
USART_CR1_RXNEIE
#define USART_CR1_RXNEIE
Definition: stm32f407xx.h:12520
USART_GTPR_GT
#define USART_GTPR_GT
Definition: stm32f407xx.h:12635
USART_CR2_STOP_0
#define USART_CR2_STOP_0
Definition: stm32f407xx.h:12575
MODIFY_REG
#define MODIFY_REG(REG, CLEARMASK, SETMASK)
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:224
USART_CR2_CPHA
#define USART_CR2_CPHA
Definition: stm32f407xx.h:12564
USART_SR_NE
#define USART_SR_NE
Definition: stm32f407xx.h:12466
USART_CR2_LBDIE
#define USART_CR2_LBDIE
Definition: stm32f407xx.h:12558
USART_SR_RXNE
#define USART_SR_RXNE
Definition: stm32f407xx.h:12475
USART_TypeDef::CR3
__IO uint32_t CR3
Definition: stm32f407xx.h:765
USART_CR1_PEIE
#define USART_CR1_PEIE
Definition: stm32f407xx.h:12529
USART_TypeDef::CR2
__IO uint32_t CR2
Definition: stm32f407xx.h:764
READ_BIT
#define READ_BIT(REG, BIT)
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:216
USART_CR3_CTSIE
#define USART_CR3_CTSIE
Definition: stm32f407xx.h:12615
USART_CR2_CPOL
#define USART_CR2_CPOL
Definition: stm32f407xx.h:12567
USART_CR1_TCIE
#define USART_CR1_TCIE
Definition: stm32f407xx.h:12523
USART_TypeDef::BRR
__IO uint32_t BRR
Definition: stm32f407xx.h:762
USART_CR3_EIE
#define USART_CR3_EIE
Definition: stm32f407xx.h:12585
USART_CR2_LBDL
#define USART_CR2_LBDL
Definition: stm32f407xx.h:12555
USART_CR1_UE
#define USART_CR1_UE
Definition: stm32f407xx.h:12544
USART_SR_TXE
#define USART_SR_TXE
Definition: stm32f407xx.h:12481
USART_CR3_IRLP
#define USART_CR3_IRLP
Definition: stm32f407xx.h:12591
USART_CR1_WAKE
#define USART_CR1_WAKE
Definition: stm32f407xx.h:12538
USART_CR1_RE
#define USART_CR1_RE
Definition: stm32f407xx.h:12511
WRITE_REG
#define WRITE_REG(REG, VAL)
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:220
USART_CR3_ONEBIT
#define USART_CR3_ONEBIT
Definition: stm32f407xx.h:12618
SET_BIT
#define SET_BIT(REG, BIT)
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:212
USART_CR2_LINEN
#define USART_CR2_LINEN
Definition: stm32f407xx.h:12580
USART_CR1_SBK
#define USART_CR1_SBK
Definition: stm32f407xx.h:12505
USART_CR3_DMAR
#define USART_CR3_DMAR
Definition: stm32f407xx.h:12603
USART_CR3_IREN
#define USART_CR3_IREN
Definition: stm32f407xx.h:12588
USART_SR_TC
#define USART_SR_TC
Definition: stm32f407xx.h:12478
USART_CR1_TE
#define USART_CR1_TE
Definition: stm32f407xx.h:12514
USART_CR1_PS
#define USART_CR1_PS
Definition: stm32f407xx.h:12532
USART_SR_FE
#define USART_SR_FE
Definition: stm32f407xx.h:12463
ErrorStatus
ErrorStatus
Definition: stm32f407/stm32f407g-disc1/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:198
USART_CR1_IDLEIE
#define USART_CR1_IDLEIE
Definition: stm32f407xx.h:12517
USART_CR3_NACK
#define USART_CR3_NACK
Definition: stm32f407xx.h:12597


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