|
|
@@ -510,7 +510,20 @@ void DMP_ICM20948::init(DMP_ICM20948Settings settings)
|
|
|
rc = inv_icm20948_enable_sensor(&icm_device, idd_sensortype_conversion(INV_SENSOR_TYPE_STEP_COUNTER), settings.enable_steps);
|
|
|
}
|
|
|
|
|
|
+void DMP_ICM20948::setOperatingMode(uint8_t mode)
|
|
|
+{
|
|
|
+ inv_icm20948_set_lowpower_or_highperformance(&icm_device, mode);
|
|
|
+}
|
|
|
|
|
|
+void DMP_ICM20948::enableSensor(inv_sensor_type sensor_type, bool enable)
|
|
|
+{
|
|
|
+ inv_icm20948_enable_sensor(&icm_device, idd_sensortype_conversion(sensor_type), enable);
|
|
|
+}
|
|
|
+
|
|
|
+void DMP_ICM20948::setSensorFrequency(inv_sensor_type sensor_type, uint32_t frequency_hz)
|
|
|
+{
|
|
|
+ inv_icm20948_set_sensor_period(&icm_device, idd_sensortype_conversion(sensor_type), 1000 / frequency_hz);
|
|
|
+}
|
|
|
|
|
|
void DMP_ICM20948::task()
|
|
|
{
|