flipper-io / flipper

Flipper is a development platform that can be controlled from any programming language.
https://www.flipper.io/
Apache License 2.0
70 stars 15 forks source link

Refactor I2C driver put/get functions into push/pull #51

Closed nicholastmosher closed 7 years ago

nicholastmosher commented 8 years ago

@TravisWhitaker mentioned on a previous PR that he noticed a discrepancy that the I2C drivers used the terms put/get for functionality that is termed push/pull in similar drivers. I propose that we discuss the merits of refactoring the driver in C initially, then allow the authors of each language binding to compensate appropriately.

nicholastmosher commented 8 years ago

@georgemorgan is there a reason I shouldn't just go ahead and refactor the current I2C driver to use the terms push/pull? Also, we may want to consider moving the options such as setting the I2C mode and address into the configure function (or some other options function that can be called multiple times if configure shouldn't be), so that the rest of the API can fit the architecture of a bus. What are your thoughts?

georgemorgan commented 8 years ago

Sure. Go ahead. As you do so, just send us snippets of your structure for the virtual interface so we can verify that it's on the right track. Also, if you haven't had a chance to do so already, do some research on the 4S' I2C peripherals; it might help you formalize a better API.