# serial_utils **Repository Path**: inteagle/serial_utils ## Basic Information - **Project Name**: serial_utils - **Description**: serial utils - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-08-04 - **Last Updated**: 2021-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # serial_utils #### Description serial utils #### Software Architecture This repository provides wrapper of serial communication to 1310 tools.
In ```uart.h``` file, there are three APIs.
the first is for initialize a serial device called ```int SerialInit(const char* serial_name)```.
the second ```void UartRead()``` is for reading from a serial device, you should create a new thread holding this API.
The third ```void serial_protocal_process()``` is for processing serial buffer data, you also should create a new thread holding this API. These disassembly data will put in variable ```rx_disassembly_buf```
The APIs also provide a data output API called ```void UartSend(uint8_t* buf, int len)``` to put your data into serial.
detail example in ```main.c``` #### Installation 1. directly copy to source directory of your code #### complie ```gcc *.c -lpthread```