stevemarple / SoftWire

Software I2C implementation for Arduino and other Wiring-type environments
GNU Lesser General Public License v2.1
136 stars 31 forks source link

Some minor improvements #4

Closed matthijskooijman closed 6 years ago

matthijskooijman commented 6 years ago

These commits add some minor improvements and allow clock stretching in more different places. See the commit message for details about each change.

matthijskooijman commented 6 years ago

There is also a commit that makes the _set* pointers public, so I can actually use them to do direct port I/O for more efficiency (see this sketch for how I use that), but this might need a more elegant way (setter methods?).

stevemarple commented 6 years ago

In 455eaadc2362596ac3a331a101d488c96259b93c void SoftWire::stop(void) const is asked to return a value which generates a compiler error in my version of the Arduino IDE. The first three commits looked good so I've cherry-picked those. Would you mind submitting a new pull request for a modified version of 455eaadc2362596ac3a331a101d488c96259b93c that changes the return type of stop() to result_t?

I've also added a Contributors section to the README and added your name to recognise the changes you provided above.

Thanks, Steve

matthijskooijman commented 6 years ago

Hm, seems I missed the warning from the compiler, w00ps. I've corrected the last commit and force-pushed it here, so you should be able to merge this PR (or just pick up the single commit from here). Thanks!

matthijskooijman commented 6 years ago

I just rebased this PR to make it apply again and did a bit of testing. Any chance this could be merged?

stevemarple commented 6 years ago

Accepted, thanks.

matthijskooijman commented 6 years ago

Thanks for merging!