Function gx_hal_uart_init¶
Defined in file__output_copyinclude_src_include_uart_gx_hal_uart.h
Function Documentation¶
-
hal_status gx_hal_uart_init(GX_HAL_UART *dev)¶
串口初始化 调用该函数初始化指定的串口,调用前需要填充dev结构体中以下参数: regs: 基地址 pclk: 时钟源频率(Hz) baudrate: 波特率 data_bits: 数据位(默认为 8) stop_bits: 停止位(默认位 1) flow: 硬件流控是能位(默认为 0) fdiv: 小数分频开关(默认为 0)
- 参数
dev – uart 句柄
- Returns HAL_OK
成功
- Returns HAL_ERROR
失败
- 返回
hal_status 是否成功