LSM9DS1 IMU sensor driver

Dependents:   LSM9DS1_Demo LSM9DS1_Demo Nucleo_i2c_master

Files at this revision

API Documentation at this revision

Comitter:
beanmachine44
Date:
Mon Oct 19 13:56:52 2015 +0000
Parent:
0:622e8874902e
Commit message:
Updated docs to match my changes to the base LSM9DS0 code.

Changed in this revision

LSM9DS1.h Show annotated file Show diff for this revision Revisions of this file
diff -r 622e8874902e -r 0e76f237c23d LSM9DS1.h
--- a/LSM9DS1.h	Mon Oct 19 13:50:48 2015 +0000
+++ b/LSM9DS1.h	Mon Oct 19 13:56:52 2015 +0000
@@ -269,7 +269,7 @@
     
     /**  setGyroScale() -- Set the full-scale range of the gyroscope.
     *  This function can be called to set the scale of the gyroscope to 
-    *  245, 500, or 200 degrees per second.
+    *  245, 500, or 2000 degrees per second.
     *  Input:
     *   - gScl = The desired gyroscope scale. Must be one of three possible
     *       values from the gyro_scale enum.
@@ -278,7 +278,7 @@
     
     /**  setAccelScale() -- Set the full-scale range of the accelerometer.
     *  This function can be called to set the scale of the accelerometer to
-    *  2, 4, 6, 8, or 16 g's.
+    *  2, 4, 8, or 16 g's.
     *  Input:
     *   - aScl = The desired accelerometer scale. Must be one of five possible
     *       values from the accel_scale enum.
@@ -287,7 +287,7 @@
     
     /**  setMagScale() -- Set the full-scale range of the magnetometer.
     *  This function can be called to set the scale of the magnetometer to
-    *  2, 4, 8, or 12 Gs.
+    *  4, 8, 12, or 16 Gs.
     *  Input:
     *   - mScl = The desired magnetometer scale. Must be one of four possible
     *       values from the mag_scale enum.
@@ -297,21 +297,21 @@
     /**  setGyroODR() -- Set the output data rate and bandwidth of the gyroscope
     *  Input:
     *   - gRate = The desired output rate and cutoff frequency of the gyro.
-    *       Must be a value from the gyro_odr enum (check above, there're 14).
+    *       Must be a value from the gyro_odr enum (check above).
     */
     void setGyroODR(gyro_odr gRate);
     
     /**  setAccelODR() -- Set the output data rate of the accelerometer
     *  Input:
     *   - aRate = The desired output rate of the accel.
-    *       Must be a value from the accel_odr enum (check above, there're 11).
+    *       Must be a value from the accel_odr enum (check above).
     */
     void setAccelODR(accel_odr aRate);
     
     /**  setMagODR() -- Set the output data rate of the magnetometer
     *  Input:
     *   - mRate = The desired output rate of the mag.
-    *       Must be a value from the mag_odr enum (check above, there're 6).
+    *       Must be a value from the mag_odr enum (check above).
     */
     void setMagODR(mag_odr mRate);
 
@@ -339,40 +339,17 @@
     float gRes, aRes, mRes;
     
     /**  initGyro() -- Sets up the gyroscope to begin reading.
-    *  This function steps through all five gyroscope control registers.
-    *  Upon exit, the following parameters will be set:
-    *   - CTRL_REG1_G = 0x0F: Normal operation mode, all axes enabled. 
-    *       95 Hz ODR, 12.5 Hz cutoff frequency.
-    *   - CTRL_REG2_G = 0x00: HPF set to normal mode, cutoff frequency
-    *       set to 7.2 Hz (depends on ODR).
-    *   - CTRL_REG3_G = 0x88: Interrupt enabled on INT_G (set to push-pull and
-    *       active high). Data-ready output enabled on DRDY_G.
-    *   - CTRL_REG4_G = 0x00: Continuous update mode. Data LSB stored in lower
-    *       address. Scale set to 245 DPS. SPI mode set to 4-wire.
-    *   - CTRL_REG5_G = 0x00: FIFO disabled. HPF disabled.
+    *  This function steps through all three gyroscope control registers.
     */
     void initGyro();
     
     /**  initAccel() -- Sets up the accelerometer to begin reading.
     *  This function steps through all accelerometer related control registers.
-    *  Upon exit these registers will be set as:
-    *   - CTRL_REG0_XM = 0x00: FIFO disabled. HPF bypassed. Normal mode.
-    *   - CTRL_REG1_XM = 0x57: 100 Hz data rate. Continuous update.
-    *       all axes enabled.
-    *   - CTRL_REG2_XM = 0x00: +/- 2g scale. 773 Hz anti-alias filter BW.
-    *   - CTRL_REG3_XM = 0x04: Accel data ready signal on INT1_XM pin.
     */
     void initAccel();
     
     /**  initMag() -- Sets up the magnetometer to begin reading.
     *  This function steps through all magnetometer-related control registers.
-    *  Upon exit these registers will be set as:
-    *   - CTRL_REG4_XM = 0x04: Mag data ready signal on INT2_XM pin.
-    *   - CTRL_REG5_XM = 0x14: 100 Hz update rate. Low resolution. Interrupt
-    *       requests don't latch. Temperature sensor disabled.
-    *   - CTRL_REG6_XM = 0x00: +/- 2 Gs scale.
-    *   - CTRL_REG7_XM = 0x00: Continuous conversion mode. Normal HPF mode.
-    *   - INT_CTRL_REG_M = 0x09: Interrupt active-high. Enable interrupts.
     */
     void initMag();