-
Notifications
You must be signed in to change notification settings - Fork 121
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
bandit-thales
wants to merge
8
commits into
rollback
Choose a base branch
from
master
base: rollback
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Master #46
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.