How elektronikaembedded/vcnl4200 works
This is a lightweight, platform-independent VCNL4200 sensor driver. An application constructs the driver with an I2C bus, initializes it, then reads proximity, ambient-light, or white-channel data and configures sensor registers through the driver API. The implementation performs register transfers through the supplied bus; platform-specific bus behavior is intended to be adapted from the templates. The templates and platform wiring are documented but not sampled, so those links are shown as unverified.
Main entry points: vcnl4200_impl.hpp Sensor operations · vcnl4200.hpp Driver API · i2c_interface.hpp I2C error contract · i2c_interface.hpp.template Platform I2C template
Components 8
Sensor driver
- Driver API
include/vcnl4200.hpp - Sensor operations
include/vcnl4200_impl.hpp - Register definitions
include/vcnl4200_registers.hpp
I2C port
- I2C error contract
include/i2c_interface.hpp - Platform I2C template
template/i2c_interface.hpp.template
Other components
- Application
- Platform I2C / MCU
- VCNL4200 sensor
Connections 8
- Application → Driver API: uses
README.md - Driver API → Sensor operations: implements
include/vcnl4200.hpp - Sensor operations → I2C error contract: checks transfer status
include/vcnl4200_impl.hpp - Sensor operations → Register definitions: accesses registers
include/vcnl4200_impl.hpp - Sensor operations → VCNL4200 sensor: reads and writes
README.md - I2C error contract → Platform I2C template: implemented by
README.md - Platform I2C template → Platform I2C / MCU: adapted for
README.md - Platform I2C / MCU → VCNL4200 sensor: communicates over I2C
README.md