I bought the sensor VL53L1X and I’m surprised for the poor or NULL information about the configuration registers.
My proposal is configure the sensor in short range (up to 1.3m of detection) and with a maximum number of samples per second (every 15 or 20ms). Also it is very important to reduce at maximum the code size.
The idea is delete complex functions as the setMeasurementTimingBudget(…), calcMacroPeriod(…), timeoutMicrosecondsToMclks(…).
Somebody can help me to config the sensor with the minimum code?
The customer must use the VL53L1X software driver for easy and efficient ranging operations to match performance and accuracy criteria. Hence full register details are not exposed. The customer should refer to the VL53L1X API user manual (UM2356).
I think it would be hard to meaningfully eliminate the functions you mentioned without affecting the correct configuration and operation of the sensor. However, it might be possible if you only need to use the sensor with one specific configuration; in that case, you might be able to precompute the appropriate register values instead of having the library/API code do it at runtime. Unfortunately, as Jim mentioned, ST (the manufacturer of the VL53L1X IC) does not provide documentation on the I2C registers, so you would likely have to get the information you need by reverse-engineering the API source code.
ST also provides an “Ultra Lite Driver” API that you could look into, since it is advertised as having a smaller code footprint than the full API, although we have not tried using it yet.