diff options
Diffstat (limited to 'board/yorp/board.c')
-rw-r--r-- | board/yorp/board.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/board/yorp/board.c b/board/yorp/board.c index 4f0c0e8fad..3a9091aef4 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -105,8 +105,7 @@ const mat33_fp_t base_standard_ref = { /* sensor private data */ static struct kionix_accel_data g_kx022_data; -static struct lsm6dsm_data lsm6dsm_g_data; -static struct lsm6dsm_data lsm6dsm_a_data; +static struct lsm6dsm_data lsm6dsm_data; /* Drivers */ struct motion_sensor_t motion_sensors[] = { @@ -143,7 +142,8 @@ struct motion_sensor_t motion_sensors[] = { .location = MOTIONSENSE_LOC_BASE, .drv = &lsm6dsm_drv, .mutex = &g_base_mutex, - .drv_data = &lsm6dsm_a_data, + .drv_data = LSM6DSM_ST_DATA(lsm6dsm_data, + MOTIONSENSE_TYPE_ACCEL), .port = I2C_PORT_SENSOR, .addr = LSM6DSM_ADDR0, .rot_standard_ref = &base_standard_ref, @@ -172,7 +172,8 @@ struct motion_sensor_t motion_sensors[] = { .location = MOTIONSENSE_LOC_BASE, .drv = &lsm6dsm_drv, .mutex = &g_base_mutex, - .drv_data = &lsm6dsm_g_data, + .drv_data = LSM6DSM_ST_DATA(lsm6dsm_data, + MOTIONSENSE_TYPE_GYRO), .port = I2C_PORT_SENSOR, .addr = LSM6DSM_ADDR0, .default_range = 1000 | ROUND_UP_FLAG, /* dps */ |