Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.81 KB

File metadata and controls

47 lines (32 loc) · 1.81 KB

linux-wire

CI

linux-wire is a minimal Linux-native I2C abstraction that mirrors Arduino's Wire API. It ships a tiny C shim over /dev/i2c-* plus a TwoWire C++ class so Arduino-style sketches can run on Raspberry Pi-class systems without heavyweight dependencies.

License: GPL-3.0-or-later Language CMake

Quick Start

cmake --preset dev
cmake --build --preset dev
ctest --preset dev

Other canonical builds:

# optimized full build
cmake --preset release
cmake --build --preset release
ctest --preset release

# lean consumer-style build
cmake --preset minimal
cmake --build --preset minimal

Use cmake --install build/dev to install the default preset build, or pass --prefix as needed. Downstream CMake projects can then find_package(linux_wire CONFIG REQUIRED) and link against linux_wire::linux_wire.

Presets require CMake 3.20 or newer. If you are on an older CMake, the raw cmake -S . -B build flow remains supported as a fallback.

Example binaries for the default contributor build live under build/dev/ after compiling.

Documentation

  • Docs index – architecture overview, API examples, CI info
  • API reference – detailed class and method documentation
  • Testing guide – running mock-based unit tests and suggested hardware validation steps
  • Arduino companion – ready-made Nano sketch for loopback testing

License

GPL-3.0-or-later. See LICENSE.