Driver for Bosch Sensortec BMA150 3-axis accelerometer.
This driver assumes that the BMA150 will always runs with the shadow registers enabled, i.e. that the shadow_dis bit in the second configuration register is zero. If you wish to run with the shadow registers disabled, you will need to write your own replacement driver.
Note that this also works for an SMB380 accelerometer which has the same register interface as the BMA150.
This code has been tested using an Atmel ATAVRSBIN Inertial One Xplain board:
The module was wire-wrapped on a prototyping shield and installed on a SolderCore:
|Bandwidth (Hz)||25, 50, 100, 190, 375, 750, 1500|
|Range (g)||±2, ±4, ±8|
|Communication||up to 400 kHz (I2C) and 10 MHz (SPI)|
This code has been tested using an Olimex MOD-SMB380:
This is plugged into a custom CoreProto rivet and plugged into a SenseCore:
And finally installed on a SolderCore:
|BMA150_I2C_ADDR||BMA150 8-bit I2C address|
|bma150_initialize_i2c||Initialize sensor on I2C bus|
|bma150_initialize_spi||Initialize sensor on SPI bus|
|bma150_read_chip_id||Read chip ID register|
|bma150_soft_reset||Soft-reset the sensor|