2018-08-01 06:10 PM
Porting the VL53L0X API (https://my.st.com/content/my_st_com/en/products/embedded-software/proximity-sensors-software/stsw-img005.license=1533144599665.html) to a particular platform requires implementation of a set of functions abstracting I2C access:
However, all of the VL53L0X_{Rd,Wr} functions can be written in terms of VL53L0X_RdMulti or VL53L0X_WrMulti. Furthermore, VL53L0X_UpdateByte can be written in terms of WrByte, WrByte, and the Lock/Unlock functions.
These implementations should be added to the core API, reducing the necessary platform functions to:
This will simultaneously reduce the burden of porting the API to a new platform, and reduce the probability of errors introduced when implementing redundant functionality.
2018-08-09 09:45 PM
More of a statement than a question, can't recategorize so adding a response to bump off the unanswered list.