Driver for STMicroelectronics LIS3DSH 3-axis accelerometer in SPI or I2C mode.
All correct at time of writing, but as always, manufacturers love to move things around on their website.
http://www.st.com/web/catalog/sense_power/FM89/SC444/PF252716
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00040962.pdf
This code has been tested using a STM32F4DISCOVERY board:
http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419
Parameter | Supported settings |
Bandwidth (Hz) | 50, 200, 400, 800 |
Range (g) | ±2, ±4, ±6, ±8, ±16 |
Communication | up to 400 kHz (I2C) and 10 MHz (SPI) |
Macros | |
LIS3DSH_I2C_ADDR | LIS3DSH 8-bit I2C address selected with SDO signal |
Functions | |
lis3dsh_initialize_i2c | Initialize sensor on I2C bus |
lis3dsh_initialize_spi | Initialize sensor on SPI bus |