How stmicroelectronics/stm32-vl53l5cx works
This is ST’s STM32Cube BSP component for the VL53L5CX time-of-flight ranging sensor. An application uses the component driver to initialize the sensor, configure ranging, poll for data, and receive per-zone results; the driver relies on the lower-level sensor API and platform I/O callbacks. Separate plugins provide cross-talk calibration, detection thresholds, and motion-indicator configuration. The source index identifies a large embedded buffer module, but its contents were not sampled; plugin-to-driver orchestration is likewise not shown, so those links are omitted.
Main entry points: vl53l5cx_api.c Ranging API · vl53l5cx.c Component driver · platform.c Platform transport · vl53l5cx_plugin_xtalk.c Cross-talk calibration
Components 13
BSP driver
- Component driver
vl53l5cx.c - Driver interface
vl53l5cx.h
Sensor API
- Ranging API
modules/vl53l5cx_api.c - API definitions
modules/vl53l5cx_api.h - Firmware buffers
modules/vl53l5cx_buffers.h
Feature plugins
- Cross-talk calibration
modules/vl53l5cx_plugin_xtalk.c - Detection thresholds
modules/vl53l5cx_plugin_detection_thresholds.c - Motion indicator
modules/vl53l5cx_plugin_motion_indicator.c
Platform I/O
- Platform transport
porting/platform.c - Platform contract
porting/platform.h
Other components
- STM32 application
- Host I/O callbacks
- VL53L5CX sensor
Connections 11
- STM32 application → Component driver: uses
- Component driver → Ranging API: configures and reads
vl53l5cx.c - Component driver → STM32 application: returns results
vl53l5cx.c - Ranging API → Platform transport: performs register I/O
modules/vl53l5cx_api.c - Ranging API → Firmware buffers: uses buffers
modules/vl53l5cx_api.c - Platform transport → Host I/O callbacks: calls read/write
porting/platform.c - Platform contract → Host I/O callbacks: defines callbacks
porting/platform.h - Platform transport → VL53L5CX sensor: transfers over I²C
- Cross-talk calibration → Ranging API: uses DCI API
modules/vl53l5cx_plugin_xtalk.c - Detection thresholds → Ranging API: uses DCI API
modules/vl53l5cx_plugin_detection_thresholds.c - Motion indicator → Ranging API: uses DCI API
modules/vl53l5cx_plugin_motion_indicator.c