MG32L003 Standard Peripherals Firmware Library
|
Functions | |
void | UART_DeInit (UART_TypeDef *UARTx) |
Deinitializes the UARTx peripheral registers to their default reset values. More... | |
void | UART_Init (UART_TypeDef *UARTx, UART_InitTypeDef *UART_InitStruct) |
Initializes the UARTx peripheral according to the specified parameters in the UART_InitStruct. More... | |
void | UART_StructInit (UART_InitTypeDef *UART_InitStruct) |
Fills each UART_InitStruct member with its default value. More... | |
void | UART_Cmd (UART_TypeDef *UARTx, FunctionalState NewState) |
Enables or disables the specified UART peripheral. More... | |
void | UART_WriteData (UART_TypeDef *UARTx, uint8_t Data) |
Write data to SBUF register. More... | |
uint8_t | UART_ReadData (UART_TypeDef *UARTx) |
Read data from SBUF register. More... | |
void | UART_WriteDataParity (UART_TypeDef *UARTx, uint8_t Data, uint8_t Parity) |
Write data and parity to SBUF register. More... | |
uint8_t | UART_ReadDataParity (UART_TypeDef *UARTx, uint8_t *Data, uint8_t Parity) |
Read data and parity check result from SBUF register. More... | |
void | UART_IrDACmd (UART_TypeDef *UARTx, FunctionalState NewState) |
Enables or disables the UARTx's IrDA Mode. More... | |
void | UART_ITConfig (UART_TypeDef *UARTx, uint8_t UART_IT, FunctionalState NewState) |
Enables or disables the UARTx's interrupts. More... | |
void | UART_MultideviceCmd (UART_TypeDef *UARTx, FunctionalState NewState) |
Enables or disables the UARTx's Multidevice function. More... | |
void | UART_SetAddress (UART_TypeDef *UARTx, uint8_t UART_Address) |
Sets the address of the UART node. More... | |
void | UART_SetAddressMask (UART_TypeDef *UARTx, uint8_t UART_AddressMask) |
Sets the address mask of the UART node. More... | |
FlagStatus | UART_GetFlagStatus (UART_TypeDef *UARTx, uint32_t UART_FLAG) |
Checks whether the specified UART flag is set or not. More... | |
void | UART_ClearFlag (UART_TypeDef *UARTx, uint32_t UART_FLAG) |
Clear the specified UART flag. More... | |
void UART_ClearFlag | ( | UART_TypeDef * | UARTx, |
uint32_t | UART_FLAG | ||
) |
Clear the specified UART flag.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
UART_FLAG | specifies the flag to clear. This parameter can be one of the following values:
|
The | new state of UART_FLAG (SET or RESET). |
void UART_Cmd | ( | UART_TypeDef * | UARTx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified UART peripheral.
UARTx | Select the UART peripheral. This parameter can be one of the following values: UART1, UART2. |
NewState | new state of the UARTx peripheral. This parameter can be: ENABLE or DISABLE. |
None |
void UART_DeInit | ( | UART_TypeDef * | UARTx | ) |
Deinitializes the UARTx peripheral registers to their default reset values.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
None |
FlagStatus UART_GetFlagStatus | ( | UART_TypeDef * | UARTx, |
uint32_t | UART_FLAG | ||
) |
Checks whether the specified UART flag is set or not.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
UART_FLAG | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of UART_FLAG (SET or RESET). |
void UART_Init | ( | UART_TypeDef * | UARTx, |
UART_InitTypeDef * | UART_InitStruct | ||
) |
Initializes the UARTx peripheral according to the specified parameters in the UART_InitStruct.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
UART_InitStruct | pointer to a UART_InitTypeDef structure that contains the configuration information for the specified UART peripheral. |
None |
void UART_IrDACmd | ( | UART_TypeDef * | UARTx, |
FunctionalState | NewState | ||
) |
Enables or disables the UARTx's IrDA Mode.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
NewState | new state of the IrDA Mode. This parameter can be: ENABLE or DISABLE. |
None |
void UART_ITConfig | ( | UART_TypeDef * | UARTx, |
uint8_t | UART_IT, | ||
FunctionalState | NewState | ||
) |
Enables or disables the UARTx's interrupts.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
UART_IT | specifies the UART interrupt sources to be enabled or disabled. This parameter can be a combination of the following values:
|
NewState | new state of the interrupts. This parameter can be: ENABLE or DISABLE. |
None |
void UART_MultideviceCmd | ( | UART_TypeDef * | UARTx, |
FunctionalState | NewState | ||
) |
Enables or disables the UARTx's Multidevice function.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
NewState | new state of the UART Multidevice function. This parameter can be: ENABLE or DISABLE. |
None |
uint8_t UART_ReadData | ( | UART_TypeDef * | UARTx | ) |
Read data from SBUF register.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
The | received data |
uint8_t UART_ReadDataParity | ( | UART_TypeDef * | UARTx, |
uint8_t * | Data, | ||
uint8_t | Parity | ||
) |
Read data and parity check result from SBUF register.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
Data | UART receiver data |
Parity | Parity Check Selection. This parameter can be one of the following values:
|
Parity | Check Result, 1 indicates successful verification, 0 indicates verification failure. |
void UART_SetAddress | ( | UART_TypeDef * | UARTx, |
uint8_t | UART_Address | ||
) |
Sets the address of the UART node.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
UART_Address | Indicates the address of the UART node. |
None |
void UART_SetAddressMask | ( | UART_TypeDef * | UARTx, |
uint8_t | UART_AddressMask | ||
) |
Sets the address mask of the UART node.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
UART_AddressMask | Indicates the address mask of the UART node. |
None |
void UART_StructInit | ( | UART_InitTypeDef * | UART_InitStruct | ) |
Fills each UART_InitStruct member with its default value.
UART_InitStruct | pointer to a UART_InitTypeDef structure which will be initialized. |
None |
void UART_WriteData | ( | UART_TypeDef * | UARTx, |
uint8_t | Data | ||
) |
Write data to SBUF register.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
Data | the data to write. |
None |
void UART_WriteDataParity | ( | UART_TypeDef * | UARTx, |
uint8_t | Data, | ||
uint8_t | Parity | ||
) |
Write data and parity to SBUF register.
UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
Data | the data to write. |
Parity | Parity Check Selection. This parameter can be one of the following values:
|
None |