Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mpu60X0.h
Go to the documentation of this file.
1 #ifndef MPU60X0
2 #define MPU60X0
3 
4 /* default I2C address */
5 #define MPU60X0_ADDR 0xD0
6 #define MPU60X0_ADDR_ALT 0xD2
7 
8 #define MPU60X0_SPI_READ 0x80
9 
10 // Power and Interface
11 #define MPU60X0_REG_AUX_VDDIO 0x01 // Must be set to 0 on MPU6000
12 #define MPU60X0_REG_USER_CTRL 0x6A
13 #define MPU60X0_REG_PWR_MGMT_1 0x6B
14 #define MPU60X0_REG_PWR_MGMT_2 0x6C
15 
16 // FIFO
17 #define MPU60X0_REG_FIFO_EN 0X23
18 #define MPU60X0_REG_FIFO_COUNT_H 0x72
19 #define MPU60X0_REG_FIFO_COUNT_L 0x73
20 #define MPU60X0_REG_FIFO_R_W 0x74
21 
22 // Measurement Settings
23 #define MPU60X0_REG_SMPLRT_DIV 0X19
24 #define MPU60X0_REG_CONFIG 0X1A
25 #define MPU60X0_REG_GYRO_CONFIG 0X1B
26 #define MPU60X0_REG_ACCEL_CONFIG 0X1C
27 
28 // I2C Slave settings
29 #define MPU60X0_REG_I2C_MST_CTRL 0X24
30 #define MPU60X0_REG_I2C_MST_STATUS 0X36
31 #define MPU60X0_REG_I2C_MST_DELAY 0X67
32 // Slave 0
33 #define MPU60X0_REG_I2C_SLV0_ADDR 0X25 // i2c addr
34 #define MPU60X0_REG_I2C_SLV0_REG 0X26 // slave reg
35 #define MPU60X0_REG_I2C_SLV0_CTRL 0X27 // set-bits
36 #define MPU60X0_REG_I2C_SLV0_DO 0X63 // DO
37 // Slave 1
38 #define MPU60X0_REG_I2C_SLV1_ADDR 0X28 // i2c addr
39 #define MPU60X0_REG_I2C_SLV1_REG 0X29 // slave reg
40 #define MPU60X0_REG_I2C_SLV1_CTRL 0X2A // set-bits
41 #define MPU60X0_REG_I2C_SLV1_DO 0X64 // DO
42 // Slave 2
43 #define MPU60X0_REG_I2C_SLV2_ADDR 0X2B // i2c addr
44 #define MPU60X0_REG_I2C_SLV2_REG 0X2C // slave reg
45 #define MPU60X0_REG_I2C_SLV2_CTRL 0X2D // set-bits
46 #define MPU60X0_REG_I2C_SLV2_DO 0X65 // DO
47 // Slave 3
48 #define MPU60X0_REG_I2C_SLV3_ADDR 0X2E // i2c addr
49 #define MPU60X0_REG_I2C_SLV3_REG 0X2F // slave reg
50 #define MPU60X0_REG_I2C_SLV3_CTRL 0X30 // set-bits
51 #define MPU60X0_REG_I2C_SLV3_DO 0X66 // DO
52 // Slave 4 - special
53 #define MPU60X0_REG_I2C_SLV4_ADDR 0X31 // i2c addr
54 #define MPU60X0_REG_I2C_SLV4_REG 0X32 // slave reg
55 #define MPU60X0_REG_I2C_SLV4_DO 0X33 // DO
56 #define MPU60X0_REG_I2C_SLV4_CTRL 0X34 // set-bits
57 #define MPU60X0_REG_I2C_SLV4_DI 0X35 // DI
58 
59 // Interrupt
60 #define MPU60X0_REG_INT_PIN_CFG 0X37
61 #define MPU60X0_REG_INT_ENABLE 0X38
62 #define MPU60X0_REG_INT_STATUS 0X3A
63 
64 // Accelero
65 #define MPU60X0_REG_ACCEL_XOUT_H 0X3B
66 #define MPU60X0_REG_ACCEL_XOUT_L 0X3C
67 #define MPU60X0_REG_ACCEL_YOUT_H 0X3D
68 #define MPU60X0_REG_ACCEL_YOUT_L 0X3E
69 #define MPU60X0_REG_ACCEL_ZOUT_H 0X3F
70 #define MPU60X0_REG_ACCEL_ZOUT_L 0X40
71 
72 // Temperature
73 #define MPU60X0_REG_TEMP_OUT_H 0X41
74 #define MPU60X0_REG_TEMP_OUT_L 0X42
75 
76 // Gyro
77 #define MPU60X0_REG_GYRO_XOUT_H 0X43
78 #define MPU60X0_REG_GYRO_XOUT_L 0X44
79 #define MPU60X0_REG_GYRO_YOUT_H 0X45
80 #define MPU60X0_REG_GYRO_YOUT_L 0X46
81 #define MPU60X0_REG_GYRO_ZOUT_H 0X47
82 #define MPU60X0_REG_GYRO_ZOUT_L 0X48
83 
84 // External Sensor Data
85 #define MPU60X0_EXT_SENS_DATA 0X49
86 #define MPU60X0_EXT_SENS_DATA_SIZE 24
87 
88 
90 // MPU60X0 Definitions
91 
92 #define MPU60X0_REG_WHO_AM_I 0X75
93 #define MPU60X0_WHOAMI_REPLY 0x68
94 
95 
96 
97 #endif /* MPU60X0 */