Hal Drivers for L4
Dependents: BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo
Fork of STM32L4xx_HAL_Driver by
Configuration functions
[USART Exported Functions]
Functions | |
__STATIC_INLINE void | LL_USART_Enable (USART_TypeDef *USARTx) |
USART Enable CR1 UE LL_USART_Enable. | |
__STATIC_INLINE void | LL_USART_Disable (USART_TypeDef *USARTx) |
USART Disable (all USART prescalers and outputs are disabled) | |
__STATIC_INLINE uint32_t | LL_USART_IsEnabled (USART_TypeDef *USARTx) |
Indicate if USART is enabled CR1 UE LL_USART_IsEnabled. | |
__STATIC_INLINE void | LL_USART_EnableInStopMode (USART_TypeDef *USARTx) |
USART enabled in STOP Mode. | |
__STATIC_INLINE void | LL_USART_DisableInStopMode (USART_TypeDef *USARTx) |
USART disabled in STOP Mode. | |
__STATIC_INLINE uint32_t | LL_USART_IsEnabledInStopMode (USART_TypeDef *USARTx) |
Indicate if USART is enabled in STOP Mode (able to wake up MCU from Stop mode or not) | |
__STATIC_INLINE void | LL_USART_EnableDirectionRx (USART_TypeDef *USARTx) |
Receiver Enable (Receiver is enabled and begins searching for a start bit) CR1 RE LL_USART_EnableDirectionRx. | |
__STATIC_INLINE void | LL_USART_DisableDirectionRx (USART_TypeDef *USARTx) |
Receiver Disable CR1 RE LL_USART_DisableDirectionRx. | |
__STATIC_INLINE void | LL_USART_EnableDirectionTx (USART_TypeDef *USARTx) |
Transmitter Enable CR1 TE LL_USART_EnableDirectionTx. | |
__STATIC_INLINE void | LL_USART_DisableDirectionTx (USART_TypeDef *USARTx) |
Transmitter Disable CR1 TE LL_USART_DisableDirectionTx. | |
__STATIC_INLINE void | LL_USART_SetTransferDirection (USART_TypeDef *USARTx, uint32_t Direction) |
Configure simultaneously enabled/disabled states of Transmitter and Receiver CR1 RE LL_USART_SetTransferDirection CR1 TE LL_USART_SetTransferDirection. | |
__STATIC_INLINE uint32_t | LL_USART_GetTransferDirection (USART_TypeDef *USARTx) |
Return enabled/disabled states of Transmitter and Receiver CR1 RE LL_USART_GetTransferDirection CR1 TE LL_USART_GetTransferDirection. | |
__STATIC_INLINE void | LL_USART_SetParity (USART_TypeDef *USARTx, uint32_t ParityMode) |
Configure Parity (enabled/disabled and parity mode if enabled). | |
__STATIC_INLINE uint32_t | LL_USART_GetParity (USART_TypeDef *USARTx) |
Return Parity configuration (enabled/disabled and parity mode if enabled) CR1 PS LL_USART_GetParity CR1 PCE LL_USART_GetParity. | |
__STATIC_INLINE void | LL_USART_SetWakeUpMethod (USART_TypeDef *USARTx, uint32_t Method) |
Set Receiver Wakeup method from Mute mode. | |
__STATIC_INLINE uint32_t | LL_USART_GetWakeUpMethod (USART_TypeDef *USARTx) |
Return Receiver Wakeup method from Mute mode CR1 WAKE LL_USART_GetWakeUpMethod. | |
__STATIC_INLINE void | LL_USART_SetDataWidth (USART_TypeDef *USARTx, uint32_t DataWidth) |
Set Word length (i.e. | |
__STATIC_INLINE uint32_t | LL_USART_GetDataWidth (USART_TypeDef *USARTx) |
Return Word length (i.e. | |
__STATIC_INLINE void | LL_USART_EnableMuteMode (USART_TypeDef *USARTx) |
Allow switch between Mute Mode and Active mode CR1 MME LL_USART_EnableMuteMode. | |
__STATIC_INLINE void | LL_USART_DisableMuteMode (USART_TypeDef *USARTx) |
Prevent Mute Mode use. | |
__STATIC_INLINE uint32_t | LL_USART_IsEnabledMuteMode (USART_TypeDef *USARTx) |
Indicate if switch between Mute Mode and Active mode is allowed CR1 MME LL_USART_IsEnabledMuteMode. | |
__STATIC_INLINE void | LL_USART_SetOverSampling (USART_TypeDef *USARTx, uint32_t OverSampling) |
Set Oversampling to 8-bit or 16-bit mode CR1 OVER8 LL_USART_SetOverSampling. | |
__STATIC_INLINE uint32_t | LL_USART_GetOverSampling (USART_TypeDef *USARTx) |
Return Oversampling mode CR1 OVER8 LL_USART_GetOverSampling. | |
__STATIC_INLINE void | LL_USART_SetLastClkPulseOutput (USART_TypeDef *USARTx, uint32_t LBCPOutput) |
Configure if Clock pulse of the last data bit is output to the SCLK pin or not. | |
__STATIC_INLINE uint32_t | LL_USART_GetLastClkPulseOutput (USART_TypeDef *USARTx) |
Retrieve Clock pulse of the last data bit output configuration (Last bit Clock pulse output to the SCLK pin or not) | |
__STATIC_INLINE void | LL_USART_SetClockPhase (USART_TypeDef *USARTx, uint32_t Phase) |
Select the phase of the clock output on the SCLK pin in synchronous mode. | |
__STATIC_INLINE uint32_t | LL_USART_GetClockPhase (USART_TypeDef *USARTx) |
Return phase of the clock output on the SCLK pin in synchronous mode. | |
__STATIC_INLINE void | LL_USART_SetClockPolarity (USART_TypeDef *USARTx, uint32_t Polarity) |
Select the polarity of the clock output on the SCLK pin in synchronous mode. | |
__STATIC_INLINE uint32_t | LL_USART_GetClockPolarity (USART_TypeDef *USARTx) |
Return polarity of the clock output on the SCLK pin in synchronous mode. | |
__STATIC_INLINE void | LL_USART_ConfigClock (USART_TypeDef *USARTx, uint32_t Phase, uint32_t Polarity, uint32_t LBCPOutput) |
Configure Clock signal format (Phase Polarity and choice about output of last bit clock pulse) | |
__STATIC_INLINE void | LL_USART_EnableSCLKOutput (USART_TypeDef *USARTx) |
Enable Clock output on SCLK pin. | |
__STATIC_INLINE void | LL_USART_DisableSCLKOutput (USART_TypeDef *USARTx) |
Disable Clock output on SCLK pin. | |
__STATIC_INLINE uint32_t | LL_USART_IsEnabledSCLKOutput (USART_TypeDef *USARTx) |
Indicate if Clock output on SCLK pin is enabled. | |
__STATIC_INLINE void | LL_USART_SetStopBitsLength (USART_TypeDef *USARTx, uint32_t StopBits) |
Set the length of the stop bits CR2 STOP LL_USART_SetStopBitsLength. | |
__STATIC_INLINE uint32_t | LL_USART_GetStopBitsLength (USART_TypeDef *USARTx) |
Retrieve the length of the stop bits CR2 STOP LL_USART_GetStopBitsLength. | |
__STATIC_INLINE void | LL_USART_ConfigCharacter (USART_TypeDef *USARTx, uint32_t DataWidth, uint32_t ParityMode, uint32_t StopBits) |
Configure Character frame format (Datawidth, Parity control, Stop Bits) | |
__STATIC_INLINE void | LL_USART_SetTXRXSwap (USART_TypeDef *USARTx, uint32_t SwapConfig) |
Configure TX/RX pins swapping setting. | |
__STATIC_INLINE uint32_t | LL_USART_GetTXRXSwap (USART_TypeDef *USARTx) |
Retrieve TX/RX pins swapping configuration. | |
__STATIC_INLINE void | LL_USART_SetRXPinLevel (USART_TypeDef *USARTx, uint32_t PinInvMethod) |
Configure RX pin active level logic CR2 RXINV LL_USART_SetRXPinLevel. | |
__STATIC_INLINE uint32_t | LL_USART_GetRXPinLevel (USART_TypeDef *USARTx) |
Retrieve RX pin active level logic configuration CR2 RXINV LL_USART_GetRXPinLevel. | |
__STATIC_INLINE void | LL_USART_SetTXPinLevel (USART_TypeDef *USARTx, uint32_t PinInvMethod) |
Configure TX pin active level logic CR2 TXINV LL_USART_SetTXPinLevel. | |
__STATIC_INLINE uint32_t | LL_USART_GetTXPinLevel (USART_TypeDef *USARTx) |
Retrieve TX pin active level logic configuration CR2 TXINV LL_USART_GetTXPinLevel. | |
__STATIC_INLINE void | LL_USART_SetBinaryDataLogic (USART_TypeDef *USARTx, uint32_t DataLogic) |
Configure Binary data logic. | |
__STATIC_INLINE uint32_t | LL_USART_GetBinaryDataLogic (USART_TypeDef *USARTx) |
Retrieve Binary data configuration CR2 DATAINV LL_USART_GetBinaryDataLogic. | |
__STATIC_INLINE void | LL_USART_SetTransferBitOrder (USART_TypeDef *USARTx, uint32_t BitOrder) |
Configure transfer bit order (either Less or Most Significant Bit First) | |
__STATIC_INLINE uint32_t | LL_USART_GetTransferBitOrder (USART_TypeDef *USARTx) |
Return transfer bit order (either Less or Most Significant Bit First) | |
__STATIC_INLINE void | LL_USART_EnableAutoBaudRate (USART_TypeDef *USARTx) |
Enable Auto Baud-Rate Detection. | |
__STATIC_INLINE void | LL_USART_DisableAutoBaudRate (USART_TypeDef *USARTx) |
Disable Auto Baud-Rate Detection. | |
__STATIC_INLINE uint32_t | LL_USART_IsEnabledAutoBaud (USART_TypeDef *USARTx) |
Indicate if Auto Baud-Rate Detection mechanism is enabled. | |
__STATIC_INLINE void | LL_USART_SetAutoBaudRateMode (USART_TypeDef *USARTx, uint32_t AutoBaudRateMode) |
Set Auto Baud-Rate mode bits. | |
__STATIC_INLINE uint32_t | LL_USART_GetAutoBaudRateMode (USART_TypeDef *USARTx) |
Return Auto Baud-Rate mode. | |
__STATIC_INLINE void | LL_USART_EnableRxTimeout (USART_TypeDef *USARTx) |
Enable Receiver Timeout CR2 RTOEN LL_USART_EnableRxTimeout. | |
__STATIC_INLINE void | LL_USART_DisableRxTimeout (USART_TypeDef *USARTx) |
Disable Receiver Timeout CR2 RTOEN LL_USART_DisableRxTimeout. | |
__STATIC_INLINE uint32_t | LL_USART_IsEnabledRxTimeout (USART_TypeDef *USARTx) |
Indicate if Receiver Timeout feature is enabled CR2 RTOEN LL_USART_IsEnabledRxTimeout. | |
__STATIC_INLINE void | LL_USART_ConfigNodeAddress (USART_TypeDef *USARTx, uint32_t AddressLen, uint32_t NodeAddress) |
Set Address of the USART node. | |
__STATIC_INLINE uint32_t | LL_USART_GetNodeAddress (USART_TypeDef *USARTx) |
Return 8 bit Address of the USART node as set in ADD field of CR2. | |
__STATIC_INLINE uint32_t | LL_USART_GetNodeAddressLen (USART_TypeDef *USARTx) |
Return Length of Node Address used in Address Detection mode (7-bit or 4-bit) CR2 ADDM7 LL_USART_GetNodeAddressLen. | |
__STATIC_INLINE void | LL_USART_EnableRTSHWFlowCtrl (USART_TypeDef *USARTx) |
Enable RTS HW Flow Control. | |
__STATIC_INLINE void | LL_USART_DisableRTSHWFlowCtrl (USART_TypeDef *USARTx) |
Disable RTS HW Flow Control. | |
__STATIC_INLINE void | LL_USART_EnableCTSHWFlowCtrl (USART_TypeDef *USARTx) |
Enable CTS HW Flow Control. | |
__STATIC_INLINE void | LL_USART_DisableCTSHWFlowCtrl (USART_TypeDef *USARTx) |
Disable CTS HW Flow Control. | |
__STATIC_INLINE void | LL_USART_SetHWFlowCtrl (USART_TypeDef *USARTx, uint32_t HWFlowCtrlMode) |
Configure HW Flow Control mode (both CTS and RTS) | |
__STATIC_INLINE uint32_t | LL_USART_GetHWFlowCtrl (USART_TypeDef *USARTx) |
Return HW Flow Control configuration (both CTS and RTS) | |
__STATIC_INLINE void | LL_USART_EnableOneBitSamp (USART_TypeDef *USARTx) |
Enable One bit sampling method CR3 ONEBIT LL_USART_EnableOneBitSamp. | |
__STATIC_INLINE void | LL_USART_DisableOneBitSamp (USART_TypeDef *USARTx) |
Disable One bit sampling method CR3 ONEBIT LL_USART_DisableOneBitSamp. | |
__STATIC_INLINE uint32_t | LL_USART_IsEnabledOneBitSamp (USART_TypeDef *USARTx) |
Indicate if One bit sampling method is enabled CR3 ONEBIT LL_USART_IsEnabledOneBitSamp. | |
__STATIC_INLINE void | LL_USART_EnableOverrunDetect (USART_TypeDef *USARTx) |
Enable Overrun detection CR3 OVRDIS LL_USART_EnableOverrunDetect. | |
__STATIC_INLINE void | LL_USART_DisableOverrunDetect (USART_TypeDef *USARTx) |
Disable Overrun detection CR3 OVRDIS LL_USART_DisableOverrunDetect. | |
__STATIC_INLINE uint32_t | LL_USART_IsEnabledOverrunDetect (USART_TypeDef *USARTx) |
Indicate if Overrun detection is enabled CR3 OVRDIS LL_USART_IsEnabledOverrunDetect. | |
__STATIC_INLINE void | LL_USART_SetWKUPType (USART_TypeDef *USARTx, uint32_t Type) |
Select event type for Wake UP Interrupt Flag (WUS[1:0] bits) | |
__STATIC_INLINE uint32_t | LL_USART_GetWKUPType (USART_TypeDef *USARTx) |
Return event type for Wake UP Interrupt Flag (WUS[1:0] bits) | |
__STATIC_INLINE void | LL_USART_SetBaudRate (USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t OverSampling, uint32_t BaudRate) |
Configure USART BRR register for achieving expected Baudrate value. | |
__STATIC_INLINE uint32_t | LL_USART_GetBaudRate (USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t OverSampling) |
Return current Baudrate value, according to USARTDIV present in BRR register (full BRR content), and to used Peripheral Clock and Oversampling mode values BRR BRR LL_USART_GetBaudRate. | |
__STATIC_INLINE void | LL_USART_SetRxTimeout (USART_TypeDef *USARTx, uint32_t Timeout) |
Set Receiver Time Out Value (expressed in nb of bits duration) RTOR RTO LL_USART_SetRxTimeout. | |
__STATIC_INLINE uint32_t | LL_USART_GetRxTimeout (USART_TypeDef *USARTx) |
Get Receiver Time Out Value (expressed in nb of bits duration) RTOR RTO LL_USART_GetRxTimeout. | |
__STATIC_INLINE void | LL_USART_SetBlockLength (USART_TypeDef *USARTx, uint32_t BlockLength) |
Set Block Length value in reception RTOR BLEN LL_USART_SetBlockLength. | |
__STATIC_INLINE uint32_t | LL_USART_GetBlockLength (USART_TypeDef *USARTx) |
Get Block Length value in reception RTOR BLEN LL_USART_GetBlockLength. |
Function Documentation
__STATIC_INLINE void LL_USART_ConfigCharacter | ( | USART_TypeDef * | USARTx, |
uint32_t | DataWidth, | ||
uint32_t | ParityMode, | ||
uint32_t | StopBits | ||
) |
Configure Character frame format (Datawidth, Parity control, Stop Bits)
- Note:
- Call of this function is equivalent to following function call sequence :
- Data Width configuration using LL_USART_SetDataWidth() function
- Parity Control and mode configuration using LL_USART_SetParity() function
- Stop bits configuration using LL_USART_SetStopBitsLength() function CR1 PS LL_USART_ConfigCharacter
CR1 PCE LL_USART_ConfigCharacter
CR1 M LL_USART_ConfigCharacter
CR2 STOP LL_USART_ConfigCharacter
- Parameters:
-
USARTx USART Instance DataWidth This parameter can be one of the following values: - LL_USART_DATAWIDTH_7B
- LL_USART_DATAWIDTH_8B
- LL_USART_DATAWIDTH_9B
ParityMode This parameter can be one of the following values: - LL_USART_PARITY_NONE
- LL_USART_PARITY_EVEN
- LL_USART_PARITY_ODD
StopBits This parameter can be one of the following values: - LL_USART_STOPBITS_1
- LL_USART_STOPBITS_2
- LL_USART_STOPBITS_1_5
- Return values:
-
None
Definition at line 956 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_ConfigClock | ( | USART_TypeDef * | USARTx, |
uint32_t | Phase, | ||
uint32_t | Polarity, | ||
uint32_t | LBCPOutput | ||
) |
Configure Clock signal format (Phase Polarity and choice about output of last bit clock pulse)
- Note:
- Call of this function is equivalent to following function call sequence :
- Clock Phase configuration using LL_USART_SetClockPhase() function
- Clock Polarity configuration using LL_USART_SetClockPolarity() function
- Output of Last bit Clock pulse configuration using LL_USART_SetLastClkPulseOutput() function
-
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 CPHA LL_USART_ConfigClock
CR2 CPOL LL_USART_ConfigClock
CR2 LBCL LL_USART_ConfigClock
- Parameters:
-
USARTx USART Instance Phase This parameter can be one of the following values: - LL_USART_PHASE_1EDGE
- LL_USART_PHASE_2EDGE
Polarity This parameter can be one of the following values: - LL_USART_POLARITY_LOW
- LL_USART_POLARITY_HIGH
LBCPOutput This parameter can be one of the following values: - LL_USART_LASTCLKPULSE_NO_OUTPUT
- LL_USART_LASTCLKPULSE_OUTPUT
- Return values:
-
None
Definition at line 858 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_ConfigNodeAddress | ( | USART_TypeDef * | USARTx, |
uint32_t | AddressLen, | ||
uint32_t | NodeAddress | ||
) |
Set Address of the USART node.
- Note:
- This is used in multiprocessor communication during Mute mode or Stop mode, for wakeup with address mark detection.
-
4bits address node is used when 4-bit Address Detection is selected in ADDM7. (b7-b4 should be set to 0) 8bits address node is used when 7-bit Address Detection is selected in ADDM7. (This is used in multiprocessor communication during Mute mode or Stop mode, for wakeup with 7-bit address mark detection. The MSB of the character sent by the transmitter should be equal to 1. It may also be used for character detection during normal reception, Mute mode inactive (for example, end of block detection in ModBus protocol). In this case, the whole received character (8-bit) is compared to the ADD[7:0] value and CMF flag is set on match) CR2 ADD LL_USART_ConfigNodeAddress
CR2 ADDM7 LL_USART_ConfigNodeAddress
- Parameters:
-
USARTx USART Instance AddressLen This parameter can be one of the following values: - LL_USART_ADDRESS_DETECT_4B
- LL_USART_ADDRESS_DETECT_7B
NodeAddress 4 or 7 bit Address of the USART node.
- Return values:
-
None
Definition at line 1234 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_Disable | ( | USART_TypeDef * | USARTx ) |
USART Disable (all USART prescalers and outputs are disabled)
- Note:
- When USART is disabled, USART prescalers and outputs are stopped immediately, and current operations are discarded. The configuration of the USART is kept, but all the status flags, in the USARTx_ISR are set to their default values. CR1 UE LL_USART_Disable
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 455 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableAutoBaudRate | ( | USART_TypeDef * | USARTx ) |
Disable Auto Baud-Rate Detection.
- Note:
- Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not Auto Baud Rate detection feature is supported by the USARTx instance. CR2 ABREN LL_USART_DisableAutoBaudRate
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1125 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableCTSHWFlowCtrl | ( | USART_TypeDef * | USARTx ) |
Disable CTS HW Flow Control.
- Note:
- Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. CR3 CTSE LL_USART_DisableCTSHWFlowCtrl
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1315 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableDirectionRx | ( | USART_TypeDef * | USARTx ) |
Receiver Disable CR1 RE LL_USART_DisableDirectionRx.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 530 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableDirectionTx | ( | USART_TypeDef * | USARTx ) |
Transmitter Disable CR1 TE LL_USART_DisableDirectionTx.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 552 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableInStopMode | ( | USART_TypeDef * | USARTx ) |
USART disabled in STOP Mode.
- Note:
- When this function is disabled, USART is not able to wake up the MCU from Stop mode
- Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not Wake-up from Stop mode feature is supported by the USARTx instance. CR1 UESM LL_USART_DisableInStopMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 495 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableMuteMode | ( | USART_TypeDef * | USARTx ) |
Prevent Mute Mode use.
Set Receiver in active mode permanently. CR1 MME LL_USART_DisableMuteMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 698 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableOneBitSamp | ( | USART_TypeDef * | USARTx ) |
Disable One bit sampling method CR3 ONEBIT LL_USART_DisableOneBitSamp.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1374 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableOverrunDetect | ( | USART_TypeDef * | USARTx ) |
Disable Overrun detection CR3 OVRDIS LL_USART_DisableOverrunDetect.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1407 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableRTSHWFlowCtrl | ( | USART_TypeDef * | USARTx ) |
Disable RTS HW Flow Control.
- Note:
- Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. CR3 RTSE LL_USART_DisableRTSHWFlowCtrl
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1289 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableRxTimeout | ( | USART_TypeDef * | USARTx ) |
Disable Receiver Timeout CR2 RTOEN LL_USART_DisableRxTimeout.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1195 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_DisableSCLKOutput | ( | USART_TypeDef * | USARTx ) |
Disable Clock output on SCLK pin.
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 CLKEN LL_USART_DisableSCLKOutput
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 884 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_Enable | ( | USART_TypeDef * | USARTx ) |
USART Enable CR1 UE LL_USART_Enable.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 441 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableAutoBaudRate | ( | USART_TypeDef * | USARTx ) |
Enable Auto Baud-Rate Detection.
- Note:
- Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not Auto Baud Rate detection feature is supported by the USARTx instance. CR2 ABREN LL_USART_EnableAutoBaudRate
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1112 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableCTSHWFlowCtrl | ( | USART_TypeDef * | USARTx ) |
Enable CTS HW Flow Control.
- Note:
- Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. CR3 CTSE LL_USART_EnableCTSHWFlowCtrl
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1302 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableDirectionRx | ( | USART_TypeDef * | USARTx ) |
Receiver Enable (Receiver is enabled and begins searching for a start bit) CR1 RE LL_USART_EnableDirectionRx.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 519 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableDirectionTx | ( | USART_TypeDef * | USARTx ) |
Transmitter Enable CR1 TE LL_USART_EnableDirectionTx.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 541 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableInStopMode | ( | USART_TypeDef * | USARTx ) |
USART enabled in STOP Mode.
- Note:
- When this function is enabled, USART is able to wake up the MCU from Stop mode, provided that USART clock selection is HSI or LSE in RCC.
- Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not Wake-up from Stop mode feature is supported by the USARTx instance. CR1 UESM LL_USART_EnableInStopMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 481 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableMuteMode | ( | USART_TypeDef * | USARTx ) |
Allow switch between Mute Mode and Active mode CR1 MME LL_USART_EnableMuteMode.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 687 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableOneBitSamp | ( | USART_TypeDef * | USARTx ) |
Enable One bit sampling method CR3 ONEBIT LL_USART_EnableOneBitSamp.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1363 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableOverrunDetect | ( | USART_TypeDef * | USARTx ) |
Enable Overrun detection CR3 OVRDIS LL_USART_EnableOverrunDetect.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1396 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableRTSHWFlowCtrl | ( | USART_TypeDef * | USARTx ) |
Enable RTS HW Flow Control.
- Note:
- Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. CR3 RTSE LL_USART_EnableRTSHWFlowCtrl
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1276 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableRxTimeout | ( | USART_TypeDef * | USARTx ) |
Enable Receiver Timeout CR2 RTOEN LL_USART_EnableRxTimeout.
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 1184 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_EnableSCLKOutput | ( | USART_TypeDef * | USARTx ) |
Enable Clock output on SCLK pin.
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 CLKEN LL_USART_EnableSCLKOutput
- Parameters:
-
USARTx USART Instance
- Return values:
-
None
Definition at line 871 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetAutoBaudRateMode | ( | USART_TypeDef * | USARTx ) |
Return Auto Baud-Rate mode.
- Note:
- Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not Auto Baud Rate detection feature is supported by the USARTx instance. CR2 ABRMODE LL_USART_GetAutoBaudRateMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_AUTOBAUD_DETECT_ON_STARTBIT
- LL_USART_AUTOBAUD_DETECT_ON_FALLINGEDGE
- LL_USART_AUTOBAUD_DETECT_ON_7F_FRAME
- LL_USART_AUTOBAUD_DETECT_ON_55_FRAME
Definition at line 1173 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetBaudRate | ( | USART_TypeDef * | USARTx, |
uint32_t | PeriphClk, | ||
uint32_t | OverSampling | ||
) |
Return current Baudrate value, according to USARTDIV present in BRR register (full BRR content), and to used Peripheral Clock and Oversampling mode values BRR BRR LL_USART_GetBaudRate.
- Parameters:
-
USARTx USART Instance PeriphClk Peripheral Clock OverSampling This parameter can be one of the following values: - LL_USART_OVERSAMPLING_16
- LL_USART_OVERSAMPLING_8
- Return values:
-
Baudrate
Definition at line 1499 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetBinaryDataLogic | ( | USART_TypeDef * | USARTx ) |
Retrieve Binary data configuration CR2 DATAINV LL_USART_GetBinaryDataLogic.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_BINARY_LOGIC_POSITIVE
- LL_USART_BINARY_LOGIC_NEGATIVE
Definition at line 1068 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetBlockLength | ( | USART_TypeDef * | USARTx ) |
Get Block Length value in reception RTOR BLEN LL_USART_GetBlockLength.
- Parameters:
-
USARTx USART Instance
- Return values:
-
0..0xFF
Definition at line 1558 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetClockPhase | ( | USART_TypeDef * | USARTx ) |
Return phase of the clock output on the SCLK pin in synchronous mode.
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 CPHA LL_USART_GetClockPhase
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_PHASE_1EDGE
- LL_USART_PHASE_2EDGE
Definition at line 799 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetClockPolarity | ( | USART_TypeDef * | USARTx ) |
Return polarity of the clock output on the SCLK pin in synchronous mode.
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 CPOL LL_USART_GetClockPolarity
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_POLARITY_LOW
- LL_USART_POLARITY_HIGH
Definition at line 830 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetDataWidth | ( | USART_TypeDef * | USARTx ) |
Return Word length (i.e.
nb of data bits, excluding start and stop bits) CR1 M LL_USART_GetDataWidth
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_DATAWIDTH_7B
- LL_USART_DATAWIDTH_8B
- LL_USART_DATAWIDTH_9B
Definition at line 676 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetHWFlowCtrl | ( | USART_TypeDef * | USARTx ) |
Return HW Flow Control configuration (both CTS and RTS)
- Note:
- Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. CR3 RTSE LL_USART_GetHWFlowCtrl
CR3 CTSE LL_USART_GetHWFlowCtrl
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_HWCONTROL_NONE
- LL_USART_HWCONTROL_RTS
- LL_USART_HWCONTROL_CTS
- LL_USART_HWCONTROL_RTS_CTS
Definition at line 1352 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetLastClkPulseOutput | ( | USART_TypeDef * | USARTx ) |
Retrieve Clock pulse of the last data bit output configuration (Last bit Clock pulse output to the SCLK pin or not)
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 LBCL LL_USART_GetLastClkPulseOutput
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_LASTCLKPULSE_NO_OUTPUT
- LL_USART_LASTCLKPULSE_OUTPUT
Definition at line 768 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetNodeAddress | ( | USART_TypeDef * | USARTx ) |
Return 8 bit Address of the USART node as set in ADD field of CR2.
- Note:
- If 4-bit Address Detection is selected in ADDM7, only 4bits (b3-b0) of returned value are relevant (b31-b4 are not relevant) If 7-bit Address Detection is selected in ADDM7, only 8bits (b7-b0) of returned value are relevant (b31-b8 are not relevant) CR2 ADD LL_USART_GetNodeAddress
- Parameters:
-
USARTx USART Instance
- Return values:
-
Address of the USART node (0..255)
Definition at line 1250 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetNodeAddressLen | ( | USART_TypeDef * | USARTx ) |
Return Length of Node Address used in Address Detection mode (7-bit or 4-bit) CR2 ADDM7 LL_USART_GetNodeAddressLen.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_ADDRESS_DETECT_4B
- LL_USART_ADDRESS_DETECT_7B
Definition at line 1263 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetOverSampling | ( | USART_TypeDef * | USARTx ) |
Return Oversampling mode CR1 OVER8 LL_USART_GetOverSampling.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_OVERSAMPLING_16
- LL_USART_OVERSAMPLING_8
Definition at line 736 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetParity | ( | USART_TypeDef * | USARTx ) |
Return Parity configuration (enabled/disabled and parity mode if enabled) CR1 PS LL_USART_GetParity
CR1 PCE LL_USART_GetParity.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_PARITY_NONE
- LL_USART_PARITY_EVEN
- LL_USART_PARITY_ODD
Definition at line 620 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetRXPinLevel | ( | USART_TypeDef * | USARTx ) |
Retrieve RX pin active level logic configuration CR2 RXINV LL_USART_GetRXPinLevel.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_RXPIN_LEVEL_STANDARD
- LL_USART_RXPIN_LEVEL_INVERTED
Definition at line 1012 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetRxTimeout | ( | USART_TypeDef * | USARTx ) |
Get Receiver Time Out Value (expressed in nb of bits duration) RTOR RTO LL_USART_GetRxTimeout.
- Parameters:
-
USARTx USART Instance
- Return values:
-
0..0x00FFFFFF
Definition at line 1535 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetStopBitsLength | ( | USART_TypeDef * | USARTx ) |
Retrieve the length of the stop bits CR2 STOP LL_USART_GetStopBitsLength.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_STOPBITS_1
- LL_USART_STOPBITS_1_5
- LL_USART_STOPBITS_2
Definition at line 926 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetTransferBitOrder | ( | USART_TypeDef * | USARTx ) |
Return transfer bit order (either Less or Most Significant Bit First)
- Note:
- MSB First means data is transmitted/received with the MSB first, following the start bit. LSB First means data is transmitted/received with data bit 0 first, following the start bit. CR2 MSBFIRST LL_USART_GetTransferBitOrder
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_BITORDER_LSBFIRST
- LL_USART_BITORDER_MSBFIRST
Definition at line 1099 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetTransferDirection | ( | USART_TypeDef * | USARTx ) |
Return enabled/disabled states of Transmitter and Receiver CR1 RE LL_USART_GetTransferDirection
CR1 TE LL_USART_GetTransferDirection.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_DIRECTION_NONE
- LL_USART_DIRECTION_RX
- LL_USART_DIRECTION_TX
- LL_USART_DIRECTION_TX_RX
Definition at line 586 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetTXPinLevel | ( | USART_TypeDef * | USARTx ) |
Retrieve TX pin active level logic configuration CR2 TXINV LL_USART_GetTXPinLevel.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_TXPIN_LEVEL_STANDARD
- LL_USART_TXPIN_LEVEL_INVERTED
Definition at line 1039 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetTXRXSwap | ( | USART_TypeDef * | USARTx ) |
Retrieve TX/RX pins swapping configuration.
CR2 SWAP LL_USART_GetTXRXSwap
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_TXRX_STANDARD
- LL_USART_TXRX_SWAPPED
Definition at line 985 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetWakeUpMethod | ( | USART_TypeDef * | USARTx ) |
Return Receiver Wakeup method from Mute mode CR1 WAKE LL_USART_GetWakeUpMethod.
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_WAKEUP_IDLELINE
- LL_USART_WAKEUP_ADDRESSMARK
Definition at line 647 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_GetWKUPType | ( | USART_TypeDef * | USARTx ) |
Return event type for Wake UP Interrupt Flag (WUS[1:0] bits)
- Note:
- Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not Wake-up from Stop mode feature is supported by the USARTx instance. CR3 WUS LL_USART_GetWKUPType
- Parameters:
-
USARTx USART Instance
- Return values:
-
Returned value can be one of the following values: - LL_USART_WAKEUP_ON_ADDRESS
- LL_USART_WAKEUP_ON_STARTBIT
- LL_USART_WAKEUP_ON_RXNE
Definition at line 1451 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_IsEnabled | ( | USART_TypeDef * | USARTx ) |
Indicate if USART is enabled CR1 UE LL_USART_IsEnabled.
- Parameters:
-
USARTx USART Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 466 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_IsEnabledAutoBaud | ( | USART_TypeDef * | USARTx ) |
Indicate if Auto Baud-Rate Detection mechanism is enabled.
- Note:
- Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not Auto Baud Rate detection feature is supported by the USARTx instance. CR2 ABREN LL_USART_IsEnabledAutoBaud
- Parameters:
-
USARTx USART Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 1138 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_IsEnabledInStopMode | ( | USART_TypeDef * | USARTx ) |
Indicate if USART is enabled in STOP Mode (able to wake up MCU from Stop mode or not)
- Note:
- Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not Wake-up from Stop mode feature is supported by the USARTx instance. CR1 UESM LL_USART_IsEnabledInStopMode
- Parameters:
-
USARTx USART Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 508 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_IsEnabledMuteMode | ( | USART_TypeDef * | USARTx ) |
Indicate if switch between Mute Mode and Active mode is allowed CR1 MME LL_USART_IsEnabledMuteMode.
- Parameters:
-
USARTx USART Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 709 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_IsEnabledOneBitSamp | ( | USART_TypeDef * | USARTx ) |
Indicate if One bit sampling method is enabled CR3 ONEBIT LL_USART_IsEnabledOneBitSamp.
- Parameters:
-
USARTx USART Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 1385 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_IsEnabledOverrunDetect | ( | USART_TypeDef * | USARTx ) |
Indicate if Overrun detection is enabled CR3 OVRDIS LL_USART_IsEnabledOverrunDetect.
- Parameters:
-
USARTx USART Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 1418 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_IsEnabledRxTimeout | ( | USART_TypeDef * | USARTx ) |
Indicate if Receiver Timeout feature is enabled CR2 RTOEN LL_USART_IsEnabledRxTimeout.
- Parameters:
-
USARTx USART Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 1206 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE uint32_t LL_USART_IsEnabledSCLKOutput | ( | USART_TypeDef * | USARTx ) |
Indicate if Clock output on SCLK pin is enabled.
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 CLKEN LL_USART_IsEnabledSCLKOutput
- Parameters:
-
USARTx USART Instance
- Return values:
-
State of bit (1 or 0).
Definition at line 897 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetAutoBaudRateMode | ( | USART_TypeDef * | USARTx, |
uint32_t | AutoBaudRateMode | ||
) |
Set Auto Baud-Rate mode bits.
- Note:
- Macro IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(USARTx) can be used to check whether or not Auto Baud Rate detection feature is supported by the USARTx instance. CR2 ABRMODE LL_USART_SetAutoBaudRateMode
- Parameters:
-
USARTx USART Instance AutoBaudRateMode This parameter can be one of the following values: - LL_USART_AUTOBAUD_DETECT_ON_STARTBIT
- LL_USART_AUTOBAUD_DETECT_ON_FALLINGEDGE
- LL_USART_AUTOBAUD_DETECT_ON_7F_FRAME
- LL_USART_AUTOBAUD_DETECT_ON_55_FRAME
- Return values:
-
None
Definition at line 1156 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetBaudRate | ( | USART_TypeDef * | USARTx, |
uint32_t | PeriphClk, | ||
uint32_t | OverSampling, | ||
uint32_t | BaudRate | ||
) |
Configure USART BRR register for achieving expected Baudrate value.
- Note:
- Compute and set USARTDIV value in BRR Register (full BRR content) according to used Peripheral Clock, Oversampling mode, and expected BaudRate values BRR BRR LL_USART_SetBaudRate
- Parameters:
-
USARTx USART Instance PeriphClk Peripheral Clock OverSampling This parameter can be one of the following values: - LL_USART_OVERSAMPLING_16
- LL_USART_OVERSAMPLING_8
BaudRate Baudrate
- Return values:
-
None
Definition at line 1469 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetBinaryDataLogic | ( | USART_TypeDef * | USARTx, |
uint32_t | DataLogic | ||
) |
Configure Binary data logic.
- Note:
- Allow to define how Logical data from the data register are send/received : either in positive/direct logic (1=H, 0=L) or in negative/inverse logic (1=L, 0=H) CR2 DATAINV LL_USART_SetBinaryDataLogic
- Parameters:
-
USARTx USART Instance DataLogic This parameter can be one of the following values: - LL_USART_BINARY_LOGIC_POSITIVE
- LL_USART_BINARY_LOGIC_NEGATIVE
- Return values:
-
None
Definition at line 1055 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetBlockLength | ( | USART_TypeDef * | USARTx, |
uint32_t | BlockLength | ||
) |
Set Block Length value in reception RTOR BLEN LL_USART_SetBlockLength.
- Parameters:
-
USARTx USART Instance BlockLength 0..0xFF
- Return values:
-
None
Definition at line 1547 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetClockPhase | ( | USART_TypeDef * | USARTx, |
uint32_t | Phase | ||
) |
Select the phase of the clock output on the SCLK pin in synchronous mode.
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 CPHA LL_USART_SetClockPhase
- Parameters:
-
USARTx USART Instance Phase This parameter can be one of the following values: - LL_USART_PHASE_1EDGE
- LL_USART_PHASE_2EDGE
- Return values:
-
None
Definition at line 784 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetClockPolarity | ( | USART_TypeDef * | USARTx, |
uint32_t | Polarity | ||
) |
Select the polarity of the clock output on the SCLK pin in synchronous mode.
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 CPOL LL_USART_SetClockPolarity
- Parameters:
-
USARTx USART Instance Polarity This parameter can be one of the following values: - LL_USART_POLARITY_LOW
- LL_USART_POLARITY_HIGH
- Return values:
-
None
Definition at line 815 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetDataWidth | ( | USART_TypeDef * | USARTx, |
uint32_t | DataWidth | ||
) |
Set Word length (i.e.
nb of data bits, excluding start and stop bits) CR1 M LL_USART_SetDataWidth
- Parameters:
-
USARTx USART Instance DataWidth This parameter can be one of the following values: - LL_USART_DATAWIDTH_7B
- LL_USART_DATAWIDTH_8B
- LL_USART_DATAWIDTH_9B
- Return values:
-
None
Definition at line 662 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetHWFlowCtrl | ( | USART_TypeDef * | USARTx, |
uint32_t | HWFlowCtrlMode | ||
) |
Configure HW Flow Control mode (both CTS and RTS)
- Note:
- Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. CR3 RTSE LL_USART_SetHWFlowCtrl
CR3 CTSE LL_USART_SetHWFlowCtrl
- Parameters:
-
USARTx USART Instance HWFlowCtrlMode This parameter can be one of the following values: - LL_USART_HWCONTROL_NONE
- LL_USART_HWCONTROL_RTS
- LL_USART_HWCONTROL_CTS
- LL_USART_HWCONTROL_RTS_CTS
- Return values:
-
None
Definition at line 1334 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetLastClkPulseOutput | ( | USART_TypeDef * | USARTx, |
uint32_t | LBCPOutput | ||
) |
Configure if Clock pulse of the last data bit is output to the SCLK pin or not.
- Note:
- Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. CR2 LBCL LL_USART_SetLastClkPulseOutput
- Parameters:
-
USARTx USART Instance LBCPOutput This parameter can be one of the following values: - LL_USART_LASTCLKPULSE_NO_OUTPUT
- LL_USART_LASTCLKPULSE_OUTPUT
- Return values:
-
None
Definition at line 752 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetOverSampling | ( | USART_TypeDef * | USARTx, |
uint32_t | OverSampling | ||
) |
Set Oversampling to 8-bit or 16-bit mode CR1 OVER8 LL_USART_SetOverSampling.
- Parameters:
-
USARTx USART Instance OverSampling This parameter can be one of the following values: - LL_USART_OVERSAMPLING_16
- LL_USART_OVERSAMPLING_8
- Return values:
-
None
Definition at line 723 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetParity | ( | USART_TypeDef * | USARTx, |
uint32_t | ParityMode | ||
) |
Configure Parity (enabled/disabled and parity mode if enabled).
- Note:
- This function selects if hardware parity control (generation and detection) is enabled or disabled. When the parity control is enabled (Odd or Even), computed parity bit is inserted at the MSB position (9th or 8th bit depending on data width) and parity is checked on the received data. CR1 PS LL_USART_SetParity
CR1 PCE LL_USART_SetParity
- Parameters:
-
USARTx USART Instance ParityMode This parameter can be one of the following values: - LL_USART_PARITY_NONE
- LL_USART_PARITY_EVEN
- LL_USART_PARITY_ODD
- Return values:
-
None
Definition at line 605 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetRXPinLevel | ( | USART_TypeDef * | USARTx, |
uint32_t | PinInvMethod | ||
) |
Configure RX pin active level logic CR2 RXINV LL_USART_SetRXPinLevel.
- Parameters:
-
USARTx USART Instance PinInvMethod This parameter can be one of the following values: - LL_USART_RXPIN_LEVEL_STANDARD
- LL_USART_RXPIN_LEVEL_INVERTED
- Return values:
-
None
Definition at line 999 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetRxTimeout | ( | USART_TypeDef * | USARTx, |
uint32_t | Timeout | ||
) |
Set Receiver Time Out Value (expressed in nb of bits duration) RTOR RTO LL_USART_SetRxTimeout.
- Parameters:
-
USARTx USART Instance Timeout 0..0x00FFFFFF
- Return values:
-
None
Definition at line 1524 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetStopBitsLength | ( | USART_TypeDef * | USARTx, |
uint32_t | StopBits | ||
) |
Set the length of the stop bits CR2 STOP LL_USART_SetStopBitsLength.
- Parameters:
-
USARTx USART Instance StopBits This parameter can be one of the following values: - LL_USART_STOPBITS_1
- LL_USART_STOPBITS_1_5
- LL_USART_STOPBITS_2
- Return values:
-
None
Definition at line 912 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetTransferBitOrder | ( | USART_TypeDef * | USARTx, |
uint32_t | BitOrder | ||
) |
Configure transfer bit order (either Less or Most Significant Bit First)
- Note:
- MSB First means data is transmitted/received with the MSB first, following the start bit. LSB First means data is transmitted/received with data bit 0 first, following the start bit. CR2 MSBFIRST LL_USART_SetTransferBitOrder
- Parameters:
-
USARTx USART Instance BitOrder This parameter can be one of the following values: - LL_USART_BITORDER_LSBFIRST
- LL_USART_BITORDER_MSBFIRST
- Return values:
-
None
Definition at line 1084 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetTransferDirection | ( | USART_TypeDef * | USARTx, |
uint32_t | Direction | ||
) |
Configure simultaneously enabled/disabled states of Transmitter and Receiver CR1 RE LL_USART_SetTransferDirection
CR1 TE LL_USART_SetTransferDirection.
- Parameters:
-
USARTx USART Instance Direction This parameter can be one of the following values: - LL_USART_DIRECTION_NONE
- LL_USART_DIRECTION_RX
- LL_USART_DIRECTION_TX
- LL_USART_DIRECTION_TX_RX
- Return values:
-
None
Definition at line 570 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetTXPinLevel | ( | USART_TypeDef * | USARTx, |
uint32_t | PinInvMethod | ||
) |
Configure TX pin active level logic CR2 TXINV LL_USART_SetTXPinLevel.
- Parameters:
-
USARTx USART Instance PinInvMethod This parameter can be one of the following values: - LL_USART_TXPIN_LEVEL_STANDARD
- LL_USART_TXPIN_LEVEL_INVERTED
- Return values:
-
None
Definition at line 1026 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetTXRXSwap | ( | USART_TypeDef * | USARTx, |
uint32_t | SwapConfig | ||
) |
Configure TX/RX pins swapping setting.
CR2 SWAP LL_USART_SetTXRXSwap
- Parameters:
-
USARTx USART Instance SwapConfig This parameter can be one of the following values: - LL_USART_TXRX_STANDARD
- LL_USART_TXRX_SWAPPED
- Return values:
-
None
Definition at line 972 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetWakeUpMethod | ( | USART_TypeDef * | USARTx, |
uint32_t | Method | ||
) |
Set Receiver Wakeup method from Mute mode.
CR1 WAKE LL_USART_SetWakeUpMethod
- Parameters:
-
USARTx USART Instance Method This parameter can be one of the following values: - LL_USART_WAKEUP_IDLELINE
- LL_USART_WAKEUP_ADDRESSMARK
- Return values:
-
None
Definition at line 634 of file stm32l4xx_ll_usart.h.
__STATIC_INLINE void LL_USART_SetWKUPType | ( | USART_TypeDef * | USARTx, |
uint32_t | Type | ||
) |
Select event type for Wake UP Interrupt Flag (WUS[1:0] bits)
- Note:
- Macro IS_UART_WAKEUP_FROMSTOP_INSTANCE(USARTx) can be used to check whether or not Wake-up from Stop mode feature is supported by the USARTx instance. CR3 WUS LL_USART_SetWKUPType
- Parameters:
-
USARTx USART Instance Type This parameter can be one of the following values: - LL_USART_WAKEUP_ON_ADDRESS
- LL_USART_WAKEUP_ON_STARTBIT
- LL_USART_WAKEUP_ON_RXNE
- Return values:
-
None
Definition at line 1435 of file stm32l4xx_ll_usart.h.
Generated on Tue Jul 12 2022 11:35:28 by
