Merge remote-tracking branch 'upstream/master' into stm32-docfix

This commit is contained in:
Lucian Copeland 2020-04-23 13:39:48 -04:00
commit c6c77726e7
85 changed files with 2537 additions and 451 deletions

View File

@ -200,6 +200,7 @@ jobs:
- "monster_m4sk" - "monster_m4sk"
- "ndgarage_ndbit6" - "ndgarage_ndbit6"
- "nfc_copy_cat" - "nfc_copy_cat"
- "nucleo_f746zg"
- "nucleo_f767zi" - "nucleo_f767zi"
- "nucleo_h743zi_2" - "nucleo_h743zi_2"
- "ohs2020_badge" - "ohs2020_badge"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -53,7 +53,7 @@ msgstr "output:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -328,7 +328,7 @@ msgstr ""
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -365,9 +365,9 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Kedua pin harus mendukung hardware interrut" msgstr "Kedua pin harus mendukung hardware interrut"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -834,6 +834,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -869,7 +874,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "" msgstr ""
@ -924,7 +929,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Pin tidak valid" msgstr "Pin tidak valid"
@ -1039,7 +1044,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1127,7 +1132,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1207,7 +1212,7 @@ msgstr "Pin tidak mempunya kemampuan untuk ADC (Analog Digital Converter)"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1233,11 +1238,6 @@ msgstr ""
"Tekan tombol apa saja untuk masuk ke dalam REPL. Gunakan CTRL+D untuk reset " "Tekan tombol apa saja untuk masuk ke dalam REPL. Gunakan CTRL+D untuk reset "
"(Reload)" "(Reload)"
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "" msgstr ""
@ -2817,12 +2817,12 @@ msgstr "anotasi return harus sebuah identifier"
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 12:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -53,7 +53,7 @@ msgstr ""
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -326,7 +326,7 @@ msgstr ""
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -361,9 +361,9 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -823,6 +823,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -858,7 +863,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "" msgstr ""
@ -913,7 +918,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "" msgstr ""
@ -1028,7 +1033,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1116,7 +1121,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1195,7 +1200,7 @@ msgstr ""
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1219,11 +1224,6 @@ msgstr ""
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "" msgstr ""
@ -2792,12 +2792,12 @@ msgstr ""
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n" "Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@ -55,7 +55,7 @@ msgstr " Ausgabe:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c erwartet int oder char" msgstr "%%c erwartet int oder char"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -328,7 +328,7 @@ msgstr "Array muss Halbwörter enthalten (type 'H')"
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "Array-Werte sollten aus Einzelbytes bestehen." msgstr "Array-Werte sollten aus Einzelbytes bestehen."
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -365,9 +365,9 @@ msgstr "Bit depth muss ein Vielfaches von 8 sein."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Beide pins müssen Hardware Interrupts unterstützen" msgstr "Beide pins müssen Hardware Interrupts unterstützen"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "Die Helligkeit muss zwischen 0 und 1.0 liegen" msgstr "Die Helligkeit muss zwischen 0 und 1.0 liegen"
@ -831,6 +831,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -866,7 +871,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Ungültiges Argument" msgstr "Ungültiges Argument"
@ -921,7 +926,7 @@ msgstr "Ungültige Phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Ungültiger Pin" msgstr "Ungültiger Pin"
@ -1037,7 +1042,7 @@ msgstr "Muss eine %q Unterklasse sein."
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1125,7 +1130,7 @@ msgstr "Kein Speicherplatz mehr verfügbar auf dem Gerät"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Keine solche Datei/Verzeichnis" msgstr "Keine solche Datei/Verzeichnis"
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1210,7 +1215,7 @@ msgstr "Pin hat keine ADC Funktionalität"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1236,11 +1241,6 @@ msgstr ""
"Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu " "Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu "
"laden" "laden"
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "Pull wird nicht verwendet, wenn die Richtung output ist." msgstr "Pull wird nicht verwendet, wenn die Richtung output ist."
@ -2830,12 +2830,12 @@ msgstr "return annotation muss ein identifier sein"
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -53,7 +53,7 @@ msgstr ""
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -326,7 +326,7 @@ msgstr ""
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -361,9 +361,9 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -823,6 +823,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -858,7 +863,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "" msgstr ""
@ -913,7 +918,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "" msgstr ""
@ -1028,7 +1033,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1116,7 +1121,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1195,7 +1200,7 @@ msgstr ""
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1219,11 +1224,6 @@ msgstr ""
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "" msgstr ""
@ -2792,12 +2792,12 @@ msgstr ""
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n" "Language-Team: @sommersoft, @MrCertainly\n"
@ -55,7 +55,7 @@ msgstr ""
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -328,7 +328,7 @@ msgstr ""
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -365,9 +365,9 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -827,6 +827,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -862,7 +867,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "" msgstr ""
@ -917,7 +922,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "" msgstr ""
@ -1032,7 +1037,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1120,7 +1125,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1199,7 +1204,7 @@ msgstr "Belay that! Th' Pin be not ADC capable"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1223,11 +1228,6 @@ msgstr ""
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "" msgstr ""
@ -2796,12 +2796,12 @@ msgstr ""
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -55,7 +55,7 @@ msgstr " salida:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c requiere int o char" msgstr "%%c requiere int o char"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -330,7 +330,7 @@ msgstr "Array debe contener media palabra (type 'H')"
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "Valores del array deben ser bytes individuales." msgstr "Valores del array deben ser bytes individuales."
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -367,9 +367,9 @@ msgstr "Bits depth debe ser múltiplo de 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Ambos pines deben soportar interrupciones por hardware" msgstr "Ambos pines deben soportar interrupciones por hardware"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -831,6 +831,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -866,7 +871,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Argumento inválido" msgstr "Argumento inválido"
@ -921,7 +926,7 @@ msgstr "Fase inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Pin inválido" msgstr "Pin inválido"
@ -1036,7 +1041,7 @@ msgstr "Debe de ser una subclase de %q"
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1124,7 +1129,7 @@ msgstr "No queda espacio en el dispositivo"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "No existe el archivo/directorio" msgstr "No existe el archivo/directorio"
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1209,7 +1214,7 @@ msgstr "Pin no tiene capacidad ADC"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1235,11 +1240,6 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
"Presiona cualquier tecla para entrar al REPL. Usa CTRL-D para recargar." "Presiona cualquier tecla para entrar al REPL. Usa CTRL-D para recargar."
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "Pull no se usa cuando la dirección es output." msgstr "Pull no se usa cuando la dirección es output."
@ -2830,12 +2830,12 @@ msgstr "la anotación de retorno debe ser un identificador"
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "retorno esperado '%q' pero se obtuvo '%q'" msgstr "retorno esperado '%q' pero se obtuvo '%q'"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n" "Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n" "Language-Team: fil\n"
@ -53,7 +53,7 @@ msgstr " output:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c nangangailangan ng int o char" msgstr "%%c nangangailangan ng int o char"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -330,7 +330,7 @@ msgstr "May halfwords (type 'H') dapat ang array"
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "Array values ay dapat single bytes." msgstr "Array values ay dapat single bytes."
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -367,9 +367,9 @@ msgstr "Bit depth ay dapat multiple ng 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Ang parehong mga pin ay dapat na sumusuporta sa hardware interrupts" msgstr "Ang parehong mga pin ay dapat na sumusuporta sa hardware interrupts"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -839,6 +839,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -874,7 +879,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Maling argumento" msgstr "Maling argumento"
@ -929,7 +934,7 @@ msgstr "Mali ang phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Mali ang pin" msgstr "Mali ang pin"
@ -1044,7 +1049,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1132,7 +1137,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Walang file/directory" msgstr "Walang file/directory"
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1215,7 +1220,7 @@ msgstr "Ang pin ay walang kakayahan sa ADC"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1241,11 +1246,6 @@ msgstr ""
"Pindutin ang anumang key upang pumasok sa REPL. Gamitin ang CTRL-D upang i-" "Pindutin ang anumang key upang pumasok sa REPL. Gamitin ang CTRL-D upang i-"
"reload." "reload."
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "Pull hindi ginagamit kapag ang direksyon ay output." msgstr "Pull hindi ginagamit kapag ang direksyon ay output."
@ -2844,12 +2844,12 @@ msgstr "return annotation ay dapat na identifier"
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "return umasa ng '%q' pero ang nakuha ay %q" msgstr "return umasa ng '%q' pero ang nakuha ay %q"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 0.1\n" "Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2019-04-14 20:05+0100\n" "PO-Revision-Date: 2019-04-14 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n" "Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n" "Language-Team: fr\n"
@ -55,7 +55,7 @@ msgstr " sortie:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c nécessite un entier 'int' ou un caractère 'char'" msgstr "%%c nécessite un entier 'int' ou un caractère 'char'"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -334,7 +334,7 @@ msgstr "Le tableau doit contenir des demi-mots (type 'H')"
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "Les valeurs du tableau doivent être des octets simples 'bytes'." msgstr "Les valeurs du tableau doivent être des octets simples 'bytes'."
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -371,9 +371,9 @@ msgstr "La profondeur de bit doit être un multiple de 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Les deux entrées doivent supporter les interruptions matérielles" msgstr "Les deux entrées doivent supporter les interruptions matérielles"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -842,6 +842,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -878,7 +883,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Argument invalide" msgstr "Argument invalide"
@ -935,7 +940,7 @@ msgstr "Phase invalide"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Broche invalide" msgstr "Broche invalide"
@ -1051,7 +1056,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1139,7 +1144,7 @@ msgstr "Il n'y a plus d'espace libre sur le périphérique"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Fichier/dossier introuvable" msgstr "Fichier/dossier introuvable"
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1229,7 +1234,7 @@ msgstr "La broche ne peut être utilisée pour l'ADC"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1254,11 +1259,6 @@ msgstr ""
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger." msgstr "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger."
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'."
@ -2876,12 +2876,12 @@ msgstr "l'annotation de return doit être un identifiant"
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "return attendait '%q' mais a reçu '%q'" msgstr "return attendait '%q' mais a reçu '%q'"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n" "Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -53,7 +53,7 @@ msgstr " output:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c necessita di int o char" msgstr "%%c necessita di int o char"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -329,7 +329,7 @@ msgstr "Array deve avere mezzoparole (typo 'H')"
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "Valori di Array dovrebbero essere bytes singulari" msgstr "Valori di Array dovrebbero essere bytes singulari"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -367,9 +367,9 @@ msgstr "La profondità di bit deve essere multipla di 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Entrambi i pin devono supportare gli interrupt hardware" msgstr "Entrambi i pin devono supportare gli interrupt hardware"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -839,6 +839,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -874,7 +879,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Argomento non valido" msgstr "Argomento non valido"
@ -931,7 +936,7 @@ msgstr "Fase non valida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Pin non valido" msgstr "Pin non valido"
@ -1048,7 +1053,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1136,7 +1141,7 @@ msgstr "Non che spazio sul dispositivo"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Nessun file/directory esistente" msgstr "Nessun file/directory esistente"
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1224,7 +1229,7 @@ msgstr "Il pin non ha capacità di ADC"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1250,11 +1255,6 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
"Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare." "Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare."
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "" msgstr ""
@ -2851,12 +2851,12 @@ msgstr ""
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "return aspettava '%q' ma ha ottenuto '%q'" msgstr "return aspettava '%q' ma ha ottenuto '%q'"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2019-05-06 14:22-0700\n" "PO-Revision-Date: 2019-05-06 14:22-0700\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -55,7 +55,7 @@ msgstr " 산출:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c 전수(int)또는 캐릭터(char)필요합니다" msgstr "%%c 전수(int)또는 캐릭터(char)필요합니다"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -328,7 +328,7 @@ msgstr ""
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -365,9 +365,9 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -827,6 +827,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -862,7 +867,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "" msgstr ""
@ -917,7 +922,7 @@ msgstr "단계가 잘못되었습니다"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "핀이 잘못되었습니다" msgstr "핀이 잘못되었습니다"
@ -1032,7 +1037,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1120,7 +1125,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1199,7 +1204,7 @@ msgstr ""
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1223,11 +1228,6 @@ msgstr ""
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "" msgstr ""
@ -2797,12 +2797,12 @@ msgstr ""
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n"
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n" "Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
"Language-Team: pl\n" "Language-Team: pl\n"
@ -54,7 +54,7 @@ msgstr " wyjście:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c wymaga int lub char" msgstr "%%c wymaga int lub char"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -327,7 +327,7 @@ msgstr "Tablica musi zawierać pół-słowa (typ 'H')"
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "Wartości powinny być bajtami." msgstr "Wartości powinny być bajtami."
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -364,9 +364,9 @@ msgstr "Głębia musi być wielokrotnością 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Obie nóżki muszą wspierać przerwania sprzętowe" msgstr "Obie nóżki muszą wspierać przerwania sprzętowe"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -828,6 +828,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -863,7 +868,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Zły argument" msgstr "Zły argument"
@ -918,7 +923,7 @@ msgstr "Zła faza"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Zła nóżka" msgstr "Zła nóżka"
@ -1033,7 +1038,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1121,7 +1126,7 @@ msgstr "Brak miejsca"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Brak pliku/katalogu" msgstr "Brak pliku/katalogu"
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1200,7 +1205,7 @@ msgstr "Nóżka nie obsługuje ADC"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1224,11 +1229,6 @@ msgstr ""
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "Dowolny klawisz aby uruchomić konsolę. CTRL-D aby przeładować." msgstr "Dowolny klawisz aby uruchomić konsolę. CTRL-D aby przeładować."
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "Podciągnięcie nieużywane w trybie wyjścia." msgstr "Podciągnięcie nieużywane w trybie wyjścia."
@ -2802,12 +2802,12 @@ msgstr "anotacja wartości musi być identyfikatorem"
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "return oczekiwał '%q', a jest '%q'" msgstr "return oczekiwał '%q', a jest '%q'"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -53,7 +53,7 @@ msgstr " saída:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c requer int ou char" msgstr "%%c requer int ou char"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -329,7 +329,7 @@ msgstr "Array deve conter meias palavras (tipo 'H')"
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -364,9 +364,9 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Ambos os pinos devem suportar interrupções de hardware" msgstr "Ambos os pinos devem suportar interrupções de hardware"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "" msgstr ""
@ -832,6 +832,11 @@ msgstr ""
msgid "Internal define error" msgid "Internal define error"
msgstr "" msgstr ""
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -867,7 +872,7 @@ msgstr ""
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "" msgstr ""
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Argumento inválido" msgstr "Argumento inválido"
@ -924,7 +929,7 @@ msgstr "Fase Inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Pino inválido" msgstr "Pino inválido"
@ -1040,7 +1045,7 @@ msgstr ""
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1128,7 +1133,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1210,7 +1215,7 @@ msgstr "O pino não tem recursos de ADC"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1235,11 +1240,6 @@ msgstr ""
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "" msgstr ""
@ -2814,12 +2814,12 @@ msgstr ""
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: circuitpython-cn\n" "Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-15 10:24-0400\n" "POT-Creation-Date: 2020-04-17 18:44-0500\n"
"PO-Revision-Date: 2019-04-13 10:10-0700\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n"
"Last-Translator: hexthat\n" "Last-Translator: hexthat\n"
"Language-Team: Chinese Hanyu Pinyin\n" "Language-Team: Chinese Hanyu Pinyin\n"
@ -60,7 +60,7 @@ msgstr " shūchū:\n"
msgid "%%c requires int or char" msgid "%%c requires int or char"
msgstr "%%c xūyào zhěngshù huò char" msgstr "%%c xūyào zhěngshù huò char"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
msgstr "" msgstr ""
@ -333,7 +333,7 @@ msgstr "Shùzǔ bìxū bāohán bàn zìshù (type 'H')"
msgid "Array values should be single bytes." msgid "Array values should be single bytes."
msgstr "Shùzǔ zhí yīnggāi shì dāngè zì jié." msgstr "Shùzǔ zhí yīnggāi shì dāngè zì jié."
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "At most %d %q may be specified (not %d)" msgid "At most %d %q may be specified (not %d)"
msgstr "" msgstr ""
@ -370,9 +370,9 @@ msgstr "Bǐtè shēndù bìxū shì 8 bèi yǐshàng."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Liǎng gè yǐn jiǎo dōu bìxū zhīchí yìngjiàn zhōngduàn" msgstr "Liǎng gè yǐn jiǎo dōu bìxū zhīchí yìngjiàn zhōngduàn"
#: shared-bindings/_protomatter/Protomatter.c
#: shared-bindings/displayio/Display.c #: shared-bindings/displayio/Display.c
#: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "Brightness must be 0-1.0" msgid "Brightness must be 0-1.0"
msgstr "Liàngdù bìxū wèi 0-1.0" msgstr "Liàngdù bìxū wèi 0-1.0"
@ -836,6 +836,11 @@ msgstr "Jiāmì bùzú"
msgid "Internal define error" msgid "Internal define error"
msgstr "Nèibù dìngyì cuòwù" msgstr "Nèibù dìngyì cuòwù"
#: shared-module/rgbmatrix/RGBMatrix.c
#, c-format
msgid "Internal error #%d"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin" msgid "Invalid %q pin"
@ -871,7 +876,7 @@ msgstr "Wúxiào de SPI yǐn jiǎo xuǎnzé"
msgid "Invalid UART pin selection" msgid "Invalid UART pin selection"
msgstr "Wúxiào de UART yǐn jiǎo xuǎnzé" msgstr "Wúxiào de UART yǐn jiǎo xuǎnzé"
#: py/moduerrno.c shared-module/_protomatter/Protomatter.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Wúxiào de cānshù" msgstr "Wúxiào de cānshù"
@ -926,7 +931,7 @@ msgstr "Jiēduàn wúxiào"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/touchio/TouchIn.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c
#: shared-bindings/pulseio/PWMOut.c shared-module/_protomatter/Protomatter.c #: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin" msgid "Invalid pin"
msgstr "Wúxiào de yǐn jiǎo" msgstr "Wúxiào de yǐn jiǎo"
@ -1041,7 +1046,7 @@ msgstr "Bìxū shì %q zi lèi."
msgid "Must provide MISO or MOSI pin" msgid "Must provide MISO or MOSI pin"
msgstr "Bìxū tígōng MISO huò MOSI yǐn jiǎo" msgstr "Bìxū tígōng MISO huò MOSI yǐn jiǎo"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "Must use a multiple of 6 rgb pins, not %d" msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "" msgstr ""
@ -1129,7 +1134,7 @@ msgstr "Shèbèi shàng méiyǒu kònggé"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Méiyǒu cǐ lèi wénjiàn/mùlù" msgstr "Méiyǒu cǐ lèi wénjiàn/mùlù"
#: shared-module/_protomatter/Protomatter.c #: shared-module/rgbmatrix/RGBMatrix.c
msgid "No timer available" msgid "No timer available"
msgstr "" msgstr ""
@ -1214,7 +1219,7 @@ msgstr "Pin méiyǒu ADC nénglì"
msgid "Pin number already reserved by EXTI" msgid "Pin number already reserved by EXTI"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "" msgid ""
"Pinout uses %d bytes per element, which consumes more than the ideal %d " "Pinout uses %d bytes per element, which consumes more than the ideal %d "
@ -1238,11 +1243,6 @@ msgstr "Qiánzhuì huǎnchōng qū bìxū zài duī shàng"
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "Àn xià rènhé jiàn jìnrù REPL. Shǐyòng CTRL-D chóngxīn jiāzài." msgstr "Àn xià rènhé jiàn jìnrù REPL. Shǐyòng CTRL-D chóngxīn jiāzài."
#: shared-module/_protomatter/Protomatter.c
#, c-format
msgid "Protomatter internal error #%d"
msgstr ""
#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng." msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng."
@ -2831,12 +2831,12 @@ msgstr "fǎnhuí zhùshì bìxū shì biāozhì fú"
msgid "return expected '%q' but got '%q'" msgid "return expected '%q' but got '%q'"
msgstr "fǎnhuí yùqí de '%q' dàn huòdéle '%q'" msgstr "fǎnhuí yùqí de '%q' dàn huòdéle '%q'"
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] duplicates another pin assignment" msgid "rgb_pins[%d] duplicates another pin assignment"
msgstr "" msgstr ""
#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format #, c-format
msgid "rgb_pins[%d] is not on the same port as clock" msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "" msgstr ""

View File

@ -14,7 +14,7 @@ CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_NETWORK = 0 CIRCUITPY_NETWORK = 0
CIRCUITPY_PROTOMATTER = 0 CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0 CIRCUITPY_PS2IO = 0
CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_AUDIOMP3 = 0

View File

@ -3,7 +3,8 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries, 2020 Radomir
* Dopieralski
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -79,7 +80,7 @@ uint8_t display_init_sequence[] = {
0xc4, 2, 0x8a, 0xee, 0xc4, 2, 0x8a, 0xee,
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x2a, 0, // _INVOFF 0x2a, 0, // _INVOFF
0x36, 1, 0xa8, // _MADCTL 0x36, 1, 0xa0, // _MADCTL
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie, // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie,
// fix on VTL // fix on VTL
0x3a, 1, 0x05, // COLMOD - 16bit color 0x3a, 1, 0x05, // COLMOD - 16bit color

View File

@ -17,7 +17,7 @@ CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_GAMEPAD = 0 CIRCUITPY_GAMEPAD = 0
CIRCUITPY_PROTOMATTER = 0 CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0 CIRCUITPY_PS2IO = 0
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice

View File

@ -19,7 +19,7 @@ CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0
CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_PROTOMATTER = 0 CIRCUITPY_RGBMATRIX = 0
# Include these Python libraries in firmware. # Include these Python libraries in firmware.
#FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice #FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice

View File

@ -3,7 +3,8 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries, 2020 Radomir
* Dopieralski
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -52,7 +53,7 @@ uint8_t display_init_sequence[] = {
0xc4, 2, 0x8a, 0xee, 0xc4, 2, 0x8a, 0xee,
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x2a, 0, // _INVOFF 0x2a, 0, // _INVOFF
0x36, 1, 0xa0, // _MADCTL bottom to top refresh 0x36, 1, 0xa8, // _MADCTL bottom to top refresh
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie,
// fix on VTL // fix on VTL
0x3a, 1, 0x05, // COLMOD - 16bit color 0x3a, 1, 0x05, // COLMOD - 16bit color

View File

@ -28,7 +28,7 @@ CIRCUITPY_GAMEPAD = 0
CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_NETWORK = 0 CIRCUITPY_NETWORK = 0
CIRCUITPY_TOUCHIO = 0 CIRCUITPY_TOUCHIO = 0
CIRCUITPY_PROTOMATTER = 0 CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0 CIRCUITPY_PS2IO = 0
CIRCUITPY_USB_HID = 0 CIRCUITPY_USB_HID = 0
CIRCUITPY_RTC = 0 CIRCUITPY_RTC = 0

View File

@ -26,7 +26,7 @@ CIRCUITPY_GAMEPAD = 0
CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_NETWORK = 0 CIRCUITPY_NETWORK = 0
CIRCUITPY_TOUCHIO = 0 CIRCUITPY_TOUCHIO = 0
CIRCUITPY_PROTOMATTER = 0 CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0 CIRCUITPY_PS2IO = 0
CIRCUITPY_USB_HID = 0 CIRCUITPY_USB_HID = 0

View File

@ -26,12 +26,12 @@
#include <stddef.h> #include <stddef.h>
#include "common-hal/_protomatter/Protomatter.h" #include "common-hal/rgbmatrix/RGBMatrix.h"
#include "samd/timers.h" #include "samd/timers.h"
#include "timer_handler.h" #include "timer_handler.h"
void *common_hal_protomatter_timer_allocate() { void *common_hal_rgbmatrix_timer_allocate() {
uint8_t timer_index = find_free_timer(); uint8_t timer_index = find_free_timer();
if (timer_index == 0xff) { if (timer_index == 0xff) {
return NULL; return NULL;
@ -49,16 +49,16 @@ static uint8_t tc_index_from_ptr(void* ptr) {
return 0xff; return 0xff;
} }
void common_hal_protomatter_timer_enable(void* ptr) { void common_hal_rgbmatrix_timer_enable(void* ptr) {
uint8_t timer_index = tc_index_from_ptr(ptr); uint8_t timer_index = tc_index_from_ptr(ptr);
if (timer_index == 0xff) { if (timer_index == 0xff) {
return; return;
} }
set_timer_handler(true, timer_index, TC_HANDLER_PROTOMATTER); set_timer_handler(true, timer_index, TC_HANDLER_RGBMATRIX);
turn_on_clocks(true, timer_index, 1); turn_on_clocks(true, timer_index, 1);
} }
void common_hal_protomatter_timer_disable(void* ptr) { void common_hal_rgbmatrix_timer_disable(void* ptr) {
uint8_t timer_index = tc_index_from_ptr(ptr); uint8_t timer_index = tc_index_from_ptr(ptr);
if (timer_index == 0xff) { if (timer_index == 0xff) {
return; return;
@ -67,7 +67,7 @@ void common_hal_protomatter_timer_disable(void* ptr) {
tc_set_enable(ptr, false); tc_set_enable(ptr, false);
} }
void common_hal_protomatter_timer_free(void* ptr) { void common_hal_rgbmatrix_timer_free(void* ptr) {
uint8_t timer_index = tc_index_from_ptr(ptr); uint8_t timer_index = tc_index_from_ptr(ptr);
if (timer_index == 0xff) { if (timer_index == 0xff) {
return; return;

View File

@ -24,12 +24,12 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PROTOMATTER_PROTOMATTER_H #ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_RGBMATRIX_RGBMATRIX_H
#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PROTOMATTER_PROTOMATTER_H #define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_RGBMATRIX_RGBMATRIX_H
void *common_hal_protomatter_timer_allocate(void); void *common_hal_rgbmatrix_timer_allocate(void);
void common_hal_protomatter_timer_enable(void*); void common_hal_rgbmatrix_timer_enable(void*);
void common_hal_protomatter_timer_disable(void*); void common_hal_rgbmatrix_timer_disable(void*);
void common_hal_protomatter_timer_free(void*); void common_hal_rgbmatrix_timer_free(void*);
#endif #endif

View File

@ -70,9 +70,9 @@ CIRCUITPY_ULAB = 1
endif endif
endif endif
ifndef CIRCUITPY_PROTOMATTER ifndef CIRCUITPY_RGBMATRIX
ifneq ($(CIRCUITPY_FULL_BUILD),0) ifneq ($(CIRCUITPY_FULL_BUILD),0)
CIRCUITPY_PROTOMATTER = 1 CIRCUITPY_RGBMATRIX = 1
endif endif
endif endif

View File

@ -64,8 +64,8 @@ void shared_timer_handler(bool is_tc, uint8_t index) {
frequencyin_interrupt_handler(index); frequencyin_interrupt_handler(index);
#endif #endif
break; break;
case TC_HANDLER_PROTOMATTER: case TC_HANDLER_RGBMATRIX:
#if CIRCUITPY_PROTOMATTER #if CIRCUITPY_RGBMATRIX
_PM_IRQ_HANDLER(); _PM_IRQ_HANDLER();
#endif #endif
break; break;

View File

@ -30,7 +30,7 @@
#define TC_HANDLER_PULSEOUT 0x1 #define TC_HANDLER_PULSEOUT 0x1
#define TC_HANDLER_PEW 0x2 #define TC_HANDLER_PEW 0x2
#define TC_HANDLER_FREQUENCYIN 0x3 #define TC_HANDLER_FREQUENCYIN 0x3
#define TC_HANDLER_PROTOMATTER 0x4 #define TC_HANDLER_RGBMATRIX 0x4
void set_timer_handler(bool is_tc, uint8_t index, uint8_t timer_handler); void set_timer_handler(bool is_tc, uint8_t index, uint8_t timer_handler);
void shared_timer_handler(bool is_tc, uint8_t index); void shared_timer_handler(bool is_tc, uint8_t index);

View File

@ -182,6 +182,11 @@ SRC_C += \
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c
endif endif
ifeq ($(MCU_SUB_VARIANT),nrf52833)
SRC_C += \
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c
endif
ifeq ($(CIRCUITPY_NETWORK),1) ifeq ($(CIRCUITPY_NETWORK),1)
CFLAGS += -DMICROPY_PY_NETWORK=1 CFLAGS += -DMICROPY_PY_NETWORK=1

View File

@ -5,7 +5,7 @@
/* Specify the memory areas */ /* Specify the memory areas */
MEMORY MEMORY
{ {
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000 /* entire flash, 1 MiB */ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = ${FLASH_SIZE} /* entire flash */
/* nRF SoftDevice */ /* nRF SoftDevice */
FLASH_MBR (rx) : ORIGIN = ${MBR_START_ADDR}, LENGTH = ${MBR_SIZE} FLASH_MBR (rx) : ORIGIN = ${MBR_START_ADDR}, LENGTH = ${MBR_SIZE}
FLASH_SD (rx) : ORIGIN = ${SD_FLASH_START_ADDR}, LENGTH = ${SD_FLASH_SIZE} FLASH_SD (rx) : ORIGIN = ${SD_FLASH_START_ADDR}, LENGTH = ${SD_FLASH_SIZE}
@ -23,7 +23,7 @@ MEMORY
/* To measure the minimum required amount of memory for given configuration, set this number /* To measure the minimum required amount of memory for given configuration, set this number
high enough to work and then check the mutation of the value done by sd_ble_enable. */ high enough to work and then check the mutation of the value done by sd_ble_enable. */
SPIM3_RAM (rw) : ORIGIN = 0x20000000 + ${SOFTDEVICE_RAM_SIZE}, LENGTH = ${SPIM3_BUFFER_SIZE} SPIM3_RAM (rw) : ORIGIN = 0x20000000 + ${SOFTDEVICE_RAM_SIZE}, LENGTH = ${SPIM3_BUFFER_SIZE}
RAM (xrw) : ORIGIN = 0x20000000 + ${SOFTDEVICE_RAM_SIZE} + ${SPIM3_BUFFER_SIZE}, LENGTH = 256K - ${SOFTDEVICE_RAM_SIZE} -${SPIM3_BUFFER_SIZE} RAM (xrw) : ORIGIN = 0x20000000 + ${SOFTDEVICE_RAM_SIZE} + ${SPIM3_BUFFER_SIZE}, LENGTH = ${RAM_SIZE} - ${SOFTDEVICE_RAM_SIZE} -${SPIM3_BUFFER_SIZE}
} }

View File

@ -56,6 +56,26 @@
#define BLE_SLAVE_LATENCY 0 #define BLE_SLAVE_LATENCY 0
#define BLE_CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) #define BLE_CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)
#ifndef BLEIO_VS_UUID_COUNT
#define BLEIO_VS_UUID_COUNT 75
#endif
#ifndef BLEIO_HVN_TX_QUEUE_SIZE
#define BLEIO_HVN_TX_QUEUE_SIZE 9
#endif
#ifndef BLEIO_CENTRAL_ROLE_COUNT
#define BLEIO_CENTRAL_ROLE_COUNT 4
#endif
#ifndef BLEIO_PERIPH_ROLE_COUNT
#define BLEIO_PERIPH_ROLE_COUNT 4
#endif
#ifndef BLEIO_ATTR_TAB_SIZE
#define BLEIO_ATTR_TAB_SIZE (BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 5)
#endif
const nvm_bytearray_obj_t common_hal_bleio_nvm_obj = { const nvm_bytearray_obj_t common_hal_bleio_nvm_obj = {
.base = { .base = {
.type = &nvm_bytearray_type, .type = &nvm_bytearray_type,
@ -124,9 +144,9 @@ STATIC uint32_t ble_stack_enable(void) {
// adv_set_count must be == 1 for S140. Cannot be increased. // adv_set_count must be == 1 for S140. Cannot be increased.
ble_conf.gap_cfg.role_count_cfg.adv_set_count = 1; ble_conf.gap_cfg.role_count_cfg.adv_set_count = 1;
// periph_role_count costs 1232 bytes for 2 to 3, then ~1840 for each further increment. // periph_role_count costs 1232 bytes for 2 to 3, then ~1840 for each further increment.
ble_conf.gap_cfg.role_count_cfg.periph_role_count = 4; ble_conf.gap_cfg.role_count_cfg.periph_role_count = BLEIO_PERIPH_ROLE_COUNT;
// central_role_count costs 648 bytes for 1 to 2, then ~1250 for each further increment. // central_role_count costs 648 bytes for 1 to 2, then ~1250 for each further increment.
ble_conf.gap_cfg.role_count_cfg.central_role_count = 4; ble_conf.gap_cfg.role_count_cfg.central_role_count = BLEIO_CENTRAL_ROLE_COUNT;
err_code = sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &ble_conf, app_ram_start); err_code = sd_ble_cfg_set(BLE_GAP_CFG_ROLE_COUNT, &ble_conf, app_ram_start);
if (err_code != NRF_SUCCESS) { if (err_code != NRF_SUCCESS) {
return err_code; return err_code;
@ -137,7 +157,7 @@ STATIC uint32_t ble_stack_enable(void) {
// Each increment to hvn_tx_queue_size costs 2064 bytes. // Each increment to hvn_tx_queue_size costs 2064 bytes.
// DevZone recommends not setting this directly, but instead changing gap_conn_cfg.event_length. // DevZone recommends not setting this directly, but instead changing gap_conn_cfg.event_length.
// However, we are setting connection extension, so this seems to make sense. // However, we are setting connection extension, so this seems to make sense.
ble_conf.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size = 9; ble_conf.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size = BLEIO_HVN_TX_QUEUE_SIZE;
err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATTS, &ble_conf, app_ram_start); err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATTS, &ble_conf, app_ram_start);
if (err_code != NRF_SUCCESS) { if (err_code != NRF_SUCCESS) {
return err_code; return err_code;
@ -156,7 +176,7 @@ STATIC uint32_t ble_stack_enable(void) {
// and anything the user does. // and anything the user does.
memset(&ble_conf, 0, sizeof(ble_conf)); memset(&ble_conf, 0, sizeof(ble_conf));
// Each increment to the BLE_GATTS_ATTR_TAB_SIZE_DEFAULT multiplier costs 1408 bytes. // Each increment to the BLE_GATTS_ATTR_TAB_SIZE_DEFAULT multiplier costs 1408 bytes.
ble_conf.gatts_cfg.attr_tab_size.attr_tab_size = BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 5; ble_conf.gatts_cfg.attr_tab_size.attr_tab_size = BLEIO_ATTR_TAB_SIZE;
err_code = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &ble_conf, app_ram_start); err_code = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &ble_conf, app_ram_start);
if (err_code != NRF_SUCCESS) { if (err_code != NRF_SUCCESS) {
return err_code; return err_code;
@ -166,7 +186,7 @@ STATIC uint32_t ble_stack_enable(void) {
// service and characteristic. // service and characteristic.
memset(&ble_conf, 0, sizeof(ble_conf)); memset(&ble_conf, 0, sizeof(ble_conf));
// Each additional vs_uuid_count costs 16 bytes. // Each additional vs_uuid_count costs 16 bytes.
ble_conf.common_cfg.vs_uuid_cfg.vs_uuid_count = 75; // Defaults to 10. ble_conf.common_cfg.vs_uuid_cfg.vs_uuid_count = BLEIO_VS_UUID_COUNT; // Defaults to 10.
err_code = sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, &ble_conf, app_ram_start); err_code = sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, &ble_conf, app_ram_start);
if (err_code != NRF_SUCCESS) { if (err_code != NRF_SUCCESS) {
return err_code; return err_code;

View File

@ -35,7 +35,9 @@
#include "shared-bindings/_bleio/Connection.h" #include "shared-bindings/_bleio/Connection.h"
#include "shared-bindings/_bleio/ScanResults.h" #include "shared-bindings/_bleio/ScanResults.h"
#ifndef BLEIO_TOTAL_CONNECTION_COUNT
#define BLEIO_TOTAL_CONNECTION_COUNT 5 #define BLEIO_TOTAL_CONNECTION_COUNT 5
#endif
extern bleio_connection_internal_t bleio_connections[BLEIO_TOTAL_CONNECTION_COUNT]; extern bleio_connection_internal_t bleio_connections[BLEIO_TOTAL_CONNECTION_COUNT];

View File

@ -168,5 +168,17 @@ STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_P1_14), MP_ROM_PTR(&pin_P1_14) }, { MP_ROM_QSTR(MP_QSTR_P1_14), MP_ROM_PTR(&pin_P1_14) },
{ MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) },
#endif #endif
#ifdef NRF52833
{ MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) },
{ MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) },
{ MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) },
{ MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) },
{ MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) },
{ MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) },
{ MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) },
{ MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) },
{ MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) },
{ MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) },
#endif
}; };
MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table); MP_DEFINE_CONST_DICT(mcu_pin_globals, mcu_pin_globals_table);

View File

@ -26,24 +26,24 @@
#include <stddef.h> #include <stddef.h>
#include "common-hal/_protomatter/Protomatter.h" #include "common-hal/rgbmatrix/RGBMatrix.h"
#include "peripherals/nrf/timers.h" #include "peripherals/nrf/timers.h"
extern void _PM_IRQ_HANDLER(void); extern void _PM_IRQ_HANDLER(void);
void *common_hal_protomatter_timer_allocate() { void *common_hal_rgbmatrix_timer_allocate() {
nrfx_timer_t *timer = nrf_peripherals_allocate_timer_or_throw(); nrfx_timer_t *timer = nrf_peripherals_allocate_timer_or_throw();
nrf_peripherals_timer_never_reset(timer); nrf_peripherals_timer_never_reset(timer);
return timer->p_reg; return timer->p_reg;
} }
static void protomatter_event_handler(nrf_timer_event_t event_type, void *p_context) { static void rgbmatrix_event_handler(nrf_timer_event_t event_type, void *p_context) {
_PM_IRQ_HANDLER(); _PM_IRQ_HANDLER();
} }
void common_hal_protomatter_timer_enable(void* ptr) { void common_hal_rgbmatrix_timer_enable(void* ptr) {
nrfx_timer_t *timer = nrf_peripherals_timer_from_reg(ptr); nrfx_timer_t *timer = nrf_peripherals_timer_from_reg(ptr);
static const nrfx_timer_config_t timer_config = { static const nrfx_timer_config_t timer_config = {
.frequency = NRF_TIMER_FREQ_16MHz, .frequency = NRF_TIMER_FREQ_16MHz,
@ -52,15 +52,15 @@ void common_hal_protomatter_timer_enable(void* ptr) {
.interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, .interrupt_priority = NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY,
.p_context = NULL, .p_context = NULL,
}; };
nrfx_timer_init(timer, &timer_config, &protomatter_event_handler); nrfx_timer_init(timer, &timer_config, &rgbmatrix_event_handler);
} }
void common_hal_protomatter_timer_disable(void* ptr) { void common_hal_rgbmatrix_timer_disable(void* ptr) {
nrfx_timer_t *timer = nrf_peripherals_timer_from_reg(ptr); nrfx_timer_t *timer = nrf_peripherals_timer_from_reg(ptr);
nrfx_timer_uninit(timer); nrfx_timer_uninit(timer);
} }
void common_hal_protomatter_timer_free(void* ptr) { void common_hal_rgbmatrix_timer_free(void* ptr) {
nrfx_timer_t *timer = nrf_peripherals_timer_from_reg(ptr); nrfx_timer_t *timer = nrf_peripherals_timer_from_reg(ptr);
nrf_peripherals_free_timer(timer); nrf_peripherals_free_timer(timer);
} }

View File

@ -24,12 +24,12 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PROTOMATTER_PROTOMATTER_H #ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_RGBMATRIX_RGBMATRIX_H
#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PROTOMATTER_PROTOMATTER_H #define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_RGBMATRIX_RGBMATRIX_H
void *common_hal_protomatter_timer_allocate(void); void *common_hal_rgbmatrix_timer_allocate(void);
void common_hal_protomatter_timer_enable(void*); void common_hal_rgbmatrix_timer_enable(void*);
void common_hal_protomatter_timer_disable(void*); void common_hal_rgbmatrix_timer_disable(void*);
void common_hal_protomatter_timer_free(void*); void common_hal_rgbmatrix_timer_free(void*);
#endif #endif

View File

@ -0,0 +1,184 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Glenn Ruben Bakke
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <stdint.h>
extern uint32_t _estack;
extern uint32_t _sidata;
extern uint32_t _sdata;
extern uint32_t _edata;
extern uint32_t _sbss;
extern uint32_t _ebss;
typedef void (*func)(void);
#define _start main
extern void _start(void) __attribute__((noreturn));
extern void SystemInit(void);
void Default_Handler(void) {
while (1);
}
void Reset_Handler(void) {
uint32_t * p_src = &_sidata;
uint32_t * p_dest = &_sdata;
while (p_dest < &_edata) {
*p_dest++ = *p_src++;
}
uint32_t * p_bss = &_sbss;
uint32_t * p_bss_end = &_ebss;
while (p_bss < p_bss_end) {
*p_bss++ = 0ul;
}
SystemInit();
_start();
}
void NMI_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void HardFault_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void MemoryManagement_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void BusFault_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void UsageFault_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void SVC_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void DebugMon_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void PendSV_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void SysTick_Handler (void) __attribute__ ((weak, alias("Default_Handler")));
void POWER_CLOCK_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void RADIO_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void UARTE0_UART0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void NFCT_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void GPIOTE_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SAADC_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void TIMER0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void TIMER1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void TIMER2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void RTC0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void TEMP_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void RNG_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void ECB_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void CCM_AAR_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void WDT_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void RTC1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void QDEC_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void COMP_LPCOMP_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SWI0_EGU0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SWI1_EGU1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SWI2_EGU2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SWI3_EGU3_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SWI4_EGU4_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SWI5_EGU5_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void TIMER3_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void TIMER4_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void PWM0_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void PDM_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void MWU_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void PWM1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void PWM2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SPIM2_SPIS2_SPI2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void RTC2_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void I2S_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void FPU_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void USBD_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void UARTE1_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void PWM3_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
void SPIM3_IRQHandler (void) __attribute__ ((weak, alias("Default_Handler")));
const func __Vectors[] __attribute__ ((used, section(".isr_vector"))) = {
(func)&_estack,
Reset_Handler,
NMI_Handler,
HardFault_Handler,
MemoryManagement_Handler,
BusFault_Handler,
UsageFault_Handler,
0,
0,
0,
0,
SVC_Handler,
DebugMon_Handler,
0,
PendSV_Handler,
SysTick_Handler,
/* External Interrupts */
POWER_CLOCK_IRQHandler,
RADIO_IRQHandler,
UARTE0_UART0_IRQHandler,
SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler,
SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler,
NFCT_IRQHandler,
GPIOTE_IRQHandler,
SAADC_IRQHandler,
TIMER0_IRQHandler,
TIMER1_IRQHandler,
TIMER2_IRQHandler,
RTC0_IRQHandler,
TEMP_IRQHandler,
RNG_IRQHandler,
ECB_IRQHandler,
CCM_AAR_IRQHandler,
WDT_IRQHandler,
RTC1_IRQHandler,
QDEC_IRQHandler,
COMP_LPCOMP_IRQHandler,
SWI0_EGU0_IRQHandler,
SWI1_EGU1_IRQHandler,
SWI2_EGU2_IRQHandler,
SWI3_EGU3_IRQHandler,
SWI4_EGU4_IRQHandler,
SWI5_EGU5_IRQHandler,
TIMER3_IRQHandler,
TIMER4_IRQHandler,
PWM0_IRQHandler,
PDM_IRQHandler,
0,
0,
MWU_IRQHandler,
PWM1_IRQHandler,
PWM2_IRQHandler,
SPIM2_SPIS2_SPI2_IRQHandler,
RTC2_IRQHandler,
I2S_IRQHandler,
FPU_IRQHandler,
USBD_IRQHandler,
UARTE1_IRQHandler,
0,
0,
0,
0,
PWM3_IRQHandler,
0,
SPIM3_IRQHandler,
};

View File

@ -9,6 +9,9 @@
// The next line is a marker to start looking for definitions. Lines above the next line are ignored. // The next line is a marker to start looking for definitions. Lines above the next line are ignored.
// START_LD_DEFINES // START_LD_DEFINES
/*FLASH_SIZE=*/ FLASH_SIZE;
/*RAM_SIZE=*/ RAM_SIZE;
/*MBR_START_ADDR=*/ MBR_START_ADDR; /*MBR_START_ADDR=*/ MBR_START_ADDR;
/*MBR_SIZE=*/ MBR_SIZE; /*MBR_SIZE=*/ MBR_SIZE;

View File

@ -36,16 +36,30 @@
// Max RAM used by SoftDevice. Can be changed when SoftDevice parameters are changed. // Max RAM used by SoftDevice. Can be changed when SoftDevice parameters are changed.
// See common.template.ld. // See common.template.ld.
#ifndef SOFTDEVICE_RAM_SIZE
#define SOFTDEVICE_RAM_SIZE (64*1024) #define SOFTDEVICE_RAM_SIZE (64*1024)
#endif
#ifdef NRF52840 #ifdef NRF52840
#define MICROPY_PY_SYS_PLATFORM "nRF52840" #define MICROPY_PY_SYS_PLATFORM "nRF52840"
#define FLASH_SIZE (0x100000) // 1MiB #define FLASH_SIZE (0x100000) // 1MiB
#define RAM_SIZE (0x40000) // 256 KiB
// Special RAM area for SPIM3 transmit buffer, to work around hardware bug. // Special RAM area for SPIM3 transmit buffer, to work around hardware bug.
// See common.template.ld. // See common.template.ld.
#define SPIM3_BUFFER_SIZE (8192) #define SPIM3_BUFFER_SIZE (8192)
#endif #endif
#ifdef NRF52833
#define MICROPY_PY_SYS_PLATFORM "nRF52833"
#define FLASH_SIZE (0x80000) // 512 KiB
#define RAM_SIZE (0x20000) // 128 KiB
// Special RAM area for SPIM3 transmit buffer, to work around hardware bug.
// See common.template.ld.
#ifndef SPIM3_BUFFER_SIZE
#define SPIM3_BUFFER_SIZE (8192)
#endif
#endif
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1) #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
#define MICROPY_PY_FUNCTION_ATTRS (1) #define MICROPY_PY_FUNCTION_ATTRS (1)
#define MICROPY_PY_IO (1) #define MICROPY_PY_IO (1)
@ -112,25 +126,30 @@
// Define these regions starting down from the bootloader: // Define these regions starting down from the bootloader:
// Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld // Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld
#define BOOTLOADER_START_ADDR (0x000F4000) #define BOOTLOADER_START_ADDR (FLASH_SIZE - BOOTLOADER_SIZE - BOOTLOADER_SETTINGS_SIZE - BOOTLOADER_MBR_SIZE)
#define BOOTLOADER_MBR_SIZE (0x1000) // 4kib
#ifndef BOOTLOADER_SIZE
#define BOOTLOADER_SIZE (0xA000) // 40kiB #define BOOTLOADER_SIZE (0xA000) // 40kiB
#define BOOTLOADER_SETTINGS_START_ADDR (0x000FF000) #endif
#define BOOTLOADER_SETTINGS_START_ADDR (FLASH_SIZE - BOOTLOADER_SETTINGS_SIZE)
#define BOOTLOADER_SETTINGS_SIZE (0x1000) // 4kiB #define BOOTLOADER_SETTINGS_SIZE (0x1000) // 4kiB
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE) #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE)
#if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE > 0 && CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR != (BOOTLOADER_START_ADDR - 256*1024) #if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE > 0 && CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR != (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE)
#warning Internal flash filesystem location has moved! #warning Internal flash filesystem location has moved!
#endif #endif
#define CIRCUITPY_INTERNAL_NVM_START_ADDR (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_INTERNAL_NVM_SIZE) #define CIRCUITPY_INTERNAL_NVM_START_ADDR (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_INTERNAL_NVM_SIZE)
// 32kiB for bonding, etc. // 32kiB for bonding, etc.
#ifndef CIRCUITPY_BLE_CONFIG_SIZE
#define CIRCUITPY_BLE_CONFIG_SIZE (32*1024) #define CIRCUITPY_BLE_CONFIG_SIZE (32*1024)
#endif
#define CIRCUITPY_BLE_CONFIG_START_ADDR (CIRCUITPY_INTERNAL_NVM_START_ADDR - CIRCUITPY_BLE_CONFIG_SIZE) #define CIRCUITPY_BLE_CONFIG_START_ADDR (CIRCUITPY_INTERNAL_NVM_START_ADDR - CIRCUITPY_BLE_CONFIG_SIZE)
// The firmware space is the space left over between the fixed lower and upper regions. // The firmware space is the space left over between the fixed lower and upper regions.
#define CIRCUITPY_FIRMWARE_SIZE (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_FIRMWARE_START_ADDR) #define CIRCUITPY_FIRMWARE_SIZE (CIRCUITPY_BLE_CONFIG_START_ADDR - CIRCUITPY_FIRMWARE_START_ADDR)
#if BOOTLOADER_START_ADDR % FLASH_ERASE_SIZE != 0 #if BOOTLOADER_START_ADDR % FLASH_ERASE_SIZE != 0
#error BOOTLOADER_START_ADDR must be on a flash erase boundary. #error BOOTLOADER_START_ADDR must be on a flash erase boundary.

View File

@ -51,8 +51,8 @@ endif
# frequencyio not yet implemented # frequencyio not yet implemented
CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_PROTOMATTER = 1 CIRCUITPY_RGBMATRIX ?= 1
CIRCUITPY_FRAMEBUFFERIO = 1 CIRCUITPY_FRAMEBUFFERIO ?= 1
# nRF52840-specific # nRF52840-specific
@ -73,4 +73,18 @@ NRF_DEFINES += -DNRF52840_XXAA -DNRF52840
CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS
CIRCUITPY_ULAB = 1 CIRCUITPY_ULAB = 1
else
ifeq ($(MCU_CHIP),nrf52833)
MCU_SERIES = m4
MCU_VARIANT = nrf52
MCU_SUB_VARIANT = nrf52833
SD ?= s140
SOFTDEV_VERSION ?= 6.1.0
BOOT_SETTING_ADDR = 0x7F000
NRF_DEFINES += -DNRF52833_XXAA -DNRF52833
endif
endif endif

View File

@ -31,8 +31,8 @@
#define CIRCUITPY_NRF_NUM_I2C 2 #define CIRCUITPY_NRF_NUM_I2C 2
#endif #endif
#if CIRCUITPY_NRF_NUM_I2C != 1 && CIRCUITPY_NRF_NUM_I2C != 2 #if CIRCUITPY_NRF_NUM_I2C != 0 && CIRCUITPY_NRF_NUM_I2C != 1 && CIRCUITPY_NRF_NUM_I2C != 2
# error CIRCUITPY_NRF_NUM_I2C must be 1 or 2 # error CIRCUITPY_NRF_NUM_I2C must be 0, 1, or 2
#endif #endif
// Enable SPIM1, SPIM2 and SPIM3 (if available) // Enable SPIM1, SPIM2 and SPIM3 (if available)
@ -41,10 +41,10 @@
#define NRFX_SPIM1_ENABLED 1 #define NRFX_SPIM1_ENABLED 1
#endif #endif
#define NRFX_SPIM2_ENABLED 1 #define NRFX_SPIM2_ENABLED 1
#ifdef NRF52840_XXAA #if defined(NRF52840_XXAA) || defined(NRF52833_XXAA)
#define NRFX_SPIM_EXTENDED_ENABLED 1 #define NRFX_SPIM_EXTENDED_ENABLED 1
#define NRFX_SPIM3_ENABLED 1 #define NRFX_SPIM3_ENABLED 1
#else #elif CIRCUITPY_NRF_NUM_I2C == 2
#define NRFX_SPIM3_ENABLED 0 #define NRFX_SPIM3_ENABLED 0
#endif #endif
@ -53,20 +53,23 @@
#define NRFX_SPIM_MISO_PULL_CFG 1 #define NRFX_SPIM_MISO_PULL_CFG 1
// QSPI // QSPI
#if defined(NRF52840_XXAA)
#define NRFX_QSPI_ENABLED 1 #define NRFX_QSPI_ENABLED 1
#endif
// TWI aka. I2C; always enable TWIM0 (no conflict with SPIM1 and SPIM2) // TWI aka. I2C; always enable TWIM0 (no conflict with SPIM1 and SPIM2)
#if CIRCUITPY_NRF_NUM_I2C == 1 || CIRCUITPY_NRF_NUM_I2C == 2
#define NRFX_TWIM_ENABLED 1 #define NRFX_TWIM_ENABLED 1
#define NRFX_TWIM0_ENABLED 1 #define NRFX_TWIM0_ENABLED 1
#define NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY 7
#define NRFX_TWIM_DEFAULT_CONFIG_FREQUENCY NRF_TWIM_FREQ_400K
#define NRFX_TWIM_DEFAULT_CONFIG_HOLD_BUS_UNINIT 0
#endif
#if CIRCUITPY_NRF_NUM_I2C == 2 #if CIRCUITPY_NRF_NUM_I2C == 2
#define NRFX_TWIM1_ENABLED 1 #define NRFX_TWIM1_ENABLED 1
#endif #endif
#define NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY 7
#define NRFX_TWIM_DEFAULT_CONFIG_FREQUENCY NRF_TWIM_FREQ_400K
#define NRFX_TWIM_DEFAULT_CONFIG_HOLD_BUS_UNINIT 0
// UART // UART
#define NRFX_UARTE_ENABLED 1 #define NRFX_UARTE_ENABLED 1
#define NRFX_UARTE0_ENABLED 1 #define NRFX_UARTE0_ENABLED 1

View File

@ -0,0 +1,72 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/obj.h"
#include "py/mphal.h"
#include "nrf/pins.h"
const mcu_pin_obj_t pin_P0_00 = PIN(P0_00, 0, 0, 0);
const mcu_pin_obj_t pin_P0_01 = PIN(P0_01, 0, 1, 0);
const mcu_pin_obj_t pin_P0_02 = PIN(P0_02, 0, 2, SAADC_CH_PSELP_PSELP_AnalogInput0);
const mcu_pin_obj_t pin_P0_03 = PIN(P0_03, 0, 3, SAADC_CH_PSELP_PSELP_AnalogInput1);
const mcu_pin_obj_t pin_P0_04 = PIN(P0_04, 0, 4, SAADC_CH_PSELP_PSELP_AnalogInput2);
const mcu_pin_obj_t pin_P0_05 = PIN(P0_05, 0, 5, SAADC_CH_PSELP_PSELP_AnalogInput3);
const mcu_pin_obj_t pin_P0_06 = PIN(P0_06, 0, 6, 0);
const mcu_pin_obj_t pin_P0_07 = PIN(P0_07, 0, 7, 0);
const mcu_pin_obj_t pin_P0_08 = PIN(P0_08, 0, 8, 0);
const mcu_pin_obj_t pin_P0_09 = PIN(P0_09, 0, 9, 0);
const mcu_pin_obj_t pin_P0_10 = PIN(P0_10, 0, 10, 0);
const mcu_pin_obj_t pin_P0_11 = PIN(P0_11, 0, 11, 0);
const mcu_pin_obj_t pin_P0_12 = PIN(P0_12, 0, 12, 0);
const mcu_pin_obj_t pin_P0_13 = PIN(P0_13, 0, 13, 0);
const mcu_pin_obj_t pin_P0_14 = PIN(P0_14, 0, 14, 0);
const mcu_pin_obj_t pin_P0_15 = PIN(P0_15, 0, 15, 0);
const mcu_pin_obj_t pin_P0_16 = PIN(P0_16, 0, 16, 0);
const mcu_pin_obj_t pin_P0_17 = PIN(P0_17, 0, 17, 0);
const mcu_pin_obj_t pin_P0_18 = PIN(P0_18, 0, 18, 0);
const mcu_pin_obj_t pin_P0_19 = PIN(P0_19, 0, 19, 0);
const mcu_pin_obj_t pin_P0_20 = PIN(P0_20, 0, 20, 0);
const mcu_pin_obj_t pin_P0_21 = PIN(P0_21, 0, 21, 0);
const mcu_pin_obj_t pin_P0_22 = PIN(P0_22, 0, 22, 0);
const mcu_pin_obj_t pin_P0_23 = PIN(P0_23, 0, 23, 0);
const mcu_pin_obj_t pin_P0_24 = PIN(P0_24, 0, 24, 0);
const mcu_pin_obj_t pin_P0_25 = PIN(P0_25, 0, 25, 0);
const mcu_pin_obj_t pin_P0_26 = PIN(P0_26, 0, 26, 0);
const mcu_pin_obj_t pin_P0_27 = PIN(P0_27, 0, 27, 0);
const mcu_pin_obj_t pin_P0_28 = PIN(P0_28, 0, 28, SAADC_CH_PSELP_PSELP_AnalogInput4);
const mcu_pin_obj_t pin_P0_29 = PIN(P0_29, 0, 29, SAADC_CH_PSELP_PSELP_AnalogInput5);
const mcu_pin_obj_t pin_P0_30 = PIN(P0_30, 0, 30, SAADC_CH_PSELP_PSELP_AnalogInput6);
const mcu_pin_obj_t pin_P0_31 = PIN(P0_31, 0, 31, SAADC_CH_PSELP_PSELP_AnalogInput7);
const mcu_pin_obj_t pin_P1_00 = PIN(P1_00, 1, 0, 0);
const mcu_pin_obj_t pin_P1_01 = PIN(P1_01, 1, 1, 0);
const mcu_pin_obj_t pin_P1_02 = PIN(P1_02, 1, 2, 0);
const mcu_pin_obj_t pin_P1_03 = PIN(P1_03, 1, 3, 0);
const mcu_pin_obj_t pin_P1_04 = PIN(P1_04, 1, 4, 0);
const mcu_pin_obj_t pin_P1_05 = PIN(P1_05, 1, 5, 0);
const mcu_pin_obj_t pin_P1_06 = PIN(P1_06, 1, 6, 0);
const mcu_pin_obj_t pin_P1_07 = PIN(P1_07, 1, 7, 0);
const mcu_pin_obj_t pin_P1_08 = PIN(P1_08, 1, 8, 0);
const mcu_pin_obj_t pin_P1_09 = PIN(P1_09, 1, 9, 0);

View File

@ -0,0 +1,73 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 by Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_NRF_PERIPHERALS_NRF52833_PINS_H
#define MICROPY_INCLUDED_NRF_PERIPHERALS_NRF52833_PINS_H
extern const mcu_pin_obj_t pin_P0_00;
extern const mcu_pin_obj_t pin_P0_01;
extern const mcu_pin_obj_t pin_P0_02;
extern const mcu_pin_obj_t pin_P0_03;
extern const mcu_pin_obj_t pin_P0_04;
extern const mcu_pin_obj_t pin_P0_05;
extern const mcu_pin_obj_t pin_P0_06;
extern const mcu_pin_obj_t pin_P0_07;
extern const mcu_pin_obj_t pin_P0_08;
extern const mcu_pin_obj_t pin_P0_09;
extern const mcu_pin_obj_t pin_P0_10;
extern const mcu_pin_obj_t pin_P0_11;
extern const mcu_pin_obj_t pin_P0_12;
extern const mcu_pin_obj_t pin_P0_13;
extern const mcu_pin_obj_t pin_P0_14;
extern const mcu_pin_obj_t pin_P0_15;
extern const mcu_pin_obj_t pin_P0_16;
extern const mcu_pin_obj_t pin_P0_17;
extern const mcu_pin_obj_t pin_P0_18;
extern const mcu_pin_obj_t pin_P0_19;
extern const mcu_pin_obj_t pin_P0_20;
extern const mcu_pin_obj_t pin_P0_21;
extern const mcu_pin_obj_t pin_P0_22;
extern const mcu_pin_obj_t pin_P0_23;
extern const mcu_pin_obj_t pin_P0_24;
extern const mcu_pin_obj_t pin_P0_25;
extern const mcu_pin_obj_t pin_P0_26;
extern const mcu_pin_obj_t pin_P0_27;
extern const mcu_pin_obj_t pin_P0_28;
extern const mcu_pin_obj_t pin_P0_29;
extern const mcu_pin_obj_t pin_P0_30;
extern const mcu_pin_obj_t pin_P0_31;
extern const mcu_pin_obj_t pin_P1_00;
extern const mcu_pin_obj_t pin_P1_01;
extern const mcu_pin_obj_t pin_P1_02;
extern const mcu_pin_obj_t pin_P1_03;
extern const mcu_pin_obj_t pin_P1_04;
extern const mcu_pin_obj_t pin_P1_05;
extern const mcu_pin_obj_t pin_P1_06;
extern const mcu_pin_obj_t pin_P1_07;
extern const mcu_pin_obj_t pin_P1_08;
extern const mcu_pin_obj_t pin_P1_09;
#endif // MICROPY_INCLUDED_NRF_PERIPHERALS_NRF52833_PINS_H

View File

@ -0,0 +1,50 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "nrfx.h"
#include "hal/nrf_nvmc.h"
void nrf_peripherals_power_init(void) {
// Set GPIO reference voltage to 3.3V if it isn't already. REGOUT0 will get reset to 0xfffffff
// if flash is erased, which sets the default to 1.8V
// This matters only when "high voltage mode" is enabled, which is true on the PCA10059,
// and might be true on other boards.
if (NRF_UICR->REGOUT0 == 0xffffffff && NRF_POWER->MAINREGSTATUS & 1) {
// Expand what nrf_nvmc_word_write() did.
// It's missing from nrfx V2.0.0, and nrfx_nvmc_word_write() does bounds
// checking which prevents writes to UICR.
// Reported: https://devzone.nordicsemi.com/f/nordic-q-a/57243/nrfx_nvmc-h-api-cannot-write-to-uicr
NRF_NVMC->CONFIG = NRF_NVMC_MODE_WRITE;
while (!(NRF_NVMC->READY & NVMC_READY_READY_Msk)) {}
NRF_UICR->REGOUT0 = UICR_REGOUT0_VOUT_3V3 << UICR_REGOUT0_VOUT_Pos;
__DMB();
while (NRF_NVMC->READY == NVMC_READY_READY_Busy) {}
NRF_NVMC->CONFIG = NRF_NVMC_MODE_READONLY;
// Must reset to enable change.
NVIC_SystemReset();
}
}

View File

@ -61,4 +61,9 @@ extern const mp_obj_type_t mcu_pin_type;
#include "nrf52840/pins.h" #include "nrf52840/pins.h"
#endif #endif
// Choose based on chip, but not specifically revision (e.g., not NRF52840_XXAA)
#ifdef NRF52833
#include "nrf52833/pins.h"
#endif
#endif // __MICROPY_INCLUDED_NRF_PERIPHERALS_PINS_H__ #endif // __MICROPY_INCLUDED_NRF_PERIPHERALS_PINS_H__

View File

@ -101,10 +101,15 @@ void reset_port(void) {
gamepad_reset(); gamepad_reset();
#endif #endif
#if CIRCUITPY_BUSIO
i2c_reset(); i2c_reset();
spi_reset(); spi_reset();
uart_reset(); uart_reset();
#endif
#if CIRCUITPY_NEOPIXEL_WRITE
neopixel_write_reset(); neopixel_write_reset();
#endif
#if CIRCUITPY_AUDIOBUSIO #if CIRCUITPY_AUDIOBUSIO
i2s_reset(); i2s_reset();

View File

@ -0,0 +1,52 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* GNU linker script for STM32F746 with filesystem
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Mark Olsson <mark@markolsson.se>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* entire flash */
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 32K /* sector 0 */
FLASH_FS (rx) : ORIGIN = 0x08008000, LENGTH = 96K /* sectors 1,2,3 are 32K */
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 896K /* sector 4 is 128K, sectors 5,6,7 are 256K */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K
ITCM (xrw) : ORIGIN = 0x00000000, LENGTH = 16K
}
/* produce a link error if there is not this amount of RAM for these sections */
_minimum_stack_size = 2K;
_minimum_heap_size = 16K;
/* Define tho top end of the stack. The stack is full descending so begins just
above last byte of RAM. Note that EABI requires the stack to be 8-byte
aligned for a call. */
_estack = ORIGIN(RAM) + LENGTH(RAM);
/* RAM extents for the garbage collector */
_ram_start = ORIGIN(RAM);
_ram_end = ORIGIN(RAM) + LENGTH(RAM);

View File

@ -8,7 +8,7 @@ MEMORY
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */ FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* entire flash */
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 32K /* sector 0 */ FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 32K /* sector 0 */
FLASH_FS (rx) : ORIGIN = 0x08008000, LENGTH = 96K /* sectors 1,2,3 are 32K */ FLASH_FS (rx) : ORIGIN = 0x08008000, LENGTH = 96K /* sectors 1,2,3 are 32K */
FLASH_TEXT (rx) : ORIGIN = 0x08010000, LENGTH = 1920K /* sector 4 is 128K, sectors 5,6,7 are 256K */ FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 1920K /* sector 4 is 128K, sectors 5,6,7 are 256K */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
} }

View File

@ -0,0 +1,38 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "boards/board.h"
void board_init(void) {
}
bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
}

View File

@ -0,0 +1,36 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
* Copyright (c) 2020 Mark Olsson <mark@markolsson.se>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
//Micropython setup
#define MICROPY_HW_BOARD_NAME "NUCLEO STM32F746"
#define MICROPY_HW_MCU_NAME "STM32F746"
#define FLASH_SIZE (0x100000)
#define FLASH_PAGE_SIZE (0x4000)
#define BOARD_OSC_DIV (8)

View File

@ -0,0 +1,14 @@
USB_VID = 0x239A
USB_PID = 0x809E
USB_PRODUCT = "Nucleo F746zg - CPy"
USB_MANUFACTURER = "STMicroelectronics"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1
MCU_SERIES = F7
MCU_VARIANT = STM32F746xx
MCU_PACKAGE = LQFP144
LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F746xG_fs.ld

View File

@ -0,0 +1,73 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PC03) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PF03) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PF05) },
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PF10) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PG09) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PG14) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PF15) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PE13) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PF14) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PE11) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PE09) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PF13) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PF12) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PD15) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PD14) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB09) },
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PB08) },
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PC06) },
{ MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PB15) },
{ MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PB13) },
{ MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_PB12) },
{ MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_PC07) },
{ MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_PB05) },
{ MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_PB04) },
{ MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_PB07) },
{ MP_ROM_QSTR(MP_QSTR_LED3), MP_ROM_PTR(&pin_PB14) },
{ MP_ROM_QSTR(MP_QSTR_SW), MP_ROM_PTR(&pin_PC13) },
{ MP_ROM_QSTR(MP_QSTR_TP1), MP_ROM_PTR(&pin_PH02) },
{ MP_ROM_QSTR(MP_QSTR_TP2), MP_ROM_PTR(&pin_PI08) },
{ MP_ROM_QSTR(MP_QSTR_TP3), MP_ROM_PTR(&pin_PH15) },
{ MP_ROM_QSTR(MP_QSTR_AUDIO_INT), MP_ROM_PTR(&pin_PD06) },
{ MP_ROM_QSTR(MP_QSTR_AUDIO_SDA), MP_ROM_PTR(&pin_PH08) },
{ MP_ROM_QSTR(MP_QSTR_AUDIO_SCL), MP_ROM_PTR(&pin_PH07) },
{ MP_ROM_QSTR(MP_QSTR_EXT_SDA), MP_ROM_PTR(&pin_PB09) },
{ MP_ROM_QSTR(MP_QSTR_EXT_SCL), MP_ROM_PTR(&pin_PB08) },
{ MP_ROM_QSTR(MP_QSTR_EXT_RST), MP_ROM_PTR(&pin_PG03) },
{ MP_ROM_QSTR(MP_QSTR_SD_SW), MP_ROM_PTR(&pin_PC13) },
{ MP_ROM_QSTR(MP_QSTR_LCD_BL_CTRL), MP_ROM_PTR(&pin_PK03) },
{ MP_ROM_QSTR(MP_QSTR_LCD_INT), MP_ROM_PTR(&pin_PI13) },
{ MP_ROM_QSTR(MP_QSTR_LCD_SDA), MP_ROM_PTR(&pin_PH08) },
{ MP_ROM_QSTR(MP_QSTR_LCD_SCL), MP_ROM_PTR(&pin_PH07) },
{ MP_ROM_QSTR(MP_QSTR_OTG_FS_POWER), MP_ROM_PTR(&pin_PD05) },
{ MP_ROM_QSTR(MP_QSTR_OTG_FS_OVER_CURRENT), MP_ROM_PTR(&pin_PD04) },
{ MP_ROM_QSTR(MP_QSTR_OTG_HS_OVER_CURRENT), MP_ROM_PTR(&pin_PE03) },
{ MP_ROM_QSTR(MP_QSTR_USB_VBUS), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_USB_ID), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_USB_DM), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_USB_DP), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_VCP_TX), MP_ROM_PTR(&pin_PD08) },
{ MP_ROM_QSTR(MP_QSTR_VCP_RX), MP_ROM_PTR(&pin_PD09) },
{ MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PD05) },
{ MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PD06) },
{ MP_ROM_QSTR(MP_QSTR_UART2_RTS), MP_ROM_PTR(&pin_PD04) },
{ MP_ROM_QSTR(MP_QSTR_UART2_CTS), MP_ROM_PTR(&pin_PD03) },
{ MP_ROM_QSTR(MP_QSTR_UART6_TX), MP_ROM_PTR(&pin_PG14) },
{ MP_ROM_QSTR(MP_QSTR_UART6_RX), MP_ROM_PTR(&pin_PG09) },
{ MP_ROM_QSTR(MP_QSTR_SPI_B_NSS), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_SPI_B_SCK), MP_ROM_PTR(&pin_PB03) },
{ MP_ROM_QSTR(MP_QSTR_SPI_B_MOSI), MP_ROM_PTR(&pin_PB05) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

View File

@ -0,0 +1,445 @@
/**
******************************************************************************
* @file stm32f7xx_hal_conf_template.h
* @author MCD Application Team
* @brief HAL configuration template file.
* This file should be copied to the application folder and renamed
* to stm32f7xx_hal_conf.h.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F7xx_HAL_CONF_H
#define __STM32F7xx_HAL_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* ########################## Module Selection ############################## */
/**
* @brief This is the list of modules to be used in the HAL driver
*/
#define HAL_MODULE_ENABLED
#define HAL_ADC_MODULE_ENABLED
/* #define HAL_CRYP_MODULE_ENABLED */
/* #define HAL_CAN_MODULE_ENABLED */
/* #define HAL_CEC_MODULE_ENABLED */
/* #define HAL_CRC_MODULE_ENABLED */
/* #define HAL_CRYP_MODULE_ENABLED */
#define HAL_DAC_MODULE_ENABLED
/* #define HAL_DCMI_MODULE_ENABLED */
/* #define HAL_DMA2D_MODULE_ENABLED */
#define HAL_ETH_MODULE_ENABLED
/* #define HAL_NAND_MODULE_ENABLED */
/* #define HAL_NOR_MODULE_ENABLED */
/* #define HAL_SRAM_MODULE_ENABLED */
/* #define HAL_SDRAM_MODULE_ENABLED */
/* #define HAL_HASH_MODULE_ENABLED */
/* #define HAL_I2S_MODULE_ENABLED */
/* #define HAL_IWDG_MODULE_ENABLED */
/* #define HAL_LPTIM_MODULE_ENABLED */
/* #define HAL_LTDC_MODULE_ENABLED */
/* #define HAL_QSPI_MODULE_ENABLED */
/* #define HAL_RNG_MODULE_ENABLED */
/* #define HAL_RTC_MODULE_ENABLED */
/* #define HAL_SAI_MODULE_ENABLED */
/* #define HAL_SD_MODULE_ENABLED */
/* #define HAL_MMC_MODULE_ENABLED */
/* #define HAL_SPDIFRX_MODULE_ENABLED */
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIM_MODULE_ENABLED
#define HAL_UART_MODULE_ENABLED
/* #define HAL_USART_MODULE_ENABLED */
/* #define HAL_IRDA_MODULE_ENABLED */
/* #define HAL_SMARTCARD_MODULE_ENABLED */
/* #define HAL_WWDG_MODULE_ENABLED */
#define HAL_PCD_MODULE_ENABLED
/* #define HAL_HCD_MODULE_ENABLED */
/* #define HAL_DFSDM_MODULE_ENABLED */
/* #define HAL_DSI_MODULE_ENABLED */
/* #define HAL_JPEG_MODULE_ENABLED */
/* #define HAL_MDIOS_MODULE_ENABLED */
/* #define HAL_SMBUS_MODULE_ENABLED */
/* #define HAL_EXTI_MODULE_ENABLED */
#define HAL_GPIO_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED
#define HAL_DMA_MODULE_ENABLED
#define HAL_RCC_MODULE_ENABLED
#define HAL_FLASH_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED
#define HAL_I2C_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED
/* ########################## HSE/HSI Values adaptation ##################### */
/**
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSE is used as system clock source, directly or through the PLL).
*/
#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */
#if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
#endif /* HSE_STARTUP_TIMEOUT */
/**
* @brief Internal High Speed oscillator (HSI) value.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSI is used as system clock source, directly or through the PLL).
*/
#if !defined (HSI_VALUE)
#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */
/**
* @brief Internal Low Speed oscillator (LSI) value.
*/
#if !defined (LSI_VALUE)
#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations
in voltage and temperature. */
/**
* @brief External Low Speed oscillator (LSE) value.
*/
#if !defined (LSE_VALUE)
#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External Low Speed oscillator in Hz */
#endif /* LSE_VALUE */
#if !defined (LSE_STARTUP_TIMEOUT)
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
#endif /* LSE_STARTUP_TIMEOUT */
/**
* @brief External clock source for I2S peripheral
* This value is used by the I2S HAL module to compute the I2S clock source
* frequency, this source is inserted directly through I2S_CKIN pad.
*/
#if !defined (EXTERNAL_CLOCK_VALUE)
#define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000U) /*!< Value of the Internal oscillator in Hz*/
#endif /* EXTERNAL_CLOCK_VALUE */
/* Tip: To avoid modifying this file each time you need to use different HSE,
=== you can define the HSE value in your toolchain compiler preprocessor. */
/* ########################### System Configuration ######################### */
/**
* @brief This is the HAL system configuration section
*/
#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */
#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */
#define USE_RTOS 0U
#define PREFETCH_ENABLE 0U
#define ART_ACCLERATOR_ENABLE 0U /* To enable instruction cache and prefetch */
/* ########################## Assert Selection ############################## */
/**
* @brief Uncomment the line below to expanse the "assert_param" macro in the
* HAL drivers code
*/
/* #define USE_FULL_ASSERT 1U */
/* ################## Ethernet peripheral configuration ##################### */
/* Section 1 : Ethernet peripheral configuration */
/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
#define MAC_ADDR0 2U
#define MAC_ADDR1 0U
#define MAC_ADDR2 0U
#define MAC_ADDR3 0U
#define MAC_ADDR4 0U
#define MAC_ADDR5 0U
/* Definition of the Ethernet driver buffers size and count */
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
#define ETH_RXBUFNB ((uint32_t)4U) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
#define ETH_TXBUFNB ((uint32_t)4U) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
/* Section 2: PHY configuration section */
/* LAN8742A_PHY_ADDRESS Address*/
#define LAN8742A_PHY_ADDRESS 0
/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
#define PHY_RESET_DELAY ((uint32_t)0x000000FFU)
/* PHY Configuration delay */
#define PHY_CONFIG_DELAY ((uint32_t)0x00000FFFU)
#define PHY_READ_TO ((uint32_t)0x0000FFFFU)
#define PHY_WRITE_TO ((uint32_t)0x0000FFFFU)
/* Section 3: Common PHY Registers */
#define PHY_BCR ((uint16_t)0x00U) /*!< Transceiver Basic Control Register */
#define PHY_BSR ((uint16_t)0x01U) /*!< Transceiver Basic Status Register */
#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */
#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */
#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */
#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */
#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */
#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */
#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */
#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */
#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */
#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */
#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */
#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */
#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */
/* Section 4: Extended PHY Registers */
#define PHY_SR ((uint16_t)0x1FU) /*!< PHY status register Offset */
#define PHY_SPEED_STATUS ((uint16_t)0x0004U) /*!< PHY Speed mask */
#define PHY_DUPLEX_STATUS ((uint16_t)0x0010U) /*!< PHY Duplex mask */
#define PHY_ISFR ((uint16_t)0x001DU) /*!< PHY Interrupt Source Flag register Offset */
#define PHY_ISFR_INT4 ((uint16_t)0x000BU) /*!< PHY Link down inturrupt */
/* ################## SPI peripheral configuration ########################## */
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
* Activated: CRC code is present inside driver
* Deactivated: CRC code cleaned from driver
*/
#define USE_SPI_CRC 0U
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include module's header file
*/
#ifdef HAL_RCC_MODULE_ENABLED
#include "stm32f7xx_hal_rcc.h"
#endif /* HAL_RCC_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32f7xx_hal_exti.h"
#endif /* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_GPIO_MODULE_ENABLED
#include "stm32f7xx_hal_gpio.h"
#endif /* HAL_GPIO_MODULE_ENABLED */
#ifdef HAL_DMA_MODULE_ENABLED
#include "stm32f7xx_hal_dma.h"
#endif /* HAL_DMA_MODULE_ENABLED */
#ifdef HAL_CORTEX_MODULE_ENABLED
#include "stm32f7xx_hal_cortex.h"
#endif /* HAL_CORTEX_MODULE_ENABLED */
#ifdef HAL_ADC_MODULE_ENABLED
#include "stm32f7xx_hal_adc.h"
#endif /* HAL_ADC_MODULE_ENABLED */
#ifdef HAL_CAN_MODULE_ENABLED
#include "stm32f7xx_hal_can.h"
#endif /* HAL_CAN_MODULE_ENABLED */
#ifdef HAL_CEC_MODULE_ENABLED
#include "stm32f7xx_hal_cec.h"
#endif /* HAL_CEC_MODULE_ENABLED */
#ifdef HAL_CRC_MODULE_ENABLED
#include "stm32f7xx_hal_crc.h"
#endif /* HAL_CRC_MODULE_ENABLED */
#ifdef HAL_CRYP_MODULE_ENABLED
#include "stm32f7xx_hal_cryp.h"
#endif /* HAL_CRYP_MODULE_ENABLED */
#ifdef HAL_DMA2D_MODULE_ENABLED
#include "stm32f7xx_hal_dma2d.h"
#endif /* HAL_DMA2D_MODULE_ENABLED */
#ifdef HAL_DAC_MODULE_ENABLED
#include "stm32f7xx_hal_dac.h"
#endif /* HAL_DAC_MODULE_ENABLED */
#ifdef HAL_DCMI_MODULE_ENABLED
#include "stm32f7xx_hal_dcmi.h"
#endif /* HAL_DCMI_MODULE_ENABLED */
#ifdef HAL_ETH_MODULE_ENABLED
#include "stm32f7xx_hal_eth.h"
#endif /* HAL_ETH_MODULE_ENABLED */
#ifdef HAL_FLASH_MODULE_ENABLED
#include "stm32f7xx_hal_flash.h"
#endif /* HAL_FLASH_MODULE_ENABLED */
#ifdef HAL_SRAM_MODULE_ENABLED
#include "stm32f7xx_hal_sram.h"
#endif /* HAL_SRAM_MODULE_ENABLED */
#ifdef HAL_NOR_MODULE_ENABLED
#include "stm32f7xx_hal_nor.h"
#endif /* HAL_NOR_MODULE_ENABLED */
#ifdef HAL_NAND_MODULE_ENABLED
#include "stm32f7xx_hal_nand.h"
#endif /* HAL_NAND_MODULE_ENABLED */
#ifdef HAL_SDRAM_MODULE_ENABLED
#include "stm32f7xx_hal_sdram.h"
#endif /* HAL_SDRAM_MODULE_ENABLED */
#ifdef HAL_HASH_MODULE_ENABLED
#include "stm32f7xx_hal_hash.h"
#endif /* HAL_HASH_MODULE_ENABLED */
#ifdef HAL_I2C_MODULE_ENABLED
#include "stm32f7xx_hal_i2c.h"
#endif /* HAL_I2C_MODULE_ENABLED */
#ifdef HAL_I2S_MODULE_ENABLED
#include "stm32f7xx_hal_i2s.h"
#endif /* HAL_I2S_MODULE_ENABLED */
#ifdef HAL_IWDG_MODULE_ENABLED
#include "stm32f7xx_hal_iwdg.h"
#endif /* HAL_IWDG_MODULE_ENABLED */
#ifdef HAL_LPTIM_MODULE_ENABLED
#include "stm32f7xx_hal_lptim.h"
#endif /* HAL_LPTIM_MODULE_ENABLED */
#ifdef HAL_LTDC_MODULE_ENABLED
#include "stm32f7xx_hal_ltdc.h"
#endif /* HAL_LTDC_MODULE_ENABLED */
#ifdef HAL_PWR_MODULE_ENABLED
#include "stm32f7xx_hal_pwr.h"
#endif /* HAL_PWR_MODULE_ENABLED */
#ifdef HAL_QSPI_MODULE_ENABLED
#include "stm32f7xx_hal_qspi.h"
#endif /* HAL_QSPI_MODULE_ENABLED */
#ifdef HAL_RNG_MODULE_ENABLED
#include "stm32f7xx_hal_rng.h"
#endif /* HAL_RNG_MODULE_ENABLED */
#ifdef HAL_RTC_MODULE_ENABLED
#include "stm32f7xx_hal_rtc.h"
#endif /* HAL_RTC_MODULE_ENABLED */
#ifdef HAL_SAI_MODULE_ENABLED
#include "stm32f7xx_hal_sai.h"
#endif /* HAL_SAI_MODULE_ENABLED */
#ifdef HAL_SD_MODULE_ENABLED
#include "stm32f7xx_hal_sd.h"
#endif /* HAL_SD_MODULE_ENABLED */
#ifdef HAL_MMC_MODULE_ENABLED
#include "stm32f7xx_hal_mmc.h"
#endif /* HAL_MMC_MODULE_ENABLED */
#ifdef HAL_SPDIFRX_MODULE_ENABLED
#include "stm32f7xx_hal_spdifrx.h"
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
#ifdef HAL_SPI_MODULE_ENABLED
#include "stm32f7xx_hal_spi.h"
#endif /* HAL_SPI_MODULE_ENABLED */
#ifdef HAL_TIM_MODULE_ENABLED
#include "stm32f7xx_hal_tim.h"
#endif /* HAL_TIM_MODULE_ENABLED */
#ifdef HAL_UART_MODULE_ENABLED
#include "stm32f7xx_hal_uart.h"
#endif /* HAL_UART_MODULE_ENABLED */
#ifdef HAL_USART_MODULE_ENABLED
#include "stm32f7xx_hal_usart.h"
#endif /* HAL_USART_MODULE_ENABLED */
#ifdef HAL_IRDA_MODULE_ENABLED
#include "stm32f7xx_hal_irda.h"
#endif /* HAL_IRDA_MODULE_ENABLED */
#ifdef HAL_SMARTCARD_MODULE_ENABLED
#include "stm32f7xx_hal_smartcard.h"
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
#ifdef HAL_WWDG_MODULE_ENABLED
#include "stm32f7xx_hal_wwdg.h"
#endif /* HAL_WWDG_MODULE_ENABLED */
#ifdef HAL_PCD_MODULE_ENABLED
#include "stm32f7xx_hal_pcd.h"
#endif /* HAL_PCD_MODULE_ENABLED */
#ifdef HAL_HCD_MODULE_ENABLED
#include "stm32f7xx_hal_hcd.h"
#endif /* HAL_HCD_MODULE_ENABLED */
#ifdef HAL_DFSDM_MODULE_ENABLED
#include "stm32f7xx_hal_dfsdm.h"
#endif /* HAL_DFSDM_MODULE_ENABLED */
#ifdef HAL_DSI_MODULE_ENABLED
#include "stm32f7xx_hal_dsi.h"
#endif /* HAL_DSI_MODULE_ENABLED */
#ifdef HAL_JPEG_MODULE_ENABLED
#include "stm32f7xx_hal_jpeg.h"
#endif /* HAL_JPEG_MODULE_ENABLED */
#ifdef HAL_MDIOS_MODULE_ENABLED
#include "stm32f7xx_hal_mdios.h"
#endif /* HAL_MDIOS_MODULE_ENABLED */
#ifdef HAL_SMBUS_MODULE_ENABLED
#include "stm32f7xx_hal_smbus.h"
#endif /* HAL_SMBUS_MODULE_ENABLED */
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t* file, uint32_t line);
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */
#ifdef __cplusplus
}
#endif
#endif /* __STM32F7xx_HAL_CONF_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@ -107,6 +107,13 @@ typedef struct {
// F7 Series // F7 Series
#ifdef STM32F746xx
#define HAS_DAC 0
#define HAS_TRNG 0
#define HAS_BASIC_TIM 0
#include "stm32f7/stm32f746xx/periph.h"
#endif
#ifdef STM32F767xx #ifdef STM32F767xx
#define HAS_DAC 0 #define HAS_DAC 0
#define HAS_TRNG 0 #define HAS_TRNG 0

View File

@ -93,6 +93,9 @@ extern const mp_obj_type_t mcu_pin_type;
#endif #endif
// F7 Series // F7 Series
#ifdef STM32F746xx
#include "stm32f7/stm32f746xx/pins.h"
#endif
#ifdef STM32F767xx #ifdef STM32F767xx
#include "stm32f7/stm32f767xx/pins.h" #include "stm32f7/stm32f767xx/pins.h"
#endif #endif

View File

@ -0,0 +1,67 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
* Copyright (c) 2020 Mark Olsson <mark@markolsson.se>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/mpconfig.h"
void stm32_peripherals_clocks_init(void) {
RCC_ClkInitTypeDef RCC_ClkInitStruct;
RCC_OscInitTypeDef RCC_OscInitStruct;
/* Enable Power Control clock */
__HAL_RCC_PWR_CLK_ENABLE();
/* The voltage scaling allows optimizing the power consumption when the device is
clocked below the maximum system frequency, to update the voltage scaling value
regarding system frequency refer to product datasheet. */
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
/* Enable HSE Oscillator and activate PLL with HSE as source */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS;
RCC_OscInitStruct.HSIState = RCC_HSI_OFF;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = BOARD_OSC_DIV;
RCC_OscInitStruct.PLL.PLLN = 432;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 9;
HAL_RCC_OscConfig(&RCC_OscInitStruct);
/* Activate the OverDrive to reach the 216 MHz Frequency */
HAL_PWREx_EnableOverDrive();
/* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers */
RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7);
}

View File

@ -0,0 +1,53 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
* Copyright (c) 2020 Mark Olsson <mark@markolsson.se>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "gpio.h"
#include "common-hal/microcontroller/Pin.h"
void stm32_peripherals_gpio_init(void) {
//Enable all GPIO for now
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
__HAL_RCC_GPIOE_CLK_ENABLE();
__HAL_RCC_GPIOF_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
__HAL_RCC_GPIOH_CLK_ENABLE();
__HAL_RCC_GPIOI_CLK_ENABLE();
__HAL_RCC_GPIOJ_CLK_ENABLE();
__HAL_RCC_GPIOK_CLK_ENABLE();
//Never reset pins
never_reset_pin_number(2,14); //PC14 OSC32_IN
never_reset_pin_number(2,15); //PC15 OSC32_OUT
never_reset_pin_number(0,13); //PA13 SWDIO
never_reset_pin_number(0,14); //PA14 SWCLK
never_reset_pin_number(7,0); //PH0 OSC_IN
never_reset_pin_number(7,1); //PH1 OSC_OUT
}

View File

@ -0,0 +1,215 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
* Copyright (c) 2020 Mark Olsson <mark@markolsson.se>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/obj.h"
#include "py/mphal.h"
#include "peripherals/pins.h"
#include "peripherals/periph.h"
// I2C
I2C_TypeDef * mcu_i2c_banks[4] = {I2C1, I2C2, I2C3, I2C4};
const mcu_periph_obj_t mcu_i2c_sda_list[10] = {
PERIPH(1, 4, &pin_PB07),
PERIPH(1, 4, &pin_PB09),
PERIPH(2, 4, &pin_PB11),
PERIPH(3, 4, &pin_PC09),
PERIPH(4, 4, &pin_PD13),
PERIPH(2, 4, &pin_PF00),
PERIPH(4, 4, &pin_PF15),
PERIPH(2, 4, &pin_PH05),
PERIPH(3, 4, &pin_PH08),
PERIPH(4, 4, &pin_PH12),
};
const mcu_periph_obj_t mcu_i2c_scl_list[10] = {
PERIPH(3, 4, &pin_PA08),
PERIPH(1, 4, &pin_PB06),
PERIPH(1, 4, &pin_PB08),
PERIPH(2, 4, &pin_PB10),
PERIPH(4, 4, &pin_PD12),
PERIPH(2, 4, &pin_PF01),
PERIPH(4, 4, &pin_PF14),
PERIPH(2, 4, &pin_PH04),
PERIPH(3, 4, &pin_PH07),
PERIPH(4, 4, &pin_PH11),
};
//SPI
SPI_TypeDef * mcu_spi_banks[6] = {SPI1, SPI2, SPI3, SPI4, SPI5, SPI6};
const mcu_periph_obj_t mcu_spi_sck_list[14] = {
PERIPH(1, 5, &pin_PA05),
PERIPH(2, 5, &pin_PA09),
PERIPH(1, 5, &pin_PB03),
PERIPH(3, 6, &pin_PB03),
PERIPH(2, 5, &pin_PB10),
PERIPH(2, 5, &pin_PB13),
PERIPH(3, 6, &pin_PC10),
PERIPH(2, 5, &pin_PD03),
PERIPH(4, 5, &pin_PE02),
PERIPH(4, 5, &pin_PE12),
PERIPH(5, 5, &pin_PF07),
PERIPH(6, 5, &pin_PG13),
PERIPH(5, 5, &pin_PH06),
PERIPH(2, 5, &pin_PI01),
};
const mcu_periph_obj_t mcu_spi_mosi_list[15] = {
PERIPH(1, 5, &pin_PA07),
PERIPH(3, 7, &pin_PB02),
PERIPH(1, 5, &pin_PB05),
PERIPH(3, 6, &pin_PB05),
PERIPH(2, 5, &pin_PB15),
PERIPH(2, 5, &pin_PC01),
PERIPH(2, 5, &pin_PC03),
PERIPH(3, 6, &pin_PC12),
PERIPH(3, 5, &pin_PD06),
PERIPH(4, 5, &pin_PE06),
PERIPH(4, 5, &pin_PE14),
PERIPH(5, 5, &pin_PF09),
PERIPH(5, 5, &pin_PF11),
PERIPH(6, 5, &pin_PG14),
PERIPH(2, 5, &pin_PI03),
};
const mcu_periph_obj_t mcu_spi_miso_list[12] = {
PERIPH(1, 5, &pin_PA06),
PERIPH(1, 5, &pin_PB04),
PERIPH(3, 6, &pin_PB04),
PERIPH(2, 5, &pin_PB14),
PERIPH(2, 5, &pin_PC02),
PERIPH(3, 6, &pin_PC11),
PERIPH(4, 5, &pin_PE05),
PERIPH(4, 5, &pin_PE13),
PERIPH(5, 5, &pin_PF08),
PERIPH(6, 5, &pin_PG12),
PERIPH(5, 5, &pin_PH07),
PERIPH(2, 5, &pin_PI02),
};
//UART
USART_TypeDef * mcu_uart_banks[MAX_UART] = {USART1, USART2, USART3, UART4, UART5, USART6, UART7, UART8};
bool mcu_uart_has_usart[MAX_UART] = {true, true, true, true, true, true, true, true};
const mcu_periph_obj_t mcu_uart_tx_list[15] = {
PERIPH(4, 8, &pin_PA00),
PERIPH(2, 7, &pin_PA02),
PERIPH(1, 7, &pin_PA09),
PERIPH(1, 7, &pin_PB06),
PERIPH(3, 7, &pin_PB10),
PERIPH(6, 8, &pin_PC06),
PERIPH(3, 7, &pin_PC10),
PERIPH(4, 8, &pin_PC10),
PERIPH(5, 8, &pin_PC12),
PERIPH(2, 7, &pin_PD05),
PERIPH(3, 7, &pin_PD08),
PERIPH(8, 8, &pin_PE01),
PERIPH(7, 8, &pin_PE08),
PERIPH(7, 8, &pin_PF07),
PERIPH(6, 8, &pin_PG14),
};
const mcu_periph_obj_t mcu_uart_rx_list[15] = {
PERIPH(4, 8, &pin_PA01),
PERIPH(2, 7, &pin_PA03),
PERIPH(1, 7, &pin_PA10),
PERIPH(1, 7, &pin_PB07),
PERIPH(3, 7, &pin_PB11),
PERIPH(6, 8, &pin_PC07),
PERIPH(3, 7, &pin_PC11),
PERIPH(4, 8, &pin_PC11),
PERIPH(5, 8, &pin_PD02),
PERIPH(2, 7, &pin_PD06),
PERIPH(3, 7, &pin_PD09),
PERIPH(8, 8, &pin_PE00),
PERIPH(7, 8, &pin_PE07),
PERIPH(7, 8, &pin_PF06),
PERIPH(6, 8, &pin_PG09),
};
//Timers
//TIM6 and TIM7 are basic timers that are only used by DAC, and don't have pins
TIM_TypeDef * mcu_tim_banks[14] = {TIM1, TIM2, TIM3, TIM4, TIM5, NULL, NULL, TIM8, TIM9, TIM10,
TIM11, TIM12, TIM13, TIM14};
const mcu_tim_pin_obj_t mcu_tim_pin_list[55] = {
TIM(2, 1, 1, &pin_PA00),
TIM(5, 2, 1, &pin_PA00),
TIM(2, 1, 2, &pin_PA01),
TIM(5, 2, 2, &pin_PA01),
TIM(2, 1, 3, &pin_PA02),
TIM(5, 2, 3, &pin_PA02),
TIM(9, 3, 1, &pin_PA02),
TIM(2, 1, 4, &pin_PA03),
TIM(5, 2, 4, &pin_PA03),
TIM(9, 3, 2, &pin_PA03),
TIM(2, 1, 1, &pin_PA05),
TIM(3, 2, 1, &pin_PA06),
TIM(3, 2, 2, &pin_PA07),
TIM(1, 1, 1, &pin_PA08),
TIM(1, 1, 2, &pin_PA09),
TIM(1, 1, 3, &pin_PA10),
TIM(1, 1, 4, &pin_PA11),
TIM(2, 1, 1, &pin_PA15),
TIM(3, 2, 3, &pin_PB00),
TIM(3, 2, 4, &pin_PB01),
TIM(2, 1, 2, &pin_PB03),
TIM(3, 2, 1, &pin_PB04),
TIM(3, 2, 2, &pin_PB05),
TIM(4, 2, 1, &pin_PB06),
TIM(4, 2, 2, &pin_PB07),
TIM(4, 2, 3, &pin_PB08),
TIM(4, 2, 4, &pin_PB09),
TIM(2, 1, 3, &pin_PB10),
TIM(2, 1, 4, &pin_PB11),
TIM(3, 2, 1, &pin_PC06),
TIM(8, 3, 1, &pin_PC06),
TIM(3, 2, 2, &pin_PC07),
TIM(8, 3, 2, &pin_PC07),
TIM(3, 2, 3, &pin_PC08),
TIM(8, 3, 3, &pin_PC08),
TIM(3, 2, 4, &pin_PC09),
TIM(8, 3, 4, &pin_PC09),
TIM(4, 2, 1, &pin_PD12),
TIM(4, 2, 2, &pin_PD13),
TIM(4, 2, 3, &pin_PD14),
TIM(4, 2, 4, &pin_PD15),
TIM(9, 3, 1, &pin_PE05),
TIM(9, 3, 2, &pin_PE06),
TIM(1, 1, 1, &pin_PE09),
TIM(1, 1, 2, &pin_PE11),
TIM(1, 1, 3, &pin_PE13),
TIM(1, 1, 4, &pin_PE14),
TIM(5, 2, 1, &pin_PH10),
TIM(5, 2, 2, &pin_PH11),
TIM(5, 2, 3, &pin_PH12),
TIM(5, 2, 4, &pin_PI00),
TIM(8, 3, 4, &pin_PI02),
TIM(8, 3, 1, &pin_PI05),
TIM(8, 3, 2, &pin_PI06),
TIM(8, 3, 3, &pin_PI07),
};

View File

@ -0,0 +1,58 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
* Copyright (c) 2020 Mark Olsson <mark@markolsson.se>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F746XX_PERIPH_H
#define MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F746XX_PERIPH_H
//I2C
extern I2C_TypeDef * mcu_i2c_banks[4];
const mcu_periph_obj_t mcu_i2c_sda_list[10];
const mcu_periph_obj_t mcu_i2c_scl_list[10];
//SPI
extern SPI_TypeDef * mcu_spi_banks[6];
const mcu_periph_obj_t mcu_spi_sck_list[14];
const mcu_periph_obj_t mcu_spi_mosi_list[15];
const mcu_periph_obj_t mcu_spi_miso_list[12];
//UART
extern USART_TypeDef * mcu_uart_banks[MAX_UART];
extern bool mcu_uart_has_usart[MAX_UART];
const mcu_periph_obj_t mcu_uart_tx_list[15];
const mcu_periph_obj_t mcu_uart_rx_list[15];
//Timers
#define TIM_BANK_ARRAY_LEN 14
#define TIM_PIN_ARRAY_LEN 55
extern TIM_TypeDef * mcu_tim_banks[TIM_BANK_ARRAY_LEN];
const mcu_tim_pin_obj_t mcu_tim_pin_list[TIM_PIN_ARRAY_LEN];
#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F746XX_PERIPH_H

View File

@ -0,0 +1,208 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/obj.h"
#include "py/mphal.h"
#include "peripherals/pins.h"
// Todo: some pins do have ADCs, but the module isn't set up yet.
const mcu_pin_obj_t pin_PA00 = PIN(0, 0, NO_ADC);
const mcu_pin_obj_t pin_PA01 = PIN(0, 1, NO_ADC);
const mcu_pin_obj_t pin_PA02 = PIN(0, 2, NO_ADC);
const mcu_pin_obj_t pin_PA03 = PIN(0, 3, NO_ADC);
const mcu_pin_obj_t pin_PA04 = PIN(0, 4, NO_ADC);
const mcu_pin_obj_t pin_PA05 = PIN(0, 5, NO_ADC);
const mcu_pin_obj_t pin_PA06 = PIN(0, 6, NO_ADC);
const mcu_pin_obj_t pin_PA07 = PIN(0, 7, NO_ADC);
const mcu_pin_obj_t pin_PA08 = PIN(0, 8, NO_ADC);
const mcu_pin_obj_t pin_PA09 = PIN(0, 9, NO_ADC);
const mcu_pin_obj_t pin_PA10 = PIN(0, 10, NO_ADC);
const mcu_pin_obj_t pin_PA11 = PIN(0, 11, NO_ADC);
const mcu_pin_obj_t pin_PA12 = PIN(0, 12, NO_ADC);
const mcu_pin_obj_t pin_PA13 = PIN(0, 13, NO_ADC);
const mcu_pin_obj_t pin_PA14 = PIN(0, 14, NO_ADC);
const mcu_pin_obj_t pin_PA15 = PIN(0, 15, NO_ADC);
const mcu_pin_obj_t pin_PB00 = PIN(1, 0, NO_ADC);
const mcu_pin_obj_t pin_PB01 = PIN(1, 1, NO_ADC);
const mcu_pin_obj_t pin_PB02 = PIN(1, 2, NO_ADC);
const mcu_pin_obj_t pin_PB03 = PIN(1, 3, NO_ADC);
const mcu_pin_obj_t pin_PB04 = PIN(1, 4, NO_ADC);
const mcu_pin_obj_t pin_PB05 = PIN(1, 5, NO_ADC);
const mcu_pin_obj_t pin_PB06 = PIN(1, 6, NO_ADC);
const mcu_pin_obj_t pin_PB07 = PIN(1, 7, NO_ADC);
const mcu_pin_obj_t pin_PB08 = PIN(1, 8, NO_ADC);
const mcu_pin_obj_t pin_PB09 = PIN(1, 9, NO_ADC);
const mcu_pin_obj_t pin_PB10 = PIN(1, 10, NO_ADC);
const mcu_pin_obj_t pin_PB11 = PIN(1, 11, NO_ADC);
const mcu_pin_obj_t pin_PB12 = PIN(1, 12, NO_ADC);
const mcu_pin_obj_t pin_PB13 = PIN(1, 13, NO_ADC);
const mcu_pin_obj_t pin_PB14 = PIN(1, 14, NO_ADC);
const mcu_pin_obj_t pin_PB15 = PIN(1, 15, NO_ADC);
const mcu_pin_obj_t pin_PC00 = PIN(2, 0, NO_ADC);
const mcu_pin_obj_t pin_PC01 = PIN(2, 1, NO_ADC);
const mcu_pin_obj_t pin_PC02 = PIN(2, 2, NO_ADC);
const mcu_pin_obj_t pin_PC03 = PIN(2, 3, NO_ADC);
const mcu_pin_obj_t pin_PC04 = PIN(2, 4, NO_ADC);
const mcu_pin_obj_t pin_PC05 = PIN(2, 5, NO_ADC);
const mcu_pin_obj_t pin_PC06 = PIN(2, 6, NO_ADC);
const mcu_pin_obj_t pin_PC07 = PIN(2, 7, NO_ADC);
const mcu_pin_obj_t pin_PC08 = PIN(2, 8, NO_ADC);
const mcu_pin_obj_t pin_PC09 = PIN(2, 9, NO_ADC);
const mcu_pin_obj_t pin_PC10 = PIN(2, 10, NO_ADC);
const mcu_pin_obj_t pin_PC11 = PIN(2, 11, NO_ADC);
const mcu_pin_obj_t pin_PC12 = PIN(2, 12, NO_ADC);
const mcu_pin_obj_t pin_PC13 = PIN(2, 13, NO_ADC);
const mcu_pin_obj_t pin_PC14 = PIN(2, 14, NO_ADC);
const mcu_pin_obj_t pin_PC15 = PIN(2, 15, NO_ADC);
const mcu_pin_obj_t pin_PD00 = PIN(3, 0, NO_ADC);
const mcu_pin_obj_t pin_PD01 = PIN(3, 1, NO_ADC);
const mcu_pin_obj_t pin_PD02 = PIN(3, 2, NO_ADC);
const mcu_pin_obj_t pin_PD03 = PIN(3, 3, NO_ADC);
const mcu_pin_obj_t pin_PD04 = PIN(3, 4, NO_ADC);
const mcu_pin_obj_t pin_PD05 = PIN(3, 5, NO_ADC);
const mcu_pin_obj_t pin_PD06 = PIN(3, 6, NO_ADC);
const mcu_pin_obj_t pin_PD07 = PIN(3, 7, NO_ADC);
const mcu_pin_obj_t pin_PD08 = PIN(3, 8, NO_ADC);
const mcu_pin_obj_t pin_PD09 = PIN(3, 9, NO_ADC);
const mcu_pin_obj_t pin_PD10 = PIN(3, 10, NO_ADC);
const mcu_pin_obj_t pin_PD11 = PIN(3, 11, NO_ADC);
const mcu_pin_obj_t pin_PD12 = PIN(3, 12, NO_ADC);
const mcu_pin_obj_t pin_PD13 = PIN(3, 13, NO_ADC);
const mcu_pin_obj_t pin_PD14 = PIN(3, 14, NO_ADC);
const mcu_pin_obj_t pin_PD15 = PIN(3, 15, NO_ADC);
const mcu_pin_obj_t pin_PE00 = PIN(4, 0, NO_ADC);
const mcu_pin_obj_t pin_PE01 = PIN(4, 1, NO_ADC);
const mcu_pin_obj_t pin_PE02 = PIN(4, 2, NO_ADC);
const mcu_pin_obj_t pin_PE03 = PIN(4, 3, NO_ADC);
const mcu_pin_obj_t pin_PE04 = PIN(4, 4, NO_ADC);
const mcu_pin_obj_t pin_PE05 = PIN(4, 5, NO_ADC);
const mcu_pin_obj_t pin_PE06 = PIN(4, 6, NO_ADC);
const mcu_pin_obj_t pin_PE07 = PIN(4, 7, NO_ADC);
const mcu_pin_obj_t pin_PE08 = PIN(4, 8, NO_ADC);
const mcu_pin_obj_t pin_PE09 = PIN(4, 9, NO_ADC);
const mcu_pin_obj_t pin_PE10 = PIN(4, 10, NO_ADC);
const mcu_pin_obj_t pin_PE11 = PIN(4, 11, NO_ADC);
const mcu_pin_obj_t pin_PE12 = PIN(4, 12, NO_ADC);
const mcu_pin_obj_t pin_PE13 = PIN(4, 13, NO_ADC);
const mcu_pin_obj_t pin_PE14 = PIN(4, 14, NO_ADC);
const mcu_pin_obj_t pin_PE15 = PIN(4, 15, NO_ADC);
const mcu_pin_obj_t pin_PF00 = PIN(5, 0, NO_ADC);
const mcu_pin_obj_t pin_PF01 = PIN(5, 1, NO_ADC);
const mcu_pin_obj_t pin_PF02 = PIN(5, 2, NO_ADC);
const mcu_pin_obj_t pin_PF03 = PIN(5, 3, NO_ADC);
const mcu_pin_obj_t pin_PF04 = PIN(5, 4, NO_ADC);
const mcu_pin_obj_t pin_PF05 = PIN(5, 5, NO_ADC);
const mcu_pin_obj_t pin_PF06 = PIN(5, 6, NO_ADC);
const mcu_pin_obj_t pin_PF07 = PIN(5, 7, NO_ADC);
const mcu_pin_obj_t pin_PF08 = PIN(5, 8, NO_ADC);
const mcu_pin_obj_t pin_PF09 = PIN(5, 9, NO_ADC);
const mcu_pin_obj_t pin_PF10 = PIN(5, 10, NO_ADC);
const mcu_pin_obj_t pin_PF11 = PIN(5, 11, NO_ADC);
const mcu_pin_obj_t pin_PF12 = PIN(5, 12, NO_ADC);
const mcu_pin_obj_t pin_PF13 = PIN(5, 13, NO_ADC);
const mcu_pin_obj_t pin_PF14 = PIN(5, 14, NO_ADC);
const mcu_pin_obj_t pin_PF15 = PIN(5, 15, NO_ADC);
const mcu_pin_obj_t pin_PG00 = PIN(6, 0, NO_ADC);
const mcu_pin_obj_t pin_PG01 = PIN(6, 1, NO_ADC);
const mcu_pin_obj_t pin_PG02 = PIN(6, 2, NO_ADC);
const mcu_pin_obj_t pin_PG03 = PIN(6, 3, NO_ADC);
const mcu_pin_obj_t pin_PG04 = PIN(6, 4, NO_ADC);
const mcu_pin_obj_t pin_PG05 = PIN(6, 5, NO_ADC);
const mcu_pin_obj_t pin_PG06 = PIN(6, 6, NO_ADC);
const mcu_pin_obj_t pin_PG07 = PIN(6, 7, NO_ADC);
const mcu_pin_obj_t pin_PG08 = PIN(6, 8, NO_ADC);
const mcu_pin_obj_t pin_PG09 = PIN(6, 9, NO_ADC);
const mcu_pin_obj_t pin_PG10 = PIN(6, 10, NO_ADC);
const mcu_pin_obj_t pin_PG11 = PIN(6, 11, NO_ADC);
const mcu_pin_obj_t pin_PG12 = PIN(6, 12, NO_ADC);
const mcu_pin_obj_t pin_PG13 = PIN(6, 13, NO_ADC);
const mcu_pin_obj_t pin_PG14 = PIN(6, 14, NO_ADC);
const mcu_pin_obj_t pin_PG15 = PIN(6, 15, NO_ADC);
const mcu_pin_obj_t pin_PH00 = PIN(7, 0, NO_ADC);
const mcu_pin_obj_t pin_PH01 = PIN(7, 1, NO_ADC);
const mcu_pin_obj_t pin_PH02 = PIN(7, 2, NO_ADC);
const mcu_pin_obj_t pin_PH03 = PIN(7, 3, NO_ADC);
const mcu_pin_obj_t pin_PH04 = PIN(7, 4, NO_ADC);
const mcu_pin_obj_t pin_PH05 = PIN(7, 5, NO_ADC);
const mcu_pin_obj_t pin_PH06 = PIN(7, 6, NO_ADC);
const mcu_pin_obj_t pin_PH07 = PIN(7, 7, NO_ADC);
const mcu_pin_obj_t pin_PH08 = PIN(7, 8, NO_ADC);
const mcu_pin_obj_t pin_PH09 = PIN(7, 9, NO_ADC);
const mcu_pin_obj_t pin_PH10 = PIN(7, 10, NO_ADC);
const mcu_pin_obj_t pin_PH11 = PIN(7, 11, NO_ADC);
const mcu_pin_obj_t pin_PH12 = PIN(7, 12, NO_ADC);
const mcu_pin_obj_t pin_PH13 = PIN(7, 13, NO_ADC);
const mcu_pin_obj_t pin_PH14 = PIN(7, 14, NO_ADC);
const mcu_pin_obj_t pin_PH15 = PIN(7, 15, NO_ADC);
const mcu_pin_obj_t pin_PI00 = PIN(8, 0, NO_ADC);
const mcu_pin_obj_t pin_PI01 = PIN(8, 1, NO_ADC);
const mcu_pin_obj_t pin_PI02 = PIN(8, 2, NO_ADC);
const mcu_pin_obj_t pin_PI03 = PIN(8, 3, NO_ADC);
const mcu_pin_obj_t pin_PI04 = PIN(8, 4, NO_ADC);
const mcu_pin_obj_t pin_PI05 = PIN(8, 5, NO_ADC);
const mcu_pin_obj_t pin_PI06 = PIN(8, 6, NO_ADC);
const mcu_pin_obj_t pin_PI07 = PIN(8, 7, NO_ADC);
const mcu_pin_obj_t pin_PI08 = PIN(8, 8, NO_ADC);
const mcu_pin_obj_t pin_PI09 = PIN(8, 9, NO_ADC);
const mcu_pin_obj_t pin_PI10 = PIN(8, 10, NO_ADC);
const mcu_pin_obj_t pin_PI11 = PIN(8, 11, NO_ADC);
const mcu_pin_obj_t pin_PI12 = PIN(8, 12, NO_ADC);
const mcu_pin_obj_t pin_PI13 = PIN(8, 13, NO_ADC);
const mcu_pin_obj_t pin_PI14 = PIN(8, 14, NO_ADC);
const mcu_pin_obj_t pin_PI15 = PIN(8, 15, NO_ADC);
const mcu_pin_obj_t pin_PJ00 = PIN(9, 0, NO_ADC);
const mcu_pin_obj_t pin_PJ01 = PIN(9, 1, NO_ADC);
const mcu_pin_obj_t pin_PJ02 = PIN(9, 2, NO_ADC);
const mcu_pin_obj_t pin_PJ03 = PIN(9, 3, NO_ADC);
const mcu_pin_obj_t pin_PJ04 = PIN(9, 4, NO_ADC);
const mcu_pin_obj_t pin_PJ05 = PIN(9, 5, NO_ADC);
const mcu_pin_obj_t pin_PJ06 = PIN(9, 6, NO_ADC);
const mcu_pin_obj_t pin_PJ07 = PIN(9, 7, NO_ADC);
const mcu_pin_obj_t pin_PJ08 = PIN(9, 8, NO_ADC);
const mcu_pin_obj_t pin_PJ09 = PIN(9, 9, NO_ADC);
const mcu_pin_obj_t pin_PJ10 = PIN(9, 10, NO_ADC);
const mcu_pin_obj_t pin_PJ11 = PIN(9, 11, NO_ADC);
const mcu_pin_obj_t pin_PJ12 = PIN(9, 12, NO_ADC);
const mcu_pin_obj_t pin_PJ13 = PIN(9, 13, NO_ADC);
const mcu_pin_obj_t pin_PJ14 = PIN(9, 14, NO_ADC);
const mcu_pin_obj_t pin_PJ15 = PIN(9, 15, NO_ADC);
const mcu_pin_obj_t pin_PK00 = PIN(10, 0, NO_ADC);
const mcu_pin_obj_t pin_PK01 = PIN(10, 1, NO_ADC);
const mcu_pin_obj_t pin_PK02 = PIN(10, 2, NO_ADC);
const mcu_pin_obj_t pin_PK03 = PIN(10, 3, NO_ADC);
const mcu_pin_obj_t pin_PK04 = PIN(10, 4, NO_ADC);
const mcu_pin_obj_t pin_PK05 = PIN(10, 5, NO_ADC);
const mcu_pin_obj_t pin_PK06 = PIN(10, 6, NO_ADC);
const mcu_pin_obj_t pin_PK07 = PIN(10, 7, NO_ADC);
const mcu_pin_obj_t pin_PK08 = PIN(10, 8, NO_ADC);
const mcu_pin_obj_t pin_PK09 = PIN(10, 9, NO_ADC);
const mcu_pin_obj_t pin_PK10 = PIN(10, 10, NO_ADC);
const mcu_pin_obj_t pin_PK11 = PIN(10, 11, NO_ADC);
const mcu_pin_obj_t pin_PK12 = PIN(10, 12, NO_ADC);
const mcu_pin_obj_t pin_PK13 = PIN(10, 13, NO_ADC);
const mcu_pin_obj_t pin_PK14 = PIN(10, 14, NO_ADC);
const mcu_pin_obj_t pin_PK15 = PIN(10, 15, NO_ADC);

View File

@ -0,0 +1,207 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F746XX_PINS_H
#define MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F746XX_PINS_H
extern const mcu_pin_obj_t pin_PA00;
extern const mcu_pin_obj_t pin_PA01;
extern const mcu_pin_obj_t pin_PA02;
extern const mcu_pin_obj_t pin_PA03;
extern const mcu_pin_obj_t pin_PA04;
extern const mcu_pin_obj_t pin_PA05;
extern const mcu_pin_obj_t pin_PA06;
extern const mcu_pin_obj_t pin_PA07;
extern const mcu_pin_obj_t pin_PA08;
extern const mcu_pin_obj_t pin_PA09;
extern const mcu_pin_obj_t pin_PA10;
extern const mcu_pin_obj_t pin_PA11;
extern const mcu_pin_obj_t pin_PA12;
extern const mcu_pin_obj_t pin_PA13;
extern const mcu_pin_obj_t pin_PA14;
extern const mcu_pin_obj_t pin_PA15;
extern const mcu_pin_obj_t pin_PB00;
extern const mcu_pin_obj_t pin_PB01;
extern const mcu_pin_obj_t pin_PB02;
extern const mcu_pin_obj_t pin_PB03;
extern const mcu_pin_obj_t pin_PB04;
extern const mcu_pin_obj_t pin_PB05;
extern const mcu_pin_obj_t pin_PB06;
extern const mcu_pin_obj_t pin_PB07;
extern const mcu_pin_obj_t pin_PB08;
extern const mcu_pin_obj_t pin_PB09;
extern const mcu_pin_obj_t pin_PB10;
extern const mcu_pin_obj_t pin_PB11;
extern const mcu_pin_obj_t pin_PB12;
extern const mcu_pin_obj_t pin_PB13;
extern const mcu_pin_obj_t pin_PB14;
extern const mcu_pin_obj_t pin_PB15;
extern const mcu_pin_obj_t pin_PC00;
extern const mcu_pin_obj_t pin_PC01;
extern const mcu_pin_obj_t pin_PC02;
extern const mcu_pin_obj_t pin_PC03;
extern const mcu_pin_obj_t pin_PC04;
extern const mcu_pin_obj_t pin_PC05;
extern const mcu_pin_obj_t pin_PC06;
extern const mcu_pin_obj_t pin_PC07;
extern const mcu_pin_obj_t pin_PC08;
extern const mcu_pin_obj_t pin_PC09;
extern const mcu_pin_obj_t pin_PC10;
extern const mcu_pin_obj_t pin_PC11;
extern const mcu_pin_obj_t pin_PC12;
extern const mcu_pin_obj_t pin_PC13;
extern const mcu_pin_obj_t pin_PC14;
extern const mcu_pin_obj_t pin_PC15;
extern const mcu_pin_obj_t pin_PD00;
extern const mcu_pin_obj_t pin_PD01;
extern const mcu_pin_obj_t pin_PD02;
extern const mcu_pin_obj_t pin_PD03;
extern const mcu_pin_obj_t pin_PD04;
extern const mcu_pin_obj_t pin_PD05;
extern const mcu_pin_obj_t pin_PD06;
extern const mcu_pin_obj_t pin_PD07;
extern const mcu_pin_obj_t pin_PD08;
extern const mcu_pin_obj_t pin_PD09;
extern const mcu_pin_obj_t pin_PD10;
extern const mcu_pin_obj_t pin_PD11;
extern const mcu_pin_obj_t pin_PD12;
extern const mcu_pin_obj_t pin_PD13;
extern const mcu_pin_obj_t pin_PD14;
extern const mcu_pin_obj_t pin_PD15;
extern const mcu_pin_obj_t pin_PE00;
extern const mcu_pin_obj_t pin_PE01;
extern const mcu_pin_obj_t pin_PE02;
extern const mcu_pin_obj_t pin_PE03;
extern const mcu_pin_obj_t pin_PE04;
extern const mcu_pin_obj_t pin_PE05;
extern const mcu_pin_obj_t pin_PE06;
extern const mcu_pin_obj_t pin_PE07;
extern const mcu_pin_obj_t pin_PE08;
extern const mcu_pin_obj_t pin_PE09;
extern const mcu_pin_obj_t pin_PE10;
extern const mcu_pin_obj_t pin_PE11;
extern const mcu_pin_obj_t pin_PE12;
extern const mcu_pin_obj_t pin_PE13;
extern const mcu_pin_obj_t pin_PE14;
extern const mcu_pin_obj_t pin_PE15;
extern const mcu_pin_obj_t pin_PF00;
extern const mcu_pin_obj_t pin_PF01;
extern const mcu_pin_obj_t pin_PF02;
extern const mcu_pin_obj_t pin_PF03;
extern const mcu_pin_obj_t pin_PF04;
extern const mcu_pin_obj_t pin_PF05;
extern const mcu_pin_obj_t pin_PF06;
extern const mcu_pin_obj_t pin_PF07;
extern const mcu_pin_obj_t pin_PF08;
extern const mcu_pin_obj_t pin_PF09;
extern const mcu_pin_obj_t pin_PF10;
extern const mcu_pin_obj_t pin_PF11;
extern const mcu_pin_obj_t pin_PF12;
extern const mcu_pin_obj_t pin_PF13;
extern const mcu_pin_obj_t pin_PF14;
extern const mcu_pin_obj_t pin_PF15;
extern const mcu_pin_obj_t pin_PG00;
extern const mcu_pin_obj_t pin_PG01;
extern const mcu_pin_obj_t pin_PG02;
extern const mcu_pin_obj_t pin_PG03;
extern const mcu_pin_obj_t pin_PG04;
extern const mcu_pin_obj_t pin_PG05;
extern const mcu_pin_obj_t pin_PG06;
extern const mcu_pin_obj_t pin_PG07;
extern const mcu_pin_obj_t pin_PG08;
extern const mcu_pin_obj_t pin_PG09;
extern const mcu_pin_obj_t pin_PG10;
extern const mcu_pin_obj_t pin_PG11;
extern const mcu_pin_obj_t pin_PG12;
extern const mcu_pin_obj_t pin_PG13;
extern const mcu_pin_obj_t pin_PG14;
extern const mcu_pin_obj_t pin_PG15;
extern const mcu_pin_obj_t pin_PH00;
extern const mcu_pin_obj_t pin_PH01;
extern const mcu_pin_obj_t pin_PH02;
extern const mcu_pin_obj_t pin_PH03;
extern const mcu_pin_obj_t pin_PH04;
extern const mcu_pin_obj_t pin_PH05;
extern const mcu_pin_obj_t pin_PH06;
extern const mcu_pin_obj_t pin_PH07;
extern const mcu_pin_obj_t pin_PH08;
extern const mcu_pin_obj_t pin_PH09;
extern const mcu_pin_obj_t pin_PH10;
extern const mcu_pin_obj_t pin_PH11;
extern const mcu_pin_obj_t pin_PH12;
extern const mcu_pin_obj_t pin_PH13;
extern const mcu_pin_obj_t pin_PH14;
extern const mcu_pin_obj_t pin_PH15;
extern const mcu_pin_obj_t pin_PI00;
extern const mcu_pin_obj_t pin_PI01;
extern const mcu_pin_obj_t pin_PI02;
extern const mcu_pin_obj_t pin_PI03;
extern const mcu_pin_obj_t pin_PI04;
extern const mcu_pin_obj_t pin_PI05;
extern const mcu_pin_obj_t pin_PI06;
extern const mcu_pin_obj_t pin_PI07;
extern const mcu_pin_obj_t pin_PI08;
extern const mcu_pin_obj_t pin_PI09;
extern const mcu_pin_obj_t pin_PI10;
extern const mcu_pin_obj_t pin_PI11;
extern const mcu_pin_obj_t pin_PI12;
extern const mcu_pin_obj_t pin_PI13;
extern const mcu_pin_obj_t pin_PI14;
extern const mcu_pin_obj_t pin_PI15;
extern const mcu_pin_obj_t pin_PJ00;
extern const mcu_pin_obj_t pin_PJ01;
extern const mcu_pin_obj_t pin_PJ02;
extern const mcu_pin_obj_t pin_PJ03;
extern const mcu_pin_obj_t pin_PJ04;
extern const mcu_pin_obj_t pin_PJ05;
extern const mcu_pin_obj_t pin_PJ06;
extern const mcu_pin_obj_t pin_PJ07;
extern const mcu_pin_obj_t pin_PJ08;
extern const mcu_pin_obj_t pin_PJ09;
extern const mcu_pin_obj_t pin_PJ10;
extern const mcu_pin_obj_t pin_PJ11;
extern const mcu_pin_obj_t pin_PJ12;
extern const mcu_pin_obj_t pin_PJ13;
extern const mcu_pin_obj_t pin_PJ14;
extern const mcu_pin_obj_t pin_PJ15;
extern const mcu_pin_obj_t pin_PK00;
extern const mcu_pin_obj_t pin_PK01;
extern const mcu_pin_obj_t pin_PK02;
extern const mcu_pin_obj_t pin_PK03;
extern const mcu_pin_obj_t pin_PK04;
extern const mcu_pin_obj_t pin_PK05;
extern const mcu_pin_obj_t pin_PK06;
extern const mcu_pin_obj_t pin_PK07;
extern const mcu_pin_obj_t pin_PK08;
extern const mcu_pin_obj_t pin_PK09;
extern const mcu_pin_obj_t pin_PK10;
extern const mcu_pin_obj_t pin_PK11;
extern const mcu_pin_obj_t pin_PK12;
extern const mcu_pin_obj_t pin_PK13;
extern const mcu_pin_obj_t pin_PK14;
extern const mcu_pin_obj_t pin_PK15;
#endif // MICROPY_INCLUDED_STM32_PERIPHERALS_STM32F746XX_PINS_H

View File

@ -5,6 +5,7 @@
* *
* Copyright (c) 2013, 2014 Damien P. George * Copyright (c) 2013, 2014 Damien P. George
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries * Copyright (c) 2020 Lucian Copeland for Adafruit Industries
* Copyright (c) 2020 Mark Olsson <mark@markolsson.se>
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -67,6 +68,13 @@
#define INTERNAL_FLASH_FILESYSTEM_START_ADDR 0x08004000 #define INTERNAL_FLASH_FILESYSTEM_START_ADDR 0x08004000
#endif #endif
/* Note this applies to STM32F769xG only, STM32F746xE has 512KB */
#ifdef STM32F746xx
#define STM32_FLASH_SIZE 0x100000 //1MB
#define INTERNAL_FLASH_FILESYSTEM_SIZE 0x18000 //96KiB
#define INTERNAL_FLASH_FILESYSTEM_START_ADDR 0x08008000
#endif
#ifdef STM32F767xx #ifdef STM32F767xx
#define STM32_FLASH_SIZE 0x200000 //2MB #define STM32_FLASH_SIZE 0x200000 //2MB
#define INTERNAL_FLASH_FILESYSTEM_SIZE 0x18000 //96KiB #define INTERNAL_FLASH_FILESYSTEM_SIZE 0x18000 //96KiB

View File

@ -181,8 +181,8 @@ endif
ifeq ($(CIRCUITPY_PIXELBUF),1) ifeq ($(CIRCUITPY_PIXELBUF),1)
SRC_PATTERNS += _pixelbuf/% SRC_PATTERNS += _pixelbuf/%
endif endif
ifeq ($(CIRCUITPY_PROTOMATTER),1) ifeq ($(CIRCUITPY_RGBMATRIX),1)
SRC_PATTERNS += _protomatter/% SRC_PATTERNS += rgbmatrix/%
endif endif
ifeq ($(CIRCUITPY_PULSEIO),1) ifeq ($(CIRCUITPY_PULSEIO),1)
SRC_PATTERNS += pulseio/% SRC_PATTERNS += pulseio/%
@ -248,8 +248,6 @@ SRC_COMMON_HAL_ALL = \
_bleio/PacketBuffer.c \ _bleio/PacketBuffer.c \
_bleio/Service.c \ _bleio/Service.c \
_bleio/UUID.c \ _bleio/UUID.c \
_protomatter/Protomatter.c \
_protomatter/__init__.c \
analogio/AnalogIn.c \ analogio/AnalogIn.c \
analogio/AnalogOut.c \ analogio/AnalogOut.c \
analogio/__init__.c \ analogio/__init__.c \
@ -279,6 +277,8 @@ SRC_COMMON_HAL_ALL = \
nvm/ByteArray.c \ nvm/ByteArray.c \
nvm/__init__.c \ nvm/__init__.c \
os/__init__.c \ os/__init__.c \
rgbmatrix/RGBMatrix.c \
rgbmatrix/__init__.c \
pulseio/PWMOut.c \ pulseio/PWMOut.c \
pulseio/PulseIn.c \ pulseio/PulseIn.c \
pulseio/PulseOut.c \ pulseio/PulseOut.c \
@ -323,8 +323,6 @@ SRC_SHARED_MODULE_ALL = \
_bleio/ScanResults.c \ _bleio/ScanResults.c \
_pixelbuf/PixelBuf.c \ _pixelbuf/PixelBuf.c \
_pixelbuf/__init__.c \ _pixelbuf/__init__.c \
_protomatter/Protomatter.c \
_protomatter/__init__.c \
_stage/Layer.c \ _stage/Layer.c \
_stage/Text.c \ _stage/Text.c \
_stage/__init__.c \ _stage/__init__.c \
@ -368,6 +366,8 @@ SRC_SHARED_MODULE_ALL = \
random/__init__.c \ random/__init__.c \
socket/__init__.c \ socket/__init__.c \
network/__init__.c \ network/__init__.c \
rgbmatrix/RGBMatrix.c \
rgbmatrix/__init__.c \
storage/__init__.c \ storage/__init__.c \
struct/__init__.c \ struct/__init__.c \
terminalio/Terminal.c \ terminalio/Terminal.c \
@ -413,11 +413,11 @@ SRC_MOD += $(addprefix lib/mp3/src/, \
) )
$(BUILD)/lib/mp3/src/buffers.o: CFLAGS += -include "py/misc.h" -D'MPDEC_ALLOCATOR(x)=m_malloc(x,0)' -D'MPDEC_FREE(x)=m_free(x)' $(BUILD)/lib/mp3/src/buffers.o: CFLAGS += -include "py/misc.h" -D'MPDEC_ALLOCATOR(x)=m_malloc(x,0)' -D'MPDEC_FREE(x)=m_free(x)'
endif endif
ifeq ($(CIRCUITPY_PROTOMATTER),1) ifeq ($(CIRCUITPY_RGBMATRIX),1)
SRC_MOD += $(addprefix lib/protomatter/, \ SRC_MOD += $(addprefix lib/protomatter/, \
core.c \ core.c \
) )
$(BUILD)/lib/protomatter/core.o: CFLAGS += -include "shared-module/_protomatter/allocator.h" -DCIRCUITPY -Wno-missing-braces $(BUILD)/lib/protomatter/core.o: CFLAGS += -include "shared-module/rgbmatrix/allocator.h" -DCIRCUITPY -Wno-missing-braces
endif endif
# All possible sources are listed here, and are filtered by SRC_PATTERNS. # All possible sources are listed here, and are filtered by SRC_PATTERNS.

View File

@ -454,11 +454,11 @@ extern const struct _mp_obj_module_t pixelbuf_module;
#define PIXELBUF_MODULE #define PIXELBUF_MODULE
#endif #endif
#if CIRCUITPY_PROTOMATTER #if CIRCUITPY_RGBMATRIX
extern const struct _mp_obj_module_t protomatter_module; extern const struct _mp_obj_module_t rgbmatrix_module;
#define PROTOMATTER_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__protomatter),(mp_obj_t)&protomatter_module }, #define RGBMATRIX_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rgbmatrix),(mp_obj_t)&rgbmatrix_module },
#else #else
#define PROTOMATTER_MODULE #define RGBMATRIX_MODULE
#endif #endif
#if CIRCUITPY_PULSEIO #if CIRCUITPY_PULSEIO
@ -651,10 +651,10 @@ extern const struct _mp_obj_module_t ustack_module;
PEW_MODULE \ PEW_MODULE \
PIXELBUF_MODULE \ PIXELBUF_MODULE \
PS2IO_MODULE \ PS2IO_MODULE \
PROTOMATTER_MODULE \
PULSEIO_MODULE \ PULSEIO_MODULE \
RANDOM_MODULE \ RANDOM_MODULE \
RE_MODULE \ RE_MODULE \
RGBMATRIX_MODULE \
ROTARYIO_MODULE \ ROTARYIO_MODULE \
RTC_MODULE \ RTC_MODULE \
SAMD_MODULE \ SAMD_MODULE \

View File

@ -181,10 +181,10 @@ endif
CFLAGS += -DCIRCUITPY_PIXELBUF=$(CIRCUITPY_PIXELBUF) CFLAGS += -DCIRCUITPY_PIXELBUF=$(CIRCUITPY_PIXELBUF)
# Only for SAMD boards for the moment # Only for SAMD boards for the moment
ifndef CIRCUITPY_PROTOMATTER ifndef CIRCUITPY_RGBMATRIX
CIRCUITPY_PROTOMATTER = 0 CIRCUITPY_RGBMATRIX = 0
endif endif
CFLAGS += -DCIRCUITPY_PROTOMATTER=$(CIRCUITPY_PROTOMATTER) CFLAGS += -DCIRCUITPY_RGBMATRIX=$(CIRCUITPY_RGBMATRIX)
ifndef CIRCUITPY_PULSEIO ifndef CIRCUITPY_PULSEIO
CIRCUITPY_PULSEIO = 1 CIRCUITPY_PULSEIO = 1

View File

@ -84,6 +84,7 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_
mp_obj_t spi = args[ARG_spi_bus].u_obj; mp_obj_t spi = args[ARG_spi_bus].u_obj;
displayio_fourwire_obj_t* self = &allocate_display_bus_or_raise()->fourwire_bus; displayio_fourwire_obj_t* self = &allocate_display_bus_or_raise()->fourwire_bus;
self->base.type = &displayio_fourwire_type;
uint8_t polarity = args[ARG_polarity].u_int; uint8_t polarity = args[ARG_polarity].u_int;
if (polarity != 0 && polarity != 1) { if (polarity != 0 && polarity != 1) {

View File

@ -73,6 +73,7 @@ STATIC mp_obj_t displayio_i2cdisplay_make_new(const mp_obj_type_t *type, size_t
mp_obj_t i2c = args[ARG_i2c_bus].u_obj; mp_obj_t i2c = args[ARG_i2c_bus].u_obj;
displayio_i2cdisplay_obj_t* self = &allocate_display_bus_or_raise()->i2cdisplay_bus; displayio_i2cdisplay_obj_t* self = &allocate_display_bus_or_raise()->i2cdisplay_bus;
self->base.type = &displayio_i2cdisplay_type;
common_hal_displayio_i2cdisplay_construct(self, common_hal_displayio_i2cdisplay_construct(self,
MP_OBJ_TO_PTR(i2c), args[ARG_device_address].u_int, reset); MP_OBJ_TO_PTR(i2c), args[ARG_device_address].u_int, reset);

View File

@ -84,6 +84,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t
mcu_pin_obj_t *reset = validate_obj_is_free_pin(args[ARG_reset].u_obj); mcu_pin_obj_t *reset = validate_obj_is_free_pin(args[ARG_reset].u_obj);
displayio_parallelbus_obj_t* self = &allocate_display_bus_or_raise()->parallel_bus; displayio_parallelbus_obj_t* self = &allocate_display_bus_or_raise()->parallel_bus;
self->base.type = &displayio_parallelbus_type;
common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset); common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset);
return self; return self;

View File

@ -4,6 +4,7 @@
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Scott Shawcroft for Adafruit Industries * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries
* Copyright (c) 2020 Jeff Epler for Adafruit Industries
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -48,35 +49,21 @@
//| objects in CircuitPython, Display objects live until `displayio.release_displays()` //| objects in CircuitPython, Display objects live until `displayio.release_displays()`
//| is called. This is done so that CircuitPython can use the display itself. //| is called. This is done so that CircuitPython can use the display itself.
//| //|
//| .. class:: FramebufferDisplay(framebuffer, *, width, height, colstart=0, rowstart=0, rotation=0, color_depth=16, grayscale=False, pixels_in_byte_share_row=True, bytes_per_cell=1, reverse_pixels_in_byte=False, backlight_pin=None, brightness=1.0, auto_brightness=False, auto_refresh=True, native_frames_per_second=60) //| .. class:: FramebufferDisplay(framebuffer, *, rotation=0, auto_refresh=True)
//| //|
//| Create a Display object with the given framebuffer (a buffer, array, ulab.array, etc) //| Create a Display object with the given framebuffer (a buffer, array, ulab.array, etc)
//| //|
//| :param framebuffer: The framebuffer that the display is connected to //| :param framebuffer: The framebuffer that the display is connected to
//| :type framebuffer: any core object implementing the framebuffer protocol //| :type framebuffer: any core object implementing the framebuffer protocol
//| :param int width: Width in pixels
//| :param int height: Height in pixels
//| :param int rotation: The rotation of the display in degrees clockwise. Must be in 90 degree increments (0, 90, 180, 270)
//| :param int color_depth: The number of bits of color per pixel transmitted. (Some displays
//| support 18 bit but 16 is easier to transmit. The last bit is extrapolated.)
//| :param int bytes_per_cell: Number of bytes per addressable memory location when color_depth < 8. When greater than one, bytes share a row or column according to pixels_in_byte_share_row.
//| :param microcontroller.Pin backlight_pin: Pin connected to the display's backlight
//| :param bool brightness: Initial display brightness. This value is ignored if auto_brightness is True.
//| :param bool auto_brightness: If True, brightness is controlled via an ambient light sensor or other mechanism.
//| :param bool auto_refresh: Automatically refresh the screen //| :param bool auto_refresh: Automatically refresh the screen
//| :param int native_frames_per_second: Number of display refreshes per second //| :param int rotation: The rotation of the display in degrees clockwise. Must be in 90 degree increments (0, 90, 180, 270)
//| //|
STATIC mp_obj_t framebufferio_framebufferdisplay_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { STATIC mp_obj_t framebufferio_framebufferdisplay_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_framebuffer, ARG_width, ARG_height, ARG_rotation, ARG_color_depth, ARG_bytes_per_cell, ARG_auto_refresh, ARG_native_frames_per_second, NUM_ARGS }; enum { ARG_framebuffer, ARG_rotation, ARG_auto_refresh, NUM_ARGS };
static const mp_arg_t allowed_args[] = { static const mp_arg_t allowed_args[] = {
{ MP_QSTR_framebuffer, MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_framebuffer, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_width, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, },
{ MP_QSTR_height, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, },
{ MP_QSTR_rotation, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, { MP_QSTR_rotation, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
{ MP_QSTR_color_depth, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 16} },
{ MP_QSTR_bytes_per_cell, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1} },
{ MP_QSTR_auto_refresh, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} }, { MP_QSTR_auto_refresh, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} },
{ MP_QSTR_native_frames_per_second, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 60} },
}; };
MP_STATIC_ASSERT( MP_ARRAY_SIZE(allowed_args) == NUM_ARGS ); MP_STATIC_ASSERT( MP_ARRAY_SIZE(allowed_args) == NUM_ARGS );
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
@ -95,12 +82,8 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_make_new(const mp_obj_type_t *t
common_hal_framebufferio_framebufferdisplay_construct( common_hal_framebufferio_framebufferdisplay_construct(
self, self,
framebuffer, framebuffer,
args[ARG_width].u_int, args[ARG_height].u_int,
rotation, rotation,
args[ARG_color_depth].u_int, args[ARG_auto_refresh].u_bool
args[ARG_bytes_per_cell].u_int,
args[ARG_auto_refresh].u_bool,
args[ARG_native_frames_per_second].u_int
); );
return self; return self;

View File

@ -4,6 +4,7 @@
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2017, 2018 Scott Shawcroft for Adafruit Industries * Copyright (c) 2017, 2018 Scott Shawcroft for Adafruit Industries
* Copyright (c) 2020 Jeff Epler for Adafruit Industries
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -39,10 +40,9 @@ extern const mp_obj_type_t framebufferio_framebufferdisplay_type;
#define NO_BRIGHTNESS_COMMAND 0x100 #define NO_BRIGHTNESS_COMMAND 0x100
void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t* self, void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t* self,
mp_obj_t framebuffer, uint16_t width, uint16_t height, mp_obj_t framebuffer,
uint16_t rotation, uint16_t color_depth, uint16_t rotation,
uint8_t bytes_per_cell, bool auto_refresh);
bool auto_refresh, uint16_t native_frames_per_second);
bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t* self, bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t* self,
displayio_group_t* root_group); displayio_group_t* root_group);

View File

@ -38,7 +38,7 @@
//| The `framebufferio` module contains classes to manage display output //| The `framebufferio` module contains classes to manage display output
//| including synchronizing with refresh rates and partial updating. //| including synchronizing with refresh rates and partial updating.
//| It is used in conjunction with classes from `displayio` to actually //| It is used in conjunction with classes from `displayio` to actually
//| place items on the display; and classes like `Protomatter` to actually //| place items on the display; and classes like `RGBMatrix` to actually
//| drive the display. //| drive the display.
//| //|
//| Libraries //| Libraries

View File

@ -29,8 +29,8 @@
#include "py/runtime.h" #include "py/runtime.h"
#include "py/objarray.h" #include "py/objarray.h"
#include "common-hal/_protomatter/Protomatter.h" #include "common-hal/rgbmatrix/RGBMatrix.h"
#include "shared-bindings/_protomatter/Protomatter.h" #include "shared-bindings/rgbmatrix/RGBMatrix.h"
#include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/util.h" #include "shared-bindings/util.h"
@ -38,9 +38,9 @@
#include "shared-module/framebufferio/__init__.h" #include "shared-module/framebufferio/__init__.h"
#include "shared-module/framebufferio/FramebufferDisplay.h" #include "shared-module/framebufferio/FramebufferDisplay.h"
//| .. currentmodule:: _protomatter //| .. currentmodule:: rgbmatrix
//| //|
//| :class:`protomatter` -- Driver for HUB75-style RGB LED matrices //| :class:`RGBMatrix` -- Driver for HUB75-style RGB LED matrices
//| ================================================================ //| ================================================================
//| //|
@ -133,14 +133,16 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
} }
} }
//| :class:`~_protomatter.Protomatter` displays an in-memory framebuffer to an LED matrix. //| :class:`~rgbmatrix.RGBMatrix` displays an in-memory framebuffer to an LED matrix.
//| //|
//| .. class:: Protomatter(width, bit_depth, rgb_pins, addr_pins, clock_pin, latch_pin, output_enable_pin, *, doublebuffer=True, framebuffer=None) //| .. class:: RGBMatrix(*, width, bit_depth, rgb_pins, addr_pins, clock_pin, latch_pin, output_enable_pin, doublebuffer=True, framebuffer=None, height=0)
//| //|
//| Create a Protomatter object with the given attributes. The height of //| Create a RGBMatrix object with the given attributes. The height of
//| the display is determined by the number of rgb and address pins: //| the display is determined by the number of rgb and address pins:
//| len(rgb_pins) // 3 * 2 ** len(address_pins). With 6 RGB pins and 4 //| len(rgb_pins) // 3 * 2 ** len(address_pins). With 6 RGB pins and 4
//| address lines, the display will be 32 pixels tall. //| address lines, the display will be 32 pixels tall. If the optional height
//| parameter is specified and is not 0, it is checked against the calculated
//| height.
//| //|
//| Up to 30 RGB pins and 8 address pins are supported. //| Up to 30 RGB pins and 8 address pins are supported.
//| //|
@ -163,19 +165,16 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
//| //|
//| If a framebuffer is not passed in, one is allocated and initialized //| If a framebuffer is not passed in, one is allocated and initialized
//| to all black. In any case, the framebuffer can be retrieved //| to all black. In any case, the framebuffer can be retrieved
//| by passing the protomatter object to memoryview(). //| by passing the RGBMatrix object to memoryview().
//| //|
//| If doublebuffer is False, some memory is saved, but the display may //| If doublebuffer is False, some memory is saved, but the display may
//| flicker during updates. //| flicker during updates.
//| //|
//| If a framebuffer is not passed in, one is allocated internally. To //| A RGBMatrix is often used in conjunction with a
//| retrieve it, pass the protomatter object to memoryview().
//|
//| A Protomatter framebuffer is often used in conjunction with a
//| `framebufferio.FramebufferDisplay`. //| `framebufferio.FramebufferDisplay`.
//| //|
STATIC mp_obj_t protomatter_protomatter_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_width, ARG_bit_depth, ARG_rgb_list, ARG_addr_list, enum { ARG_width, ARG_bit_depth, ARG_rgb_list, ARG_addr_list,
ARG_clock_pin, ARG_latch_pin, ARG_output_enable_pin, ARG_doublebuffer, ARG_framebuffer, ARG_height }; ARG_clock_pin, ARG_latch_pin, ARG_output_enable_pin, ARG_doublebuffer, ARG_framebuffer, ARG_height };
static const mp_arg_t allowed_args[] = { static const mp_arg_t allowed_args[] = {
@ -193,11 +192,8 @@ STATIC mp_obj_t protomatter_protomatter_make_new(const mp_obj_type_t *type, size
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
// Because interrupt handlers point directly at protomatter objects, rgbmatrix_rgbmatrix_obj_t *self = &allocate_display_bus_or_raise()->rgbmatrix;
// it is NOT okay to move them to the long-lived pool later. Allocate self->base.type = &rgbmatrix_RGBMatrix_type;
// them there to begin with, since generally they'll be long-lived anyway.
protomatter_protomatter_obj_t *self = &allocate_display_bus_or_raise()->protomatter;
self->base.type = &protomatter_Protomatter_type;
uint8_t rgb_count, addr_count; uint8_t rgb_count, addr_count;
uint8_t rgb_pins[MP_ARRAY_SIZE(self->rgb_pins)]; uint8_t rgb_pins[MP_ARRAY_SIZE(self->rgb_pins)];
@ -231,7 +227,7 @@ STATIC mp_obj_t protomatter_protomatter_make_new(const mp_obj_type_t *type, size
framebuffer = mp_obj_new_bytearray_of_zeros(bufsize); framebuffer = mp_obj_new_bytearray_of_zeros(bufsize);
} }
common_hal_protomatter_protomatter_construct(self, common_hal_rgbmatrix_rgbmatrix_construct(self,
args[ARG_width].u_int, args[ARG_width].u_int,
args[ARG_bit_depth].u_int, args[ARG_bit_depth].u_int,
rgb_count, rgb_pins, rgb_count, rgb_pins,
@ -252,18 +248,18 @@ STATIC mp_obj_t protomatter_protomatter_make_new(const mp_obj_type_t *type, size
//| .. method:: deinit //| .. method:: deinit
//| //|
//| Free the resources (pins, timers, etc.) associated with this //| Free the resources (pins, timers, etc.) associated with this
//| protomatter instance. After deinitialization, no further operations //| rgbmatrix instance. After deinitialization, no further operations
//| may be performed. //| may be performed.
//| //|
STATIC mp_obj_t protomatter_protomatter_deinit(mp_obj_t self_in) { STATIC mp_obj_t rgbmatrix_rgbmatrix_deinit(mp_obj_t self_in) {
protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in;
common_hal_protomatter_protomatter_deinit(self); common_hal_rgbmatrix_rgbmatrix_deinit(self);
return mp_const_none; return mp_const_none;
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(protomatter_protomatter_deinit_obj, protomatter_protomatter_deinit); STATIC MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_deinit_obj, rgbmatrix_rgbmatrix_deinit);
static void check_for_deinit(protomatter_protomatter_obj_t *self) { static void check_for_deinit(rgbmatrix_rgbmatrix_obj_t *self) {
if (!self->core.rgbPins) { if (!self->core.rgbPins) {
raise_deinited_error(); raise_deinited_error();
} }
@ -274,30 +270,30 @@ static void check_for_deinit(protomatter_protomatter_obj_t *self) {
//| In the current implementation, 0.0 turns the display off entirely //| In the current implementation, 0.0 turns the display off entirely
//| and any other value up to 1.0 turns the display on fully. //| and any other value up to 1.0 turns the display on fully.
//| //|
STATIC mp_obj_t protomatter_protomatter_get_brightness(mp_obj_t self_in) { STATIC mp_obj_t rgbmatrix_rgbmatrix_get_brightness(mp_obj_t self_in) {
protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in;
check_for_deinit(self); check_for_deinit(self);
return mp_obj_new_float(common_hal_protomatter_protomatter_get_paused(self)? 0.0f : 1.0f); return mp_obj_new_float(common_hal_rgbmatrix_rgbmatrix_get_paused(self)? 0.0f : 1.0f);
} }
MP_DEFINE_CONST_FUN_OBJ_1(protomatter_protomatter_get_brightness_obj, protomatter_protomatter_get_brightness); MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_get_brightness_obj, rgbmatrix_rgbmatrix_get_brightness);
STATIC mp_obj_t protomatter_protomatter_set_brightness(mp_obj_t self_in, mp_obj_t value_in) { STATIC mp_obj_t rgbmatrix_rgbmatrix_set_brightness(mp_obj_t self_in, mp_obj_t value_in) {
protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in;
check_for_deinit(self); check_for_deinit(self);
mp_float_t brightness = mp_obj_get_float(value_in); mp_float_t brightness = mp_obj_get_float(value_in);
if (brightness < 0.0f || brightness > 1.0f) { if (brightness < 0.0f || brightness > 1.0f) {
mp_raise_ValueError(translate("Brightness must be 0-1.0")); mp_raise_ValueError(translate("Brightness must be 0-1.0"));
} }
common_hal_protomatter_protomatter_set_paused(self_in, brightness <= 0); common_hal_rgbmatrix_rgbmatrix_set_paused(self, brightness <= 0);
return mp_const_none; return mp_const_none;
} }
MP_DEFINE_CONST_FUN_OBJ_2(protomatter_protomatter_set_brightness_obj, protomatter_protomatter_set_brightness); MP_DEFINE_CONST_FUN_OBJ_2(rgbmatrix_rgbmatrix_set_brightness_obj, rgbmatrix_rgbmatrix_set_brightness);
const mp_obj_property_t protomatter_protomatter_brightness_obj = { const mp_obj_property_t rgbmatrix_rgbmatrix_brightness_obj = {
.base.type = &mp_type_property, .base.type = &mp_type_property,
.proxy = {(mp_obj_t)&protomatter_protomatter_get_brightness_obj, .proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_brightness_obj,
(mp_obj_t)&protomatter_protomatter_set_brightness_obj, (mp_obj_t)&rgbmatrix_rgbmatrix_set_brightness_obj,
(mp_obj_t)&mp_const_none_obj}, (mp_obj_t)&mp_const_none_obj},
}; };
@ -306,23 +302,60 @@ const mp_obj_property_t protomatter_protomatter_brightness_obj = {
//| Transmits the color data in the buffer to the pixels so that //| Transmits the color data in the buffer to the pixels so that
//| they are shown. //| they are shown.
//| //|
STATIC mp_obj_t protomatter_protomatter_refresh(mp_obj_t self_in) { STATIC mp_obj_t rgbmatrix_rgbmatrix_refresh(mp_obj_t self_in) {
protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in;
check_for_deinit(self); check_for_deinit(self);
common_hal_protomatter_protomatter_refresh(self); common_hal_rgbmatrix_rgbmatrix_refresh(self);
return mp_const_none; return mp_const_none;
} }
MP_DEFINE_CONST_FUN_OBJ_1(protomatter_protomatter_refresh_obj, protomatter_protomatter_refresh); MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_refresh_obj, rgbmatrix_rgbmatrix_refresh);
STATIC const mp_rom_map_elem_t protomatter_protomatter_locals_dict_table[] = { //| .. attribute:: width
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&protomatter_protomatter_deinit_obj) }, //|
{ MP_ROM_QSTR(MP_QSTR_brightness), MP_ROM_PTR(&protomatter_protomatter_brightness_obj) }, //| The width of the display, in pixels
{ MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&protomatter_protomatter_refresh_obj) }, //|
STATIC mp_obj_t rgbmatrix_rgbmatrix_get_width(mp_obj_t self_in) {
rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in;
check_for_deinit(self);
return MP_OBJ_NEW_SMALL_INT(common_hal_rgbmatrix_rgbmatrix_get_width(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_get_width_obj, rgbmatrix_rgbmatrix_get_width);
const mp_obj_property_t rgbmatrix_rgbmatrix_width_obj = {
.base.type = &mp_type_property,
.proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_width_obj,
(mp_obj_t)&mp_const_none_obj,
(mp_obj_t)&mp_const_none_obj},
}; };
STATIC MP_DEFINE_CONST_DICT(protomatter_protomatter_locals_dict, protomatter_protomatter_locals_dict_table);
STATIC void protomatter_protomatter_get_bufinfo(mp_obj_t self_in, mp_buffer_info_t *bufinfo) { //| .. attribute:: height
protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; //|
//| The height of the display, in pixels
//|
STATIC mp_obj_t rgbmatrix_rgbmatrix_get_height(mp_obj_t self_in) {
rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in;
check_for_deinit(self);
return MP_OBJ_NEW_SMALL_INT(common_hal_rgbmatrix_rgbmatrix_get_height(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_get_height_obj, rgbmatrix_rgbmatrix_get_height);
const mp_obj_property_t rgbmatrix_rgbmatrix_height_obj = {
.base.type = &mp_type_property,
.proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_height_obj,
(mp_obj_t)&mp_const_none_obj,
(mp_obj_t)&mp_const_none_obj},
};
STATIC const mp_rom_map_elem_t rgbmatrix_rgbmatrix_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&rgbmatrix_rgbmatrix_deinit_obj) },
{ MP_ROM_QSTR(MP_QSTR_brightness), MP_ROM_PTR(&rgbmatrix_rgbmatrix_brightness_obj) },
{ MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&rgbmatrix_rgbmatrix_refresh_obj) },
{ MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&rgbmatrix_rgbmatrix_width_obj) },
{ MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&rgbmatrix_rgbmatrix_height_obj) },
};
STATIC MP_DEFINE_CONST_DICT(rgbmatrix_rgbmatrix_locals_dict, rgbmatrix_rgbmatrix_locals_dict_table);
STATIC void rgbmatrix_rgbmatrix_get_bufinfo(mp_obj_t self_in, mp_buffer_info_t *bufinfo) {
rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in;
check_for_deinit(self); check_for_deinit(self);
*bufinfo = self->bufinfo; *bufinfo = self->bufinfo;
@ -330,34 +363,60 @@ STATIC void protomatter_protomatter_get_bufinfo(mp_obj_t self_in, mp_buffer_info
// These version exists so that the prototype matches the protocol, // These version exists so that the prototype matches the protocol,
// avoiding a type cast that can hide errors // avoiding a type cast that can hide errors
STATIC void protomatter_protomatter_swapbuffers(mp_obj_t self_in) { STATIC void rgbmatrix_rgbmatrix_swapbuffers(mp_obj_t self_in) {
common_hal_protomatter_protomatter_refresh(self_in); common_hal_rgbmatrix_rgbmatrix_refresh(self_in);
} }
STATIC void protomatter_protomatter_deinit_proto(mp_obj_t self_in) { STATIC void rgbmatrix_rgbmatrix_deinit_proto(mp_obj_t self_in) {
common_hal_protomatter_protomatter_deinit(self_in); common_hal_rgbmatrix_rgbmatrix_deinit(self_in);
} }
STATIC float protomatter_protomatter_get_brightness_proto(mp_obj_t self_in) { STATIC float rgbmatrix_rgbmatrix_get_brightness_proto(mp_obj_t self_in) {
return common_hal_protomatter_protomatter_get_paused(self_in) ? 0.0f : 1.0f; return common_hal_rgbmatrix_rgbmatrix_get_paused(self_in) ? 0.0f : 1.0f;
} }
STATIC bool protomatter_protomatter_set_brightness_proto(mp_obj_t self_in, mp_float_t value) { STATIC bool rgbmatrix_rgbmatrix_set_brightness_proto(mp_obj_t self_in, mp_float_t value) {
common_hal_protomatter_protomatter_set_paused(self_in, value <= 0); common_hal_rgbmatrix_rgbmatrix_set_paused(self_in, value <= 0);
return true; return true;
} }
STATIC const framebuffer_p_t protomatter_protomatter_proto = { STATIC int rgbmatrix_rgbmatrix_get_width_proto(mp_obj_t self_in) {
return common_hal_rgbmatrix_rgbmatrix_get_width(self_in);
}
STATIC int rgbmatrix_rgbmatrix_get_height_proto(mp_obj_t self_in) {
return common_hal_rgbmatrix_rgbmatrix_get_height(self_in);
}
STATIC int rgbmatrix_rgbmatrix_get_color_depth_proto(mp_obj_t self_in) {
return 16;
}
STATIC int rgbmatrix_rgbmatrix_get_bytes_per_cell_proto(mp_obj_t self_in) {
return 1;
}
STATIC int rgbmatrix_rgbmatrix_get_native_frames_per_second_proto(mp_obj_t self_in) {
return 250;
}
STATIC const framebuffer_p_t rgbmatrix_rgbmatrix_proto = {
MP_PROTO_IMPLEMENT(MP_QSTR_protocol_framebuffer) MP_PROTO_IMPLEMENT(MP_QSTR_protocol_framebuffer)
.get_bufinfo = protomatter_protomatter_get_bufinfo, .get_bufinfo = rgbmatrix_rgbmatrix_get_bufinfo,
.set_brightness = protomatter_protomatter_set_brightness_proto, .set_brightness = rgbmatrix_rgbmatrix_set_brightness_proto,
.get_brightness = protomatter_protomatter_get_brightness_proto, .get_brightness = rgbmatrix_rgbmatrix_get_brightness_proto,
.swapbuffers = protomatter_protomatter_swapbuffers, .get_width = rgbmatrix_rgbmatrix_get_width_proto,
.deinit = protomatter_protomatter_deinit_proto, .get_height = rgbmatrix_rgbmatrix_get_height_proto,
.get_color_depth = rgbmatrix_rgbmatrix_get_color_depth_proto,
.get_bytes_per_cell = rgbmatrix_rgbmatrix_get_bytes_per_cell_proto,
.get_native_frames_per_second = rgbmatrix_rgbmatrix_get_native_frames_per_second_proto,
.swapbuffers = rgbmatrix_rgbmatrix_swapbuffers,
.deinit = rgbmatrix_rgbmatrix_deinit_proto,
}; };
STATIC mp_int_t protomatter_protomatter_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { STATIC mp_int_t rgbmatrix_rgbmatrix_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) {
protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in;
// a readonly framebuffer would be unusual but not impossible // a readonly framebuffer would be unusual but not impossible
if ((flags & MP_BUFFER_WRITE) && !(self->bufinfo.typecode & MP_OBJ_ARRAY_TYPECODE_FLAG_RW)) { if ((flags & MP_BUFFER_WRITE) && !(self->bufinfo.typecode & MP_OBJ_ARRAY_TYPECODE_FLAG_RW)) {
return 1; return 1;
@ -366,11 +425,11 @@ STATIC mp_int_t protomatter_protomatter_get_buffer(mp_obj_t self_in, mp_buffer_i
return 0; return 0;
} }
const mp_obj_type_t protomatter_Protomatter_type = { const mp_obj_type_t rgbmatrix_RGBMatrix_type = {
{ &mp_type_type }, { &mp_type_type },
.name = MP_QSTR_Protomatter, .name = MP_QSTR_RGBMatrix,
.buffer_p = { .get_buffer = protomatter_protomatter_get_buffer, }, .buffer_p = { .get_buffer = rgbmatrix_rgbmatrix_get_buffer, },
.make_new = protomatter_protomatter_make_new, .make_new = rgbmatrix_rgbmatrix_make_new,
.protocol = &protomatter_protomatter_proto, .protocol = &rgbmatrix_rgbmatrix_proto,
.locals_dict = (mp_obj_dict_t*)&protomatter_protomatter_locals_dict, .locals_dict = (mp_obj_dict_t*)&rgbmatrix_rgbmatrix_locals_dict,
}; };

View File

@ -24,13 +24,13 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_PROTOMATTER_PROTOMATTER_H #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_RGBMATRIX_RGBMATRIX_H
#define MICROPY_INCLUDED_SHARED_BINDINGS_PROTOMATTER_PROTOMATTER_H #define MICROPY_INCLUDED_SHARED_BINDINGS_RGBMATRIX_RGBMATRIX_H
#include "shared-module/_protomatter/Protomatter.h" #include "shared-module/rgbmatrix/RGBMatrix.h"
#include "lib/protomatter/core.h" #include "lib/protomatter/core.h"
extern const mp_obj_type_t protomatter_Protomatter_type; extern const mp_obj_type_t rgbmatrix_RGBMatrix_type;
typedef struct { typedef struct {
mp_obj_base_t base; mp_obj_base_t base;
mp_obj_t framebuffer; mp_obj_t framebuffer;
@ -46,14 +46,16 @@ typedef struct {
bool core_is_initialized; bool core_is_initialized;
bool paused; bool paused;
bool doublebuffer; bool doublebuffer;
} protomatter_protomatter_obj_t; } rgbmatrix_rgbmatrix_obj_t;
void common_hal_protomatter_protomatter_construct(protomatter_protomatter_obj_t* self, int width, int bit_depth, uint8_t rgb_count, uint8_t* rgb_pins, uint8_t addr_count, uint8_t* addr_pins, uint8_t clock_pin, uint8_t latch_pin, uint8_t oe_pin, bool doublebuffer, mp_obj_t framebuffer, void* timer); void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t* self, int width, int bit_depth, uint8_t rgb_count, uint8_t* rgb_pins, uint8_t addr_count, uint8_t* addr_pins, uint8_t clock_pin, uint8_t latch_pin, uint8_t oe_pin, bool doublebuffer, mp_obj_t framebuffer, void* timer);
void common_hal_protomatter_protomatter_deinit(protomatter_protomatter_obj_t*); void common_hal_rgbmatrix_rgbmatrix_deinit(rgbmatrix_rgbmatrix_obj_t*);
void protomatter_protomatter_collect_ptrs(protomatter_protomatter_obj_t*); void rgbmatrix_rgbmatrix_collect_ptrs(rgbmatrix_rgbmatrix_obj_t*);
void common_hal_protomatter_protomatter_reconstruct(protomatter_protomatter_obj_t* self, mp_obj_t framebuffer); void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self, mp_obj_t framebuffer);
void common_hal_protomatter_protomatter_set_paused(protomatter_protomatter_obj_t* self, bool paused); void common_hal_rgbmatrix_rgbmatrix_set_paused(rgbmatrix_rgbmatrix_obj_t* self, bool paused);
bool common_hal_protomatter_protomatter_get_paused(protomatter_protomatter_obj_t* self); bool common_hal_rgbmatrix_rgbmatrix_get_paused(rgbmatrix_rgbmatrix_obj_t* self);
void common_hal_protomatter_protomatter_refresh(protomatter_protomatter_obj_t* self); void common_hal_rgbmatrix_rgbmatrix_refresh(rgbmatrix_rgbmatrix_obj_t* self);
int common_hal_rgbmatrix_rgbmatrix_get_width(rgbmatrix_rgbmatrix_obj_t* self);
int common_hal_rgbmatrix_rgbmatrix_get_height(rgbmatrix_rgbmatrix_obj_t* self);
#endif #endif

View File

@ -29,27 +29,27 @@
#include "py/obj.h" #include "py/obj.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "shared-bindings/_protomatter/Protomatter.h" #include "shared-bindings/rgbmatrix/RGBMatrix.h"
//| :mod:`_protomatter` --- Low-level routines for bitbanged LED matrices //| :mod:`rgbmatrix` --- Low-level routines for bitbanged LED matrices
//| ===================================================================== //| =====================================================================
//| //|
//| .. module:: _protomatter //| .. module:: rgbmatrix
//| :synopsis: Low-level routines for bitbanged LED matrices //| :synopsis: Low-level routines for bitbanged LED matrices
//| //|
//| .. toctree:: //| .. toctree::
//| :maxdepth: 3 //| :maxdepth: 3
//| //|
//| Protomatter //| RGBMatrix
STATIC const mp_rom_map_elem_t protomatter_module_globals_table[] = { STATIC const mp_rom_map_elem_t rgbmatrix_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__protomatter) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_rgbmatrix) },
{ MP_ROM_QSTR(MP_QSTR_Protomatter), MP_ROM_PTR(&protomatter_Protomatter_type) }, { MP_ROM_QSTR(MP_QSTR_RGBMatrix), MP_ROM_PTR(&rgbmatrix_RGBMatrix_type) },
}; };
STATIC MP_DEFINE_CONST_DICT(protomatter_module_globals, protomatter_module_globals_table); STATIC MP_DEFINE_CONST_DICT(rgbmatrix_module_globals, rgbmatrix_module_globals_table);
const mp_obj_module_t protomatter_module = { const mp_obj_module_t rgbmatrix_module = {
.base = { &mp_type_module }, .base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&protomatter_module_globals, .globals = (mp_obj_dict_t*)&rgbmatrix_module_globals,
}; };

View File

@ -191,6 +191,38 @@ Basic Array defining functions
Return a new 1-D array with ``num`` elements ranging from ``start`` to ``stop`` linearly. Return a new 1-D array with ``num`` elements ranging from ``start`` to ``stop`` linearly.
:mod:`ulab.compare` --- Comparison functions
============================================
.. module::ulab.compare
.. method:: clip(x1, x2, x3)
Constrain the values from ``x1`` to be between ``x2`` and ``x3``.
``x2`` is assumed to be less than or equal to ``x3``.
Arguments may be ulab arrays or numbers. All array arguments
must be the same size. If the inputs are all scalars, a 1-element
array is returned.
Shorthand for ``ulab.maximum(x2, ulab.minimum(x1, x3))``
.. method:: maximum(x1, x2)
Compute the element by element maximum of the arguments.
Arguments may be ulab arrays or numbers. All array arguments
must be the same size. If the inputs are both scalars, a number is
returned
.. method:: minimum(x1, x2)
Compute the element by element minimum of the arguments.
Arguments may be ulab arrays or numbers. All array arguments
must be the same size. If the inputs are both scalars, a number is
returned
:mod:`ulab.vector` --- Element-by-element functions :mod:`ulab.vector` --- Element-by-element functions
=================================================== ===================================================

View File

@ -21,8 +21,8 @@
primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT]; primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT];
#if CIRCUITPY_PROTOMATTER #if CIRCUITPY_RGBMATRIX
STATIC bool any_display_uses_this_protomatter(protomatter_protomatter_obj_t* pm) { STATIC bool any_display_uses_this_rgbmatrix(rgbmatrix_rgbmatrix_obj_t* pm) {
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
if (displays[i].framebuffer_display.base.type == &framebufferio_framebufferdisplay_type) { if (displays[i].framebuffer_display.base.type == &framebufferio_framebufferdisplay_type) {
framebufferio_framebufferdisplay_obj_t* display = &displays[i].framebuffer_display; framebufferio_framebufferdisplay_obj_t* display = &displays[i].framebuffer_display;
@ -103,8 +103,8 @@ void common_hal_displayio_release_displays(void) {
} else if (bus_type == &displayio_parallelbus_type) { } else if (bus_type == &displayio_parallelbus_type) {
common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus);
#if CIRCUITPY_FRAMEBUFFERIO #if CIRCUITPY_FRAMEBUFFERIO
} else if (bus_type == &protomatter_Protomatter_type) { } else if (bus_type == &rgbmatrix_RGBMatrix_type) {
common_hal_protomatter_protomatter_deinit(&displays[i].protomatter); common_hal_rgbmatrix_rgbmatrix_deinit(&displays[i].rgbmatrix);
#endif #endif
} }
displays[i].fourwire_bus.base.type = &mp_type_NoneType; displays[i].fourwire_bus.base.type = &mp_type_NoneType;
@ -167,11 +167,11 @@ void reset_displays(void) {
} }
} }
} }
#if CIRCUITPY_PROTOMATTER #if CIRCUITPY_RGBMATRIX
} else if (displays[i].protomatter.base.type == &protomatter_Protomatter_type) { } else if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) {
protomatter_protomatter_obj_t * pm = &displays[i].protomatter; rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix;
if(!any_display_uses_this_protomatter(pm)) { if(!any_display_uses_this_rgbmatrix(pm)) {
common_hal_protomatter_protomatter_deinit(pm); common_hal_rgbmatrix_rgbmatrix_deinit(pm);
} }
#endif #endif
} else { } else {
@ -200,9 +200,9 @@ void reset_displays(void) {
void displayio_gc_collect(void) { void displayio_gc_collect(void) {
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
#if CIRCUITPY_PROTOMATTER #if CIRCUITPY_RGBMATRIX
if (displays[i].protomatter.base.type == &protomatter_Protomatter_type) { if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) {
protomatter_protomatter_collect_ptrs(&displays[i].protomatter); rgbmatrix_rgbmatrix_collect_ptrs(&displays[i].rgbmatrix);
} }
#endif #endif

View File

@ -36,15 +36,15 @@
#include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/Group.h"
#include "shared-bindings/displayio/I2CDisplay.h" #include "shared-bindings/displayio/I2CDisplay.h"
#include "shared-bindings/displayio/ParallelBus.h" #include "shared-bindings/displayio/ParallelBus.h"
#include "shared-bindings/_protomatter/Protomatter.h" #include "shared-bindings/rgbmatrix/RGBMatrix.h"
typedef struct { typedef struct {
union { union {
displayio_fourwire_obj_t fourwire_bus; displayio_fourwire_obj_t fourwire_bus;
displayio_i2cdisplay_obj_t i2cdisplay_bus; displayio_i2cdisplay_obj_t i2cdisplay_bus;
displayio_parallelbus_obj_t parallel_bus; displayio_parallelbus_obj_t parallel_bus;
#if CIRCUITPY_PROTOMATTER #if CIRCUITPY_RGBMATRIX
protomatter_protomatter_obj_t protomatter; rgbmatrix_rgbmatrix_obj_t rgbmatrix;
#endif #endif
}; };
union { union {

View File

@ -4,6 +4,7 @@
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Scott Shawcroft for Adafruit Industries * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries
* Copyright (c) 2020 Jeff Epler for Adafruit Industries
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -42,10 +43,9 @@
#include "tick.h" #include "tick.h"
void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t* self, void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t* self,
mp_obj_t framebuffer, uint16_t width, uint16_t height, mp_obj_t framebuffer,
uint16_t rotation, uint16_t color_depth, uint16_t rotation,
uint8_t bytes_per_cell, bool auto_refresh) {
bool auto_refresh, uint16_t native_frames_per_second) {
// Turn off auto-refresh as we init. // Turn off auto-refresh as we init.
self->auto_refresh = false; self->auto_refresh = false;
self->framebuffer = framebuffer; self->framebuffer = framebuffer;
@ -54,15 +54,29 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
uint16_t ram_width = 0x100; uint16_t ram_width = 0x100;
uint16_t ram_height = 0x100; uint16_t ram_height = 0x100;
displayio_display_core_construct(&self->core, NULL, width, height, ram_width, ram_height, 0, 0, rotation, displayio_display_core_construct(
color_depth, false, false, bytes_per_cell, false, false); &self->core,
NULL,
self->framebuffer_protocol->get_width(self->framebuffer),
self->framebuffer_protocol->get_height(self->framebuffer),
ram_width,
ram_height,
0,
0,
rotation,
self->framebuffer_protocol->get_color_depth(self->framebuffer),
false,
false,
self->framebuffer_protocol->get_bytes_per_cell(self->framebuffer),
false,
false);
self->first_manual_refresh = !auto_refresh; self->first_manual_refresh = !auto_refresh;
self->native_frames_per_second = native_frames_per_second; self->native_frames_per_second = self->framebuffer_protocol->get_native_frames_per_second(self->framebuffer);
self->native_ms_per_frame = 1000 / native_frames_per_second; self->native_ms_per_frame = 1000 / self->native_frames_per_second;
supervisor_start_terminal(width, height); supervisor_start_terminal(self->core.width, self->core.height);
// Set the group after initialization otherwise we may send pixels while we delay in // Set the group after initialization otherwise we may send pixels while we delay in
// initialization. // initialization.

View File

@ -4,6 +4,7 @@
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
* Copyright (c) 2020 Jeff Epler for Adafruit Industries
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -66,12 +67,22 @@ typedef bool (*framebuffer_set_brightness_fun)(mp_obj_t, mp_float_t);
typedef mp_float_t (*framebuffer_get_brightness_fun)(mp_obj_t); typedef mp_float_t (*framebuffer_get_brightness_fun)(mp_obj_t);
typedef bool (*framebuffer_set_auto_brightness_fun)(mp_obj_t, bool); typedef bool (*framebuffer_set_auto_brightness_fun)(mp_obj_t, bool);
typedef bool (*framebuffer_get_auto_brightness_fun)(mp_obj_t); typedef bool (*framebuffer_get_auto_brightness_fun)(mp_obj_t);
typedef int (*framebuffer_get_width_fun)(mp_obj_t);
typedef int (*framebuffer_get_height_fun)(mp_obj_t);
typedef int (*framebuffer_get_color_depth_fun)(mp_obj_t);
typedef int (*framebuffer_get_bytes_per_cell_fun)(mp_obj_t);
typedef int (*framebuffer_get_native_frames_per_second_fun)(mp_obj_t);
typedef struct _framebuffer_p_t { typedef struct _framebuffer_p_t {
MP_PROTOCOL_HEAD // MP_QSTR_protocol_framebuffer MP_PROTOCOL_HEAD // MP_QSTR_protocol_framebuffer
framebuffer_get_bufinfo_fun get_bufinfo; framebuffer_get_bufinfo_fun get_bufinfo;
framebuffer_swapbuffers_fun swapbuffers; framebuffer_swapbuffers_fun swapbuffers;
framebuffer_deinit_fun deinit; framebuffer_deinit_fun deinit;
framebuffer_get_width_fun get_width;
framebuffer_get_height_fun get_height;
framebuffer_get_color_depth_fun get_color_depth;
framebuffer_get_bytes_per_cell_fun get_bytes_per_cell;
framebuffer_get_native_frames_per_second_fun get_native_frames_per_second;
framebuffer_get_brightness_fun get_brightness; framebuffer_get_brightness_fun get_brightness;
framebuffer_set_brightness_fun set_brightness; framebuffer_set_brightness_fun set_brightness;
framebuffer_get_auto_brightness_fun get_auto_brightness; framebuffer_get_auto_brightness_fun get_auto_brightness;

View File

@ -32,9 +32,9 @@
#include "py/objproperty.h" #include "py/objproperty.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "common-hal/_protomatter/Protomatter.h" #include "common-hal/rgbmatrix/RGBMatrix.h"
#include "shared-module/_protomatter/allocator.h" #include "shared-module/rgbmatrix/allocator.h"
#include "shared-bindings/_protomatter/Protomatter.h" #include "shared-bindings/rgbmatrix/RGBMatrix.h"
#include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/util.h" #include "shared-bindings/util.h"
@ -42,7 +42,7 @@
extern Protomatter_core *_PM_protoPtr; extern Protomatter_core *_PM_protoPtr;
void common_hal_protomatter_protomatter_construct(protomatter_protomatter_obj_t *self, int width, int bit_depth, uint8_t rgb_count, uint8_t *rgb_pins, uint8_t addr_count, uint8_t *addr_pins, uint8_t clock_pin, uint8_t latch_pin, uint8_t oe_pin, bool doublebuffer, mp_obj_t framebuffer, void *timer) { void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t *self, int width, int bit_depth, uint8_t rgb_count, uint8_t *rgb_pins, uint8_t addr_count, uint8_t *addr_pins, uint8_t clock_pin, uint8_t latch_pin, uint8_t oe_pin, bool doublebuffer, mp_obj_t framebuffer, void *timer) {
self->width = width; self->width = width;
self->bit_depth = bit_depth; self->bit_depth = bit_depth;
self->rgb_count = rgb_count; self->rgb_count = rgb_count;
@ -54,7 +54,7 @@ void common_hal_protomatter_protomatter_construct(protomatter_protomatter_obj_t
self->latch_pin = latch_pin; self->latch_pin = latch_pin;
self->doublebuffer = doublebuffer; self->doublebuffer = doublebuffer;
self->timer = timer ? timer : common_hal_protomatter_timer_allocate(); self->timer = timer ? timer : common_hal_rgbmatrix_timer_allocate();
if (self->timer == NULL) { if (self->timer == NULL) {
mp_raise_ValueError(translate("No timer available")); mp_raise_ValueError(translate("No timer available"));
} }
@ -62,10 +62,10 @@ void common_hal_protomatter_protomatter_construct(protomatter_protomatter_obj_t
self->width = width; self->width = width;
self->bufsize = 2 * width * rgb_count / 3 * (1 << addr_count); self->bufsize = 2 * width * rgb_count / 3 * (1 << addr_count);
common_hal_protomatter_protomatter_reconstruct(self, framebuffer); common_hal_rgbmatrix_rgbmatrix_reconstruct(self, framebuffer);
} }
void common_hal_protomatter_protomatter_reconstruct(protomatter_protomatter_obj_t* self, mp_obj_t framebuffer) { void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self, mp_obj_t framebuffer) {
if (framebuffer) { if (framebuffer) {
self->framebuffer = framebuffer; self->framebuffer = framebuffer;
framebuffer = mp_obj_new_bytearray_of_zeros(self->bufsize); framebuffer = mp_obj_new_bytearray_of_zeros(self->bufsize);
@ -99,7 +99,7 @@ void common_hal_protomatter_protomatter_reconstruct(protomatter_protomatter_obj_
if (stat == PROTOMATTER_OK) { if (stat == PROTOMATTER_OK) {
_PM_protoPtr = &self->core; _PM_protoPtr = &self->core;
common_hal_mcu_disable_interrupts(); common_hal_mcu_disable_interrupts();
common_hal_protomatter_timer_enable(self->timer); common_hal_rgbmatrix_timer_enable(self->timer);
stat = _PM_begin(&self->core); stat = _PM_begin(&self->core);
_PM_convert_565(&self->core, self->bufinfo.buf, self->width); _PM_convert_565(&self->core, self->bufinfo.buf, self->width);
common_hal_mcu_enable_interrupts(); common_hal_mcu_enable_interrupts();
@ -109,7 +109,7 @@ void common_hal_protomatter_protomatter_reconstruct(protomatter_protomatter_obj_
if (stat != PROTOMATTER_OK) { if (stat != PROTOMATTER_OK) {
// XXX this deinit() actually makes crashy-crashy // XXX this deinit() actually makes crashy-crashy
// can trigger it by sending inappropriate pins // can trigger it by sending inappropriate pins
common_hal_protomatter_protomatter_deinit(self); common_hal_rgbmatrix_rgbmatrix_deinit(self);
switch (stat) { switch (stat) {
case PROTOMATTER_ERR_PINS: case PROTOMATTER_ERR_PINS:
mp_raise_ValueError(translate("Invalid pin")); mp_raise_ValueError(translate("Invalid pin"));
@ -120,7 +120,7 @@ void common_hal_protomatter_protomatter_reconstruct(protomatter_protomatter_obj_
case PROTOMATTER_ERR_MALLOC: /// should have already been signaled as NLR case PROTOMATTER_ERR_MALLOC: /// should have already been signaled as NLR
default: default:
mp_raise_msg_varg(&mp_type_RuntimeError, mp_raise_msg_varg(&mp_type_RuntimeError,
translate("Protomatter internal error #%d"), (int)stat); translate("Internal error #%d"), (int)stat);
break; break;
} }
} }
@ -142,9 +142,9 @@ STATIC void free_pin_seq(uint8_t *seq, int count) {
} }
} }
void common_hal_protomatter_protomatter_deinit(protomatter_protomatter_obj_t* self) { void common_hal_rgbmatrix_rgbmatrix_deinit(rgbmatrix_rgbmatrix_obj_t* self) {
if (self->timer) { if (self->timer) {
common_hal_protomatter_timer_free(self->timer); common_hal_rgbmatrix_timer_free(self->timer);
self->timer = 0; self->timer = 0;
} }
@ -173,14 +173,14 @@ void common_hal_protomatter_protomatter_deinit(protomatter_protomatter_obj_t* se
self->framebuffer = NULL; self->framebuffer = NULL;
} }
void protomatter_protomatter_collect_ptrs(protomatter_protomatter_obj_t* self) { void rgbmatrix_rgbmatrix_collect_ptrs(rgbmatrix_rgbmatrix_obj_t* self) {
gc_collect_ptr(self->framebuffer); gc_collect_ptr(self->framebuffer);
gc_collect_ptr(self->core.rgbPins); gc_collect_ptr(self->core.rgbPins);
gc_collect_ptr(self->core.addr); gc_collect_ptr(self->core.addr);
gc_collect_ptr(self->core.screenData); gc_collect_ptr(self->core.screenData);
} }
void common_hal_protomatter_protomatter_set_paused(protomatter_protomatter_obj_t* self, bool paused) { void common_hal_rgbmatrix_rgbmatrix_set_paused(rgbmatrix_rgbmatrix_obj_t* self, bool paused) {
if (paused && !self->paused) { if (paused && !self->paused) {
_PM_stop(&self->core); _PM_stop(&self->core);
} else if (!paused && self->paused) { } else if (!paused && self->paused) {
@ -189,12 +189,21 @@ void common_hal_protomatter_protomatter_set_paused(protomatter_protomatter_obj_t
self->paused = paused; self->paused = paused;
} }
bool common_hal_protomatter_protomatter_get_paused(protomatter_protomatter_obj_t* self) { bool common_hal_rgbmatrix_rgbmatrix_get_paused(rgbmatrix_rgbmatrix_obj_t* self) {
return self->paused; return self->paused;
} }
void common_hal_protomatter_protomatter_refresh(protomatter_protomatter_obj_t* self) { void common_hal_rgbmatrix_rgbmatrix_refresh(rgbmatrix_rgbmatrix_obj_t* self) {
_PM_convert_565(&self->core, self->bufinfo.buf, self->width); _PM_convert_565(&self->core, self->bufinfo.buf, self->width);
_PM_swapbuffer_maybe(&self->core); _PM_swapbuffer_maybe(&self->core);
} }
int common_hal_rgbmatrix_rgbmatrix_get_width(rgbmatrix_rgbmatrix_obj_t* self) {
return self->width;
}
int common_hal_rgbmatrix_rgbmatrix_get_height(rgbmatrix_rgbmatrix_obj_t* self) {
int computed_height = (self->rgb_count / 3) << (self->addr_count);
return computed_height;
}

View File

@ -1,5 +1,5 @@
#ifndef MICROPY_INCLUDED_SHARED_MODULE_PROTOMATTER_ALLOCATOR_H #ifndef MICROPY_INCLUDED_SHARED_MODULE_RGBMATRIX_ALLOCATOR_H
#define MICROPY_INCLUDED_SHARED_MODULE_PROTOMATTER_ALLOCATOR_H #define MICROPY_INCLUDED_SHARED_MODULE_RGBMATRIX_ALLOCATOR_H
#include <stdbool.h> #include <stdbool.h>
#include "py/gc.h" #include "py/gc.h"

View File

@ -34,7 +34,7 @@
#include "shared-bindings/displayio/TileGrid.h" #include "shared-bindings/displayio/TileGrid.h"
#include "supervisor/memory.h" #include "supervisor/memory.h"
#if CIRCUITPY_PROTOMATTER #if CIRCUITPY_RGBMATRIX
#include "shared-module/displayio/__init__.h" #include "shared-module/displayio/__init__.h"
#endif #endif
@ -116,11 +116,11 @@ void supervisor_display_move_memory(void) {
grid->inline_tiles = false; grid->inline_tiles = false;
} }
MP_STATE_VM(terminal_tilegrid_tiles) = NULL; MP_STATE_VM(terminal_tilegrid_tiles) = NULL;
#if CIRCUITPY_PROTOMATTER #if CIRCUITPY_RGBMATRIX
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
if (displays[i].protomatter.base.type == &protomatter_Protomatter_type) { if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) {
protomatter_protomatter_obj_t * pm = &displays[i].protomatter; rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix;
common_hal_protomatter_protomatter_reconstruct(pm, NULL); common_hal_rgbmatrix_rgbmatrix_reconstruct(pm, NULL);
} }
} }
#endif #endif

View File

@ -481,6 +481,25 @@ typedef struct {
.single_status_byte = true, \ .single_status_byte = true, \
} }
// Settings for the Macronix MX25R1635F 8MiB SPI flash.
// Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7595/MX25R1635F,%20Wide%20Range,%2016Mb,%20v1.6.pdf
// In low power mode, quad operations can only run at 8 MHz.
#define MX25R1635F {\
.total_size = (1 << 21), /* 2 MiB */ \
.start_up_time_us = 800, \
.manufacturer_id = 0xc2, \
.memory_type = 0x28, \
.capacity = 0x18, \
.max_clock_speed_mhz = 33, /* 8 mhz for dual/quad */ \
.quad_enable_bit_mask = 0x80, \
.has_sector_protection = false, \
.supports_fast_read = true, \
.supports_qspi = true, \
.supports_qspi_writes = true, \
.write_status_register_split = false, \
.single_status_byte = true, \
}
// Settings for the Macronix MX25L51245G 64MiB SPI flash. // Settings for the Macronix MX25L51245G 64MiB SPI flash.
// Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7437/MX25L51245G,%203V,%20512Mb,%20v1.6.pdf // Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7437/MX25L51245G,%203V,%20512Mb,%20v1.6.pdf
#define MX25L51245G {\ #define MX25L51245G {\