We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f0e8dd commit e1c2f2cCopy full SHA for e1c2f2c
drivers/sensor/mpu9250/mpu9250.c
@@ -210,9 +210,9 @@ static int mpu9250_sample_fetch(const struct device *dev,
210
drv_data->gyro_y = sys_be16_to_cpu(buf[5]);
211
drv_data->gyro_z = sys_be16_to_cpu(buf[6]);
212
#ifdef CONFIG_MPU9250_MAGN_EN
213
- drv_data->magn_x = sys_be16_to_cpu(buf[7]);
214
- drv_data->magn_y = sys_be16_to_cpu(buf[8]);
215
- drv_data->magn_z = sys_be16_to_cpu(buf[9]);
+ drv_data->magn_x = sys_le16_to_cpu(buf[7]);
+ drv_data->magn_y = sys_le16_to_cpu(buf[8]);
+ drv_data->magn_z = sys_le16_to_cpu(buf[9]);
216
drv_data->magn_st2 = ((uint8_t *)buf)[20];
217
LOG_DBG("magn_st2: %u", drv_data->magn_st2);
218
#endif
0 commit comments