forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
canio: Initial implementation for SAM E5x MCUs #3425
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 all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
183649a
samd: move mcu_find_pin_function to header
jepler e7a213a
py: Add enum helper code
jepler a2e1867
_canio: Minimal implementation for SAM E5x MCUs
jepler 65ca1c7
_canio: Message: Setting data should set the size to match
jepler 37af9dd
Listener: fix doc markup, include in globals of its module
jepler f8dcf21
_canio: Add _canio.State enum-like class
jepler 635fcad
_canio.CAN: add error handling & bus state
jepler 1eb0587
correct docstring
jepler 40d4a69
more doc improvements
jepler ca32a81
main.c: Correct CANIO if-guard
jepler 2cb4707
Message: add extended address flag
jepler 27cbb69
_canio: Add listener matching
jepler 58b920e
fix whitespace
jepler a69b298
Whitespace
jepler 44c5b2b
Respond to review comments
jepler 67d8f10
Add CAN to SAM E51 clock config
jepler a76119a
add _canio to Feather M4 CAN
jepler c39ec15
_canio: Message: setting data clears rtr, and vice versa
jepler 09f8a83
samd: template.ld: put canram in its own output section
jepler 7fd6cab
canio: Make both tx and rx (but not both) optional
jepler df379b8
remove unneeded symbols
jepler fd9df16
canio: Message: remove size property
jepler 4e4853d
common.template.ld: remove unneeded line
jepler 9e8f182
canio.CAN: switch rx/tx, make both mandatory, move declarations around
jepler 493679d
CAN.listen: block until a message comes in or timeout is reached
jepler 4869dbd
canio: rename from _canio
jepler 85756fa
make translate
jepler a8147c1
Fix unintentional cross references
jepler 10245c0
canio: a few more stray _canios
jepler 59580d0
canio: Fix implementation bugs in atmel-sam
jepler 9fd9cf1
canio: fix bugs in shared-bindings
jepler 82f37c9
canio: fix read(), iterable bindings
jepler 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2020-09-16 17:07-0700\n" | ||
"POT-Creation-Date: 2020-09-21 16:45-0500\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -92,7 +92,11 @@ msgstr "" | |
msgid "%q must be a tuple of length 2" | ||
msgstr "" | ||
|
||
#: ports/atmel-samd/common-hal/sdioio/SDCard.c | ||
#: shared-bindings/canio/Match.c | ||
msgid "%q out of range" | ||
msgstr "" | ||
|
||
#: ports/atmel-samd/common-hal/microcontroller/Pin.c | ||
msgid "%q pin invalid" | ||
msgstr "" | ||
|
||
|
@@ -280,6 +284,10 @@ msgstr "" | |
msgid "All I2C peripherals are in use" | ||
msgstr "" | ||
|
||
#: ports/atmel-samd/common-hal/canio/Listener.c | ||
msgid "All RX FIFOs in use" | ||
msgstr "" | ||
|
||
#: ports/nrf/common-hal/busio/SPI.c | ||
msgid "All SPI peripherals are in use" | ||
msgstr "" | ||
|
@@ -316,6 +324,10 @@ msgstr "" | |
msgid "Already advertising." | ||
msgstr "" | ||
|
||
#: ports/atmel-samd/common-hal/canio/Listener.c | ||
msgid "Already have all-matches listener" | ||
msgstr "" | ||
|
||
#: shared-module/memorymonitor/AllocationAlarm.c | ||
#: shared-module/memorymonitor/AllocationSize.c | ||
msgid "Already running" | ||
|
@@ -752,7 +764,7 @@ msgstr "" | |
msgid "Error in regex" | ||
msgstr "" | ||
|
||
#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c | ||
#: py/enum.c shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c | ||
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c | ||
#: shared-bindings/neopixel_write/__init__.c | ||
#: shared-bindings/terminalio/Terminal.c | ||
|
@@ -845,6 +857,10 @@ msgstr "" | |
msgid "File exists" | ||
msgstr "" | ||
|
||
#: ports/atmel-samd/common-hal/canio/Listener.c | ||
msgid "Filters too complex" | ||
msgstr "" | ||
|
||
#: ports/cxd56/common-hal/camera/Camera.c | ||
msgid "Format not supported" | ||
msgstr "" | ||
|
@@ -1127,6 +1143,10 @@ msgstr "" | |
msgid "Maximum x value when mirrored is %d" | ||
msgstr "" | ||
|
||
#: shared-bindings/canio/Message.c | ||
msgid "Messages limited to 8 bytes" | ||
msgstr "" | ||
|
||
#: supervisor/shared/safe_mode.c | ||
msgid "MicroPython NLR jump failed. Likely memory corruption." | ||
msgstr "" | ||
|
@@ -2310,6 +2330,10 @@ msgstr "" | |
msgid "exceptions must derive from BaseException" | ||
msgstr "" | ||
|
||
#: shared-bindings/canio/CAN.c shared-bindings/canio/Listener.c | ||
msgid "expected '%q' but got '%q'" | ||
msgstr "" | ||
|
||
#: py/objstr.c | ||
msgid "expected ':' after format specifier" | ||
msgstr "" | ||
|
@@ -3147,6 +3171,10 @@ msgstr "" | |
msgid "source palette too large" | ||
msgstr "" | ||
|
||
#: shared-bindings/canio/Message.c | ||
msgid "specify size or data, but not both" | ||
msgstr "" | ||
|
||
#: py/objstr.c | ||
msgid "start/end indices" | ||
msgstr "" | ||
|
@@ -3261,7 +3289,7 @@ msgid "tuple/list has wrong length" | |
msgstr "" | ||
|
||
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c | ||
#: shared-bindings/busio/UART.c | ||
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c | ||
msgid "tx and rx cannot both be None" | ||
msgstr "" | ||
|
||
|
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ EXTERNAL_FLASH_DEVICES = GD25Q16C | |
LONGINT_IMPL = MPZ | ||
|
||
CIRCUITPY_VECTORIO = 1 | ||
CIRCUITPY_CANIO = 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ EXTERNAL_FLASH_DEVICES = "N25Q256A" | |
LONGINT_IMPL = MPZ | ||
|
||
CIRCUITPY_SDIOIO = 1 | ||
CIRCUITPY_CANIO = 1 |
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
Oops, something went wrong.
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.
(Not for this PR.) We should have a reset_common_hal that wraps all of these. Right now they are don't haphazard in reset_port.