diff options
Diffstat (limited to 'board/kukui/board.c')
-rw-r--r-- | board/kukui/board.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/board/kukui/board.c b/board/kukui/board.c index d86beb1e46..a14b4a6a76 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -358,6 +358,13 @@ const mat33_fp_t base_standard_ref = { { 0, 0, FLOAT_TO_FP(1)} }; +/* Matrix to rotate accelrator into standard reference frame */ +const mat33_fp_t mag_standard_ref = { + { FLOAT_TO_FP(-1), 0, 0}, + { 0, FLOAT_TO_FP(1), 0}, + { 0, 0, FLOAT_TO_FP(-1)} +}; + struct motion_sensor_t motion_sensors[] = { /* * Note: bmi160: supports accelerometer and gyro sensor @@ -403,6 +410,23 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, }, + [LID_MAG] = { + .name = "Lid Mag", + .active_mask = SENSOR_ACTIVE_S0, + .chip = MOTIONSENSE_CHIP_BMI160, + .type = MOTIONSENSE_TYPE_MAG, + .location = MOTIONSENSE_LOC_LID, + .drv = &bmi160_drv, + .mutex = &g_base_mutex, + .drv_data = &g_bmi160_data, + .port = I2C_PORT_ACCEL, + .addr = BMI160_ADDR0, + .default_range = 1 << 11, /* 16LSB / uT, fixed */ + .rot_standard_ref = &mag_standard_ref, + .rot_standard_ref = NULL, + .min_frequency = BMM150_MAG_MIN_FREQ, + .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL), + }, [VSYNC] = { .name = "Camera vsync", .active_mask = SENSOR_ACTIVE_S0, |