Add preliminary support for HMC5883L magnetometer and MPL3115A2 altimeter.
Logging only, at this stage.
This commit is contained in:
12
mpu6050.c
12
mpu6050.c
@@ -57,6 +57,16 @@ struct i2c_transaction mpu6050_whoami_transaction2 = {
|
||||
|
||||
unsigned char mpu6050_init_command[] = {0x6B, 0x01};
|
||||
unsigned char mpu6050_accel_init_command[] = {0x1c, (AFS_SEL<<3)};
|
||||
unsigned char mpu6050_bypass_init_command[] = {0x37, 0x02};
|
||||
|
||||
struct i2c_transaction mpu6050_bypass_init_transaction = {
|
||||
(0x68 << 1) + 0, /* write */
|
||||
2,
|
||||
mpu6050_bypass_init_command,
|
||||
&mpu6050_result,
|
||||
EVENT_MPU6050_I2C_COMPLETE,
|
||||
NULL
|
||||
};
|
||||
|
||||
struct i2c_transaction mpu6050_accel_init_transaction = {
|
||||
(0x68 << 1) + 0, /* write */
|
||||
@@ -64,7 +74,7 @@ struct i2c_transaction mpu6050_accel_init_transaction = {
|
||||
mpu6050_accel_init_command,
|
||||
&mpu6050_result,
|
||||
EVENT_MPU6050_I2C_COMPLETE,
|
||||
NULL
|
||||
&mpu6050_bypass_init_transaction
|
||||
};
|
||||
|
||||
struct i2c_transaction mpu6050_init_transaction = {
|
||||
|
||||
Reference in New Issue
Block a user