English / 中文
This project is a derivative version of a lightweight data transmission protocol proposed and developed by the author when he participated in Robomaster high school summer camp in senior three. The main purpose is to realize the function of the transport layer. This protocol can be applied to various physical layers, such as UART, SPI, IIC, etc., which provides a guarantee for sequential data transmission. According to the requirements of the amount of data transmitted, the author divides the protocol into the following three different versions:
- Large Capacity Data Transmit Protocol: Infinite data length
- Mid Capacity Data Transmit Protocol: Data length is less than 128Byte
- Small Capacity Data Transmit Protocol: Data length is less than 3Byte
Note: please choose a small data transmission protocol when the transmission capacity is met, because the larger the data transmission protocol, the larger the stack, the more complex the protocol processing and the greater the error probability, which is reflected in the longer interrupt occupation time (geometric increase) and the easier the stack overflow on the microcontroller.
- Porting files "encrypt.c,encrypt.h,decrypt.c,decrypt.h,ioctrl.c,ioctrl.h" into your project
- Realize the single byte transmit function in "ioctrl.c", which function name is common_sendbyte.
- After receiving a byte,call the "common_receivebyte" function in "decrypt.c", as well deliver the received byte to buf.
- After finished the previous steps,call the "xdtp_data_transmit" function to send a package; it'll trig the "xdtp_callback_handler" function in "ioctrl.c" if received a package.
Please report bugs and request features using the Issue Tracker and follow these request:
- Tab highlight when on different tab.
- Don’t let the update disappear if the window is not in focus.
The source code is released under a AGPL-3.0 License.
Affiliation:AcmeTech
Author: Yanzhen Zhu
Maintainer:YanzhenZhu, [email protected]
The product has been tested under Windows 10 and Ubuntu 22.04 LTS. This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.