8051-ELL库  beta 1.1.6
8051-ELL library API Document Center
UART_InitType结构体 参考

串口初始化结构体句柄,初始化时请定义该句柄,并用其地址来传参。 更多...

#include <STC8x_UART.h>

成员变量

UARTMode_Type Mode
 
UART_BRTGen_Type BRTGen
 
uint8_t BRTGenClkDiv
 
UART_BRTMode_Type BRTMode
 
BOOL BRTDouble
 
uint32_t BaudRate
 
BOOL MulitComm
 
BOOL Relay
 
BOOL RxEnable
 

详细描述

串口初始化结构体句柄,初始化时请定义该句柄,并用其地址来传参。

The uart initializes the structure handle. When initializing, please define the handle and use its address to pass parameters.

注解
关于BRTGenClkDiv这个参数,在系统时钟发生改变以后,需要你手动重新更改, 以匹配你需要的定时时间,它不可以向BaudRate参数一样可以自己做修正。

结构体成员变量说明

◆ BaudRate

uint32_t BaudRate

波特率值。 Baud rate value.

◆ BRTDouble

BOOL BRTDouble

波特率加倍控制位。 Baud rate double control bit.

◆ BRTGen

1T指令周期。 Baud rate generator.

◆ BRTGenClkDiv

uint8_t BRTGenClkDiv

1T指令周期。 Baud rate generator clock division.

◆ BRTMode

波特率发生器时钟模式。 Baud rate generator clock mode.

◆ Mode

1T指令周期。 Working mode.

◆ MulitComm

BOOL MulitComm

多机通信控制位。Multi-machine communication control bit.

◆ Relay

BOOL Relay

中继广播控制位。 Relay broadcasting control bit.

◆ RxEnable

BOOL RxEnable

串口接收控制位。 Serial port receive control bit.