forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature: shortcut I2C support for atmel-samd boards #841
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b0bacd9
review code
a10f04a
support for 2
bd7f603
zero + feather logger
cd1f662
formatting
cdeb7dd
fix non- builds
4e65752
feather m0 boards
ff6e6b5
best effort
fbb57f9
better error message
2c067ed
used pins.c instead of README.rst
8a35159
formatting, trailing newlines
e8e75c0
For the two boards without SCL and SDA can you still add the board gl…
0a185c4
Merge branch 'master' of https://github.com/adafruit/circuitpython in…
0511bec
Merge branch 'master' of https://github.com/adafruit/circuitpython in…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix non- builds
- Loading branch information
There are no files selected for viewing
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the frequency always fixed at 400000? If so, is this what is wanted? Can this be overridden somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't be over-ridden. What do you recommend? I'm still around for sprints tomorrow.
I followed what @tannewt recommended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can set your own fequency when you explicitly create the i2c object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah - so this is an alternative to the way we do it now? I'm just trying to understand what is being done, not objecting to it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to default to the board's standard I2C pins when they haven't been specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #340
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK - thanks for clarifying - so if you omit SCL/SDA it will trigger this. Will it still accept the full set of keyword arguments in the current API? Sorry if I am just confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It gives you a
board.I2C
that is an instance of the default I2C bus for the board, which you can then pass to your drivers. If you need to change the pins or frequency, construct your own I2C object instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK - that make sense - Thanks for explaining it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW - I think this will have a conflict with PR #829 but we can work that out