Closed taruti closed 2 years ago
I came here to see if anybody had done this! :).
I see that there are two solutions proposed. While this provides maximum flexibility, I think that the other proposed solution is a bit easier for the end user as it hard codes all possible addresses based on the sensors data sheet.
Honestly, I haven't played in the embedded space much for the past several years. How about I make y'all collaborators on this?
@taruti What are your thoughts. I would say that is seems reasonable to go ahead and merge either one of these solutions. I really wish that Rust had an approach for default arguments. I realize that a builder approach would work there, but then you would have to call some function to actually initialize the sensor.
Closing PR in favor of the alternative approach with the limited address space
This adds support for LIS3MDL on other I2C addresses. Needed this to support Adafruit LIS3MDL+LSM6DS33 board.