MG32L003 Standard Peripherals Firmware Library
Modules | Data Structures | Functions

LPUART driver modules. More...

Modules

 LPUART_Exported_Constants
 
 LPUART_Private_Functions
 

Data Structures

struct  LPUART_InitTypeDef
 LPUART Init Structure definition. More...
 

Functions

void LPUART_DeInit (LPUART_TypeDef *LPUARTx)
 Deinitializes the LPUARTx peripheral registers to their default reset values. More...
 
void LPUART_Init (LPUART_TypeDef *LPUARTx, LPUART_InitTypeDef *LPUART_InitStruct)
 Initializes the LPUARTx peripheral according to the specified parameters in the LPUART_InitStruct. More...
 
void LPUART_StructInit (LPUART_InitTypeDef *LPUART_InitStruct)
 Fills each LPUART_InitStruct member with its default value. More...
 
void LPUART_Cmd (LPUART_TypeDef *LPUARTx, FunctionalState NewState)
 Enables or disables the specified LPUART peripheral. More...
 
void LPUART_WriteData (LPUART_TypeDef *LPUARTx, uint8_t Data)
 Write data to SBUF register. More...
 
uint8_t LPUART_ReadData (LPUART_TypeDef *LPUARTx)
 Read data from SBUF register. More...
 
void LPUART_MultideviceCmd (LPUART_TypeDef *LPUARTx, FunctionalState NewState)
 Enables or disables the LPUARTx's Multidevice function. More...
 
void LPUART_SetAddress (LPUART_TypeDef *LPUARTx, uint8_t LPUART_Address)
 Sets the address of the LPUART node. More...
 
void LPUART_SetAddressMask (LPUART_TypeDef *LPUARTx, uint8_t LPUART_AddressMask)
 Sets the address mask of the LPUART node. More...
 
void LPUART_ITConfig (LPUART_TypeDef *LPUARTx, uint32_t LPUART_IT, FunctionalState NewState)
 Enables or disables the LPUARTx's interrupts. More...
 
FlagStatus LPUART_GetFlagStatus (LPUART_TypeDef *LPUARTx, uint32_t LPUART_FLAG)
 Checks whether the specified UART flag is set or not. More...
 
void LPUART_ClearFlag (LPUART_TypeDef *LPUARTx, uint32_t LPUART_FLAG)
 Clear the specified LPUART flag. More...
 

Detailed Description

LPUART driver modules.

Function Documentation

◆ LPUART_ClearFlag()

void LPUART_ClearFlag ( LPUART_TypeDef LPUARTx,
uint32_t  LPUART_FLAG 
)

Clear the specified LPUART flag.

Parameters
LPUARTxPointer to selected LPUART peripheral. This parameter can be one of the following values: LPUAERT.
LPUART_FLAGspecifies the flag to clear. This parameter can be one of the following values:
  • LPUART_FLAG_FE: LPUART receive error interrupt flag.
  • LPUART_FLAG_TI: LPUART transmit complate interrupt flag.
  • LPUART_FLAG_RI: LPUART receive complate interrupt flag.
Return values
None.

◆ LPUART_Cmd()

void LPUART_Cmd ( LPUART_TypeDef LPUARTx,
FunctionalState  NewState 
)

Enables or disables the specified LPUART peripheral.

Parameters
LPUARTxSelect the LPUART peripheral. This parameter can be one of the following values: LPUART.
NewStatenew state of the LPUARTx peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None

◆ LPUART_DeInit()

void LPUART_DeInit ( LPUART_TypeDef LPUARTx)

Deinitializes the LPUARTx peripheral registers to their default reset values.

Parameters
LPUARTxPointer to selected LPUART peripheral.
Return values
None

◆ LPUART_GetFlagStatus()

FlagStatus LPUART_GetFlagStatus ( LPUART_TypeDef LPUARTx,
uint32_t  LPUART_FLAG 
)

Checks whether the specified UART flag is set or not.

Parameters
LPUARTxPointer to selected UART peripheral. This parameter can be one of the following values: LPUART.
UART_FLAGspecifies the flag to check. This parameter can be one of the following values:
  • LPUART_FLAG_FE: LPUART receive error interrupt flag.
  • LPUART_FLAG_TI: LPUART transmit complate interrupt flag.
  • LPUART_FLAG_RI: LPUART receive complate interrupt flag.
Return values
Thenew state of LPUART_FLAG (SET or RESET).

◆ LPUART_Init()

void LPUART_Init ( LPUART_TypeDef LPUARTx,
LPUART_InitTypeDef LPUART_InitStruct 
)

Initializes the LPUARTx peripheral according to the specified parameters in the LPUART_InitStruct.

Parameters
LPUARTxPointer to selected LPUART peripheral.
LPUART_InitStructpointer to a LPUART_InitTypeDef structure that contains the configuration information for the specified LPUART peripheral.
Return values
None

◆ LPUART_ITConfig()

void LPUART_ITConfig ( LPUART_TypeDef LPUARTx,
uint32_t  LPUART_IT,
FunctionalState  NewState 
)

Enables or disables the LPUARTx's interrupts.

Parameters
LPUARTxPointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
LPUART_ITspecifies the LPUART interrupt sources to be enabled or disabled. This parameter can be a combination of the following values:
  • LPUART_IT_FE: LPUART receive error interrupt.
  • LPUART_IT_TI: LPUART transmit complate interrupt.
  • LPUART_IT_RI: LPUART receive complate interrupt.
NewStatenew state of the interrupts. This parameter can be: ENABLE or DISABLE.
Return values
None

◆ LPUART_MultideviceCmd()

void LPUART_MultideviceCmd ( LPUART_TypeDef LPUARTx,
FunctionalState  NewState 
)

Enables or disables the LPUARTx's Multidevice function.

Parameters
LPUARTxPointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
NewStatenew state of the UART Multidevice function. This parameter can be: ENABLE or DISABLE.
Return values
None

◆ LPUART_ReadData()

uint8_t LPUART_ReadData ( LPUART_TypeDef LPUARTx)

Read data from SBUF register.

Parameters
LPUARTxPointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
Return values
Thereceived data

◆ LPUART_SetAddress()

void LPUART_SetAddress ( LPUART_TypeDef LPUARTx,
uint8_t  LPUART_Address 
)

Sets the address of the LPUART node.

Parameters
LPUARTxPointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
LPUART_AddressIndicates the address of the LPUART node.
Return values
None

◆ LPUART_SetAddressMask()

void LPUART_SetAddressMask ( LPUART_TypeDef LPUARTx,
uint8_t  LPUART_AddressMask 
)

Sets the address mask of the LPUART node.

Parameters
LPUARTxPointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
LPUART_AddressMaskIndicates the address mask of the LPUART node.
Return values
None

◆ LPUART_StructInit()

void LPUART_StructInit ( LPUART_InitTypeDef LPUART_InitStruct)

Fills each LPUART_InitStruct member with its default value.

Parameters
LPUART_InitStructpointer to a LPUART_InitTypeDef structure which will be initialized.
Return values
None

◆ LPUART_WriteData()

void LPUART_WriteData ( LPUART_TypeDef LPUARTx,
uint8_t  Data 
)

Write data to SBUF register.

Parameters
LPUARTxPointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
Datathe data to write.
Return values
None