summaryrefslogtreecommitdiff
path: root/board/ryu_sh/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/ryu_sh/board.c')
-rw-r--r--board/ryu_sh/board.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/board/ryu_sh/board.c b/board/ryu_sh/board.c
index 4e2f68f18a..dd2bb1fed6 100644
--- a/board/ryu_sh/board.c
+++ b/board/ryu_sh/board.c
@@ -37,8 +37,8 @@ const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
/* Sensor mutex */
static struct mutex g_mutex;
-/* lsm6ds0 local sensor data (per-sensor) */
-struct lsm6ds0_data g_lsm6ds0_data[2];
+/* local sensor data (per-sensor) */
+struct motion_data_t g_saved_data[2];
struct motion_sensor_t motion_sensors[] = {
@@ -54,11 +54,13 @@ struct motion_sensor_t motion_sensors[] = {
.location = MOTIONSENSE_LOC_LID,
.drv = &lsm6ds0_drv,
.mutex = &g_mutex,
- .drv_data = &g_lsm6ds0_data[0],
+ .drv_data = &g_saved_data[0],
.i2c_addr = LSM6DS0_ADDR1,
.rot_standard_ref = NULL,
- .default_odr = 119000,
- .default_range = 2
+ .default_config = {
+ .odr = 119000,
+ .range = 2
+ }
},
{.name = "Gyro",
@@ -68,11 +70,13 @@ struct motion_sensor_t motion_sensors[] = {
.location = MOTIONSENSE_LOC_LID,
.drv = &lsm6ds0_drv,
.mutex = &g_mutex,
- .drv_data = &g_lsm6ds0_data[1],
+ .drv_data = &g_saved_data[1],
.i2c_addr = LSM6DS0_ADDR1,
.rot_standard_ref = NULL,
- .default_odr = 119000,
- .default_range = 2000
+ .default_config = {
+ .odr = 119000,
+ .range = 2000
+ }
},
};
@@ -82,7 +86,7 @@ const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
* Note: If a new sensor driver is added, make sure to update the following
* assert.
*/
-BUILD_ASSERT(ARRAY_SIZE(motion_sensors) == ARRAY_SIZE(g_lsm6ds0_data));
+BUILD_ASSERT(ARRAY_SIZE(motion_sensors) == ARRAY_SIZE(g_saved_data));
void board_config_pre_init(void)
{