cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L0X platform port is too broad

Austin Glaser
Associate

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:

  • VL53L0X_LockSequenceAccess
  • VL53L0X_UnlockSequenceAccess
  • VL53L0X_WriteMulti
  • VL53L0X_ReadMulti
  • VL53L0X_WrByte
  • VL53L0X_WrWord
  • VL53L0X_WrDWord
  • VL53L0X_RdByte
  • VL53L0X_RdWord
  • VL53L0X_RdDWord
  • VL53L0X_UpdateByte
  • VL53L0X_PollingDelay

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:

  • VL53L0X_LockSequenceAccess
  • VL53L0X_UnlockSequenceAccess
  • VL53L0X_WriteMulti
  • VL53L0X_ReadMulti
  • VL53L0X_PollingDelay

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.

1 REPLY 1

More of a statement than a question, can't recategorize so adding a response to bump off the unanswered list.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..