Moving from VL53L1CB to VL53L1X ULD API
I'm using the full API for the VL53L1 ToF sensor. The project is pretty simple as I'm using 4 sensor to measure distance connected on an I2C of an STM32F091.
I'm optimizing the code and I'm come across the VL53L1X ULD API (Ultra Lite Driver Application Programming Interface) STSW-IMG009.
From what I'm seeing most of the function I'm using:
- VL53L1_StartMeasurement
- VL53L1_GetMeasurementDataReady
- VL53L1_GetRangingMeasurementData
- VL53L1_ClearInterruptAndStartMeasurement
- XNUCLEO53L1A1_ResetId
- VL53L1_SetDeviceAddress
- VL53L1_WaitDeviceBooted
- VL53L1_DataInit
- VL53L1_StaticInit
- VL53L1_SetDistanceMode
- VL53L1_SetMeasurementTimingBudgetMicroSeconds
- VL53L1_SetInterMeasurementPeriodMilliSeconds
Could be replaced with the ones available in the ULD API.
The only thing I can't understand is how to edit the Dev structure. I'm currently using
Dev->I2cHandle = &hi2c2;
Dev->comms_speed_khz = 100; //400
Dev->comms_type = 1;
Dev->I2cDevAddr = 0x52; // default ToF sensor I2C address
From what I'm understanding I have to edit VL51L1X_NVM_CONFIGURATION and VL51L1X_DEFAULT_CONFIGURATION with the settings I'm using.
Is that right?
