Skip to content

Commit

Permalink
Plumb AK8975 through
Browse files Browse the repository at this point in the history
  • Loading branch information
pimvanpelt committed May 13, 2018
1 parent 64d29e3 commit 8e33a0f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mgos_imu_magnetometer.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "mgos.h"
#include "mgos_imu_internal.h"
#include "mgos_imu_ak8963.h"
#include "mgos_imu_ak8975.h"
#include "mgos_imu_mag3110.h"

static struct mgos_imu_mag *mgos_imu_mag_create(void) {
Expand Down Expand Up @@ -116,6 +117,12 @@ bool mgos_imu_magnetometer_create_i2c(struct mgos_imu *imu, struct mgos_i2c *i2c
imu->mag->read = mgos_imu_ak8963_read;
break;

case MAG_AK8975:
imu->mag->detect = mgos_imu_ak8975_detect;
imu->mag->create = mgos_imu_ak8975_create;
imu->mag->read = mgos_imu_ak8975_read;
break;

case MAG_MAG3110:
imu->mag->detect = mgos_imu_mag3110_detect;
imu->mag->create = mgos_imu_mag3110_create;
Expand Down

0 comments on commit 8e33a0f

Please sign in to comment.