Skip to content

Commit 157f8d3

Browse files
authored
Merge pull request #153 from jitingcn/feat/add-support-icm-45688-p
add support for ICM-45688-P
2 parents 5237d5a + fe56a18 commit 157f8d3

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/build_defines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ static uint8_t get_server_constant_imu_id(int id)
151151
return SVR_IMU_ICM42688;
152152
case IMU_ICM45686:
153153
return SVR_IMU_ICM45686;
154+
case IMU_ICM45688:
155+
return SVR_IMU_ICM45686; // compatible with driver, but not really
154156
case IMU_ISM330IS:
155157
return 0;
156158
case IMU_LSM6DS3:

src/sensor/sensors.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const char *dev_imu_names[] = {
6161
"ICM-20948",
6262
"ICM-42688-P/ICM-42688-V",
6363
"ICM-45686",
64+
"ICM-45688-P",
6465
"LSM6DSO16IS/ISM330IS",
6566
"LSM6DS3",
6667
"LSM6DS3TR-C/LSM6DSL/LSM6DSM/ISM330DLC",
@@ -80,6 +81,7 @@ const sensor_imu_t *sensor_imus[] = {
8081
&sensor_imu_none,
8182
&sensor_imu_icm42688,
8283
&sensor_imu_icm45686,
84+
&sensor_imu_icm45686, // compatible with driver
8385
&sensor_imu_none, // will not implement, does not have FIFO
8486
&sensor_imu_lsm6dsm, // compatible with driver (unfortunately)
8587
&sensor_imu_lsm6dsm,
@@ -102,13 +104,13 @@ const uint8_t i2c_dev_imu_reg[] = {
102104
};
103105
const uint8_t i2c_dev_imu_id[] = {
104106
4, 0xEA,0xD1,0x24,0x43, // reg 0x00
105-
1, 0xE9, // reg 0x72
107+
2, 0xE9,0xE7, // reg 0x72
106108
5, 0x68,0x70,0x71,0x47,0xDB, // reg 0x75
107109
8, 0x22,0x69,0x6A,0x6B,0x6C,0x6D,0x70,0x71 // reg 0x0F
108110
};
109111
const int i2c_dev_imu[] = {
110112
IMU_ICM20948, IMU_BMI160, IMU_BMI270, IMU_BMI323,
111-
IMU_ICM45686,
113+
IMU_ICM45686, IMU_ICM45688,
112114
IMU_MPU6050, IMU_MPU6500, IMU_MPU9250, IMU_ICM42688, IMU_ICM42688, // ICM-42688-P, ICM-42688-V
113115
IMU_ISM330IS, IMU_LSM6DS3, IMU_LSM6DSM, IMU_LSM6DSR, IMU_LSM6DSO, IMU_LSM6DST, IMU_LSM6DSV, IMU_ISM330BX
114116
};
@@ -263,4 +265,4 @@ int sensor_scan_mag_ext(const sensor_ext_ssi_t *ext_ssi, uint16_t *ext_dev_addr,
263265
return sensor_scan_ext(ext_ssi, ext_dev_addr, ext_dev_reg, i2c_dev_mag_addr_count, i2c_dev_mag_addr, i2c_dev_mag_reg, i2c_dev_mag_id, i2c_dev_mag);
264266
}
265267

266-
#endif
268+
#endif

src/sensor/sensors_enum.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ TDK InvenSense
4242
*ICM-42688-P:68/69,75,47
4343
*ICM-42688-V:68/69,75,DB
4444
*ICM-45686:68/69,72,E9
45+
*ICM-45688-P:68/69,72,E7
4546
STMicroelectronics
4647
-LSM6DSO16IS:6A/6B,0F,22
4748
-ISM330IS:6A/6B,0F,22
@@ -59,7 +60,7 @@ STMicroelectronics
5960
*ISM330BX:6A/6B,0F,71
6061
6162
68/69,6A/6B
62-
00,75 (EA:ICM-20948,D1:BMI160,24:BMI270,43:BMI323;68:MPU-6000/MPU-6050,70:MPU-6500,71:MPU-9250,47:ICM-42688-P,DB:ICM-42688-V)
63+
00,72,75 (EA:ICM-20948,D1:BMI160,24:BMI270,43:BMI323;E7:ICM-45688-P,E9:ICM-45686;68:MPU-6000/MPU-6050,70:MPU-6500,71:MPU-9250,47:ICM-42688-P,DB:ICM-42688-V)
6364
0F (22:LSM6DSO16IS/ISM330IS,69:LSM6DS3,6A:LSM6DS3TR-C/LSM6DSL/LSM6DSM/ISM330DLC,6B:LSM6DSR/ISM330DHCX,6C:LSM6DSO,6C:LSM6DST,70:LSM6DSV,71:LSM6DSV16B/ISM330BX)
6465
6566
Magnetometers:
@@ -118,6 +119,7 @@ enum dev_imu {
118119
IMU_ICM20948,
119120
IMU_ICM42688, // ICM-42688-P/ICM-42688-V
120121
IMU_ICM45686,
122+
IMU_ICM45688, // ICM-45688-P
121123
IMU_ISM330IS, // LSM6DSO16IS/ISM330IS
122124
IMU_LSM6DS3,
123125
IMU_LSM6DSM, // LSM6DS3TR-C/LSM6DSL/LSM6DSM/ISM330DLC
@@ -151,4 +153,4 @@ enum dev_mag {
151153
MAG_MMC5983MA
152154
};
153155

154-
#endif
156+
#endif

0 commit comments

Comments
 (0)