diff options
Diffstat (limited to 'driver')
-rw-r--r-- | driver/mag_bmm150.c | 4 | ||||
-rw-r--r-- | driver/mag_bmm150.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/driver/mag_bmm150.c b/driver/mag_bmm150.c index b5658f2ba3..6f81ea407a 100644 --- a/driver/mag_bmm150.c +++ b/driver/mag_bmm150.c @@ -118,8 +118,8 @@ int bmm150_init(const struct motion_sensor_t *s) /* Set the repetition in "Regular Preset" */ - raw_mag_write8(s->addr, BMM150_REPXY, BMM150_REP(REGULAR, XY)); - raw_mag_write8(s->addr, BMM150_REPZ, BMM150_REP(REGULAR, Z)); + raw_mag_write8(s->addr, BMM150_REPXY, BMM150_REP(SPECIAL, XY)); + raw_mag_write8(s->addr, BMM150_REPZ, BMM150_REP(SPECIAL, Z)); ret = raw_mag_read8(s->addr, BMM150_REPXY, &val); CPRINTS("repxy: 0x%02x", val); ret = raw_mag_read8(s->addr, BMM150_REPZ, &val); diff --git a/driver/mag_bmm150.h b/driver/mag_bmm150.h index 4a6af7ee0d..a76c68cf3d 100644 --- a/driver/mag_bmm150.h +++ b/driver/mag_bmm150.h @@ -40,11 +40,13 @@ #define BMM150_REGULAR_nXY 9 #define BMM150_ENHANCED_nXY 15 #define BMM150_HIGH_ACCURACY_nXY 47 +#define BMM150_SPECIAL_nXY 75 #define BMM150_REPZ 0x52 #define BMM150_LOW_POWER_nZ 3 #define BMM150_REGULAR_nZ 15 #define BMM150_ENHANCED_nZ 27 #define BMM150_HIGH_ACCURACY_nZ 83 +#define BMM150_SPECIAL_nZ 27 #define BMM150_REP(_preset, _axis) CONCAT4(BMM150_, _preset, _n, _axis) |