Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Arduino Core for SAMD21 CPU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
josc941e
Arduino Core for SAMD21 CPU
Commits
9a7f2be3
Commit
9a7f2be3
authored
9 years ago
by
Sandeep Mistry
Browse files
Options
Downloads
Patches
Plain Diff
Wire slave sender working with stops and with repeated starts
parent
ab2ed909
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/Wire/Wire.cpp
+5
-1
5 additions, 1 deletion
libraries/Wire/Wire.cpp
with
5 additions
and
1 deletion
libraries/Wire/Wire.cpp
+
5
−
1
View file @
9a7f2be3
...
...
@@ -220,7 +220,7 @@ void TwoWire::onService(void)
if
(
sercom
->
isSlaveWIRE
()
)
{
if
(
sercom
->
isStopDetectedWIRE
()
||
(
sercom
->
isAddressMatch
()
&&
sercom
->
isRestartDetectedWIRE
()))
//Stop or Restart detected
(
sercom
->
isAddressMatch
()
&&
sercom
->
isRestartDetectedWIRE
()
&&
!
sercom
->
isMasterReadOperationWIRE
()
))
//Stop or Restart detected
{
sercom
->
prepareAckBitWIRE
();
sercom
->
prepareCommandBitsWire
(
0x03
);
...
...
@@ -240,6 +240,10 @@ void TwoWire::onService(void)
if
(
sercom
->
isMasterReadOperationWIRE
())
//Is a request ?
{
// wait for data ready flag,
// before calling request callback
while
(
!
sercom
->
isDataReadyWIRE
());
//Calling onRequestCallback, if exists
if
(
onRequestCallback
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment