|
DevLab_ICM20948 1.0.2
ICM-20948 9-Axis Motion Sensor Driver
|
I2C interrupt example for the DevLab ICM-20948. More...
Go to the source code of this file.
Macros | |
| #define | SDA_PIN 6 |
| I2C SDA pin used by the example board. | |
| #define | SCL_PIN 7 |
| I2C SCL pin used by the example board. | |
| #define | I2C_FREQ 400000UL |
| I2C bus speed in hertz. | |
| #define | ICM_ADDR 0x69 |
| ICM-20948 I2C address selected by the AD0 pin. | |
| #define | PIN_INT D7 |
| MCU pin connected to the IMU interrupt output. | |
Functions | |
| void | printLinea () |
| Print a separator line to Serial. | |
| void | printDobleLinea () |
| Print a double separator line to Serial. | |
| void IRAM_ATTR | isrHandler () |
| Interrupt service routine for the IMU data-ready signal. | |
| void | setup () |
| Initialize I2C, verify the IMU, configure interrupts, and attach ISR. | |
| void | loop () |
| Report interrupt events when the ISR count changes. | |
Variables | |
| DevLab_ICM20948 | imu |
| Global ICM-20948 driver instance. | |
| ICM20948_IntPinConfig | pinCfg |
| Interrupt pin electrical and latch configuration. | |
| ICM20948_IntEnableConfig | intEn |
| Interrupt enable flags used by this example. | |
| volatile uint32_t | isrCount = 0 |
| Number of interrupt events observed by the ISR. | |
I2C interrupt example for the DevLab ICM-20948.
Configures the IMU raw-data-ready interrupt pin and counts ISR events on an Arduino-compatible board.
Definition in file interrupt.ino.
| #define I2C_FREQ 400000UL |
I2C bus speed in hertz.
Definition at line 17 of file interrupt.ino.
| #define ICM_ADDR 0x69 |
ICM-20948 I2C address selected by the AD0 pin.
Definition at line 19 of file interrupt.ino.
| #define PIN_INT D7 |
MCU pin connected to the IMU interrupt output.
Definition at line 21 of file interrupt.ino.
| #define SCL_PIN 7 |
I2C SCL pin used by the example board.
Definition at line 15 of file interrupt.ino.
| #define SDA_PIN 6 |
I2C SDA pin used by the example board.
Definition at line 13 of file interrupt.ino.
| void IRAM_ATTR isrHandler | ( | ) |
Interrupt service routine for the IMU data-ready signal.
Definition at line 53 of file interrupt.ino.
| void loop | ( | ) |
Report interrupt events when the ISR count changes.
Definition at line 95 of file interrupt.ino.
| void printDobleLinea | ( | ) |
Print a double separator line to Serial.
Definition at line 29 of file interrupt.ino.
| void printLinea | ( | ) |
Print a separator line to Serial.
Definition at line 27 of file interrupt.ino.
| void setup | ( | ) |
Initialize I2C, verify the IMU, configure interrupts, and attach ISR.
Definition at line 60 of file interrupt.ino.
| DevLab_ICM20948 imu |
Global ICM-20948 driver instance.
Definition at line 24 of file interrupt.ino.
| ICM20948_IntEnableConfig intEn |
Interrupt enable flags used by this example.
Definition at line 43 of file interrupt.ino.
| volatile uint32_t isrCount = 0 |
Number of interrupt events observed by the ISR.
Definition at line 48 of file interrupt.ino.
| ICM20948_IntPinConfig pinCfg |
Interrupt pin electrical and latch configuration.
Definition at line 32 of file interrupt.ino.