WB32L003 Standard Peripherals Firmware Library

模块 | 结构体 | 函数
LPUART
WB32L003_StdPeriph_Driver

LPUART driver modules 更多...

## 模块
| LPUART_Exported_Constants
| LPUART_Private_Functions

## 结构体
struct | LPUART_InitTypeDef
| LPUART Init Structure definition 更多...

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

## 详细描述

LPUART driver modules

## 函数说明

## ◆ LPUART_ClearFlag()

void LPUART_ClearFlag | ( | LPUART_TypeDef * | LPUARTx,
|  | uint32_t | LPUART_FLAG
| ) |  |

Clear the specified LPUART flag.

参数

  LPUARTx | Pointer to selected LPUART peripheral. This parameter can be one of the following values: LPUAERT.
  LPUART_FLAG | specifies 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.

返回值

  None. |

## ◆ LPUART_Cmd()

void LPUART_Cmd | ( | LPUART_TypeDef * | LPUARTx,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the specified LPUART peripheral.

参数

  LPUARTx | Select the LPUART peripheral. This parameter can be one of the following values: LPUART.
  NewState | new state of the LPUARTx peripheral. This parameter can be: ENABLE or DISABLE.

返回值

  None |

## ◆ LPUART_DeInit()

void LPUART_DeInit | ( | LPUART_TypeDef * | LPUARTx | ) |

Deinitializes the LPUARTx peripheral registers to their default reset values.

参数

  LPUARTx | Pointer to selected LPUART peripheral.

返回值

  None |

## ◆ LPUART_GetFlagStatus()

FlagStatus LPUART_GetFlagStatus | ( | LPUART_TypeDef * | LPUARTx,
|  | uint32_t | LPUART_FLAG
| ) |  |

Checks whether the specified UART flag is set or not.

参数

  LPUARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: LPUART.
  UART_FLAG | specifies 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.

返回值

  The | new 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.

参数

  LPUARTx | Pointer to selected LPUART peripheral.
  LPUART_InitStruct | pointer to a LPUART_InitTypeDef structure that contains the configuration information for the specified LPUART peripheral.

返回值

  None |

## ◆ LPUART_ITConfig()

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

Enables or disables the LPUARTx's interrupts.

参数

  LPUARTx | Pointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
  LPUART_IT | specifies 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.
  NewState | new state of the interrupts. This parameter can be: ENABLE or DISABLE.

返回值

  None |

## ◆ LPUART_MultideviceCmd()

void LPUART_MultideviceCmd | ( | LPUART_TypeDef * | LPUARTx,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the LPUARTx's Multidevice function.

参数

  LPUARTx | Pointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
  NewState | new state of the UART Multidevice function. This parameter can be: ENABLE or DISABLE.

返回值

  None |

## ◆ LPUART_ReadData()

uint8_t LPUART_ReadData | ( | LPUART_TypeDef * | LPUARTx | ) |

Read data from SBUF register.

参数

  LPUARTx | Pointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.

返回值

  The | received data

## ◆ LPUART_SetAddress()

void LPUART_SetAddress | ( | LPUART_TypeDef * | LPUARTx,
|  | uint8_t | LPUART_Address
| ) |  |

Sets the address of the LPUART node.

参数

  LPUARTx | Pointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
  LPUART_Address | Indicates the address of the LPUART node.

返回值

  None |

## ◆ LPUART_SetAddressMask()

void LPUART_SetAddressMask | ( | LPUART_TypeDef * | LPUARTx,
|  | uint8_t | LPUART_AddressMask
| ) |  |

Sets the address mask of the LPUART node.

参数

  LPUARTx | Pointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
  LPUART_AddressMask | Indicates the address mask of the LPUART node.

返回值

  None |

## ◆ LPUART_StructInit()

void LPUART_StructInit | ( | LPUART_InitTypeDef * | LPUART_InitStruct | ) |

Fills each LPUART_InitStruct member with its default value.

参数

  LPUART_InitStruct | pointer to a LPUART_InitTypeDef structure which will be initialized.

返回值

  None |

## ◆ LPUART_WriteData()

void LPUART_WriteData | ( | LPUART_TypeDef * | LPUARTx,
|  | uint8_t | Data
| ) |  |

Write data to SBUF register.

参数

  LPUARTx | Pointer to selected LPUART peripheral. This parameter can be one of the following values: LPUART.
  Data | the data to write.

返回值

  None |