LIS302DL Accelerometer Driver
This is an SPI driver for the LIS302DL Accelerometer (as found on the STM discovery board). I built this based on Architect’s FezMonoOled example and it hopefully provides another example template that can be used for less complicated drivers.
The driver supports multiple constructors that allow you to specify most configuration parameters without having to dig into the code. It also supports a debug constant that can be used to provide feedback.
The example shows the usage (its pretty easy). This version doesn’t support programing the accelerometer to trigger an interupt, it simply allows you to obtain the X,Y,Z values.
I’m just getting started in .NETMF (and C# in general) so feedback is welcome.
Instructions on how to use this on the STM32F4 discovery using the Cerberus firmware are provided in the example code.