i2c trial - does'nt work
Dependencies: ACD_ePaper aconno_I2C aconno_bsp mbed
Fork of acd52832_LSM9DS1 by
LSM9DS1/LSM9DS1_regs.h@1:e97c56fb9629, 2018-02-14 (annotated)
- Committer:
- med2017
- Date:
- Wed Feb 14 21:16:43 2018 +0000
- Revision:
- 1:e97c56fb9629
- Parent:
- LSM9DS1_regs.h@0:940647793667
testing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jurica238814 | 0:940647793667 | 1 | /* Copyright (c) 2016 Aconno. All Rights Reserved. |
jurica238814 | 0:940647793667 | 2 | * |
jurica238814 | 0:940647793667 | 3 | * Licensees are granted free, non-transferable use of the information. NO |
jurica238814 | 0:940647793667 | 4 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from |
jurica238814 | 0:940647793667 | 5 | * the file. |
jurica238814 | 0:940647793667 | 6 | * |
jurica238814 | 0:940647793667 | 7 | */ |
jurica238814 | 0:940647793667 | 8 | |
jurica238814 | 0:940647793667 | 9 | //Magnetometer I2C address |
jurica238814 | 0:940647793667 | 10 | #define TWI_MAG_ADDR (0x1C << 1) |
jurica238814 | 0:940647793667 | 11 | |
jurica238814 | 0:940647793667 | 12 | //Accelerometer and Gyroscope registars addresses |
jurica238814 | 0:940647793667 | 13 | #define ACT_THS 0x04 |
jurica238814 | 0:940647793667 | 14 | #define ACT_DUR 0x05 |
jurica238814 | 0:940647793667 | 15 | #define INT_GEN_CFG_XL 0x06 |
jurica238814 | 0:940647793667 | 16 | #define INT_GEN_THS_X_XL 0x07 |
jurica238814 | 0:940647793667 | 17 | #define INT_GEN_THS_Y_XL 0x08 |
jurica238814 | 0:940647793667 | 18 | #define INT_GEN_THS_Z_XL 0x09 |
jurica238814 | 0:940647793667 | 19 | #define INT_GEN_DUR_XL 0x0A |
jurica238814 | 0:940647793667 | 20 | #define REFERENCE_G 0x0B |
jurica238814 | 0:940647793667 | 21 | #define INT1_CTRL 0x0C |
jurica238814 | 0:940647793667 | 22 | #define INT2_CTRL 0x0D |
jurica238814 | 0:940647793667 | 23 | #define WHO_AM_I_XG 0x0F |
jurica238814 | 0:940647793667 | 24 | #define CTRL_REG1_G 0x10 |
jurica238814 | 0:940647793667 | 25 | #define CTRL_REG2_G 0x11 |
jurica238814 | 0:940647793667 | 26 | #define CTRL_REG3_G 0x12 |
jurica238814 | 0:940647793667 | 27 | #define ORIENT_CFG_G 0x13 |
jurica238814 | 0:940647793667 | 28 | #define INT_GEN_SRC_G 0x14 |
jurica238814 | 0:940647793667 | 29 | #define OUT_TEMP_L 0x15 |
jurica238814 | 0:940647793667 | 30 | #define OUT_TEMP_H 0x16 |
jurica238814 | 0:940647793667 | 31 | #define STATUS_REG_0 0x17 |
jurica238814 | 0:940647793667 | 32 | #define OUT_X_L_G 0x18 |
jurica238814 | 0:940647793667 | 33 | #define OUT_X_H_G 0x19 |
jurica238814 | 0:940647793667 | 34 | #define OUT_Y_L_G 0x1A |
jurica238814 | 0:940647793667 | 35 | #define OUT_Y_H_G 0x1B |
jurica238814 | 0:940647793667 | 36 | #define OUT_Z_L_G 0x1C |
jurica238814 | 0:940647793667 | 37 | #define OUT_Z_H_G 0x1D |
jurica238814 | 0:940647793667 | 38 | #define CTRL_REG4 0x1E |
med2017 | 1:e97c56fb9629 | 39 | #define CTRL_REG5_XL 0x1F ///////////ACCEL |
jurica238814 | 0:940647793667 | 40 | #define CTRL_REG6_XL 0x20 |
jurica238814 | 0:940647793667 | 41 | #define CTRL_REG7_XL 0x21 |
jurica238814 | 0:940647793667 | 42 | #define CTRL_REG8 0x22 |
jurica238814 | 0:940647793667 | 43 | #define CTRL_REG9 0x23 |
jurica238814 | 0:940647793667 | 44 | #define CTRL_REG10 0x24 |
jurica238814 | 0:940647793667 | 45 | #define INT_GEN_SRC_XL 0x26 |
jurica238814 | 0:940647793667 | 46 | #define STATUS_REG_1 0x27 |
med2017 | 1:e97c56fb9629 | 47 | #define OUT_X_L_XL 0x28 ////////////////////// |
jurica238814 | 0:940647793667 | 48 | #define OUT_X_H_XL 0x29 |
jurica238814 | 0:940647793667 | 49 | #define OUT_Y_L_XL 0x2A |
jurica238814 | 0:940647793667 | 50 | #define OUT_Y_H_XL 0x2B |
jurica238814 | 0:940647793667 | 51 | #define OUT_Z_L_XL 0x2C |
jurica238814 | 0:940647793667 | 52 | #define OUT_Z_H_XL 0x2D |
jurica238814 | 0:940647793667 | 53 | #define FIFO_CTRL 0x2E |
jurica238814 | 0:940647793667 | 54 | #define FIFO_SRC 0x2F |
jurica238814 | 0:940647793667 | 55 | #define INT_GEN_CFG_G 0x30 |
jurica238814 | 0:940647793667 | 56 | #define INT_GEN_THS_XH_G 0x31 |
jurica238814 | 0:940647793667 | 57 | #define INT_GEN_THS_XL_G 0x32 |
jurica238814 | 0:940647793667 | 58 | #define INT_GEN_THS_YH_G 0x33 |
jurica238814 | 0:940647793667 | 59 | #define INT_GEN_THS_YL_G 0x34 |
jurica238814 | 0:940647793667 | 60 | #define INT_GEN_THS_ZH_G 0x35 |
jurica238814 | 0:940647793667 | 61 | #define INT_GEN_THS_ZL_G 0x36 |
jurica238814 | 0:940647793667 | 62 | #define INT_GEN_DUR_G 0x37 |
jurica238814 | 0:940647793667 | 63 | |
jurica238814 | 0:940647793667 | 64 | //Magnetometer registers addresses |
jurica238814 | 0:940647793667 | 65 | #define OFFSET_X_REG_L_M 0x05 |
jurica238814 | 0:940647793667 | 66 | #define OFFSET_X_REG_H_M 0x06 |
jurica238814 | 0:940647793667 | 67 | #define OFFSET_Y_REG_L_M 0x07 |
jurica238814 | 0:940647793667 | 68 | #define OFFSET_Y_REG_H_M 0x08 |
jurica238814 | 0:940647793667 | 69 | #define OFFSET_Z_REG_L_M 0x09 |
jurica238814 | 0:940647793667 | 70 | #define OFFSET_Z_REG_H_M 0x0A |
jurica238814 | 0:940647793667 | 71 | #define WHO_AM_I_M 0x0F |
jurica238814 | 0:940647793667 | 72 | #define CTRL_REG1_M 0x20 |
jurica238814 | 0:940647793667 | 73 | #define CTRL_REG2_M 0x21 |
jurica238814 | 0:940647793667 | 74 | #define CTRL_REG3_M 0x22 |
jurica238814 | 0:940647793667 | 75 | #define CTRL_REG4_M 0x23 |
jurica238814 | 0:940647793667 | 76 | #define CTRL_REG5_M 0x24 |
jurica238814 | 0:940647793667 | 77 | #define STATUS_REG_M 0x27 |
jurica238814 | 0:940647793667 | 78 | #define OUT_X_L_M 0x28 |
jurica238814 | 0:940647793667 | 79 | #define OUT_X_H_M 0x29 |
jurica238814 | 0:940647793667 | 80 | #define OUT_Y_L_M 0x2A |
jurica238814 | 0:940647793667 | 81 | #define OUT_Y_H_M 0x2B |
jurica238814 | 0:940647793667 | 82 | #define OUT_Z_L_M 0x2C |
jurica238814 | 0:940647793667 | 83 | #define OUT_Z_H_M 0x2D |
jurica238814 | 0:940647793667 | 84 | #define INT_CFG_M 0x30 |
jurica238814 | 0:940647793667 | 85 | #define INT_SRC_M 0x30 |
jurica238814 | 0:940647793667 | 86 | #define INT_THS_L_M 0x32 |
jurica238814 | 0:940647793667 | 87 | #define INT_THS_H_M 0x33 |