adafruit / Wippersnapper_Protobuf

Protocol buffer messages for Adafruit.io WipperSnapper Beta
MIT License
0 stars 2 forks source link

Redo I2C Scan, add init #52

Closed brentru closed 3 years ago

brentru commented 3 years ago

As it stands in master, i2cscanrequest handles both i2c port initialization and scanning. This approach requires re-initialization and/or transmitting additional information about the bus. We should only be setting up I2C once (per port), not every scan.

This pull request breaks out i2c initialization parameters from an I2CScanRequest into an I2CInitRequest.

In the new, modified, workflow:

Notes: Marked OK if this PR is failing, there are breaking API changes (not integrated yet into application-level code)