Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update Wire peripheral handler#605

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
stonehippo wants to merge0 commits intoarduino:masterfromstonehippo:master

Conversation

@stonehippo
Copy link

The existing onService method for I2C peripheral (slave) implementation
swapped the sense of onRequest (master read) and onReceive (master
write) handlers. It also didn't handle writes correctly, requiring two
write operations to get bytes out of the buffer and in the onReceive
handler.

This implementation follows the SERCOM I2C flow defined for the
default clock-stretching case (CTRLB.SCLSM=0) as described in the
SAMD21 datasheet.

@stonehippo
Copy link
Author

I found a couple of issues that I've resolved, namely that NACKs needed to be sent at the end of the read or write logic to close down the connection. Should be all set now.

I'm using a version of this code locally to test out a custom peripheral and so far, it's working as expected (with the NACK fix in place).

@stonehippo
Copy link
Author

I've found bug here (the write NACK prevents reads). I'll fix that and push a revision to the PR.

@stonehippo
Copy link
Author

Ok, last bug (that I've found) smooshed. Would love a review of this and to see it get merged in.

@reufer
Copy link

works for me!

stonehippo reacted with thumbs up emoji

@stonehippo
Copy link
Author

It’s been a while since I submitted this PR. The checks failed due to issue that had nothing to do with the changes here. Any idea how to get this re-checked and maybe merged in?@per1234?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@stonehippo@reufer

[8]ページ先頭

©2009-2025 Movatter.jp