tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
604 stars 188 forks source link

vl53l1x: Add functions for setting the device address #409

Closed baw-michael closed 2 years ago

baw-michael commented 2 years ago

This PR implements functions to get and set the device address similar to its reference implementation in C: https://github.com/pololu/vl53l1x-arduino/blob/master/VL53L1X.cpp#L28

The field Address of type Device could be changed to a private now; but I kept it because it would be a breaking change.

deadprogram commented 2 years ago

Looks good to me @baw-michael thank you for the code contribution. Now merging.