How libdriver/max30102 works
LibDriver MAX30102 is a C driver library with Raspberry Pi and STM32F407 sample applications. A typical use configures the sensor through the driver, handles FIFO-ready interrupts, reads red/IR samples, and reports them. The central driver uses platform-provided I2C, delay, and debug hooks; the projects supply board-specific adapters and peripherals. The README documents the FIFO workflow, while sampled code confirms interrupt callbacks and the driver’s I2C hook. Some adapter internals and application dispatch paths were not sampled, so those links are omitted or marked unverified.
Main entry points: driver_max30102.c MAX30102 driver · driver_max30102_interface.h Platform contract · main.c Board demo · raspberrypi4b_driver_max30102_interface.c Raspberry adapter
Components 12
Driver Library
- MAX30102 driver
src/driver_max30102.c - Driver API
src/driver_max30102.h - Platform contract
interface/driver_max30102_interface.h
Board Applications
- Board demo
project/raspberrypi4b/src/main.c - STM32 demo
project/stm32f407/usr/src/main.c
Platform I/O
- Raspberry adapter
project/raspberrypi4b/driver/src/raspberrypi4b_driver_max30102_interface.c - STM32 adapter
project/stm32f407/driver/src/stm32f407_driver_max30102_interface.c - Raspberry I2C
project/raspberrypi4b/interface/src/iic.c - STM32 I2C
project/stm32f407/interface/src/iic.c
Other components
- Application user
- MAX30102 sensor
- FIFO samples
Connections 12
- Application user → Board demo: runs demo
README.md - Application user → STM32 demo: runs demo
README.md - Board demo → MAX30102 driver: reads FIFO
README.md - MAX30102 driver → Driver API: implements API
src/driver_max30102.c - MAX30102 driver → Platform contract: uses hooks
src/driver_max30102.c - Platform contract → Raspberry adapter: implemented by
project/raspberrypi4b/driver/src/raspberrypi4b_driver_max30102_interface.c - Platform contract → STM32 adapter: implemented by
project/stm32f407/driver/src/stm32f407_driver_max30102_interface.c - Raspberry adapter → Raspberry I2C: uses bus
- STM32 adapter → STM32 I2C: uses bus
project/stm32f407/driver/src/stm32f407_driver_max30102_interface.c - Raspberry I2C → MAX30102 sensor: transfers data
- STM32 I2C → MAX30102 sensor: transfers data
- MAX30102 driver → FIFO samples: returns samples
README.md