test_code / Mbed OS test_icm20948
Committer:
eric11fr
Date:
Fri Mar 19 21:59:25 2021 +0000
Revision:
0:efb1550773f1
Child:
1:8459e28d77a1
to

Who changed what in which revision?

UserRevisionLine numberNew contents of line
eric11fr 0:efb1550773f1 1 /*
eric11fr 0:efb1550773f1 2 Note: The ICM-20948 is an I2C sensor and uses the Arduino Wire library.
eric11fr 0:efb1550773f1 3 */
eric11fr 0:efb1550773f1 4 #ifndef _ICM20948_H_
eric11fr 0:efb1550773f1 5 #define _ICM20948_H_
eric11fr 0:efb1550773f1 6
eric11fr 0:efb1550773f1 7 #include <SPI.h>
eric11fr 0:efb1550773f1 8 #include <Wire.h>
eric11fr 0:efb1550773f1 9
eric11fr 0:efb1550773f1 10 #define SERIAL_DEBUG true
eric11fr 0:efb1550773f1 11
eric11fr 0:efb1550773f1 12 // See also ICM-20948 Datasheet, Register Map and Descriptions, Revision 1.3,
eric11fr 0:efb1550773f1 13 // https://www.invensense.com/wp-content/uploads/2016/06/DS-000189-ICM-20948-v1.3.pdf
eric11fr 0:efb1550773f1 14 // and AK09916 Datasheet and Register Map
eric11fr 0:efb1550773f1 15 // https://www.akm.com/akm/en/file/datasheet/AK09916C.pdf
eric11fr 0:efb1550773f1 16
eric11fr 0:efb1550773f1 17 //Magnetometer Registers
eric11fr 0:efb1550773f1 18 #define AK09916_ADDRESS 0x0C
eric11fr 0:efb1550773f1 19 #define WHO_AM_I_AK09916 0x01 // (AKA WIA2) should return 0x09
eric11fr 0:efb1550773f1 20 #define AK09916_ST1 0x10 // data ready status bit 0
eric11fr 0:efb1550773f1 21 #define AK09916_XOUT_L 0x11 // data
eric11fr 0:efb1550773f1 22 #define AK09916_XOUT_H 0x12
eric11fr 0:efb1550773f1 23 #define AK09916_YOUT_L 0x13
eric11fr 0:efb1550773f1 24 #define AK09916_YOUT_H 0x14
eric11fr 0:efb1550773f1 25 #define AK09916_ZOUT_L 0x15
eric11fr 0:efb1550773f1 26 #define AK09916_ZOUT_H 0x16
eric11fr 0:efb1550773f1 27 #define AK09916_ST2 0x18 // Data overflow bit 3 and data read error status bit 2
eric11fr 0:efb1550773f1 28 #define AK09916_CNTL 0x30 // Power down (0000), single-measurement (0001), self-test (1000) and Fuse ROM (1111) modes on bits 3:0
eric11fr 0:efb1550773f1 29 #define AK09916_CNTL2 0x31 // Normal (0), Reset (1)
eric11fr 0:efb1550773f1 30
eric11fr 0:efb1550773f1 31 // ICM-20948
eric11fr 0:efb1550773f1 32
eric11fr 0:efb1550773f1 33 // USER BANK 0 REGISTER MAP
eric11fr 0:efb1550773f1 34 #define WHO_AM_I_ICM20948 0x00 // Should return 0xEA
eric11fr 0:efb1550773f1 35 #define USER_CTRL 0x03 // Bit 7 enable DMP, bit 3 reset DMP
eric11fr 0:efb1550773f1 36 #define LP_CONFIG 0x05 // Not found in MPU-9250
eric11fr 0:efb1550773f1 37 #define PWR_MGMT_1 0x06 // Device defaults to the SLEEP mode
eric11fr 0:efb1550773f1 38 #define PWR_MGMT_2 0x07
eric11fr 0:efb1550773f1 39 #define INT_PIN_CFG 0x0F
eric11fr 0:efb1550773f1 40 #define INT_ENABLE 0x10
eric11fr 0:efb1550773f1 41 #define INT_ENABLE_1 0x11 // Not found in MPU-9250
eric11fr 0:efb1550773f1 42 #define INT_ENABLE_2 0x12 // Not found in MPU-9250
eric11fr 0:efb1550773f1 43 #define INT_ENABLE_3 0x13 // Not found in MPU-9250
eric11fr 0:efb1550773f1 44 #define I2C_MST_STATUS 0x17
eric11fr 0:efb1550773f1 45 #define INT_STATUS 0x19
eric11fr 0:efb1550773f1 46 #define INT_STATUS_1 0x1A // Not found in MPU-9250
eric11fr 0:efb1550773f1 47 #define INT_STATUS_2 0x1B // Not found in MPU-9250
eric11fr 0:efb1550773f1 48 #define INT_STATUS_3 0x1C // Not found in MPU-9250
eric11fr 0:efb1550773f1 49 #define DELAY_TIMEH 0x28 // Not found in MPU-9250
eric11fr 0:efb1550773f1 50 #define DELAY_TIMEL 0x29 // Not found in MPU-9250
eric11fr 0:efb1550773f1 51 #define ACCEL_XOUT_H 0x2D
eric11fr 0:efb1550773f1 52 #define ACCEL_XOUT_L 0x2E
eric11fr 0:efb1550773f1 53 #define ACCEL_YOUT_H 0x2F
eric11fr 0:efb1550773f1 54 #define ACCEL_YOUT_L 0x30
eric11fr 0:efb1550773f1 55 #define ACCEL_ZOUT_H 0x31
eric11fr 0:efb1550773f1 56 #define ACCEL_ZOUT_L 0x32
eric11fr 0:efb1550773f1 57 #define GYRO_XOUT_H 0x33
eric11fr 0:efb1550773f1 58 #define GYRO_XOUT_L 0x34
eric11fr 0:efb1550773f1 59 #define GYRO_YOUT_H 0x35
eric11fr 0:efb1550773f1 60 #define GYRO_YOUT_L 0x36
eric11fr 0:efb1550773f1 61 #define GYRO_ZOUT_H 0x37
eric11fr 0:efb1550773f1 62 #define GYRO_ZOUT_L 0x38
eric11fr 0:efb1550773f1 63 #define TEMP_OUT_H 0x39
eric11fr 0:efb1550773f1 64 #define TEMP_OUT_L 0x3A
eric11fr 0:efb1550773f1 65 #define EXT_SENS_DATA_00 0x3B
eric11fr 0:efb1550773f1 66 #define EXT_SENS_DATA_01 0x3C
eric11fr 0:efb1550773f1 67 #define EXT_SENS_DATA_02 0x3D
eric11fr 0:efb1550773f1 68 #define EXT_SENS_DATA_03 0x3E
eric11fr 0:efb1550773f1 69 #define EXT_SENS_DATA_04 0x3F
eric11fr 0:efb1550773f1 70 #define EXT_SENS_DATA_05 0x40
eric11fr 0:efb1550773f1 71 #define EXT_SENS_DATA_06 0x41
eric11fr 0:efb1550773f1 72 #define EXT_SENS_DATA_07 0x42
eric11fr 0:efb1550773f1 73 #define EXT_SENS_DATA_08 0x43
eric11fr 0:efb1550773f1 74 #define EXT_SENS_DATA_09 0x44
eric11fr 0:efb1550773f1 75 #define EXT_SENS_DATA_10 0x45
eric11fr 0:efb1550773f1 76 #define EXT_SENS_DATA_11 0x46
eric11fr 0:efb1550773f1 77 #define EXT_SENS_DATA_12 0x47
eric11fr 0:efb1550773f1 78 #define EXT_SENS_DATA_13 0x48
eric11fr 0:efb1550773f1 79 #define EXT_SENS_DATA_14 0x49
eric11fr 0:efb1550773f1 80 #define EXT_SENS_DATA_15 0x4A
eric11fr 0:efb1550773f1 81 #define EXT_SENS_DATA_16 0x4B
eric11fr 0:efb1550773f1 82 #define EXT_SENS_DATA_17 0x4C
eric11fr 0:efb1550773f1 83 #define EXT_SENS_DATA_18 0x4D
eric11fr 0:efb1550773f1 84 #define EXT_SENS_DATA_19 0x4E
eric11fr 0:efb1550773f1 85 #define EXT_SENS_DATA_20 0x4F
eric11fr 0:efb1550773f1 86 #define EXT_SENS_DATA_21 0x50
eric11fr 0:efb1550773f1 87 #define EXT_SENS_DATA_22 0x51
eric11fr 0:efb1550773f1 88 #define EXT_SENS_DATA_23 0x52
eric11fr 0:efb1550773f1 89 #define FIFO_EN_1 0x66
eric11fr 0:efb1550773f1 90 #define FIFO_EN_2 0x67 // Not found in MPU-9250
eric11fr 0:efb1550773f1 91 #define FIFO_RST 0x68 // Not found in MPU-9250
eric11fr 0:efb1550773f1 92 #define FIFO_MODE 0x69 // Not found in MPU-9250
eric11fr 0:efb1550773f1 93 #define FIFO_COUNTH 0x70
eric11fr 0:efb1550773f1 94 #define FIFO_COUNTL 0x71
eric11fr 0:efb1550773f1 95 #define FIFO_R_W 0x72
eric11fr 0:efb1550773f1 96 #define DATA_RDY_STATUS 0x74 // Not found in MPU-9250
eric11fr 0:efb1550773f1 97 #define FIFO_CFG 0x76 // Not found in MPU-9250
eric11fr 0:efb1550773f1 98 #define REG_BANK_SEL 0x7F // Not found in MPU-9250
eric11fr 0:efb1550773f1 99
eric11fr 0:efb1550773f1 100 // USER BANK 1 REGISTER MAP
eric11fr 0:efb1550773f1 101 #define SELF_TEST_X_GYRO 0x02
eric11fr 0:efb1550773f1 102 #define SELF_TEST_Y_GYRO 0x03
eric11fr 0:efb1550773f1 103 #define SELF_TEST_Z_GYRO 0x04
eric11fr 0:efb1550773f1 104 #define SELF_TEST_X_ACCEL 0x0E
eric11fr 0:efb1550773f1 105 #define SELF_TEST_Y_ACCEL 0x0F
eric11fr 0:efb1550773f1 106 #define SELF_TEST_Z_ACCEL 0x10
eric11fr 0:efb1550773f1 107 #define XA_OFFSET_H 0x14
eric11fr 0:efb1550773f1 108 #define XA_OFFSET_L 0x15
eric11fr 0:efb1550773f1 109 #define YA_OFFSET_H 0x17
eric11fr 0:efb1550773f1 110 #define YA_OFFSET_L 0x18
eric11fr 0:efb1550773f1 111 #define ZA_OFFSET_H 0x1A
eric11fr 0:efb1550773f1 112 #define ZA_OFFSET_L 0x1B
eric11fr 0:efb1550773f1 113 #define TIMEBASE_CORRECTION_PLL 0x28
eric11fr 0:efb1550773f1 114
eric11fr 0:efb1550773f1 115 // USER BANK 2 REGISTER MAP
eric11fr 0:efb1550773f1 116 #define GYRO_SMPLRT_DIV 0x00 // Not found in MPU-9250
eric11fr 0:efb1550773f1 117 #define GYRO_CONFIG_1 0x01 // Not found in MPU-9250
eric11fr 0:efb1550773f1 118 #define GYRO_CONFIG_2 0x02 // Not found in MPU-9250
eric11fr 0:efb1550773f1 119 #define XG_OFFSET_H 0x03 // User-defined trim values for gyroscope
eric11fr 0:efb1550773f1 120 #define XG_OFFSET_L 0x04
eric11fr 0:efb1550773f1 121 #define YG_OFFSET_H 0x05
eric11fr 0:efb1550773f1 122 #define YG_OFFSET_L 0x06
eric11fr 0:efb1550773f1 123 #define ZG_OFFSET_H 0x07
eric11fr 0:efb1550773f1 124 #define ZG_OFFSET_L 0x08
eric11fr 0:efb1550773f1 125 #define ODR_ALIGN_EN 0x09 // Not found in MPU-9250
eric11fr 0:efb1550773f1 126 #define ACCEL_SMPLRT_DIV_1 0x10 // Not found in MPU-9250
eric11fr 0:efb1550773f1 127 #define ACCEL_SMPLRT_DIV_2 0x11 // Not found in MPU-9250
eric11fr 0:efb1550773f1 128 #define ACCEL_INTEL_CTRL 0x12 // Not found in MPU-9250
eric11fr 0:efb1550773f1 129 #define ACCEL_WOM_THR 0x13 // Not found in MPU-9250 (could be WOM_THR)
eric11fr 0:efb1550773f1 130 #define ACCEL_CONFIG 0x14
eric11fr 0:efb1550773f1 131 #define ACCEL_CONFIG_2 0x15 // Not found in MPU-9250 (could be ACCEL_CONFIG2)
eric11fr 0:efb1550773f1 132 #define FSYNC_CONFIG 0x52 // Not found in MPU-9250
eric11fr 0:efb1550773f1 133 #define TEMP_CONFIG 0x53 // Not found in MPU-9250
eric11fr 0:efb1550773f1 134 #define MOD_CTRL_USR 0x54 // Not found in MPU-9250
eric11fr 0:efb1550773f1 135
eric11fr 0:efb1550773f1 136 // USER BANK 3 REGISTER MAP
eric11fr 0:efb1550773f1 137 #define I2C_MST_ODR_CONFIG 0x00 // Not found in MPU-9250
eric11fr 0:efb1550773f1 138 #define I2C_MST_CTRL 0x01
eric11fr 0:efb1550773f1 139 #define I2C_MST_DELAY_CTRL 0x02
eric11fr 0:efb1550773f1 140 #define I2C_SLV0_ADDR 0x03
eric11fr 0:efb1550773f1 141 #define I2C_SLV0_REG 0x04
eric11fr 0:efb1550773f1 142 #define I2C_SLV0_CTRL 0x05
eric11fr 0:efb1550773f1 143 #define I2C_SLV0_DO 0x06
eric11fr 0:efb1550773f1 144 #define I2C_SLV1_ADDR 0x07
eric11fr 0:efb1550773f1 145 #define I2C_SLV1_REG 0x08
eric11fr 0:efb1550773f1 146 #define I2C_SLV1_CTRL 0x09
eric11fr 0:efb1550773f1 147 #define I2C_SLV1_DO 0x0A
eric11fr 0:efb1550773f1 148 #define I2C_SLV2_ADDR 0x0B
eric11fr 0:efb1550773f1 149 #define I2C_SLV2_REG 0x0C
eric11fr 0:efb1550773f1 150 #define I2C_SLV2_CTRL 0x0D
eric11fr 0:efb1550773f1 151 #define I2C_SLV2_DO 0x0E
eric11fr 0:efb1550773f1 152 #define I2C_SLV3_ADDR 0x0F
eric11fr 0:efb1550773f1 153 #define I2C_SLV3_REG 0x10
eric11fr 0:efb1550773f1 154 #define I2C_SLV3_CTRL 0x11
eric11fr 0:efb1550773f1 155 #define I2C_SLV3_DO 0x12
eric11fr 0:efb1550773f1 156 #define I2C_SLV4_ADDR 0x13
eric11fr 0:efb1550773f1 157 #define I2C_SLV4_REG 0x14
eric11fr 0:efb1550773f1 158 #define I2C_SLV4_CTRL 0x15
eric11fr 0:efb1550773f1 159 #define I2C_SLV4_DO 0x16
eric11fr 0:efb1550773f1 160 #define I2C_SLV4_DI 0x17
eric11fr 0:efb1550773f1 161
eric11fr 0:efb1550773f1 162
eric11fr 0:efb1550773f1 163 // Using the ICM-20948 breakout board, ADO is set to 1
eric11fr 0:efb1550773f1 164 // Seven-bit device address is 1000100 for ADO = 0 and 1000101 for ADO = 1
eric11fr 0:efb1550773f1 165 #define ADO 1
eric11fr 0:efb1550773f1 166 #if ADO
eric11fr 0:efb1550773f1 167 #define ICM20948_ADDRESS 0x69 // Device address when ADO = 1
eric11fr 0:efb1550773f1 168 #else
eric11fr 0:efb1550773f1 169 #define ICM20948_ADDRESS 0x68 // Device address when ADO = 0
eric11fr 0:efb1550773f1 170 #define AK09916_ADDRESS 0x0C // Address of magnetometer
eric11fr 0:efb1550773f1 171 #endif // AD0
eric11fr 0:efb1550773f1 172
eric11fr 0:efb1550773f1 173 #define READ_FLAG 0x80
eric11fr 0:efb1550773f1 174 #define NOT_SPI -1
eric11fr 0:efb1550773f1 175 #define SPI_DATA_RATE 1000000 // 1MHz is the max speed of the ICM-20948
eric11fr 0:efb1550773f1 176 //#define SPI_DATA_RATE 1000000 // 1MHz is the max speed of the ICM-20948
eric11fr 0:efb1550773f1 177 #define SPI_MODE SPI_MODE3
eric11fr 0:efb1550773f1 178
eric11fr 0:efb1550773f1 179 class ICM20948
eric11fr 0:efb1550773f1 180 {
eric11fr 0:efb1550773f1 181 protected:
eric11fr 0:efb1550773f1 182 // Set initial input parameters
eric11fr 0:efb1550773f1 183 enum Ascale
eric11fr 0:efb1550773f1 184 {
eric11fr 0:efb1550773f1 185 AFS_2G = 0,
eric11fr 0:efb1550773f1 186 AFS_4G,
eric11fr 0:efb1550773f1 187 AFS_8G,
eric11fr 0:efb1550773f1 188 AFS_16G
eric11fr 0:efb1550773f1 189 };
eric11fr 0:efb1550773f1 190
eric11fr 0:efb1550773f1 191 enum Gscale {
eric11fr 0:efb1550773f1 192 GFS_250DPS = 0,
eric11fr 0:efb1550773f1 193 GFS_500DPS,
eric11fr 0:efb1550773f1 194 GFS_1000DPS,
eric11fr 0:efb1550773f1 195 GFS_2000DPS
eric11fr 0:efb1550773f1 196 };
eric11fr 0:efb1550773f1 197
eric11fr 0:efb1550773f1 198 enum Mscale {
eric11fr 0:efb1550773f1 199 MFS_14BITS = 0, // 0.6 mG per LSB
eric11fr 0:efb1550773f1 200 MFS_16BITS // 0.15 mG per LSB
eric11fr 0:efb1550773f1 201 };
eric11fr 0:efb1550773f1 202
eric11fr 0:efb1550773f1 203 enum M_MODE {
eric11fr 0:efb1550773f1 204 M_8HZ = 0x02, // 8 Hz update
eric11fr 0:efb1550773f1 205 M_100HZ = 0x06 // 100 Hz continuous magnetometer
eric11fr 0:efb1550773f1 206 };
eric11fr 0:efb1550773f1 207
eric11fr 0:efb1550773f1 208 // TODO: Add setter methods for this hard coded stuff
eric11fr 0:efb1550773f1 209 // Specify sensor full scale
eric11fr 0:efb1550773f1 210 uint8_t Gscale = GFS_250DPS;
eric11fr 0:efb1550773f1 211 uint8_t Ascale = AFS_2G;
eric11fr 0:efb1550773f1 212
eric11fr 0:efb1550773f1 213 // 2 for 8 Hz, 6 for 100 Hz continuous magnetometer data read
eric11fr 0:efb1550773f1 214 uint8_t Mmode = M_100HZ;
eric11fr 0:efb1550773f1 215
eric11fr 0:efb1550773f1 216 // SPI chip select pin
eric11fr 0:efb1550773f1 217 int8_t _csPin;
eric11fr 0:efb1550773f1 218
eric11fr 0:efb1550773f1 219 uint8_t writeByteWire(uint8_t, uint8_t, uint8_t);
eric11fr 0:efb1550773f1 220 uint8_t writeByteSPI(uint8_t, uint8_t);
eric11fr 0:efb1550773f1 221 uint8_t readByteSPI(uint8_t subAddress);
eric11fr 0:efb1550773f1 222 uint8_t readByteWire(uint8_t address, uint8_t subAddress);
eric11fr 0:efb1550773f1 223 bool magInit();
eric11fr 0:efb1550773f1 224 void kickHardware();
eric11fr 0:efb1550773f1 225 void select();
eric11fr 0:efb1550773f1 226 void deselect();
eric11fr 0:efb1550773f1 227 // TODO: Remove this next line
eric11fr 0:efb1550773f1 228 public:
eric11fr 0:efb1550773f1 229 uint8_t ak09916WhoAmI_SPI();
eric11fr 0:efb1550773f1 230
eric11fr 0:efb1550773f1 231 public:
eric11fr 0:efb1550773f1 232 float pitch, yaw, roll;
eric11fr 0:efb1550773f1 233 float temperature; // Stores the real internal chip temperature in Celsius
eric11fr 0:efb1550773f1 234 int16_t tempCount; // Temperature raw count output
eric11fr 0:efb1550773f1 235 uint32_t delt_t = 0; // Used to control display output rate
eric11fr 0:efb1550773f1 236
eric11fr 0:efb1550773f1 237 uint32_t count = 0, sumCount = 0; // used to control display output rate
eric11fr 0:efb1550773f1 238 float deltat = 0.0f, sum = 0.0f; // integration interval for both filter schemes
eric11fr 0:efb1550773f1 239 uint32_t lastUpdate = 0, firstUpdate = 0; // used to calculate integration interval
eric11fr 0:efb1550773f1 240 uint32_t Now = 0; // used to calculate integration interval
eric11fr 0:efb1550773f1 241
eric11fr 0:efb1550773f1 242 int16_t gyroCount[3]; // Stores the 16-bit signed gyro sensor output
eric11fr 0:efb1550773f1 243 int16_t magCount[3]; // Stores the 16-bit signed magnetometer sensor output
eric11fr 0:efb1550773f1 244 // Scale resolutions per LSB for the sensors
eric11fr 0:efb1550773f1 245 float aRes, gRes, mRes;
eric11fr 0:efb1550773f1 246 // Variables to hold latest sensor data values
eric11fr 0:efb1550773f1 247 float ax, ay, az, gx, gy, gz, mx, my, mz;
eric11fr 0:efb1550773f1 248 // Factory mag calibration and mag bias
eric11fr 0:efb1550773f1 249 float factoryMagCalibration[3] = {0, 0, 0}, factoryMagBias[3] = {0, 0, 0};
eric11fr 0:efb1550773f1 250 // Bias corrections for gyro, accelerometer, and magnetometer
eric11fr 0:efb1550773f1 251 float gyroBias[3] = {0, 0, 0},
eric11fr 0:efb1550773f1 252 accelBias[3] = {0, 0, 0},
eric11fr 0:efb1550773f1 253 magBias[3] = {0, 0, 0},
eric11fr 0:efb1550773f1 254 magScale[3] = {0, 0, 0};
eric11fr 0:efb1550773f1 255 float selfTest[6];
eric11fr 0:efb1550773f1 256 // Stores the 16-bit signed accelerometer sensor output
eric11fr 0:efb1550773f1 257 int16_t accelCount[3];
eric11fr 0:efb1550773f1 258
eric11fr 0:efb1550773f1 259 // Public method declarations
eric11fr 0:efb1550773f1 260 ICM20948(int8_t csPin=NOT_SPI);
eric11fr 0:efb1550773f1 261 void getMres();
eric11fr 0:efb1550773f1 262 void getGres();
eric11fr 0:efb1550773f1 263 void getAres();
eric11fr 0:efb1550773f1 264 void readAccelData(int16_t *);
eric11fr 0:efb1550773f1 265 void readGyroData(int16_t *);
eric11fr 0:efb1550773f1 266 void readMagData(int16_t *);
eric11fr 0:efb1550773f1 267 int16_t readTempData();
eric11fr 0:efb1550773f1 268 void updateTime();
eric11fr 0:efb1550773f1 269 void initAK09916();
eric11fr 0:efb1550773f1 270 void initICM20948();
eric11fr 0:efb1550773f1 271 void calibrateICM20948(float * gyroBias, float * accelBias);
eric11fr 0:efb1550773f1 272 void ICM20948SelfTest(float * destination);
eric11fr 0:efb1550773f1 273 void magCalICM20948(float * dest1, float * dest2);
eric11fr 0:efb1550773f1 274 uint8_t writeByte(uint8_t, uint8_t, uint8_t);
eric11fr 0:efb1550773f1 275 uint8_t readByte(uint8_t, uint8_t);
eric11fr 0:efb1550773f1 276 uint8_t readBytes(uint8_t, uint8_t, uint8_t, uint8_t *);
eric11fr 0:efb1550773f1 277 // TODO: make SPI/Wire private
eric11fr 0:efb1550773f1 278 uint8_t readBytesSPI(uint8_t, uint8_t, uint8_t *);
eric11fr 0:efb1550773f1 279 uint8_t readBytesWire(uint8_t, uint8_t, uint8_t, uint8_t *);
eric11fr 0:efb1550773f1 280 bool isInI2cMode() { return _csPin == -1; }
eric11fr 0:efb1550773f1 281 bool begin();
eric11fr 0:efb1550773f1 282 }; // class ICM20948
eric11fr 0:efb1550773f1 283
eric11fr 0:efb1550773f1 284 #endif // _ICM20948_H_