How sleepypandas/icm42670_driver_stm32_esp32 works
This repository is a portable C driver for the ICM-42670-P IMU. An application configures a transport (direct callbacks or a platform adapter), initializes the driver, then reads scaled or raw measurements and may opt into APEX, FIFO, or FSYNC features. The core separates sensor behavior from platform bus access through callbacks. The README documents the workflow and feature scope; source-index references support several internal module relationships, but many implementation details were not sampled.
Main entry points: ICM42670_internal.c Register helpers · ICM42670_driver.c Init and control · ICM42670_apex.c APEX motion · ICM42670_fifo.c FIFO capture
Components 13
Application workflow
- Embedded application
Portable driver core
- Init and control
ICM42670_Driver/ICM42670_driver.c - Sensor reads
ICM42670_Driver/ICM42670_driver.c - Gyro calibration
ICM42670_Driver/ICM42670_driver.c - Register helpers
ICM42670_Driver/ICM42670_internal.c - Driver API
ICM42670_Driver/ICM42670_driver.h
Platform transports
- ESP-IDF adapter
ICM42670_Driver/ports/esp_idf/ICM42670_esp_idf.c - STM32 HAL adapter
ICM42670_Driver/ports/stm32_hal/ICM42670_stm32_hal.c
Optional sensor features
- APEX motion
ICM42670_Driver/ICM42670_apex.c - FIFO capture
ICM42670_Driver/ICM42670_fifo.c - FSYNC capture
ICM42670_Driver/ICM42670_fsync.c
Register protocol
- Register definitions
ICM42670_Driver/ICM42670_registermap.h
Other components
- ICM-42670-P IMU
Connections 19
- Embedded application → ESP-IDF adapter: configures bus
README.md - Embedded application → STM32 HAL adapter: configures bus
README.md - Embedded application → Init and control: initializes
README.md - Embedded application → Sensor reads: requests measurements
README.md - Embedded application → Gyro calibration: calibrates gyro
README.md - ESP-IDF adapter → Init and control: sets callbacks
README.md - STM32 HAL adapter → Init and control: sets callbacks
README.md - Init and control → Register helpers: uses helpers
ICM42670_Driver/ICM42670_driver.c - Sensor reads → Register helpers: uses helpers
ICM42670_Driver/ICM42670_driver.c - Gyro calibration → Register helpers: uses helpers
README.md - Init and control → ICM-42670-P IMU: configures registers
README.md - Sensor reads → ICM-42670-P IMU: reads measurements
README.md - APEX motion → Register helpers: uses helpers
ICM42670_Driver/ICM42670_apex.c - FIFO capture → Register helpers: uses helpers
ICM42670_Driver/ICM42670_fifo.c - FSYNC capture → Register helpers: uses helpers
ICM42670_Driver/ICM42670_fsync.c - APEX motion → ICM-42670-P IMU: configures and reads
README.md - FIFO capture → ICM-42670-P IMU: configures and reads
README.md - FSYNC capture → ICM-42670-P IMU: configures and reads
README.md - Driver API → Register definitions: uses definitions
ICM42670_Driver/ICM42670_driver.h