mpu9250: Adding support for MPU-9250 (and MPU-6050) accelerometer

Add support for mpu9250 accelerometer over I2C bus.

Signed-off-by: Harry Beyel <harry3b9@gmail.com>
This commit is contained in:
bluesforte
2022-05-04 16:02:37 -07:00
committed by Kevin O'Connor
parent fc7838855f
commit f55b9d3e57
6 changed files with 786 additions and 5 deletions

View File

@@ -9,10 +9,7 @@
#include "command.h" //sendf
#include "sched.h" //DECL_COMMAND
#include "board/gpio.h" //i2c_write/read/setup
struct i2cdev_s {
struct i2c_config i2c_config;
};
#include "i2ccmds.h"
void
command_config_i2c(uint32_t *args)
@@ -25,6 +22,12 @@ command_config_i2c(uint32_t *args)
DECL_COMMAND(command_config_i2c,
"config_i2c oid=%c i2c_bus=%u rate=%u address=%u");
struct i2cdev_s *
i2cdev_oid_lookup(uint8_t oid)
{
return oid_lookup(oid, command_config_i2c);
}
void
command_i2c_write(uint32_t *args)
{