1 Star 0 Fork 4.9K

famoustang / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wifiiot_uart-h.md 13.62 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

wifiiot_uart.h

Overview

Related Modules:

Wifiiot

Description:

Declares the UART interface functions.

These functions are used for UART initialization, data input/output, and data flow control.

Since:

1.0

Version:

1.0

Summary

Data Structures

Data Structure Name

Description

WifiIotUartAttribute

Defines the basic attributes of a UART device.

WifiIotUartExtraAttr

Defines the extended attributes of a UART device.

Enumerations

Enumeration Name

Description

WifiIotUartIdx { WIFI_IOT_UART_IDX_0, WIFI_IOT_UART_IDX_1, WIFI_IOT_UART_IDX_2, WIFI_IOT_UART_IDX_MAX }

Enumerates the UART serial number.

WifiIotUartIdxDataBit { WIFI_IOT_UART_DATA_BIT_5 = 5, WIFI_IOT_UART_DATA_BIT_6, WIFI_IOT_UART_DATA_BIT_7, WIFI_IOT_UART_DATA_BIT_8 }

Enumerates the number of UART data bits.

WifiIotUartStopBit { WIFI_IOT_UART_STOP_BIT_1 = 1, WIFI_IOT_UART_STOP_BIT_2 = 2 }

Enumerates the number of UART stop bits.

WifiIotUartParity { WIFI_IOT_UART_PARITY_NONE = 0, WIFI_IOT_UART_PARITY_ODD = 1, WIFI_IOT_UART_PARITY_EVEN = 2 }

Enumerates the UART parity bit.

WifiIotUartFifoLine {   WIFI_IOT_FIFO_LINE_ONE_EIGHT = 1, WIFI_IOT_FIFO_LINE_ONE_QUARTER, WIFI_IOT_FIFO_LINE_HALF, WIFI_IOT_FIFO_LINE_THREE_QUARTERS,   WIFI_IOT_FIFO_LINE_SEVEN_EIGHTS }

Enumerates UART FIFO interrupt thresholds.

WifiIotUartBlockState { WIFI_IOT_UART_BLOCK_STATE_NONE_BLOCK = 1, WIFI_IOT_UART_BLOCK_STATE_BLOCK }

Enumerates UART block states.

WifiIotUartDmaState { WIFI_IOT_UART_NONE_DMA = 1, WIFI_IOT_UART_USE_DMA }

Enumerates UART DMA states.

WifiIotFlowCtrl { WIFI_IOT_FLOW_CTRL_NONE, WIFI_IOT_FLOW_CTRL_RTS_CTS, WIFI_IOT_FLOW_CTRL_RTS_ONLY, WIFI_IOT_FLOW_CTRL_CTS_ONLY }

Enumerates hardware flow control modes.

Functions

Function Name

Description

UartInit (WifiIotUartIdx id, const WifiIotUartAttribute *param, const WifiIotUartExtraAttr *extraAttr)

unsigned int 

Configures a UART device.

UartRead (WifiIotUartIdx id, unsigned char *data, unsigned int dataLen)

int 

Reads data from a UART device.

UartWrite (WifiIotUartIdx id, const unsigned char *data, unsigned int dataLen)

int 

Writes data to a UART device.

UartDeinit (WifiIotUartIdx id)

unsigned int 

Deinitializes a UART device.

UartSetFlowCtrl (WifiIotUartIdx id, WifiIotFlowCtrl flowCtrl)

unsigned int 

Sets UART hardware flow control.

1
https://gitee.com/famoustang/docs.git
git@gitee.com:famoustang/docs.git
famoustang
docs
docs
master

搜索帮助