20#ifndef STM32H7xx_LL_LPUART_H
21#define STM32H7xx_LL_LPUART_H
48static const uint16_t LPUART_PRESCALER_TAB[] =
73#define LPUART_LPUARTDIV_FREQ_MUL 256U
74#define LPUART_BRR_MASK 0x000FFFFFU
75#define LPUART_BRR_MIN_VALUE 0x00000300U
82#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
93#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
104 uint32_t PrescalerValue;
133 uint32_t TransferDirection;
139 uint32_t HardwareFlowControl;
145} LL_LPUART_InitTypeDef;
163#define LL_LPUART_ICR_PECF USART_ICR_PECF
164#define LL_LPUART_ICR_FECF USART_ICR_FECF
165#define LL_LPUART_ICR_NCF USART_ICR_NECF
166#define LL_LPUART_ICR_ORECF USART_ICR_ORECF
167#define LL_LPUART_ICR_IDLECF USART_ICR_IDLECF
168#define LL_LPUART_ICR_TCCF USART_ICR_TCCF
169#define LL_LPUART_ICR_CTSCF USART_ICR_CTSCF
170#define LL_LPUART_ICR_CMCF USART_ICR_CMCF
171#define LL_LPUART_ICR_WUCF USART_ICR_WUCF
181#define LL_LPUART_ISR_PE USART_ISR_PE
182#define LL_LPUART_ISR_FE USART_ISR_FE
183#define LL_LPUART_ISR_NE USART_ISR_NE
184#define LL_LPUART_ISR_ORE USART_ISR_ORE
185#define LL_LPUART_ISR_IDLE USART_ISR_IDLE
186#define LL_LPUART_ISR_RXNE_RXFNE USART_ISR_RXNE_RXFNE
187#define LL_LPUART_ISR_TC USART_ISR_TC
188#define LL_LPUART_ISR_TXE_TXFNF USART_ISR_TXE_TXFNF
189#define LL_LPUART_ISR_CTSIF USART_ISR_CTSIF
190#define LL_LPUART_ISR_CTS USART_ISR_CTS
191#define LL_LPUART_ISR_BUSY USART_ISR_BUSY
192#define LL_LPUART_ISR_CMF USART_ISR_CMF
193#define LL_LPUART_ISR_SBKF USART_ISR_SBKF
194#define LL_LPUART_ISR_RWU USART_ISR_RWU
195#define LL_LPUART_ISR_WUF USART_ISR_WUF
196#define LL_LPUART_ISR_TEACK USART_ISR_TEACK
197#define LL_LPUART_ISR_REACK USART_ISR_REACK
198#define LL_LPUART_ISR_TXFE USART_ISR_TXFE
199#define LL_LPUART_ISR_RXFF USART_ISR_RXFF
200#define LL_LPUART_ISR_RXFT USART_ISR_RXFT
201#define LL_LPUART_ISR_TXFT USART_ISR_TXFT
211#define LL_LPUART_CR1_IDLEIE USART_CR1_IDLEIE
212#define LL_LPUART_CR1_RXNEIE_RXFNEIE USART_CR1_RXNEIE_RXFNEIE
214#define LL_LPUART_CR1_TCIE USART_CR1_TCIE
215#define LL_LPUART_CR1_TXEIE_TXFNFIE USART_CR1_TXEIE_TXFNFIE
217#define LL_LPUART_CR1_PEIE USART_CR1_PEIE
218#define LL_LPUART_CR1_CMIE USART_CR1_CMIE
219#define LL_LPUART_CR1_TXFEIE USART_CR1_TXFEIE
220#define LL_LPUART_CR1_RXFFIE USART_CR1_RXFFIE
221#define LL_LPUART_CR3_EIE USART_CR3_EIE
222#define LL_LPUART_CR3_CTSIE USART_CR3_CTSIE
223#define LL_LPUART_CR3_WUFIE USART_CR3_WUFIE
224#define LL_LPUART_CR3_TXFTIE USART_CR3_TXFTIE
225#define LL_LPUART_CR3_RXFTIE USART_CR3_RXFTIE
234#define LL_LPUART_FIFOTHRESHOLD_1_8 0x00000000U
235#define LL_LPUART_FIFOTHRESHOLD_1_4 0x00000001U
236#define LL_LPUART_FIFOTHRESHOLD_1_2 0x00000002U
237#define LL_LPUART_FIFOTHRESHOLD_3_4 0x00000003U
238#define LL_LPUART_FIFOTHRESHOLD_7_8 0x00000004U
239#define LL_LPUART_FIFOTHRESHOLD_8_8 0x00000005U
248#define LL_LPUART_DIRECTION_NONE 0x00000000U
249#define LL_LPUART_DIRECTION_RX USART_CR1_RE
250#define LL_LPUART_DIRECTION_TX USART_CR1_TE
251#define LL_LPUART_DIRECTION_TX_RX (USART_CR1_TE |USART_CR1_RE)
260#define LL_LPUART_PARITY_NONE 0x00000000U
261#define LL_LPUART_PARITY_EVEN USART_CR1_PCE
262#define LL_LPUART_PARITY_ODD (USART_CR1_PCE | USART_CR1_PS)
271#define LL_LPUART_WAKEUP_IDLELINE 0x00000000U
272#define LL_LPUART_WAKEUP_ADDRESSMARK USART_CR1_WAKE
281#define LL_LPUART_DATAWIDTH_7B USART_CR1_M1
282#define LL_LPUART_DATAWIDTH_8B 0x00000000U
283#define LL_LPUART_DATAWIDTH_9B USART_CR1_M0
292#define LL_LPUART_PRESCALER_DIV1 0x00000000U
293#define LL_LPUART_PRESCALER_DIV2 (USART_PRESC_PRESCALER_0)
294#define LL_LPUART_PRESCALER_DIV4 (USART_PRESC_PRESCALER_1)
295#define LL_LPUART_PRESCALER_DIV6 (USART_PRESC_PRESCALER_1 |\
296 USART_PRESC_PRESCALER_0)
297#define LL_LPUART_PRESCALER_DIV8 (USART_PRESC_PRESCALER_2)
298#define LL_LPUART_PRESCALER_DIV10 (USART_PRESC_PRESCALER_2 |\
299 USART_PRESC_PRESCALER_0)
300#define LL_LPUART_PRESCALER_DIV12 (USART_PRESC_PRESCALER_2 |\
301 USART_PRESC_PRESCALER_1)
302#define LL_LPUART_PRESCALER_DIV16 (USART_PRESC_PRESCALER_2 |\
303 USART_PRESC_PRESCALER_1 |\
304 USART_PRESC_PRESCALER_0)
305#define LL_LPUART_PRESCALER_DIV32 (USART_PRESC_PRESCALER_3)
306#define LL_LPUART_PRESCALER_DIV64 (USART_PRESC_PRESCALER_3 |\
307 USART_PRESC_PRESCALER_0)
308#define LL_LPUART_PRESCALER_DIV128 (USART_PRESC_PRESCALER_3 |\
309 USART_PRESC_PRESCALER_1)
310#define LL_LPUART_PRESCALER_DIV256 (USART_PRESC_PRESCALER_3 |\
311 USART_PRESC_PRESCALER_1 |\
312 USART_PRESC_PRESCALER_0)
321#define LL_LPUART_STOPBITS_1 0x00000000U
322#define LL_LPUART_STOPBITS_2 USART_CR2_STOP_1
331#define LL_LPUART_TXRX_STANDARD 0x00000000U
332#define LL_LPUART_TXRX_SWAPPED (USART_CR2_SWAP)
341#define LL_LPUART_RXPIN_LEVEL_STANDARD 0x00000000U
342#define LL_LPUART_RXPIN_LEVEL_INVERTED (USART_CR2_RXINV)
351#define LL_LPUART_TXPIN_LEVEL_STANDARD 0x00000000U
352#define LL_LPUART_TXPIN_LEVEL_INVERTED (USART_CR2_TXINV)
361#define LL_LPUART_BINARY_LOGIC_POSITIVE 0x00000000U
363#define LL_LPUART_BINARY_LOGIC_NEGATIVE USART_CR2_DATAINV
374#define LL_LPUART_BITORDER_LSBFIRST 0x00000000U
376#define LL_LPUART_BITORDER_MSBFIRST USART_CR2_MSBFIRST
386#define LL_LPUART_ADDRESS_DETECT_4B 0x00000000U
387#define LL_LPUART_ADDRESS_DETECT_7B USART_CR2_ADDM7
396#define LL_LPUART_HWCONTROL_NONE 0x00000000U
397#define LL_LPUART_HWCONTROL_RTS USART_CR3_RTSE
399#define LL_LPUART_HWCONTROL_CTS USART_CR3_CTSE
401#define LL_LPUART_HWCONTROL_RTS_CTS (USART_CR3_RTSE | USART_CR3_CTSE)
410#define LL_LPUART_WAKEUP_ON_ADDRESS 0x00000000U
411#define LL_LPUART_WAKEUP_ON_STARTBIT USART_CR3_WUS_1
412#define LL_LPUART_WAKEUP_ON_RXNE (USART_CR3_WUS_0 | USART_CR3_WUS_1)
421#define LL_LPUART_DE_POLARITY_HIGH 0x00000000U
422#define LL_LPUART_DE_POLARITY_LOW USART_CR3_DEP
431#define LL_LPUART_DMA_REG_DATA_TRANSMIT 0x00000000U
432#define LL_LPUART_DMA_REG_DATA_RECEIVE 0x00000001U
459#define LL_LPUART_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
467#define LL_LPUART_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
497#define __LL_LPUART_DIV(__PERIPHCLK__, __PRESCALER__, __BAUDRATE__) (uint32_t)\
498 ((((((uint64_t)(__PERIPHCLK__)/(uint64_t)(LPUART_PRESCALER_TAB[(uint16_t)(__PRESCALER__)]))\
499 * LPUART_LPUARTDIV_FREQ_MUL) + (uint32_t)((__BAUDRATE__)/2U))/(__BAUDRATE__)) & LPUART_BRR_MASK)
545__STATIC_INLINE
void LL_LPUART_Disable(
USART_TypeDef *LPUARTx)
556__STATIC_INLINE uint32_t LL_LPUART_IsEnabled(
const USART_TypeDef *LPUARTx)
567__STATIC_INLINE
void LL_LPUART_EnableFIFO(
USART_TypeDef *LPUARTx)
578__STATIC_INLINE
void LL_LPUART_DisableFIFO(
USART_TypeDef *LPUARTx)
589__STATIC_INLINE uint32_t LL_LPUART_IsEnabledFIFO(
const USART_TypeDef *LPUARTx)
607__STATIC_INLINE
void LL_LPUART_SetTXFIFOThreshold(
USART_TypeDef *LPUARTx, uint32_t Threshold)
624__STATIC_INLINE uint32_t LL_LPUART_GetTXFIFOThreshold(
const USART_TypeDef *LPUARTx)
642__STATIC_INLINE
void LL_LPUART_SetRXFIFOThreshold(
USART_TypeDef *LPUARTx, uint32_t Threshold)
659__STATIC_INLINE uint32_t LL_LPUART_GetRXFIFOThreshold(
const USART_TypeDef *LPUARTx)
685__STATIC_INLINE
void LL_LPUART_ConfigFIFOsThreshold(
USART_TypeDef *LPUARTx, uint32_t TXThreshold, uint32_t RXThreshold)
688 (RXThreshold << USART_CR3_RXFTCFG_Pos));
699__STATIC_INLINE
void LL_LPUART_EnableInStopMode(
USART_TypeDef *LPUARTx)
711__STATIC_INLINE
void LL_LPUART_DisableInStopMode(
USART_TypeDef *LPUARTx)
723__STATIC_INLINE uint32_t LL_LPUART_IsEnabledInStopMode(
const USART_TypeDef *LPUARTx)
734__STATIC_INLINE
void LL_LPUART_EnableDirectionRx(
USART_TypeDef *LPUARTx)
745__STATIC_INLINE
void LL_LPUART_DisableDirectionRx(
USART_TypeDef *LPUARTx)
756__STATIC_INLINE
void LL_LPUART_EnableDirectionTx(
USART_TypeDef *LPUARTx)
767__STATIC_INLINE
void LL_LPUART_DisableDirectionTx(
USART_TypeDef *LPUARTx)
785__STATIC_INLINE
void LL_LPUART_SetTransferDirection(
USART_TypeDef *LPUARTx, uint32_t TransferDirection)
801__STATIC_INLINE uint32_t LL_LPUART_GetTransferDirection(
const USART_TypeDef *LPUARTx)
820__STATIC_INLINE
void LL_LPUART_SetParity(
USART_TypeDef *LPUARTx, uint32_t Parity)
835__STATIC_INLINE uint32_t LL_LPUART_GetParity(
const USART_TypeDef *LPUARTx)
849__STATIC_INLINE
void LL_LPUART_SetWakeUpMethod(
USART_TypeDef *LPUARTx, uint32_t Method)
862__STATIC_INLINE uint32_t LL_LPUART_GetWakeUpMethod(
const USART_TypeDef *LPUARTx)
877__STATIC_INLINE
void LL_LPUART_SetDataWidth(
USART_TypeDef *LPUARTx, uint32_t DataWidth)
891__STATIC_INLINE uint32_t LL_LPUART_GetDataWidth(
const USART_TypeDef *LPUARTx)
902__STATIC_INLINE
void LL_LPUART_EnableMuteMode(
USART_TypeDef *LPUARTx)
913__STATIC_INLINE
void LL_LPUART_DisableMuteMode(
USART_TypeDef *LPUARTx)
924__STATIC_INLINE uint32_t LL_LPUART_IsEnabledMuteMode(
const USART_TypeDef *LPUARTx)
948__STATIC_INLINE
void LL_LPUART_SetPrescaler(
USART_TypeDef *LPUARTx, uint32_t PrescalerValue)
971__STATIC_INLINE uint32_t LL_LPUART_GetPrescaler(
const USART_TypeDef *LPUARTx)
985__STATIC_INLINE
void LL_LPUART_SetStopBitsLength(
USART_TypeDef *LPUARTx, uint32_t StopBits)
998__STATIC_INLINE uint32_t LL_LPUART_GetStopBitsLength(
const USART_TypeDef *LPUARTx)
1027__STATIC_INLINE
void LL_LPUART_ConfigCharacter(
USART_TypeDef *LPUARTx, uint32_t DataWidth, uint32_t Parity,
1043__STATIC_INLINE
void LL_LPUART_SetTXRXSwap(
USART_TypeDef *LPUARTx, uint32_t SwapConfig)
1056__STATIC_INLINE uint32_t LL_LPUART_GetTXRXSwap(
const USART_TypeDef *LPUARTx)
1070__STATIC_INLINE
void LL_LPUART_SetRXPinLevel(
USART_TypeDef *LPUARTx, uint32_t PinInvMethod)
1083__STATIC_INLINE uint32_t LL_LPUART_GetRXPinLevel(
const USART_TypeDef *LPUARTx)
1097__STATIC_INLINE
void LL_LPUART_SetTXPinLevel(
USART_TypeDef *LPUARTx, uint32_t PinInvMethod)
1110__STATIC_INLINE uint32_t LL_LPUART_GetTXPinLevel(
const USART_TypeDef *LPUARTx)
1127__STATIC_INLINE
void LL_LPUART_SetBinaryDataLogic(
USART_TypeDef *LPUARTx, uint32_t DataLogic)
1140__STATIC_INLINE uint32_t LL_LPUART_GetBinaryDataLogic(
const USART_TypeDef *LPUARTx)
1156__STATIC_INLINE
void LL_LPUART_SetTransferBitOrder(
USART_TypeDef *LPUARTx, uint32_t BitOrder)
1171__STATIC_INLINE uint32_t LL_LPUART_GetTransferBitOrder(
const USART_TypeDef *LPUARTx)
1199__STATIC_INLINE
void LL_LPUART_ConfigNodeAddress(
USART_TypeDef *LPUARTx, uint32_t AddressLen, uint32_t NodeAddress)
1202 (uint32_t)(AddressLen | (NodeAddress << USART_CR2_ADD_Pos)));
1215__STATIC_INLINE uint32_t LL_LPUART_GetNodeAddress(
const USART_TypeDef *LPUARTx)
1217 return (uint32_t)(READ_BIT(LPUARTx->
CR2,
USART_CR2_ADD) >> USART_CR2_ADD_Pos);
1228__STATIC_INLINE uint32_t LL_LPUART_GetNodeAddressLen(
const USART_TypeDef *LPUARTx)
1239__STATIC_INLINE
void LL_LPUART_EnableRTSHWFlowCtrl(
USART_TypeDef *LPUARTx)
1250__STATIC_INLINE
void LL_LPUART_DisableRTSHWFlowCtrl(
USART_TypeDef *LPUARTx)
1261__STATIC_INLINE
void LL_LPUART_EnableCTSHWFlowCtrl(
USART_TypeDef *LPUARTx)
1272__STATIC_INLINE
void LL_LPUART_DisableCTSHWFlowCtrl(
USART_TypeDef *LPUARTx)
1289__STATIC_INLINE
void LL_LPUART_SetHWFlowCtrl(
USART_TypeDef *LPUARTx, uint32_t HardwareFlowControl)
1305__STATIC_INLINE uint32_t LL_LPUART_GetHWFlowCtrl(
const USART_TypeDef *LPUARTx)
1316__STATIC_INLINE
void LL_LPUART_EnableOverrunDetect(
USART_TypeDef *LPUARTx)
1327__STATIC_INLINE
void LL_LPUART_DisableOverrunDetect(
USART_TypeDef *LPUARTx)
1338__STATIC_INLINE uint32_t LL_LPUART_IsEnabledOverrunDetect(
const USART_TypeDef *LPUARTx)
1353__STATIC_INLINE
void LL_LPUART_SetWKUPType(
USART_TypeDef *LPUARTx, uint32_t Type)
1367__STATIC_INLINE uint32_t LL_LPUART_GetWKUPType(
const USART_TypeDef *LPUARTx)
1401__STATIC_INLINE
void LL_LPUART_SetBaudRate(
USART_TypeDef *LPUARTx, uint32_t PeriphClk, uint32_t PrescalerValue,
1406 LPUARTx->
BRR = __LL_LPUART_DIV(PeriphClk, PrescalerValue, BaudRate);
1432__STATIC_INLINE uint32_t LL_LPUART_GetBaudRate(
const USART_TypeDef *LPUARTx, uint32_t PeriphClk,
1433 uint32_t PrescalerValue)
1437 uint32_t periphclkpresc = (uint32_t)(PeriphClk / (LPUART_PRESCALER_TAB[(uint16_t)PrescalerValue]));
1439 lpuartdiv = LPUARTx->
BRR & LPUART_BRR_MASK;
1441 if (lpuartdiv >= LPUART_BRR_MIN_VALUE)
1443 brrresult = (uint32_t)(((uint64_t)(periphclkpresc) * LPUART_LPUARTDIV_FREQ_MUL) / lpuartdiv);
1468__STATIC_INLINE
void LL_LPUART_EnableHalfDuplex(
USART_TypeDef *LPUARTx)
1479__STATIC_INLINE
void LL_LPUART_DisableHalfDuplex(
USART_TypeDef *LPUARTx)
1490__STATIC_INLINE uint32_t LL_LPUART_IsEnabledHalfDuplex(
const USART_TypeDef *LPUARTx)
1511__STATIC_INLINE
void LL_LPUART_SetDEDeassertionTime(
USART_TypeDef *LPUARTx, uint32_t Time)
1522__STATIC_INLINE uint32_t LL_LPUART_GetDEDeassertionTime(
const USART_TypeDef *LPUARTx)
1524 return (uint32_t)(READ_BIT(LPUARTx->
CR1,
USART_CR1_DEDT) >> USART_CR1_DEDT_Pos);
1534__STATIC_INLINE
void LL_LPUART_SetDEAssertionTime(
USART_TypeDef *LPUARTx, uint32_t Time)
1545__STATIC_INLINE uint32_t LL_LPUART_GetDEAssertionTime(
const USART_TypeDef *LPUARTx)
1547 return (uint32_t)(READ_BIT(LPUARTx->
CR1,
USART_CR1_DEAT) >> USART_CR1_DEAT_Pos);
1556__STATIC_INLINE
void LL_LPUART_EnableDEMode(
USART_TypeDef *LPUARTx)
1567__STATIC_INLINE
void LL_LPUART_DisableDEMode(
USART_TypeDef *LPUARTx)
1578__STATIC_INLINE uint32_t LL_LPUART_IsEnabledDEMode(
const USART_TypeDef *LPUARTx)
1592__STATIC_INLINE
void LL_LPUART_SetDESignalPolarity(
USART_TypeDef *LPUARTx, uint32_t Polarity)
1605__STATIC_INLINE uint32_t LL_LPUART_GetDESignalPolarity(
const USART_TypeDef *LPUARTx)
1625__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_PE(
const USART_TypeDef *LPUARTx)
1636__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_FE(
const USART_TypeDef *LPUARTx)
1647__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_NE(
const USART_TypeDef *LPUARTx)
1658__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_ORE(
const USART_TypeDef *LPUARTx)
1669__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_IDLE(
const USART_TypeDef *LPUARTx)
1674#define LL_LPUART_IsActiveFlag_RXNE LL_LPUART_IsActiveFlag_RXNE_RXFNE
1682__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_RXNE_RXFNE(
const USART_TypeDef *LPUARTx)
1693__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_TC(
const USART_TypeDef *LPUARTx)
1698#define LL_LPUART_IsActiveFlag_TXE LL_LPUART_IsActiveFlag_TXE_TXFNF
1706__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_TXE_TXFNF(
const USART_TypeDef *LPUARTx)
1717__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_nCTS(
const USART_TypeDef *LPUARTx)
1728__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_CTS(
const USART_TypeDef *LPUARTx)
1739__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_BUSY(
const USART_TypeDef *LPUARTx)
1750__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_CM(
const USART_TypeDef *LPUARTx)
1761__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_SBK(
const USART_TypeDef *LPUARTx)
1772__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_RWU(
const USART_TypeDef *LPUARTx)
1783__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_WKUP(
const USART_TypeDef *LPUARTx)
1794__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_TEACK(
const USART_TypeDef *LPUARTx)
1805__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_REACK(
const USART_TypeDef *LPUARTx)
1816__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_TXFE(
const USART_TypeDef *LPUARTx)
1827__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_RXFF(
const USART_TypeDef *LPUARTx)
1838__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_TXFT(
const USART_TypeDef *LPUARTx)
1849__STATIC_INLINE uint32_t LL_LPUART_IsActiveFlag_RXFT(
const USART_TypeDef *LPUARTx)
1860__STATIC_INLINE
void LL_LPUART_ClearFlag_PE(
USART_TypeDef *LPUARTx)
1871__STATIC_INLINE
void LL_LPUART_ClearFlag_FE(
USART_TypeDef *LPUARTx)
1882__STATIC_INLINE
void LL_LPUART_ClearFlag_NE(
USART_TypeDef *LPUARTx)
1893__STATIC_INLINE
void LL_LPUART_ClearFlag_ORE(
USART_TypeDef *LPUARTx)
1904__STATIC_INLINE
void LL_LPUART_ClearFlag_IDLE(
USART_TypeDef *LPUARTx)
1915__STATIC_INLINE
void LL_LPUART_ClearFlag_TC(
USART_TypeDef *LPUARTx)
1926__STATIC_INLINE
void LL_LPUART_ClearFlag_nCTS(
USART_TypeDef *LPUARTx)
1937__STATIC_INLINE
void LL_LPUART_ClearFlag_CM(
USART_TypeDef *LPUARTx)
1948__STATIC_INLINE
void LL_LPUART_ClearFlag_WKUP(
USART_TypeDef *LPUARTx)
1968__STATIC_INLINE
void LL_LPUART_EnableIT_IDLE(
USART_TypeDef *LPUARTx)
1973#define LL_LPUART_EnableIT_RXNE LL_LPUART_EnableIT_RXNE_RXFNE
1981__STATIC_INLINE
void LL_LPUART_EnableIT_RXNE_RXFNE(
USART_TypeDef *LPUARTx)
1992__STATIC_INLINE
void LL_LPUART_EnableIT_TC(
USART_TypeDef *LPUARTx)
1997#define LL_LPUART_EnableIT_TXE LL_LPUART_EnableIT_TXE_TXFNF
2005__STATIC_INLINE
void LL_LPUART_EnableIT_TXE_TXFNF(
USART_TypeDef *LPUARTx)
2016__STATIC_INLINE
void LL_LPUART_EnableIT_PE(
USART_TypeDef *LPUARTx)
2027__STATIC_INLINE
void LL_LPUART_EnableIT_CM(
USART_TypeDef *LPUARTx)
2038__STATIC_INLINE
void LL_LPUART_EnableIT_TXFE(
USART_TypeDef *LPUARTx)
2049__STATIC_INLINE
void LL_LPUART_EnableIT_RXFF(
USART_TypeDef *LPUARTx)
2064__STATIC_INLINE
void LL_LPUART_EnableIT_ERROR(
USART_TypeDef *LPUARTx)
2075__STATIC_INLINE
void LL_LPUART_EnableIT_CTS(
USART_TypeDef *LPUARTx)
2086__STATIC_INLINE
void LL_LPUART_EnableIT_WKUP(
USART_TypeDef *LPUARTx)
2097__STATIC_INLINE
void LL_LPUART_EnableIT_TXFT(
USART_TypeDef *LPUARTx)
2108__STATIC_INLINE
void LL_LPUART_EnableIT_RXFT(
USART_TypeDef *LPUARTx)
2119__STATIC_INLINE
void LL_LPUART_DisableIT_IDLE(
USART_TypeDef *LPUARTx)
2124#define LL_LPUART_DisableIT_RXNE LL_LPUART_DisableIT_RXNE_RXFNE
2132__STATIC_INLINE
void LL_LPUART_DisableIT_RXNE_RXFNE(
USART_TypeDef *LPUARTx)
2143__STATIC_INLINE
void LL_LPUART_DisableIT_TC(
USART_TypeDef *LPUARTx)
2148#define LL_LPUART_DisableIT_TXE LL_LPUART_DisableIT_TXE_TXFNF
2156__STATIC_INLINE
void LL_LPUART_DisableIT_TXE_TXFNF(
USART_TypeDef *LPUARTx)
2167__STATIC_INLINE
void LL_LPUART_DisableIT_PE(
USART_TypeDef *LPUARTx)
2178__STATIC_INLINE
void LL_LPUART_DisableIT_CM(
USART_TypeDef *LPUARTx)
2189__STATIC_INLINE
void LL_LPUART_DisableIT_TXFE(
USART_TypeDef *LPUARTx)
2200__STATIC_INLINE
void LL_LPUART_DisableIT_RXFF(
USART_TypeDef *LPUARTx)
2215__STATIC_INLINE
void LL_LPUART_DisableIT_ERROR(
USART_TypeDef *LPUARTx)
2226__STATIC_INLINE
void LL_LPUART_DisableIT_CTS(
USART_TypeDef *LPUARTx)
2237__STATIC_INLINE
void LL_LPUART_DisableIT_WKUP(
USART_TypeDef *LPUARTx)
2248__STATIC_INLINE
void LL_LPUART_DisableIT_TXFT(
USART_TypeDef *LPUARTx)
2259__STATIC_INLINE
void LL_LPUART_DisableIT_RXFT(
USART_TypeDef *LPUARTx)
2270__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_IDLE(
const USART_TypeDef *LPUARTx)
2275#define LL_LPUART_IsEnabledIT_RXNE LL_LPUART_IsEnabledIT_RXNE_RXFNE
2283__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_RXNE_RXFNE(
const USART_TypeDef *LPUARTx)
2294__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_TC(
const USART_TypeDef *LPUARTx)
2299#define LL_LPUART_IsEnabledIT_TXE LL_LPUART_IsEnabledIT_TXE_TXFNF
2307__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_TXE_TXFNF(
const USART_TypeDef *LPUARTx)
2318__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_PE(
const USART_TypeDef *LPUARTx)
2329__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_CM(
const USART_TypeDef *LPUARTx)
2340__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_TXFE(
const USART_TypeDef *LPUARTx)
2351__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_RXFF(
const USART_TypeDef *LPUARTx)
2362__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_ERROR(
const USART_TypeDef *LPUARTx)
2373__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_CTS(
const USART_TypeDef *LPUARTx)
2384__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_WKUP(
const USART_TypeDef *LPUARTx)
2395__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_TXFT(
const USART_TypeDef *LPUARTx)
2406__STATIC_INLINE uint32_t LL_LPUART_IsEnabledIT_RXFT(
const USART_TypeDef *LPUARTx)
2426__STATIC_INLINE
void LL_LPUART_EnableDMAReq_RX(
USART_TypeDef *LPUARTx)
2437__STATIC_INLINE
void LL_LPUART_DisableDMAReq_RX(
USART_TypeDef *LPUARTx)
2448__STATIC_INLINE uint32_t LL_LPUART_IsEnabledDMAReq_RX(
const USART_TypeDef *LPUARTx)
2459__STATIC_INLINE
void LL_LPUART_EnableDMAReq_TX(
USART_TypeDef *LPUARTx)
2470__STATIC_INLINE
void LL_LPUART_DisableDMAReq_TX(
USART_TypeDef *LPUARTx)
2481__STATIC_INLINE uint32_t LL_LPUART_IsEnabledDMAReq_TX(
const USART_TypeDef *LPUARTx)
2492__STATIC_INLINE
void LL_LPUART_EnableDMADeactOnRxErr(
USART_TypeDef *LPUARTx)
2503__STATIC_INLINE
void LL_LPUART_DisableDMADeactOnRxErr(
USART_TypeDef *LPUARTx)
2514__STATIC_INLINE uint32_t LL_LPUART_IsEnabledDMADeactOnRxErr(
const USART_TypeDef *LPUARTx)
2529__STATIC_INLINE uint32_t LL_LPUART_DMA_GetRegAddr(
const USART_TypeDef *LPUARTx, uint32_t Direction)
2531 uint32_t data_reg_addr;
2533 if (Direction == LL_LPUART_DMA_REG_DATA_TRANSMIT)
2536 data_reg_addr = (uint32_t) &(LPUARTx->
TDR);
2541 data_reg_addr = (uint32_t) &(LPUARTx->
RDR);
2544 return data_reg_addr;
2562__STATIC_INLINE uint8_t LL_LPUART_ReceiveData8(
const USART_TypeDef *LPUARTx)
2573__STATIC_INLINE uint16_t LL_LPUART_ReceiveData9(
const USART_TypeDef *LPUARTx)
2585__STATIC_INLINE
void LL_LPUART_TransmitData8(
USART_TypeDef *LPUARTx, uint8_t Value)
2587 LPUARTx->
TDR = Value;
2597__STATIC_INLINE
void LL_LPUART_TransmitData9(
USART_TypeDef *LPUARTx, uint16_t Value)
2599 LPUARTx->
TDR = Value & 0x1FFUL;
2617__STATIC_INLINE
void LL_LPUART_RequestBreakSending(
USART_TypeDef *LPUARTx)
2628__STATIC_INLINE
void LL_LPUART_RequestEnterMuteMode(
USART_TypeDef *LPUARTx)
2641__STATIC_INLINE
void LL_LPUART_RequestRxDataFlush(
USART_TypeDef *LPUARTx)
2650#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
2656ErrorStatus LL_LPUART_Init(
USART_TypeDef *LPUARTx,
const LL_LPUART_InitTypeDef *LPUART_InitStruct);
2657void LL_LPUART_StructInit(LL_LPUART_InitTypeDef *LPUART_InitStruct);
#define USART_ICR_WUCF
Definition: stm32h723xx.h:21309
#define USART_ISR_NE
Definition: stm32h723xx.h:21187
#define USART_ISR_RWU
Definition: stm32h723xx.h:21238
#define USART_ISR_TXE_TXFNF
Definition: stm32h723xx.h:21202
#define USART_ISR_TXFT
Definition: stm32h723xx.h:21262
#define USART_CR1_UESM
Definition: stm32h723xx.h:20901
#define USART_CR3_DEP
Definition: stm32h723xx.h:21100
#define USART_PRESC_PRESCALER
Definition: stm32h723xx.h:21324
#define USART_CR1_PEIE
Definition: stm32h723xx.h:20922
#define USART_ISR_FE
Definition: stm32h723xx.h:21184
#define USART_RQR_MMRQ
Definition: stm32h723xx.h:21170
#define USART_CR1_UE
Definition: stm32h723xx.h:20898
#define USART_RQR_SBKRQ
Definition: stm32h723xx.h:21167
#define USART_CR2_ADDM7
Definition: stm32h723xx.h:20995
#define USART_CR1_PS
Definition: stm32h723xx.h:20925
#define USART_CR3_OVRDIS
Definition: stm32h723xx.h:21091
#define USART_ICR_ORECF
Definition: stm32h723xx.h:21276
#define USART_CR2_ADD
Definition: stm32h723xx.h:21050
#define USART_CR3_TXFTCFG
Definition: stm32h723xx.h:21132
#define USART_ICR_PECF
Definition: stm32h723xx.h:21267
#define USART_CR3_RXFTIE
Definition: stm32h723xx.h:21129
#define USART_CR1_MME
Definition: stm32h723xx.h:20940
#define USART_CR2_SWAP
Definition: stm32h723xx.h:21024
#define USART_CR1_IDLEIE
Definition: stm32h723xx.h:20910
#define USART_ICR_CMCF
Definition: stm32h723xx.h:21306
#define USART_CR3_TXFTIE
Definition: stm32h723xx.h:21117
#define USART_CR3_DMAT
Definition: stm32h723xx.h:21076
#define USART_CR1_PCE
Definition: stm32h723xx.h:20928
#define USART_CR3_CTSIE
Definition: stm32h723xx.h:21085
#define USART_CR1_DEAT
Definition: stm32h723xx.h:20957
#define USART_CR1_RXFFIE
Definition: stm32h723xx.h:20980
#define USART_CR2_MSBFIRST
Definition: stm32h723xx.h:21036
#define USART_ISR_SBKF
Definition: stm32h723xx.h:21235
#define USART_CR3_WUS
Definition: stm32h723xx.h:21109
#define USART_RQR_RXFRQ
Definition: stm32h723xx.h:21173
#define USART_CR3_RTSE
Definition: stm32h723xx.h:21079
#define USART_CR3_WUFIE
Definition: stm32h723xx.h:21114
#define USART_ISR_CMF
Definition: stm32h723xx.h:21232
#define USART_CR1_RXNEIE_RXFNEIE
Definition: stm32h723xx.h:20913
#define USART_ICR_FECF
Definition: stm32h723xx.h:21270
#define USART_ISR_CTS
Definition: stm32h723xx.h:21211
#define USART_ICR_CTSCF
Definition: stm32h723xx.h:21294
#define USART_CR2_DATAINV
Definition: stm32h723xx.h:21033
#define USART_CR1_TXEIE_TXFNFIE
Definition: stm32h723xx.h:20919
#define USART_CR1_M
Definition: stm32h723xx.h:20934
#define USART_ICR_IDLECF
Definition: stm32h723xx.h:21279
#define USART_ISR_ORE
Definition: stm32h723xx.h:21190
#define USART_ISR_CTSIF
Definition: stm32h723xx.h:21208
#define USART_ISR_PE
Definition: stm32h723xx.h:21181
#define USART_CR3_CTSE
Definition: stm32h723xx.h:21082
#define USART_CR1_TCIE
Definition: stm32h723xx.h:20916
#define USART_ISR_TC
Definition: stm32h723xx.h:21199
#define USART_ISR_REACK
Definition: stm32h723xx.h:21247
#define USART_ISR_RXFF
Definition: stm32h723xx.h:21253
#define USART_CR1_CMIE
Definition: stm32h723xx.h:20943
#define USART_CR3_EIE
Definition: stm32h723xx.h:21055
#define USART_CR1_DEDT
Definition: stm32h723xx.h:20949
#define USART_CR1_TXFEIE
Definition: stm32h723xx.h:20977
#define USART_CR3_RXFTCFG
Definition: stm32h723xx.h:21123
#define USART_ISR_RXNE_RXFNE
Definition: stm32h723xx.h:21196
#define USART_CR3_HDSEL
Definition: stm32h723xx.h:21064
#define USART_ICR_NECF
Definition: stm32h723xx.h:21273
#define USART_CR3_DEM
Definition: stm32h723xx.h:21097
#define USART_ISR_IDLE
Definition: stm32h723xx.h:21193
#define USART_ICR_TCCF
Definition: stm32h723xx.h:21285
#define USART_CR1_WAKE
Definition: stm32h723xx.h:20931
#define USART_ISR_WUF
Definition: stm32h723xx.h:21241
#define USART_CR1_RE
Definition: stm32h723xx.h:20904
#define USART_CR2_TXINV
Definition: stm32h723xx.h:21030
#define USART_CR1_TE
Definition: stm32h723xx.h:20907
#define USART_CR3_DDRE
Definition: stm32h723xx.h:21094
#define USART_ISR_RXFT
Definition: stm32h723xx.h:21259
#define USART_RDR_RDR
Definition: stm32h723xx.h:21314
#define USART_ISR_TEACK
Definition: stm32h723xx.h:21244
#define USART_ISR_TXFE
Definition: stm32h723xx.h:21250
#define USART_CR2_STOP
Definition: stm32h723xx.h:21016
#define USART_CR1_FIFOEN
Definition: stm32h723xx.h:20974
#define USART_ISR_BUSY
Definition: stm32h723xx.h:21229
#define USART_CR3_DMAR
Definition: stm32h723xx.h:21073
#define USART_CR2_RXINV
Definition: stm32h723xx.h:21027
CMSIS STM32H7xx Device Peripheral Access Layer Header File.
Universal Synchronous Asynchronous Receiver Transmitter.
Definition: stm32h723xx.h:1596
__IO uint32_t TDR
Definition: stm32h723xx.h:1607
__IO uint32_t CR1
Definition: stm32h723xx.h:1597
__IO uint32_t BRR
Definition: stm32h723xx.h:1600
__IO uint32_t ISR
Definition: stm32h723xx.h:1604
__IO uint32_t RDR
Definition: stm32h723xx.h:1606
__IO uint32_t CR2
Definition: stm32h723xx.h:1598
__IO uint32_t ICR
Definition: stm32h723xx.h:1605
__IO uint32_t PRESC
Definition: stm32h723xx.h:1608
__IO uint32_t RQR
Definition: stm32h723xx.h:1603
__IO uint32_t CR3
Definition: stm32h723xx.h:1599