17#define ICM_20948_ARD_UNUSED_PIN 0xFF
24 bool _printDebug =
false;
26 const uint8_t MAX_MAGNETOMETER_STARTS = 10;
43#if defined(ARDUINO_ARCH_SAMD)
45#if (USB_VID == 0x1B4F)
46#if !defined(ARDUINO_SAMD51_THING_PLUS) & !defined(ARDUINO_SAMD51_MICROMOD)
70 void doDebugPrint(
char (*)(
const char *),
const char *,
bool newLine =
false);
264#define ICM_20948_SPI_DEFAULT_FREQ 4000000
265#define ICM_20948_SPI_DEFAULT_ORDER MSBFIRST
266#define ICM_20948_SPI_DEFAULT_MODE SPI_MODE0
#define DMP_START_ADDRESS
#define ICM_20948_SPI_DEFAULT_FREQ
#define ICM_20948_ARD_UNUSED_PIN
inv_icm20948_sensor
Sensor identifier for control function.
ICM_20948_PWR_MGMT_1_CLKSEL_e
virtual ICM_20948_Status_e begin(TwoWire &wirePort=Wire, bool ad0val=true, uint8_t ad0pin=ICM_20948_ARD_UNUSED_PIN)
ICM_20948_Status_e begin(uint8_t csPin, SPIClass &spiPort=SPI, uint32_t SPIFreq=ICM_20948_SPI_DEFAULT_FREQ)
ICM_20948_Status_e setBiasAccelZ(int32_t newValue)
ICM_20948_Status_e intEnableWOM(bool enable)
ICM_20948_Status_e clearInterrupts(void)
ICM_20948_Status_e WOMLogic(uint8_t enable, uint8_t mode)
ICM_20948_Status_e readFIFO(uint8_t *data, uint8_t len=1)
ICM_20948_Status_e readDMPmems(unsigned short reg, unsigned int length, unsigned char *data)
ICM_20948_Status_e setBiasCPassZ(int32_t newValue)
ICM_20948_Status_e setDLPFcfg(uint8_t sensor_id_bm, ICM_20948_dlpcfg_t cfg)
ICM_20948_Status_e read(uint8_t reg, uint8_t *pdata, uint32_t len)
ICM_20948_Status_e getBiasGyroZ(int32_t *bias)
void debugPrint(const char *)
void debugPrintln(const char *)
float getMagUT(int16_t axis_val)
ICM_20948_Status_e writeMag(AK09916_Reg_Addr_e reg, uint8_t *pdata)
ICM_20948_Status_e getBiasGyroX(int32_t *bias)
ICM_20948_Status_e setBiasAccelX(int32_t newValue)
ICM_20948_Status_e cfgFsyncIntMode(bool interrupt_mode)
ICM_20948_Status_e cfgFsyncActiveLow(bool active_low)
ICM_20948_Status_e setBank(uint8_t bank)
ICM_20948_Status_e intEnableWOF(bool enable)
ICM_20948_Status_e getBiasCPassZ(int32_t *bias)
ICM_20948_Status_e enableDMP(bool enable=true)
ICM_20948_Status_e enableDLPF(uint8_t sensor_id_bm, bool enable)
void doDebugPrint(char(*)(const char *), const char *, bool newLine=false)
ICM_20948_Status_e intEnableDMP(bool enable)
ICM_20948_Status_e readDMPdataFromFIFO(icm_20948_DMP_data_t *data)
void debugPrintf(float f)
ICM_20948_Status_e getBiasGyroY(int32_t *bias)
ICM_20948_Status_e resetMag()
void debugPrint(const __FlashStringHelper *)
ICM_20948_Status_e setFullScale(uint8_t sensor_id_bm, ICM_20948_fss_t fss)
ICM_20948_Status_e getBiasAccelY(int32_t *bias)
ICM_20948_Status_e setFIFOmode(bool snapshot=false)
ICM_20948_Status_e resetDMP(void)
ICM_20948_Status_e intEnableOverflowFIFO(uint8_t bm_enable)
ICM_20948_Status_e i2cMasterPassthrough(bool passthrough=true)
ICM_20948_Status_e status
void disableDebugging(void)
uint8_t i2cMasterSingleR(uint8_t addr, uint8_t reg)
ICM_20948_Status_e writeDMPmems(unsigned short reg, unsigned int length, const unsigned char *data)
ICM_20948_Status_e intEnableI2C(bool enable)
ICM_20948_Status_e cfgIntActiveLow(bool active_low)
uint8_t readMag(AK09916_Reg_Addr_e reg)
ICM_20948_Status_e setDMPODRrate(enum DMP_ODR_Registers odr_reg, int interval)
ICM_20948_Status_e write(uint8_t reg, uint8_t *pdata, uint32_t len)
ICM_20948_Status_e cfgIntAnyReadToClear(bool enabled)
ICM_20948_Status_e enableFIFO(bool enable=true)
ICM_20948_Status_e i2cMasterEnable(bool enable=true)
const char * statusString(ICM_20948_Status_e stat=ICM_20948_Stat_NUM)
ICM_20948_Status_e setBiasCPassY(int32_t newValue)
ICM_20948_Status_e intEnableRawDataReady(bool enable)
ICM_20948_Status_e setBiasCPassX(int32_t newValue)
ICM_20948_Status_e setBiasGyroZ(int32_t newValue)
ICM_20948_Status_e getBiasCPassX(int32_t *bias)
float getAccMG(int16_t axis_val)
ICM_20948_Status_e startupMagnetometer(bool minimal=false)
ICM_20948_Status_e setBiasAccelY(int32_t newValue)
ICM_20948_Status_e i2cMasterSingleW(uint8_t addr, uint8_t reg, uint8_t data)
ICM_20948_Status_e swReset(void)
ICM_20948_Status_e setSampleMode(uint8_t sensor_id_bm, uint8_t lp_config_cycle_mode)
ICM_20948_Status_e i2cControllerPeriph4Transaction(uint8_t addr, uint8_t reg, uint8_t *data, uint8_t len, bool Rw, bool send_reg_addr=true)
ICM_20948_Status_e cfgIntLatch(bool latching)
void debugPrintStatus(ICM_20948_Status_e stat)
ICM_20948_Status_e intEnableWatermarkFIFO(uint8_t bm_enable)
ICM_20948_Status_e getBiasAccelX(int32_t *bias)
ICM_20948_Status_e startupDefault(bool minimal=false)
ICM_20948_Status_e WOMThreshold(uint8_t threshold)
ICM_20948_Status_e getBiasCPassY(int32_t *bias)
ICM_20948_Device_t _device
ICM_20948_AGMT_t getAGMT(void)
ICM_20948_Status_e setClockSource(ICM_20948_PWR_MGMT_1_CLKSEL_e source)
ICM_20948_Status_e intEnablePLL(bool enable)
ICM_20948_Status_e setBiasGyroX(int32_t newValue)
ICM_20948_Status_e getFIFOcount(uint16_t *count)
ICM_20948_Status_e checkID(void)
float getGyrDPS(int16_t axis_val)
ICM_20948_Status_e enableDMPSensorInt(enum inv_icm20948_sensor sensor, bool enable=true)
ICM_20948_Status_e loadDMPFirmware(void)
ICM_20948_Status_e lowPower(bool on=true)
ICM_20948_Status_e initializeDMP(void) __attribute__((weak))
void enableDebugging(Stream &debugPort=Serial)
float getTempC(int16_t val)
ICM_20948_Status_e enableDMPSensor(enum inv_icm20948_sensor sensor, bool enable=true)
ICM_20948_Status_e i2cControllerConfigurePeripheral(uint8_t peripheral, uint8_t addr, uint8_t reg, uint8_t len, bool Rw=true, bool enable=true, bool data_only=false, bool grp=false, bool swap=false, uint8_t dataOut=0)
ICM_20948_Status_e i2cMasterConfigureSlave(uint8_t peripheral, uint8_t addr, uint8_t reg, uint8_t len, bool Rw=true, bool enable=true, bool data_only=false, bool grp=false, bool swap=false)
ICM_20948_Status_e getBiasAccelZ(int32_t *bias)
ICM_20948_Status_e resetFIFO(void)
ICM_20948_Status_e magWhoIAm(void)
ICM_20948_Status_e setGyroSF(unsigned char div, int gyro_level)
ICM_20948_Status_e setSampleRate(uint8_t sensor_id_bm, ICM_20948_smplrt_t smplrt)
ICM_20948_Status_e sleep(bool on=false)
ICM_20948_Status_e cfgIntOpenDrain(bool open_drain)
void debugPrintln(const __FlashStringHelper *)
ICM_20948_Status_e setDMPstartAddress(unsigned short address=DMP_START_ADDRESS)
ICM_20948_Status_e setBiasGyroY(int32_t newValue)
ICM_20948_Status_e i2cMasterReset()
ICM_20948_Status_e i2cMasterSLV4Transaction(uint8_t addr, uint8_t reg, uint8_t *data, uint8_t len, bool Rw, bool send_reg_addr=true)