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