aboutsummaryrefslogtreecommitdiffstats
path: root/src/i2ccmds.c
diff options
context:
space:
mode:
authorbluesforte <harry3b9@gmail.com>2022-05-04 16:02:37 -0700
committerKevin O'Connor <kevin@koconnor.net>2022-06-16 11:09:33 -0400
commitf55b9d3e5746b73d37f1f2de288aa06d9fe23138 (patch)
tree4f4a2945127c61340195c80ccfce11694512e64a /src/i2ccmds.c
parentfc7838855f886383917076cee87b13938d8bbe40 (diff)
downloadkutter-f55b9d3e5746b73d37f1f2de288aa06d9fe23138.tar.gz
kutter-f55b9d3e5746b73d37f1f2de288aa06d9fe23138.tar.xz
kutter-f55b9d3e5746b73d37f1f2de288aa06d9fe23138.zip
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>
Diffstat (limited to 'src/i2ccmds.c')
-rw-r--r--src/i2ccmds.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/i2ccmds.c b/src/i2ccmds.c
index cde0f6fa..69af011b 100644
--- a/src/i2ccmds.c
+++ b/src/i2ccmds.c
@@ -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)
{