Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #46

Open
wants to merge 8 commits into
base: rollback
Choose a base branch
from
Open

Master #46

wants to merge 8 commits into from

Conversation

bandit-thales
Copy link

No description provided.

rshartog and others added 8 commits February 20, 2016 09:55
These changes make the usiTwiSlave library fully interrupt driven.
The fundamental change is to explicitly determine when the I2C
master is done sending data [ in a Wire.beginTransmission() /
Wire.write() / Wire.endTransmission() set ] within the
Interrupt Service Routine (ISR) and then calling the
USI_RECEIVE_CALLBACK() function directly.

The TinyWireS_Stress_Master and TinyWires_Stress_Slave examples
have been modified. The most interesting change is that the slave
program now sleeps the Tiny85 CPU which was not possible with the
previous version of the usiTwiSlave library.

The TinyWireS_stop_check() call is no longer necessary in the main
loop because the receive callback routine is called directly from
the ISR. The TinyWireS_stop_check() function is still in the
TinyWireS library so that prior code that uses the library will
still compile and function, however, the TinyWireS_stop_check()
function is now empty.

Similarly, the tws_delay() is no longer necessary because its main
purpose was to call TinyWireS_stop_check() during a delay
operation. Regular delay() calls can be used in the main loop.
The tws_delay() function is still in the TinyWireS library so that
prior code that uses the library will still compile and function.
It is intact, but its call the TinyWireS_stop_check calls an empty
function.

The library changes and the TinyWireS_Stress_Master/_Slave programs
have been tested on Uno R3, Mega 2560, Leonardo, and MonkeyBoard
ESP8266 E12 boards.
Execute receive callback on repeated start in addition to doing so on a
stop.
This reverses the change done in a503849. That change changed the API
(even if it wasn't in a way visible through the methods) and failed to
match the way the library was intended to be used.

This once again makes it possible to send bodies larger than the buffer.
Execute request call for each byte requested
Interrupt driven request callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants