加入收藏
举报
02-14 20:02
#0
文件名称:
wifiiot_uart-h.md
所在目录:
Openharmony v1.0 / docs / api / api-LinkIoT
文件大小:
13.62 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# wifiiot\_uart.h
## **Overview**
**Related Modules:**
[Wifiiot](Wifiiot.md)
**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.


点赞 回复
回帖
支持markdown部分语法 ?