SoftwareWire icon indicating copy to clipboard operation
SoftwareWire copied to clipboard

Split endTransmission and requestFrom so function signaturess exactly…

Open AxTheB opened this issue 6 years ago • 3 comments

… match TwoWires, so it can be used in 3rd party libraries. (if/when Arduino makes beginTransmission, beginTransmission and requestFrom virtual)

AxTheB avatar Jan 16 '20 22:01 AxTheB

Agreed. Perhaps more is needed, for example making them virtual. The Arduino Wire.h for the AVR branch is from 2016 and the Wire.cpp from 2017. It seems that those files will not change a lot the coming years, so that is the goal to be compatible with.

Koepel avatar Jan 16 '20 22:01 Koepel

Yes, you have to make them virtual, but you have to do it in Wire.h. Having this merged is just a step on my quest to get it working upstream (or at least having less libraries to patch when deploying my hardware)

AxTheB avatar Feb 02 '20 10:02 AxTheB

Arduino Teams decided they didn't want to set up Virtual the functions in Wire.h.

It would still be useful match all functions with TwoWire API, but should be cheched if not only this two functions need modifications. If you like to do it, I'll accept the new PR Thank you

Testato avatar Jul 01 '21 18:07 Testato