![](/media/cache/profiles/b61abc775fa6b65019e9f6b02d891041.jpg.50x50_q85.jpg)
Only GYRO/ACC's configuration done
LSM9DS0_SH.h@4:b9dd320947ff, 2016-09-14 (annotated)
- Committer:
- open4416
- Date:
- Wed Sep 14 05:57:55 2016 +0000
- Revision:
- 4:b9dd320947ff
- Parent:
- 1:b42c3522a50a
- Child:
- 6:c2efb0a3a543
2016/9/14 stable
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
open4416 | 1:b42c3522a50a | 1 | #ifndef LSM9DS0_SH_H |
open4416 | 1:b42c3522a50a | 2 | #define LSM9DS0_SH_H |
open4416 | 1:b42c3522a50a | 3 | |
open4416 | 1:b42c3522a50a | 4 | #include "mbed.h" |
open4416 | 1:b42c3522a50a | 5 | |
open4416 | 4:b9dd320947ff | 6 | // Personality of IMU // |
open4416 | 4:b9dd320947ff | 7 | #define Gpx 3.068e-4f //1.526e-2 * d2r = 2.663e-4f |
open4416 | 4:b9dd320947ff | 8 | #define Gpy 3.064e-4f //1.526e-2 * d2r = 2.663e-4f |
open4416 | 4:b9dd320947ff | 9 | #define Gpz 2.994e-4f //1.526e-2 * d2r = 2.663e-4f |
open4416 | 4:b9dd320947ff | 10 | //#define Gdx -0.0099f //initial nutraulize |
open4416 | 4:b9dd320947ff | 11 | //#define Gdy 0.0168f |
open4416 | 4:b9dd320947ff | 12 | //#define Gdz 0.0210f |
open4416 | 4:b9dd320947ff | 13 | |
open4416 | 4:b9dd320947ff | 14 | #define Apx -1.239e-4f //one for G |
open4416 | 4:b9dd320947ff | 15 | #define Apy -1.234e-4f |
open4416 | 4:b9dd320947ff | 16 | #define Apz -1.236e-4f |
open4416 | 4:b9dd320947ff | 17 | #define Adx -0.1460f |
open4416 | 4:b9dd320947ff | 18 | #define Ady -0.0695f |
open4416 | 4:b9dd320947ff | 19 | #define Adz -0.0228f |
open4416 | 4:b9dd320947ff | 20 | |
open4416 | 1:b42c3522a50a | 21 | // LSM9DS0 Gyro Registers // |
open4416 | 1:b42c3522a50a | 22 | #define WHO_AM_I_G 0x0F //r //WHO_G |
open4416 | 1:b42c3522a50a | 23 | #define CTRL_REG1_G 0x20 //rw //GYRO Data-rate/LPF/Enable |
open4416 | 1:b42c3522a50a | 24 | #define CTRL_REG2_G 0x21 //rw |
open4416 | 1:b42c3522a50a | 25 | #define CTRL_REG3_G 0x22 //rw |
open4416 | 1:b42c3522a50a | 26 | #define CTRL_REG4_G 0x23 //rw //GYRO Scale |
open4416 | 1:b42c3522a50a | 27 | #define CTRL_REG5_G 0x24 //rw |
open4416 | 1:b42c3522a50a | 28 | #define REFERENCE_G 0x25 //rw |
open4416 | 1:b42c3522a50a | 29 | #define STATUS_REG_G 0x27 //r |
open4416 | 1:b42c3522a50a | 30 | #define OUT_X_L_G 0x28 //r //GYRO Data |
open4416 | 1:b42c3522a50a | 31 | #define OUT_X_H_G 0x29 //r //GYRO Data |
open4416 | 1:b42c3522a50a | 32 | #define OUT_Y_L_G 0x2A //r //GYRO Data |
open4416 | 1:b42c3522a50a | 33 | #define OUT_Y_H_G 0x2B //r //GYRO Data |
open4416 | 1:b42c3522a50a | 34 | #define OUT_Z_L_G 0x2C //r //GYRO Data |
open4416 | 1:b42c3522a50a | 35 | #define OUT_Z_H_G 0x2D //r //GYRO Data |
open4416 | 1:b42c3522a50a | 36 | |
open4416 | 1:b42c3522a50a | 37 | // LSM9DS0 Accel/Magneto (XM) Registers // |
open4416 | 1:b42c3522a50a | 38 | #define OUT_TEMP_L_XM 0x05 //r //TEMP Data |
open4416 | 1:b42c3522a50a | 39 | #define OUT_TEMP_H_XM 0x06 //r //TEMP Data |
open4416 | 1:b42c3522a50a | 40 | #define STATUS_REG_M 0x07 //r |
open4416 | 1:b42c3522a50a | 41 | #define OUT_X_L_M 0x08 //r //MAG Data |
open4416 | 1:b42c3522a50a | 42 | #define OUT_X_H_M 0x09 //r //MAG Data |
open4416 | 1:b42c3522a50a | 43 | #define OUT_Y_L_M 0x0A //r //MAG Data |
open4416 | 1:b42c3522a50a | 44 | #define OUT_Y_H_M 0x0B //r //MAG Data |
open4416 | 1:b42c3522a50a | 45 | #define OUT_Z_L_M 0x0C //r //MAG Data |
open4416 | 1:b42c3522a50a | 46 | #define OUT_Z_H_M 0x0D //r //MAG Data |
open4416 | 1:b42c3522a50a | 47 | #define WHO_AM_I_XM 0x0F //r //WHO_XM |
open4416 | 1:b42c3522a50a | 48 | #define OFFSET_X_L_M 0x16 //rw //MAG Data_Offset |
open4416 | 1:b42c3522a50a | 49 | #define OFFSET_X_H_M 0x17 //rw //MAG Data_Offset |
open4416 | 1:b42c3522a50a | 50 | #define OFFSET_Y_L_M 0x18 //rw //MAG Data_Offset |
open4416 | 1:b42c3522a50a | 51 | #define OFFSET_Y_H_M 0x19 //rw //MAG Data_Offset |
open4416 | 1:b42c3522a50a | 52 | #define OFFSET_Z_L_M 0x1A //rw //MAG Data_Offset |
open4416 | 1:b42c3522a50a | 53 | #define OFFSET_Z_H_M 0x1B //rw //MAG Data_Offset |
open4416 | 1:b42c3522a50a | 54 | #define CTRL_REG0_XM 0x1F //rw |
open4416 | 1:b42c3522a50a | 55 | #define CTRL_REG1_XM 0x20 //rw //ACC Data-rate/Enable |
open4416 | 1:b42c3522a50a | 56 | #define CTRL_REG2_XM 0x21 //rw //ACC LPF/Scale |
open4416 | 1:b42c3522a50a | 57 | #define CTRL_REG3_XM 0x22 //rw |
open4416 | 1:b42c3522a50a | 58 | #define CTRL_REG4_XM 0x23 //rw |
open4416 | 1:b42c3522a50a | 59 | #define CTRL_REG5_XM 0x24 //rw //TEMP Enable, MAG Data-rate |
open4416 | 1:b42c3522a50a | 60 | #define CTRL_REG6_XM 0x25 //rw //MAG Scale |
open4416 | 1:b42c3522a50a | 61 | #define CTRL_REG7_XM 0x26 //rw |
open4416 | 1:b42c3522a50a | 62 | #define STATUS_REG_A 0x27 //r |
open4416 | 1:b42c3522a50a | 63 | #define OUT_X_L_A 0x28 //r //ACC Data |
open4416 | 1:b42c3522a50a | 64 | #define OUT_X_H_A 0x29 //r //ACC Data |
open4416 | 1:b42c3522a50a | 65 | #define OUT_Y_L_A 0x2A //r //ACC Data |
open4416 | 1:b42c3522a50a | 66 | #define OUT_Y_H_A 0x2B //r //ACC Data |
open4416 | 1:b42c3522a50a | 67 | #define OUT_Z_L_A 0x2C //r //ACC Data |
open4416 | 1:b42c3522a50a | 68 | #define OUT_Z_H_A 0x2D //r //ACC Data |
open4416 | 1:b42c3522a50a | 69 | |
open4416 | 1:b42c3522a50a | 70 | |
open4416 | 1:b42c3522a50a | 71 | #endif //LSM9DS0_SH_H |