Commit Graph

17634 Commits

Author SHA1 Message Date
Jeff Epler 82f37c9252 canio: fix read(), iterable bindings 2020-09-22 10:28:25 -05:00
root dbf8a9ad69 Changed delay calls to avoid conflicts with qspi_disable 2020-09-22 10:25:31 -05:00
DavePutz 7ad7e1cf64
Merge pull request #29 from adafruit/main
Update from adafruit/main
2020-09-22 10:13:18 -05:00
Jeff Epler 9fd9cf1138 canio: fix bugs in shared-bindings 2020-09-22 09:36:47 -05:00
Jeff Epler 59580d0f2d canio: Fix implementation bugs in atmel-sam 2020-09-22 09:36:29 -05:00
hierophect 9f892cdda8
Merge pull request #3451 from microDev1/patch-1
FIX : esp32s2 RTC support
2020-09-22 09:32:18 -04:00
microDev add230b4da
Update port.c 2020-09-22 11:37:12 +05:30
Mark Roberts 5536e574db Changes to compile cleanly 2020-09-21 22:08:16 -04:00
Mark Roberts 08189edf24 Quirk coded up for ...set_region_to_update 2020-09-21 21:07:42 -04:00
FoamyGuy ff1a90a9c3 Merge branch 'adafruit_main' into sdcard_odb_fix 2020-09-21 17:58:05 -05:00
Mark Roberts f21dc253e0 Initial commit bool column_and_page_addressing 2020-09-21 18:42:16 -04:00
Jeff Epler 10245c0ff8 canio: a few more stray _canios 2020-09-21 17:04:30 -05:00
Jeff Epler a8147c125c Fix unintentional cross references 2020-09-21 16:47:28 -05:00
Jeff Epler 85756fa0cd make translate 2020-09-21 16:45:51 -05:00
Jeff Epler 4869dbdc67 canio: rename from _canio
This reflects our belief that the API is stable enough to avoid incompatible changes during 6.x.
2020-09-21 16:44:26 -05:00
Jeff Epler 493679da3b CAN.listen: block until a message comes in or timeout is reached 2020-09-21 16:44:26 -05:00
Jeff Epler 9e8f1820c8 canio.CAN: switch rx/tx, make both mandatory, move declarations around 2020-09-21 16:44:26 -05:00
Jeff Epler 4e4853dcb2 common.template.ld: remove unneeded line 2020-09-21 16:44:26 -05:00
Jeff Epler fd9df164c0 canio: Message: remove size property
This is just duplicating what len(message.data) gives you.
2020-09-21 16:44:26 -05:00
Jeff Epler df379b84cb remove unneeded symbols 2020-09-21 16:44:26 -05:00
Jeff Epler 7fd6cab2ac canio: Make both tx and rx (but not both) optional
.. loopback and silent come from the (optional) constructor parameters
not guessing based on the pin specification

.. docstring & comment improvements
2020-09-21 16:44:26 -05:00
Jeff Epler 09f8a83a75 samd: template.ld: put canram in its own output section 2020-09-21 16:44:26 -05:00
Jeff Epler c39ec1581e _canio: Message: setting data clears rtr, and vice versa 2020-09-21 16:44:26 -05:00
Jeff Epler a76119afcb add _canio to Feather M4 CAN 2020-09-21 16:44:26 -05:00
Jeff Epler 67d8f108bb Add CAN to SAM E51 clock config 2020-09-21 16:44:26 -05:00
Jeff Epler 44c5b2bbb1 Respond to review comments
Thanks @tannewt!
2020-09-21 16:44:26 -05:00
Jeff Epler a69b298aed Whitespace 2020-09-21 16:44:26 -05:00
Jeff Epler 58b920ed97 fix whitespace 2020-09-21 16:44:26 -05:00
Jeff Epler 27cbb690e5 _canio: Add listener matching
Lightly tested:
 * no matches (catch-all)
 * standard address single address matches (even and odd positions)
 * standard address mask matches
 * only tested that extended doesn't match non-extended
2020-09-21 16:44:26 -05:00
Jeff Epler 2cb4707f92 Message: add extended address flag 2020-09-21 16:44:26 -05:00
Jeff Epler ca32a81bf1 main.c: Correct CANIO if-guard 2020-09-21 16:44:26 -05:00
Jeff Epler 40d4a69133 more doc improvements 2020-09-21 16:44:26 -05:00
Jeff Epler 1eb0587917 correct docstring 2020-09-21 16:44:26 -05:00
Jeff Epler 635fcadb59 _canio.CAN: add error handling & bus state 2020-09-21 16:44:26 -05:00
Jeff Epler f8dcf2118e _canio: Add _canio.State enum-like class 2020-09-21 16:44:26 -05:00
Jeff Epler 37af9dde90 Listener: fix doc markup, include in globals of its module 2020-09-21 16:44:26 -05:00
Jeff Epler 65ca1c7bbc _canio: Message: Setting data should set the size to match 2020-09-21 16:44:26 -05:00
Jeff Epler a2e1867f69 _canio: Minimal implementation for SAM E5x MCUs
Tested & working:

 * Send standard packets
 * Receive standard packets (1 FIFO, no filter)

Interoperation between SAM E54 Xplained running this tree and
MicroPython running on STM32F405 Feather with an external
transceiver was also tested.

Many other aspects of a full implementation are not yet present,
such as error detection and recovery.
2020-09-21 16:44:26 -05:00
Jeff Epler e7a213a114 py: Add enum helper code
This makes it much easier to implement enums, and the printing code is
shared.  We might want to convert other enums to this in the future.
2020-09-21 16:44:26 -05:00
Jeff Epler 183649aad8 samd: move mcu_find_pin_function to header
.. it'll be used in can as well as sdio
2020-09-21 16:44:07 -05:00
Lucian Copeland 22d9a94f2b Use write_value, add missing pin exceptions 2020-09-21 13:47:14 -04:00
Scott Shawcroft df067b498d
Merge pull request #3446 from jepler/python35-compression-fix
makeqstrdata: Work around python3.5/3.6 compatibility problem
2020-09-21 10:35:00 -07:00
Scott Shawcroft c963771b4b
Merge pull request #3445 from microDev1/boardInfo
Update microS2 config files
2020-09-21 10:33:38 -07:00
Jeff Epler 0318eb359f makeqstrdata: Work around python3.6 compatibility problem
Discord user Folknology encountered a problem building with Python 3.6.9,
`TypeError: ord() expected a character, but string of length 0 found`.

I was able to reproduce the problem using Python3.5*, and discovered that
the meaning of the regular expression `"|."` had changed in 3.7.  Before,
```
>>> [m.group(0) for m in re.finditer("|.", "hello")]
['', '', '', '', '', '']
```
After:
```
>>> [m.group(0) for m in re.finditer("|.", "hello")]
['', 'h', '', 'e', '', 'l', '', 'l', '', 'o', '']
```
Check if `words` is empty and if so use `"."` as the regular expression
instead.  This gives the same result on both versions:
```
['h', 'e', 'l', 'l', 'o']
```
and fixes the generation of the huffman dictionary.

Folknology verified that this fix worked for them.

 * I could easily install 3.5 but not 3.6.  3.5 reproduced the same problem
2020-09-21 10:03:07 -05:00
microDev 40ec7a66e4
Update microS2 config files 2020-09-21 14:39:31 +05:30
Dan Halbert 8eda9174b2
Merge pull request #3443 from jepler/python-version-compat
makeqstrdata: Work with older Python
2020-09-20 10:18:21 -04:00
Jeff Epler ce266425e1
Merge pull request #3441 from hierophect/stm32-rgbmatrix-crashfix
STM32: Add never_reset reservation to RGBMatrix init
2020-09-20 07:51:09 -05:00
Dan Halbert 9d9bc5adee
Merge pull request #3428 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-09-19 15:20:39 -04:00
Wellington Terumi Uemura 54001079f7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (800 of 800 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-09-19 19:41:29 +02:00
Hosted Weblate ed9173498f Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-09-19 19:41:29 +02:00