C code to interface with a lis3dh accelerometer over SPI using the Linux spidev driver. It has been tested on a Raspberry Pi.
This code was written as a starting point for a specific project and does not expose many of the lis3dh options. Any PRs are welcome, however.
To build and run:
make && ./main
This program was derived from spidev_test.c.