How elektronikaembedded/ir_gesture_apds9960 works
This is STM32F103 firmware demonstrating APDS-9960 infrared gesture sensing. The principal workflow initializes the board and sensor, enables gesture detection, reads sensor data when the external-interrupt flag is set, and provides LED and serial-debug support. The graph separates application control, sensor communications, board services, and STM32 support. Source excerpts show the main initialization and read path; some peripheral and interrupt relationships are supported only by the SOURCE INDEX, so uncertain runtime links are omitted.
Main entry points: main.c Firmware loop · apds9960.c APDS9960 driver · debug.c Serial debug · delay.c Timing utilities
Components 14
Application
- Firmware loop
source/application/main.c - Interrupt handling
source/application/stm32f10x_it.c
Gesture sensing
- APDS9960 driver
source/application/apds9960.c - Gesture sensor
Board services
- I2C interface
source/application/hal/i2c_hal.c - LED control
source/application/hardware/led.c - Serial debug
source/application/utils/debug.c - Timing utilities
source/application/utils/delay.c
STM32 support
- GPIO driver
source/library/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c - I2C peripheral
source/library/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c - USART driver
source/library/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c - Timer driver
source/library/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c - System clock
source/CMSIS_BOOT/system_stm32f10x.c
Other components
- Operator
Connections 16
- Firmware loop → Timing utilities: initializes
source/application/main.c - Firmware loop → LED control: initializes
source/application/main.c - Firmware loop → Serial debug: initializes
source/application/main.c - Firmware loop → APDS9960 driver: initializes
source/application/main.c - Firmware loop → APDS9960 driver: enables gestures
source/application/main.c - Firmware loop → Interrupt handling: configures EXTI
source/application/main.c - Firmware loop → APDS9960 driver: reads gesture
source/application/main.c - APDS9960 driver → I2C interface: reads and writes
source/application/apds9960.c - I2C interface → I2C peripheral: uses peripheral
source/application/hal/i2c_hal.c - APDS9960 driver → Serial debug: logs status
source/application/apds9960.c - APDS9960 driver → Timing utilities: uses timing
- LED control → GPIO driver: controls pins
source/application/hardware/led.c - Serial debug → USART driver: transmits serial
source/application/utils/debug.c - Timing utilities → Timer driver: uses timer
source/application/utils/delay.c - Operator → Gesture sensor: makes gesture
- Gesture sensor → APDS9960 driver: provides readings