Skip to content

Commit 84e8c89

Browse files
committed
Fix accidental write to PWR_MGMT_1 when LP_CONFIG was intended
1 parent aa27642 commit 84e8c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/ICM_20948_C.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ ICM_20948_Status_e ICM_20948_set_sample_mode( ICM_20948_Device_t* pdev, ICM_2094
166166
if( sensors & ICM_20948_Internal_Gyr ){ reg.GYRO_CYCLE = mode; }
167167
if( sensors & ICM_20948_Internal_Mst ){ reg.I2C_MST_CYCLE = mode; }
168168

169-
retval = ICM_20948_execute_w( pdev, AGB0_REG_PWR_MGMT_1, (uint8_t*)&reg, sizeof(ICM_20948_PWR_MGMT_1_t));
169+
retval = ICM_20948_execute_w( pdev, AGB0_REG_LP_CONFIG, (uint8_t*)&reg, sizeof(ICM_20948_LP_CONFIG_t));
170170
if( retval != ICM_20948_Stat_Ok ){ return retval; }
171171
return retval;
172172
}

0 commit comments

Comments
 (0)