7 #ifndef LINUX_LIBV2_SOURCE_TQUART_TQ_UART_H_ 8 #define LINUX_LIBV2_SOURCE_TQUART_TQ_UART_H_ 14 #define UART_API extern "C"
UART_API int tq_uart_read_data(int fd, char *buff, int len, int timeout_ms)
读取串口信息
UART_API int tq_uart_init(char *dev, int nBaud, int nBits, char nEvent, int nStop)
初始化串口
UART_API void tq_uart_close(int fd)
关闭串口
UART_API int tq_uart_read(int fd, char *buff, int len)
读取串口信息,默认读取超时时间为1秒
UART_API int tq_uart_write(int fd, char *buff, int len)
向串口写数据,,参数和使用方法与 uart_write_data 函数一样
UART_API int tq_uart_open(char *dev_name)
打开串口
UART_API int tq_uart_write_data(int fd, char *buff, int len)
向串口写数据