Serial Packet Transfer library
C library for transferring binary data packets over a single serial data connection side by side with log entries and other plain text messages.
A packet containing binary data sent by libspt has the following layout:
- pthreads
- libevent (optional)
- termios (optional)
Set these environment variables/macros to:
NO_LIBEVENT
- Use blocking IO instead of libevent
NO_TERMIOS
- No <termios.h>
will be required but the TTY utils won't be available
make
will create the static library at build/libspt/libspt.a
The examples are created to work with a serial tty available at /dev/ttyUSB0
cd examples
make
cd ../build/examples
./serialexample