WB32L003 Standard Peripherals Firmware Library
结构体 | 宏定义 | 函数
wb32l003_lpuart.h 文件参考

This file contains all the functions prototypes for the LPUART firmware library. 更多...

#include "wb32l003.h"

浏览源代码.

结构体

struct  LPUART_InitTypeDef
 LPUART Init Structure definition 更多...
 

宏定义

#define IS_LPUART_ALL_PERIPH(PERIPH)   (((PERIPH) == LPUART))
 
#define LPUART_BandDouble_Enable   ((uint32_t)LPUART_SCON_DBAUD)
 
#define LPUART_BandDouble_Disable   ((uint32_t)0x00)
 
#define LPUART_BaudRateMode_Self   ((uint32_t)LPUART_BAUDCR_SELF_BRG)
 
#define LPUART_BaudRateMode_Tim   ((uint32_t)0x00)
 
#define LPUART_WordLength_8b   ((uint32_t)(0x01U << 6))
 
#define LPUART_WordLength_9b   ((uint32_t)(0x03U << 6))
 
#define LPUART_LowPower_Enable   ((uint32_t)(0x01U << 10))
 
#define LPUART_LowPower_Disable   ((uint32_t)0x00)
 
#define LPUART_ClkSel_PCLK   ((uint32_t)(0x01U << 11))
 
#define LPUART_ClkSel_LSE   ((uint32_t)(0x02U << 11))
 
#define LPUART_ClkSel_LSI   ((uint32_t)(0x03U << 11))
 
#define LPUART_CLK_DIV1   ((uint32_t)(0x07U << 13))
 
#define LPUART_CLK_DIV2   ((uint32_t)(0x06U << 13))
 
#define LPUART_CLK_DIV4   ((uint32_t)(0x05U << 13))
 
#define LPUART_CLK_DIV8   ((uint32_t)(0x04U << 13))
 
#define LPUART_CLK_DIV16   ((uint32_t)(0x03U << 13))
 
#define LPUART_CLK_DIV32   ((uint32_t)(0x02U << 13))
 
#define LPUART_CLK_DIV64   ((uint32_t)(0x01U << 13))
 
#define LPUART_CLK_DIV128   ((uint32_t)(0x00U << 13))
 
#define LPUART_Parity_None   ((uint32_t)0x00)
 
#define LPUART_Parity_Odd   ((uint32_t)0x01)
 
#define LPUART_Parity_Even   ((uint32_t)0x02)
 
#define LPUART_IT_FE   LPUART_SCON_FEEN
 
#define LPUART_IT_TI   LPUART_SCON_TIEN
 
#define LPUART_IT_RI   LPUART_SCON_RIEN
 
#define LPUART_FLAG_FE   LPUART_INTSR_FE
 
#define LPUART_FLAG_TI   LPUART_INTSR_TI
 
#define LPUART_FLAG_RI   LPUART_INTSR_RI
 

函数

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. 更多...
 

详细描述

This file contains all the functions prototypes for the LPUART firmware library.

作者
Westberry Application Team
版本
V0.0.4
日期
23-April-2023