Lightweight Linux library for SPI in Linux - looking for feedback
github.comยท6hยท
Flag this post

SPIMonkey ๐Ÿต

Lightweight, type-safe SPI abstraction layer for Linux spidev

SPIMonkey provides a clean, structured C API for controlling SPI devices on Linux via the spidev kernel driver. It wraps the low-level ioctl() interface with safe, well-tested functions for configuration management, data transfers, and error handling.


Features

  • Simple Device Management โ€” Open, configure, and close /dev/spidevX.Y with minimal boilerplate
  • Type-Safe Configuration โ€” Structured spm_cfg_t for clock mode, speed, bits-per-word, and more
  • Batch Transfers โ€” Execute multiple SPI transactions in a single syscall for improved performance
  • Automatic Validation โ€” Configurations are sanitized and clamped to valid ranges before driver application
  • **Config Syโ€ฆ

Similar Posts

Loading similar posts...