When working on Badger I tried to design the interface to be as generic and 
applicable as possible: <https://github.com/PMunch/badger/blob/master/i2c.nim>. 
The idea is that every platform will have a static I2C object that details 
specifics about the platform and exposes one or more such `I2CBus` constants. 
Then the rest of the reader/writers takes this static object and uses it to 
perform I2C operations. This was used on an Arduino Teensy in a project with a 
great focus on small code footprint, so it should be an applicable interface 
for pretty much anything.

Reply via email to