rambo / TinyWire

My modifications to TinyWire Arduino libs
284 stars 121 forks source link

TX / RX Ring Buffer Improvements #22

Closed rshartog closed 8 years ago

rshartog commented 8 years ago

This change simplfies the RX and TX ring buffer management. The new code is 20 lines shorter and more readily understood (in my opinion). This change also allows the full size of the RX and TX buffers to be used by the request/receive callback functions. I also deleted some lines relating to a callback function, "_onTwiDataRequest()", for which there was no way in the code to assign the function pointer.

I verified these changes using the TinyWire_Stress_Slave and TinyWire_Stress_Master programs.

rshartog commented 8 years ago

I spent some time trying to understand GitHub, so hopefully I did this pull-request correctly this time, but it's clear that I'm a noob on GitHub. Please let me know if there's some part of the process I messed up or could have done better.

--Scott