Skip to content

NestorDP/cppserial

Repository files navigation

CppSerial

release

unit-tests codecov Codacy Badge Documentation Status

C++ Application Programming Interface for the asm/termbits.h C library


The goal of this API is to provide developers with a modern C++ interface to the traditional C header asm/termbits.h. It allows setting any baud rate supported by the hardware, not just the standard ones, enabling a more flexible communication process that is ideal for industrial or embedded applications requiring non-standard baud rates. It uses Object-Oriented Programming concepts, smart pointers, lambda functions, and more to give your applications greater flexibility and power when dealing with serial communication in a Linux environment.


Features

  • 🚀 Modern C++ API for serial communication
  • 🧠 Object-Oriented design using smart pointers and RAII
  • ⚙️ Full control of serial port configuration via termios2
  • 🧩 Example applications included
  • 🐧 Works only on Linux systems

Build and Installation

# Clone the repository:
git clone https://github.com/NestorDP/cppserial.git && cd cppserial

# Build the source code:
mkdir build && cd build
cmake ..
make

# Install the library (you will need to enter your sudo password):
sudo make install

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request to help improve this project.

Before submitting a PR, please:

  • Follow the existing coding style
  • Add or update documentation when necessary
  • Include tests for new features if possible

📄 License

This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for more details.