This file is used in these projects (among others):

Proven to work nicely with the Raspberry Pi models A, B, B+ (but read the RPi's IO manual before you play with the parameters)

This file relies completely on the #C GPIO library for Raspberry Pi, be sure to download it completely and understand it first, before using it. It reuses facilities from the GPIO such as mode setting and "parachutes", shares mmap(), and other little details. The compilation command line is the same, as well (and requires root rights). Together they are directly integrated inside the final program and use very little room.

For a better flexibility, don't include this file directly, but its meta-configuration file PI_SPI_config.h (this keeps actual implementation and parameters separate).

Todo (order TBD):

  • Test under RPi2, Rpi3
  • Write some example code