diff options
| author | Jeff Epler <jeff@adafruit.com> | 2020-04-20 07:09:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-20 07:09:12 -0500 |
| commit | 276241b9626078d2e998300ee3b5ff6f7822aa37 (patch) | |
| tree | f3f3c87e5acf90e4b171ebf27858e7994f07cb4d | |
| parent | 1a71c8c51577cc7014d5db1c05084778c0b977e9 (diff) | |
| parent | 898c09c35e994402ae0bafb25dba5ba284838a82 (diff) | |
Merge pull request #2775 from jepler/rgbmatrix
Rename Protomatter to RGBMatrix
47 files changed, 504 insertions, 426 deletions
diff --git a/locale/ID.po b/locale/ID.po index 57cdce469..fe503d20a 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -53,7 +53,7 @@ msgstr "output:\n" msgid "%%c requires int or char" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -328,7 +328,7 @@ msgstr "" msgid "Array values should be single bytes." msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "At most %d %q may be specified (not %d)" msgstr "" @@ -365,9 +365,9 @@ msgstr "" msgid "Both pins must support hardware interrupts" msgstr "Kedua pin harus mendukung hardware interrut" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -834,6 +834,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -869,7 +874,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -924,7 +929,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.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" msgstr "Pin tidak valid" @@ -1039,7 +1044,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1127,7 +1132,7 @@ msgstr "" msgid "No such file/directory" msgstr "" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1207,7 +1212,7 @@ msgstr "Pin tidak mempunya kemampuan untuk ADC (Analog Digital Converter)" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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 " "(Reload)" -#: shared-module/_protomatter/Protomatter.c -#, c-format -msgid "Protomatter internal error #%d" -msgstr "" - #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." msgstr "" @@ -2817,12 +2817,12 @@ msgstr "anotasi return harus sebuah identifier" msgid "return expected '%q' but got '%q'" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index e9e7838cb..7a7eb5d44 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -53,7 +53,7 @@ msgstr "" msgid "%%c requires int or char" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -326,7 +326,7 @@ msgstr "" msgid "Array values should be single bytes." msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "At most %d %q may be specified (not %d)" msgstr "" @@ -361,9 +361,9 @@ msgstr "" msgid "Both pins must support hardware interrupts" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -823,6 +823,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -858,7 +863,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -913,7 +918,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.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" msgstr "" @@ -1028,7 +1033,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1116,7 +1121,7 @@ msgstr "" msgid "No such file/directory" msgstr "" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1195,7 +1200,7 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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." msgstr "" -#: shared-module/_protomatter/Protomatter.c -#, c-format -msgid "Protomatter internal error #%d" -msgstr "" - #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." msgstr "" @@ -2792,12 +2792,12 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index bdc4c9bf4..ac7ff8cad 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \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" "Last-Translator: Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n" @@ -55,7 +55,7 @@ msgstr " Ausgabe:\n" msgid "%%c requires int or char" msgstr "%%c erwartet int oder char" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -328,7 +328,7 @@ msgstr "Array muss Halbwörter enthalten (type 'H')" msgid "Array values should be single bytes." 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)" msgstr "" @@ -365,9 +365,9 @@ msgstr "Bit depth muss ein Vielfaches von 8 sein." msgid "Both pins must support hardware interrupts" msgstr "Beide pins müssen Hardware Interrupts unterstützen" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Die Helligkeit muss zwischen 0 und 1.0 liegen" @@ -831,6 +831,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -866,7 +871,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid 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/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" msgstr "Ungültiger Pin" @@ -1037,7 +1042,7 @@ msgstr "Muss eine %q Unterklasse sein." msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1125,7 +1130,7 @@ msgstr "Kein Speicherplatz mehr verfügbar auf dem Gerät" msgid "No such file/directory" msgstr "Keine solche Datei/Verzeichnis" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1210,7 +1215,7 @@ msgstr "Pin hat keine ADC Funktionalität" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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 " "laden" -#: shared-module/_protomatter/Protomatter.c -#, c-format -msgid "Protomatter internal error #%d" -msgstr "" - #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." 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'" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/en_US.po b/locale/en_US.po index 8028a42da..ab482425e 100644 --- a/locale/en_US.po +++ b/locale/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \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" "Last-Translator: \n" "Language-Team: \n" @@ -53,7 +53,7 @@ msgstr "" msgid "%%c requires int or char" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -326,7 +326,7 @@ msgstr "" msgid "Array values should be single bytes." msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "At most %d %q may be specified (not %d)" msgstr "" @@ -361,9 +361,9 @@ msgstr "" msgid "Both pins must support hardware interrupts" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -823,6 +823,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -858,7 +863,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -913,7 +918,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.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" msgstr "" @@ -1028,7 +1033,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1116,7 +1121,7 @@ msgstr "" msgid "No such file/directory" msgstr "" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1195,7 +1200,7 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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." msgstr "" -#: shared-module/_protomatter/Protomatter.c -#, c-format -msgid "Protomatter internal error #%d" -msgstr "" - #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." msgstr "" @@ -2792,12 +2792,12 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/en_x_pirate.po b/locale/en_x_pirate.po index c98c0faa7..7deda3718 100644 --- a/locale/en_x_pirate.po +++ b/locale/en_x_pirate.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \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" "Last-Translator: \n" "Language-Team: @sommersoft, @MrCertainly\n" @@ -55,7 +55,7 @@ msgstr "" msgid "%%c requires int or char" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -328,7 +328,7 @@ msgstr "" msgid "Array values should be single bytes." msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "At most %d %q may be specified (not %d)" msgstr "" @@ -365,9 +365,9 @@ msgstr "" msgid "Both pins must support hardware interrupts" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -827,6 +827,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -862,7 +867,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -917,7 +922,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.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" msgstr "" @@ -1032,7 +1037,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1120,7 +1125,7 @@ msgstr "" msgid "No such file/directory" msgstr "" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1199,7 +1204,7 @@ msgstr "Belay that! Th' Pin be not ADC capable" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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." msgstr "" -#: shared-module/_protomatter/Protomatter.c -#, c-format -msgid "Protomatter internal error #%d" -msgstr "" - #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." msgstr "" @@ -2796,12 +2796,12 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/es.po b/locale/es.po index 7cf508644..388a8b3be 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \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" "Last-Translator: \n" "Language-Team: \n" @@ -55,7 +55,7 @@ msgstr " salida:\n" msgid "%%c requires int or char" msgstr "%%c requiere int o char" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -330,7 +330,7 @@ msgstr "Array debe contener media palabra (type 'H')" msgid "Array values should be single bytes." 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)" msgstr "" @@ -367,9 +367,9 @@ msgstr "Bits depth debe ser múltiplo de 8." msgid "Both pins must support hardware interrupts" msgstr "Ambos pines deben soportar interrupciones por hardware" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -831,6 +831,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -866,7 +871,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" 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/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" msgstr "Pin inválido" @@ -1036,7 +1041,7 @@ msgstr "Debe de ser una subclase de %q" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1124,7 +1129,7 @@ msgstr "No queda espacio en el dispositivo" msgid "No such file/directory" msgstr "No existe el archivo/directorio" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1209,7 +1214,7 @@ msgstr "Pin no tiene capacidad ADC" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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 "" "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 msgid "Pull not used when direction is 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'" msgstr "retorno esperado '%q' pero se obtuvo '%q'" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/fil.po b/locale/fil.po index 3b6fee038..90e650374 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \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" "Last-Translator: Timothy <me@timothygarcia.ca>\n" "Language-Team: fil\n" @@ -53,7 +53,7 @@ msgstr " output:\n" msgid "%%c requires int or char" msgstr "%%c nangangailangan ng int o char" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -330,7 +330,7 @@ msgstr "May halfwords (type 'H') dapat ang array" msgid "Array values should be 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)" msgstr "" @@ -367,9 +367,9 @@ msgstr "Bit depth ay dapat multiple ng 8." msgid "Both pins must support 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/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -839,6 +839,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -874,7 +879,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Maling argumento" @@ -929,7 +934,7 @@ msgstr "Mali ang phase" #: ports/atmel-samd/common-hal/audioio/AudioOut.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" msgstr "Mali ang pin" @@ -1044,7 +1049,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1132,7 +1137,7 @@ msgstr "" msgid "No such file/directory" msgstr "Walang file/directory" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1215,7 +1220,7 @@ msgstr "Ang pin ay walang kakayahan sa ADC" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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-" "reload." -#: shared-module/_protomatter/Protomatter.c -#, c-format -msgid "Protomatter internal error #%d" -msgstr "" - #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is 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'" msgstr "return umasa ng '%q' pero ang nakuha ay ‘%q’" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 64c78b57a..ee0a05439 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\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" "Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n" "Language-Team: fr\n" @@ -55,7 +55,7 @@ msgstr " sortie:\n" msgid "%%c requires int or 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 msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -334,7 +334,7 @@ msgstr "Le tableau doit contenir des demi-mots (type 'H')" msgid "Array values should be single 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)" msgstr "" @@ -371,9 +371,9 @@ msgstr "La profondeur de bit doit être un multiple de 8." msgid "Both pins must support hardware interrupts" msgstr "Les deux entrées doivent supporter les interruptions matérielles" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -842,6 +842,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -878,7 +883,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argument invalide" @@ -935,7 +940,7 @@ msgstr "Phase invalide" #: ports/atmel-samd/common-hal/audioio/AudioOut.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" msgstr "Broche invalide" @@ -1051,7 +1056,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1139,7 +1144,7 @@ msgstr "Il n'y a plus d'espace libre sur le périphérique" msgid "No such file/directory" msgstr "Fichier/dossier introuvable" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1229,7 +1234,7 @@ msgstr "La broche ne peut être utilisée pour l'ADC" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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." 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 msgid "Pull not used when direction is 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'" msgstr "return attendait '%q' mais a reçu '%q'" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 99e99a3cb..7085f9a4b 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n" "Language-Team: \n" @@ -53,7 +53,7 @@ msgstr " output:\n" msgid "%%c requires int or char" msgstr "%%c necessita di int o char" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -329,7 +329,7 @@ msgstr "Array deve avere mezzoparole (typo 'H')" msgid "Array values should be single bytes." 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)" msgstr "" @@ -367,9 +367,9 @@ msgstr "La profondità di bit deve essere multipla di 8." msgid "Both pins must support hardware interrupts" msgstr "Entrambi i pin devono supportare gli interrupt hardware" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -839,6 +839,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -874,7 +879,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" 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/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" msgstr "Pin non valido" @@ -1048,7 +1053,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1136,7 +1141,7 @@ msgstr "Non che spazio sul dispositivo" msgid "No such file/directory" msgstr "Nessun file/directory esistente" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1224,7 +1229,7 @@ msgstr "Il pin non ha capacità di ADC" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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 "" "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 msgid "Pull not used when direction is output." msgstr "" @@ -2851,12 +2851,12 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "return aspettava '%q' ma ha ottenuto '%q'" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index d232133e2..760010c70 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: \n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -55,7 +55,7 @@ msgstr " 산출:\n" msgid "%%c requires int or char" msgstr "%%c 전수(int)또는 캐릭터(char)필요합니다" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -328,7 +328,7 @@ msgstr "" msgid "Array values should be single bytes." msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "At most %d %q may be specified (not %d)" msgstr "" @@ -365,9 +365,9 @@ msgstr "" msgid "Both pins must support hardware interrupts" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -827,6 +827,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -862,7 +867,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -917,7 +922,7 @@ msgstr "단계가 잘못되었습니다" #: ports/atmel-samd/common-hal/audioio/AudioOut.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" msgstr "핀이 잘못되었습니다" @@ -1032,7 +1037,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1120,7 +1125,7 @@ msgstr "" msgid "No such file/directory" msgstr "" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1199,7 +1204,7 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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." msgstr "" -#: shared-module/_protomatter/Protomatter.c -#, c-format -msgid "Protomatter internal error #%d" -msgstr "" - #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." msgstr "" @@ -2797,12 +2797,12 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index 6b58cbc4e..12881677b 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \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" "Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n" "Language-Team: pl\n" @@ -54,7 +54,7 @@ msgstr " wyjście:\n" msgid "%%c requires int or char" msgstr "%%c wymaga int lub char" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -327,7 +327,7 @@ msgstr "Tablica musi zawierać pół-słowa (typ 'H')" msgid "Array values should be single bytes." 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)" msgstr "" @@ -364,9 +364,9 @@ msgstr "Głębia musi być wielokrotnością 8." msgid "Both pins must support hardware interrupts" msgstr "Obie nóżki muszą wspierać przerwania sprzętowe" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -828,6 +828,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -863,7 +868,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid 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/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" msgstr "Zła nóżka" @@ -1033,7 +1038,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1121,7 +1126,7 @@ msgstr "Brak miejsca" msgid "No such file/directory" msgstr "Brak pliku/katalogu" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1200,7 +1205,7 @@ msgstr "Nóżka nie obsługuje ADC" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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." 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 msgid "Pull not used when direction is output." 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'" msgstr "return oczekiwał '%q', a jest '%q'" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 6ef31ef4a..da8276d75 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\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" "Last-Translator: \n" "Language-Team: \n" @@ -53,7 +53,7 @@ msgstr " saída:\n" msgid "%%c requires int or char" msgstr "%%c requer int ou char" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" msgstr "" @@ -329,7 +329,7 @@ msgstr "Array deve conter meias palavras (tipo 'H')" msgid "Array values should be single bytes." msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "At most %d %q may be specified (not %d)" msgstr "" @@ -364,9 +364,9 @@ msgstr "" msgid "Both pins must support hardware interrupts" msgstr "Ambos os pinos devem suportar interrupções de hardware" -#: shared-bindings/_protomatter/Protomatter.c #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -832,6 +832,11 @@ msgstr "" msgid "Internal define error" 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/PDMIn.c msgid "Invalid %q pin" @@ -867,7 +872,7 @@ msgstr "" msgid "Invalid UART pin selection" msgstr "" -#: py/moduerrno.c shared-module/_protomatter/Protomatter.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" 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/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" msgstr "Pino inválido" @@ -1040,7 +1045,7 @@ msgstr "" msgid "Must provide MISO or MOSI pin" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1128,7 +1133,7 @@ msgstr "" msgid "No such file/directory" msgstr "" -#: shared-module/_protomatter/Protomatter.c +#: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" msgstr "" @@ -1210,7 +1215,7 @@ msgstr "O pino não tem recursos de ADC" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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." msgstr "" -#: shared-module/_protomatter/Protomatter.c -#, c-format -msgid "Protomatter internal error #%d" -msgstr "" - #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." msgstr "" @@ -2814,12 +2814,12 @@ msgstr "" msgid "return expected '%q' but got '%q'" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 253760ff5..0ca59446f 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\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" "Last-Translator: hexthat\n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -60,7 +60,7 @@ msgstr " shūchū:\n" msgid "%%c requires int or char" msgstr "%%c xūyào zhěngshù huò char" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" 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." 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)" 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" 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/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 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" 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/PDMIn.c 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" 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" 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/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" 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" 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 msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "" @@ -1129,7 +1134,7 @@ msgstr "Shèbèi shàng méiyǒu kònggé" msgid "No such file/directory" 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" msgstr "" @@ -1214,7 +1219,7 @@ msgstr "Pin méiyǒu ADC nénglì" msgid "Pin number already reserved by EXTI" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "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." 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 msgid "Pull not used when direction is output." 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'" 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 msgid "rgb_pins[%d] duplicates another pin assignment" msgstr "" -#: shared-bindings/_protomatter/Protomatter.c +#: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" msgstr "" diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk index f7223790a..febd2a6c3 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk @@ -14,7 +14,7 @@ CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_NETWORK = 0 -CIRCUITPY_PROTOMATTER = 0 +CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_PS2IO = 0 CIRCUITPY_AUDIOMP3 = 0 diff --git a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk index c14a29615..adaeecb89 100644 --- a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk @@ -17,7 +17,7 @@ CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_GAMEPAD = 0 -CIRCUITPY_PROTOMATTER = 0 +CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_PS2IO = 0 FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk index 57eb7f1b9..fd6e25f6c 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk @@ -19,7 +19,7 @@ CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FREQUENCYIO = 0 -CIRCUITPY_PROTOMATTER = 0 +CIRCUITPY_RGBMATRIX = 0 # Include these Python libraries in firmware. #FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk index 691c1c136..466e34591 100644 --- a/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk @@ -28,7 +28,7 @@ CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_NETWORK = 0 CIRCUITPY_TOUCHIO = 0 -CIRCUITPY_PROTOMATTER = 0 +CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_PS2IO = 0 CIRCUITPY_USB_HID = 0 CIRCUITPY_RTC = 0 diff --git a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk index ed97aef4c..6a78a4ff9 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk @@ -26,7 +26,7 @@ CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_NETWORK = 0 CIRCUITPY_TOUCHIO = 0 -CIRCUITPY_PROTOMATTER = 0 +CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_PS2IO = 0 CIRCUITPY_USB_HID = 0 diff --git a/ports/atmel-samd/common-hal/_protomatter/Protomatter.c b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c index bf9cafb6b..55b0c2f12 100644 --- a/ports/atmel-samd/common-hal/_protomatter/Protomatter.c +++ b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c @@ -26,12 +26,12 @@ #include <stddef.h> -#include "common-hal/_protomatter/Protomatter.h" +#include "common-hal/rgbmatrix/RGBMatrix.h" #include "samd/timers.h" #include "timer_handler.h" -void *common_hal_protomatter_timer_allocate() { +void *common_hal_rgbmatrix_timer_allocate() { uint8_t timer_index = find_free_timer(); if (timer_index == 0xff) { return NULL; @@ -49,16 +49,16 @@ static uint8_t tc_index_from_ptr(void* ptr) { 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); if (timer_index == 0xff) { 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); } -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); if (timer_index == 0xff) { return; @@ -67,7 +67,7 @@ void common_hal_protomatter_timer_disable(void* ptr) { 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); if (timer_index == 0xff) { return; diff --git a/ports/atmel-samd/common-hal/_protomatter/Protomatter.h b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.h index 8185bed0e..48de4dcb2 100644 --- a/ports/atmel-samd/common-hal/_protomatter/Protomatter.h +++ b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.h @@ -24,12 +24,12 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PROTOMATTER_PROTOMATTER_H -#define 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_RGBMATRIX_RGBMATRIX_H -void *common_hal_protomatter_timer_allocate(void); -void common_hal_protomatter_timer_enable(void*); -void common_hal_protomatter_timer_disable(void*); -void common_hal_protomatter_timer_free(void*); +void *common_hal_rgbmatrix_timer_allocate(void); +void common_hal_rgbmatrix_timer_enable(void*); +void common_hal_rgbmatrix_timer_disable(void*); +void common_hal_rgbmatrix_timer_free(void*); #endif diff --git a/ports/atmel-samd/common-hal/_protomatter/__init__.c b/ports/atmel-samd/common-hal/rgbmatrix/__init__.c index e69de29bb..e69de29bb 100644 --- a/ports/atmel-samd/common-hal/_protomatter/__init__.c +++ b/ports/atmel-samd/common-hal/rgbmatrix/__init__.c diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 61f7c206a..039263be7 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -70,9 +70,9 @@ CIRCUITPY_ULAB = 1 endif endif -ifndef CIRCUITPY_PROTOMATTER +ifndef CIRCUITPY_RGBMATRIX ifneq ($(CIRCUITPY_SMALL_BUILD),1) -CIRCUITPY_PROTOMATTER = 1 +CIRCUITPY_RGBMATRIX = 1 endif endif diff --git a/ports/atmel-samd/timer_handler.c b/ports/atmel-samd/timer_handler.c index 598fad564..51c6f0a39 100644 --- a/ports/atmel-samd/timer_handler.c +++ b/ports/atmel-samd/timer_handler.c @@ -64,8 +64,8 @@ void shared_timer_handler(bool is_tc, uint8_t index) { frequencyin_interrupt_handler(index); #endif break; - case TC_HANDLER_PROTOMATTER: - #if CIRCUITPY_PROTOMATTER + case TC_HANDLER_RGBMATRIX: + #if CIRCUITPY_RGBMATRIX _PM_IRQ_HANDLER(); #endif break; diff --git a/ports/atmel-samd/timer_handler.h b/ports/atmel-samd/timer_handler.h index 646cd54ec..8115cd73b 100644 --- a/ports/atmel-samd/timer_handler.h +++ b/ports/atmel-samd/timer_handler.h @@ -30,7 +30,7 @@ #define TC_HANDLER_PULSEOUT 0x1 #define TC_HANDLER_PEW 0x2 #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 shared_timer_handler(bool is_tc, uint8_t index); diff --git a/ports/nrf/common-hal/_protomatter/Protomatter.c b/ports/nrf/common-hal/rgbmatrix/RGBMatrix.c index b6e55bbd4..e13b761ab 100644 --- a/ports/nrf/common-hal/_protomatter/Protomatter.c +++ b/ports/nrf/common-hal/rgbmatrix/RGBMatrix.c @@ -26,24 +26,24 @@ #include <stddef.h> -#include "common-hal/_protomatter/Protomatter.h" +#include "common-hal/rgbmatrix/RGBMatrix.h" #include "peripherals/nrf/timers.h" 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(); nrf_peripherals_timer_never_reset(timer); 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(); } -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); static const nrfx_timer_config_t timer_config = { .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, .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_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); nrf_peripherals_free_timer(timer); } diff --git a/ports/nrf/common-hal/_protomatter/Protomatter.h b/ports/nrf/common-hal/rgbmatrix/RGBMatrix.h index 8185bed0e..48de4dcb2 100644 --- a/ports/nrf/common-hal/_protomatter/Protomatter.h +++ b/ports/nrf/common-hal/rgbmatrix/RGBMatrix.h @@ -24,12 +24,12 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PROTOMATTER_PROTOMATTER_H -#define 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_RGBMATRIX_RGBMATRIX_H -void *common_hal_protomatter_timer_allocate(void); -void common_hal_protomatter_timer_enable(void*); -void common_hal_protomatter_timer_disable(void*); -void common_hal_protomatter_timer_free(void*); +void *common_hal_rgbmatrix_timer_allocate(void); +void common_hal_rgbmatrix_timer_enable(void*); +void common_hal_rgbmatrix_timer_disable(void*); +void common_hal_rgbmatrix_timer_free(void*); #endif diff --git a/ports/nrf/common-hal/_protomatter/__init__.c b/ports/nrf/common-hal/rgbmatrix/__init__.c index e69de29bb..e69de29bb 100644 --- a/ports/nrf/common-hal/_protomatter/__init__.c +++ b/ports/nrf/common-hal/rgbmatrix/__init__.c diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index 5ca1f0f35..ec6850ebb 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -51,7 +51,7 @@ endif # frequencyio not yet implemented CIRCUITPY_FREQUENCYIO = 0 -CIRCUITPY_PROTOMATTER = 1 +CIRCUITPY_RGBMATRIX = 1 CIRCUITPY_FRAMEBUFFERIO = 1 # nRF52840-specific diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index b6b0cacaf..78ab41e12 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -181,8 +181,8 @@ endif ifeq ($(CIRCUITPY_PIXELBUF),1) SRC_PATTERNS += _pixelbuf/% endif -ifeq ($(CIRCUITPY_PROTOMATTER),1) -SRC_PATTERNS += _protomatter/% +ifeq ($(CIRCUITPY_RGBMATRIX),1) +SRC_PATTERNS += rgbmatrix/% endif ifeq ($(CIRCUITPY_PULSEIO),1) SRC_PATTERNS += pulseio/% @@ -248,8 +248,6 @@ SRC_COMMON_HAL_ALL = \ _bleio/PacketBuffer.c \ _bleio/Service.c \ _bleio/UUID.c \ - _protomatter/Protomatter.c \ - _protomatter/__init__.c \ analogio/AnalogIn.c \ analogio/AnalogOut.c \ analogio/__init__.c \ @@ -279,6 +277,8 @@ SRC_COMMON_HAL_ALL = \ nvm/ByteArray.c \ nvm/__init__.c \ os/__init__.c \ + rgbmatrix/RGBMatrix.c \ + rgbmatrix/__init__.c \ pulseio/PWMOut.c \ pulseio/PulseIn.c \ pulseio/PulseOut.c \ @@ -323,8 +323,6 @@ SRC_SHARED_MODULE_ALL = \ _bleio/ScanResults.c \ _pixelbuf/PixelBuf.c \ _pixelbuf/__init__.c \ - _protomatter/Protomatter.c \ - _protomatter/__init__.c \ _stage/Layer.c \ _stage/Text.c \ _stage/__init__.c \ @@ -368,6 +366,8 @@ SRC_SHARED_MODULE_ALL = \ random/__init__.c \ socket/__init__.c \ network/__init__.c \ + rgbmatrix/RGBMatrix.c \ + rgbmatrix/__init__.c \ storage/__init__.c \ struct/__init__.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)' endif -ifeq ($(CIRCUITPY_PROTOMATTER),1) +ifeq ($(CIRCUITPY_RGBMATRIX),1) SRC_MOD += $(addprefix lib/protomatter/, \ 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 # All possible sources are listed here, and are filtered by SRC_PATTERNS. diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 06289258d..497fd9523 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -461,11 +461,11 @@ extern const struct _mp_obj_module_t pixelbuf_module; #define PIXELBUF_MODULE #endif -#if CIRCUITPY_PROTOMATTER -extern const struct _mp_obj_module_t protomatter_module; -#define PROTOMATTER_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__protomatter),(mp_obj_t)&protomatter_module }, +#if CIRCUITPY_RGBMATRIX +extern const struct _mp_obj_module_t rgbmatrix_module; +#define RGBMATRIX_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rgbmatrix),(mp_obj_t)&rgbmatrix_module }, #else -#define PROTOMATTER_MODULE +#define RGBMATRIX_MODULE #endif #if CIRCUITPY_PULSEIO @@ -658,10 +658,10 @@ extern const struct _mp_obj_module_t ustack_module; PEW_MODULE \ PIXELBUF_MODULE \ PS2IO_MODULE \ - PROTOMATTER_MODULE \ PULSEIO_MODULE \ RANDOM_MODULE \ RE_MODULE \ + RGBMATRIX_MODULE \ ROTARYIO_MODULE \ RTC_MODULE \ SAMD_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index ba94f9784..601f1c4e4 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -216,10 +216,10 @@ endif CFLAGS += -DCIRCUITPY_PIXELBUF=$(CIRCUITPY_PIXELBUF) # Only for SAMD boards for the moment -ifndef CIRCUITPY_PROTOMATTER -CIRCUITPY_PROTOMATTER = 0 +ifndef CIRCUITPY_RGBMATRIX +CIRCUITPY_RGBMATRIX = 0 endif -CFLAGS += -DCIRCUITPY_PROTOMATTER=$(CIRCUITPY_PROTOMATTER) +CFLAGS += -DCIRCUITPY_RGBMATRIX=$(CIRCUITPY_RGBMATRIX) ifndef CIRCUITPY_PULSEIO CIRCUITPY_PULSEIO = $(CIRCUITPY_DEFAULT_BUILD) diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index aa8fc1a63..9ff6cc12d 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -4,6 +4,7 @@ * The MIT License (MIT) * * 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 * 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()` //| 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) //| //| :param framebuffer: The framebuffer that the display is connected to //| :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 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) { - 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[] = { { 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_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_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_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( self, framebuffer, - args[ARG_width].u_int, args[ARG_height].u_int, rotation, - args[ARG_color_depth].u_int, - args[ARG_bytes_per_cell].u_int, - args[ARG_auto_refresh].u_bool, - args[ARG_native_frames_per_second].u_int + args[ARG_auto_refresh].u_bool ); return self; diff --git a/shared-bindings/framebufferio/FramebufferDisplay.h b/shared-bindings/framebufferio/FramebufferDisplay.h index b472088d2..c41e041ce 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.h +++ b/shared-bindings/framebufferio/FramebufferDisplay.h @@ -4,6 +4,7 @@ * The MIT License (MIT) * * 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 * 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 void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t* self, - mp_obj_t framebuffer, uint16_t width, uint16_t height, - uint16_t rotation, uint16_t color_depth, - uint8_t bytes_per_cell, - bool auto_refresh, uint16_t native_frames_per_second); + mp_obj_t framebuffer, + uint16_t rotation, + bool auto_refresh); bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t* self, displayio_group_t* root_group); diff --git a/shared-bindings/framebufferio/__init__.c b/shared-bindings/framebufferio/__init__.c index 0f0823a25..88f69bb2c 100644 --- a/shared-bindings/framebufferio/__init__.c +++ b/shared-bindings/framebufferio/__init__.c @@ -38,7 +38,7 @@ //| The `framebufferio` module contains classes to manage display output //| including synchronizing with refresh rates and partial updating. //| 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. //| //| Libraries diff --git a/shared-bindings/_protomatter/Protomatter.c b/shared-bindings/rgbmatrix/RGBMatrix.c index bb4339079..d758774d9 100644 --- a/shared-bindings/_protomatter/Protomatter.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -29,8 +29,8 @@ #include "py/runtime.h" #include "py/objarray.h" -#include "common-hal/_protomatter/Protomatter.h" -#include "shared-bindings/_protomatter/Protomatter.h" +#include "common-hal/rgbmatrix/RGBMatrix.h" +#include "shared-bindings/rgbmatrix/RGBMatrix.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/util.h" @@ -38,9 +38,9 @@ #include "shared-module/framebufferio/__init__.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: //| 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. //| @@ -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 //| 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 //| flicker during updates. //| -//| If a framebuffer is not passed in, one is allocated internally. To -//| retrieve it, pass the protomatter object to memoryview(). -//| -//| A Protomatter framebuffer is often used in conjunction with a +//| A RGBMatrix is often used in conjunction with a //| `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, ARG_clock_pin, ARG_latch_pin, ARG_output_enable_pin, ARG_doublebuffer, ARG_framebuffer, ARG_height }; 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_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - // Because interrupt handlers point directly at protomatter objects, - // it is NOT okay to move them to the long-lived pool later. Allocate - // 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; + rgbmatrix_rgbmatrix_obj_t *self = &allocate_display_bus_or_raise()->rgbmatrix; + self->base.type = &rgbmatrix_RGBMatrix_type; uint8_t rgb_count, addr_count; 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); } - common_hal_protomatter_protomatter_construct(self, + common_hal_rgbmatrix_rgbmatrix_construct(self, args[ARG_width].u_int, args[ARG_bit_depth].u_int, 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 //| //| 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. //| -STATIC mp_obj_t protomatter_protomatter_deinit(mp_obj_t self_in) { - protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; - common_hal_protomatter_protomatter_deinit(self); +STATIC mp_obj_t rgbmatrix_rgbmatrix_deinit(mp_obj_t self_in) { + rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in; + common_hal_rgbmatrix_rgbmatrix_deinit(self); 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) { 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 //| 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) { - protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; +STATIC mp_obj_t rgbmatrix_rgbmatrix_get_brightness(mp_obj_t self_in) { + rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in; 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) { - protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; +STATIC mp_obj_t rgbmatrix_rgbmatrix_set_brightness(mp_obj_t self_in, mp_obj_t value_in) { + rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in; check_for_deinit(self); mp_float_t brightness = mp_obj_get_float(value_in); if (brightness < 0.0f || brightness > 1.0f) { 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; } -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, - .proxy = {(mp_obj_t)&protomatter_protomatter_get_brightness_obj, - (mp_obj_t)&protomatter_protomatter_set_brightness_obj, + .proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_brightness_obj, + (mp_obj_t)&rgbmatrix_rgbmatrix_set_brightness_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 //| they are shown. //| -STATIC mp_obj_t protomatter_protomatter_refresh(mp_obj_t self_in) { - protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; +STATIC mp_obj_t rgbmatrix_rgbmatrix_refresh(mp_obj_t self_in) { + rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in; check_for_deinit(self); - common_hal_protomatter_protomatter_refresh(self); + common_hal_rgbmatrix_rgbmatrix_refresh(self); 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[] = { - { 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) }, - { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&protomatter_protomatter_refresh_obj) }, +//| .. attribute:: width +//| +//| The width of the display, in pixels +//| +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) { - protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; +//| .. attribute:: height +//| +//| 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); *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, // avoiding a type cast that can hide errors -STATIC void protomatter_protomatter_swapbuffers(mp_obj_t self_in) { - common_hal_protomatter_protomatter_refresh(self_in); +STATIC void rgbmatrix_rgbmatrix_swapbuffers(mp_obj_t self_in) { + common_hal_rgbmatrix_rgbmatrix_refresh(self_in); } -STATIC void protomatter_protomatter_deinit_proto(mp_obj_t self_in) { - common_hal_protomatter_protomatter_deinit(self_in); +STATIC void rgbmatrix_rgbmatrix_deinit_proto(mp_obj_t self_in) { + common_hal_rgbmatrix_rgbmatrix_deinit(self_in); } -STATIC float protomatter_protomatter_get_brightness_proto(mp_obj_t self_in) { - return common_hal_protomatter_protomatter_get_paused(self_in) ? 0.0f : 1.0f; +STATIC float rgbmatrix_rgbmatrix_get_brightness_proto(mp_obj_t self_in) { + 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) { - common_hal_protomatter_protomatter_set_paused(self_in, value <= 0); +STATIC bool rgbmatrix_rgbmatrix_set_brightness_proto(mp_obj_t self_in, mp_float_t value) { + common_hal_rgbmatrix_rgbmatrix_set_paused(self_in, value <= 0); 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) - .get_bufinfo = protomatter_protomatter_get_bufinfo, - .set_brightness = protomatter_protomatter_set_brightness_proto, - .get_brightness = protomatter_protomatter_get_brightness_proto, - .swapbuffers = protomatter_protomatter_swapbuffers, - .deinit = protomatter_protomatter_deinit_proto, + .get_bufinfo = rgbmatrix_rgbmatrix_get_bufinfo, + .set_brightness = rgbmatrix_rgbmatrix_set_brightness_proto, + .get_brightness = rgbmatrix_rgbmatrix_get_brightness_proto, + .get_width = rgbmatrix_rgbmatrix_get_width_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) { - protomatter_protomatter_obj_t *self = (protomatter_protomatter_obj_t*)self_in; +STATIC mp_int_t rgbmatrix_rgbmatrix_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { + rgbmatrix_rgbmatrix_obj_t *self = (rgbmatrix_rgbmatrix_obj_t*)self_in; // a readonly framebuffer would be unusual but not impossible if ((flags & MP_BUFFER_WRITE) && !(self->bufinfo.typecode & MP_OBJ_ARRAY_TYPECODE_FLAG_RW)) { return 1; @@ -366,11 +425,11 @@ STATIC mp_int_t protomatter_protomatter_get_buffer(mp_obj_t self_in, mp_buffer_i return 0; } -const mp_obj_type_t protomatter_Protomatter_type = { +const mp_obj_type_t rgbmatrix_RGBMatrix_type = { { &mp_type_type }, - .name = MP_QSTR_Protomatter, - .buffer_p = { .get_buffer = protomatter_protomatter_get_buffer, }, - .make_new = protomatter_protomatter_make_new, - .protocol = &protomatter_protomatter_proto, - .locals_dict = (mp_obj_dict_t*)&protomatter_protomatter_locals_dict, + .name = MP_QSTR_RGBMatrix, + .buffer_p = { .get_buffer = rgbmatrix_rgbmatrix_get_buffer, }, + .make_new = rgbmatrix_rgbmatrix_make_new, + .protocol = &rgbmatrix_rgbmatrix_proto, + .locals_dict = (mp_obj_dict_t*)&rgbmatrix_rgbmatrix_locals_dict, }; diff --git a/shared-bindings/_protomatter/Protomatter.h b/shared-bindings/rgbmatrix/RGBMatrix.h index 9499da22c..027f817bb 100644 --- a/shared-bindings/_protomatter/Protomatter.h +++ b/shared-bindings/rgbmatrix/RGBMatrix.h @@ -24,13 +24,13 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_PROTOMATTER_PROTOMATTER_H -#define MICROPY_INCLUDED_SHARED_BINDINGS_PROTOMATTER_PROTOMATTER_H +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_RGBMATRIX_RGBMATRIX_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" -extern const mp_obj_type_t protomatter_Protomatter_type; +extern const mp_obj_type_t rgbmatrix_RGBMatrix_type; typedef struct { mp_obj_base_t base; mp_obj_t framebuffer; @@ -46,14 +46,16 @@ typedef struct { bool core_is_initialized; bool paused; 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_protomatter_protomatter_deinit(protomatter_protomatter_obj_t*); -void protomatter_protomatter_collect_ptrs(protomatter_protomatter_obj_t*); -void common_hal_protomatter_protomatter_reconstruct(protomatter_protomatter_obj_t* self, mp_obj_t framebuffer); -void common_hal_protomatter_protomatter_set_paused(protomatter_protomatter_obj_t* self, bool paused); -bool common_hal_protomatter_protomatter_get_paused(protomatter_protomatter_obj_t* self); -void common_hal_protomatter_protomatter_refresh(protomatter_protomatter_obj_t* self); +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_rgbmatrix_rgbmatrix_deinit(rgbmatrix_rgbmatrix_obj_t*); +void rgbmatrix_rgbmatrix_collect_ptrs(rgbmatrix_rgbmatrix_obj_t*); +void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self, mp_obj_t framebuffer); +void common_hal_rgbmatrix_rgbmatrix_set_paused(rgbmatrix_rgbmatrix_obj_t* self, bool paused); +bool common_hal_rgbmatrix_rgbmatrix_get_paused(rgbmatrix_rgbmatrix_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 diff --git a/shared-bindings/_protomatter/__init__.c b/shared-bindings/rgbmatrix/__init__.c index 2281b15f1..662d2c4f6 100644 --- a/shared-bindings/_protomatter/__init__.c +++ b/shared-bindings/rgbmatrix/__init__.c @@ -29,27 +29,27 @@ #include "py/obj.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 //| //| .. toctree:: //| :maxdepth: 3 //| -//| Protomatter +//| RGBMatrix -STATIC const mp_rom_map_elem_t protomatter_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__protomatter) }, - { MP_ROM_QSTR(MP_QSTR_Protomatter), MP_ROM_PTR(&protomatter_Protomatter_type) }, +STATIC const mp_rom_map_elem_t rgbmatrix_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_rgbmatrix) }, + { 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 }, - .globals = (mp_obj_dict_t*)&protomatter_module_globals, + .globals = (mp_obj_dict_t*)&rgbmatrix_module_globals, }; diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index cf1bc45d9..c898bbb98 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -21,8 +21,8 @@ primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT]; -#if CIRCUITPY_PROTOMATTER -STATIC bool any_display_uses_this_protomatter(protomatter_protomatter_obj_t* pm) { +#if CIRCUITPY_RGBMATRIX +STATIC bool any_display_uses_this_rgbmatrix(rgbmatrix_rgbmatrix_obj_t* pm) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { if (displays[i].framebuffer_display.base.type == &framebufferio_framebufferdisplay_type) { 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) { common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); #if CIRCUITPY_FRAMEBUFFERIO - } else if (bus_type == &protomatter_Protomatter_type) { - common_hal_protomatter_protomatter_deinit(&displays[i].protomatter); + } else if (bus_type == &rgbmatrix_RGBMatrix_type) { + common_hal_rgbmatrix_rgbmatrix_deinit(&displays[i].rgbmatrix); #endif } displays[i].fourwire_bus.base.type = &mp_type_NoneType; @@ -167,11 +167,11 @@ void reset_displays(void) { } } } -#if CIRCUITPY_PROTOMATTER - } else if (displays[i].protomatter.base.type == &protomatter_Protomatter_type) { - protomatter_protomatter_obj_t * pm = &displays[i].protomatter; - if(!any_display_uses_this_protomatter(pm)) { - common_hal_protomatter_protomatter_deinit(pm); +#if CIRCUITPY_RGBMATRIX + } else if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { + rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; + if(!any_display_uses_this_rgbmatrix(pm)) { + common_hal_rgbmatrix_rgbmatrix_deinit(pm); } #endif } else { @@ -200,9 +200,9 @@ void reset_displays(void) { void displayio_gc_collect(void) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { -#if CIRCUITPY_PROTOMATTER - if (displays[i].protomatter.base.type == &protomatter_Protomatter_type) { - protomatter_protomatter_collect_ptrs(&displays[i].protomatter); +#if CIRCUITPY_RGBMATRIX + if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { + rgbmatrix_rgbmatrix_collect_ptrs(&displays[i].rgbmatrix); } #endif diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index 278a5e78f..9eb10c28b 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -36,15 +36,15 @@ #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/I2CDisplay.h" #include "shared-bindings/displayio/ParallelBus.h" -#include "shared-bindings/_protomatter/Protomatter.h" +#include "shared-bindings/rgbmatrix/RGBMatrix.h" typedef struct { union { displayio_fourwire_obj_t fourwire_bus; displayio_i2cdisplay_obj_t i2cdisplay_bus; displayio_parallelbus_obj_t parallel_bus; -#if CIRCUITPY_PROTOMATTER - protomatter_protomatter_obj_t protomatter; +#if CIRCUITPY_RGBMATRIX + rgbmatrix_rgbmatrix_obj_t rgbmatrix; #endif }; union { diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index bd0764e8e..13fbb2629 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -4,6 +4,7 @@ * The MIT License (MIT) * * 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 * of this software and associated documentation files (the "Software"), to deal @@ -42,10 +43,9 @@ #include "tick.h" void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t* self, - mp_obj_t framebuffer, uint16_t width, uint16_t height, - uint16_t rotation, uint16_t color_depth, - uint8_t bytes_per_cell, - bool auto_refresh, uint16_t native_frames_per_second) { + mp_obj_t framebuffer, + uint16_t rotation, + bool auto_refresh) { // Turn off auto-refresh as we init. self->auto_refresh = false; self->framebuffer = framebuffer; @@ -54,15 +54,29 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu uint16_t ram_width = 0x100; uint16_t ram_height = 0x100; - displayio_display_core_construct(&self->core, NULL, width, height, ram_width, ram_height, 0, 0, rotation, - color_depth, false, false, bytes_per_cell, false, false); + displayio_display_core_construct( + &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->native_frames_per_second = native_frames_per_second; - self->native_ms_per_frame = 1000 / 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 / 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 // initialization. diff --git a/shared-module/framebufferio/FramebufferDisplay.h b/shared-module/framebufferio/FramebufferDisplay.h index a7b91a522..1b68d2ab0 100644 --- a/shared-module/framebufferio/FramebufferDisplay.h +++ b/shared-module/framebufferio/FramebufferDisplay.h @@ -4,6 +4,7 @@ * The MIT License (MIT) * * 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 * 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 bool (*framebuffer_set_auto_brightness_fun)(mp_obj_t, bool); 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 { MP_PROTOCOL_HEAD // MP_QSTR_protocol_framebuffer framebuffer_get_bufinfo_fun get_bufinfo; framebuffer_swapbuffers_fun swapbuffers; 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_set_brightness_fun set_brightness; framebuffer_get_auto_brightness_fun get_auto_brightness; diff --git a/shared-module/_protomatter/Protomatter.c b/shared-module/rgbmatrix/RGBMatrix.c index 77ca63476..df064ff81 100644 --- a/shared-module/_protomatter/Protomatter.c +++ b/shared-module/rgbmatrix/RGBMatrix.c @@ -32,9 +32,9 @@ #include "py/objproperty.h" #include "py/runtime.h" -#include "common-hal/_protomatter/Protomatter.h" -#include "shared-module/_protomatter/allocator.h" -#include "shared-bindings/_protomatter/Protomatter.h" +#include "common-hal/rgbmatrix/RGBMatrix.h" +#include "shared-module/rgbmatrix/allocator.h" +#include "shared-bindings/rgbmatrix/RGBMatrix.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/util.h" @@ -42,7 +42,7 @@ 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->bit_depth = bit_depth; 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->doublebuffer = doublebuffer; - self->timer = timer ? timer : common_hal_protomatter_timer_allocate(); + self->timer = timer ? timer : common_hal_rgbmatrix_timer_allocate(); if (self->timer == NULL) { 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->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) { self->framebuffer = framebuffer; 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) { _PM_protoPtr = &self->core; common_hal_mcu_disable_interrupts(); - common_hal_protomatter_timer_enable(self->timer); + common_hal_rgbmatrix_timer_enable(self->timer); stat = _PM_begin(&self->core); _PM_convert_565(&self->core, self->bufinfo.buf, self->width); common_hal_mcu_enable_interrupts(); @@ -109,7 +109,7 @@ void common_hal_protomatter_protomatter_reconstruct(protomatter_protomatter_obj_ if (stat != PROTOMATTER_OK) { // XXX this deinit() actually makes crashy-crashy // can trigger it by sending inappropriate pins - common_hal_protomatter_protomatter_deinit(self); + common_hal_rgbmatrix_rgbmatrix_deinit(self); switch (stat) { case PROTOMATTER_ERR_PINS: 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 default: mp_raise_msg_varg(&mp_type_RuntimeError, - translate("Protomatter internal error #%d"), (int)stat); + translate("Internal error #%d"), (int)stat); 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) { - common_hal_protomatter_timer_free(self->timer); + common_hal_rgbmatrix_timer_free(self->timer); self->timer = 0; } @@ -173,14 +173,14 @@ void common_hal_protomatter_protomatter_deinit(protomatter_protomatter_obj_t* se 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->core.rgbPins); gc_collect_ptr(self->core.addr); 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) { _PM_stop(&self->core); } else if (!paused && self->paused) { @@ -189,12 +189,21 @@ void common_hal_protomatter_protomatter_set_paused(protomatter_protomatter_obj_t 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; } -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_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; +} + diff --git a/shared-module/_protomatter/Protomatter.h b/shared-module/rgbmatrix/RGBMatrix.h index e69de29bb..e69de29bb 100644 --- a/shared-module/_protomatter/Protomatter.h +++ b/shared-module/rgbmatrix/RGBMatrix.h diff --git a/shared-module/_protomatter/__init__.c b/shared-module/rgbmatrix/__init__.c index e69de29bb..e69de29bb 100644 --- a/shared-module/_protomatter/__init__.c +++ b/shared-module/rgbmatrix/__init__.c diff --git a/shared-module/_protomatter/__init__.h b/shared-module/rgbmatrix/__init__.h index e69de29bb..e69de29bb 100644 --- a/shared-module/_protomatter/__init__.h +++ b/shared-module/rgbmatrix/__init__.h diff --git a/shared-module/_protomatter/allocator.h b/shared-module/rgbmatrix/allocator.h index b7f517ce5..5e6f0b41d 100644 --- a/shared-module/_protomatter/allocator.h +++ b/shared-module/rgbmatrix/allocator.h @@ -1,5 +1,5 @@ -#ifndef MICROPY_INCLUDED_SHARED_MODULE_PROTOMATTER_ALLOCATOR_H -#define MICROPY_INCLUDED_SHARED_MODULE_PROTOMATTER_ALLOCATOR_H +#ifndef MICROPY_INCLUDED_SHARED_MODULE_RGBMATRIX_ALLOCATOR_H +#define MICROPY_INCLUDED_SHARED_MODULE_RGBMATRIX_ALLOCATOR_H #include <stdbool.h> #include "py/gc.h" diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index 95926bc9c..9c074209b 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -34,7 +34,7 @@ #include "shared-bindings/displayio/TileGrid.h" #include "supervisor/memory.h" -#if CIRCUITPY_PROTOMATTER +#if CIRCUITPY_RGBMATRIX #include "shared-module/displayio/__init__.h" #endif @@ -116,11 +116,11 @@ void supervisor_display_move_memory(void) { grid->inline_tiles = false; } MP_STATE_VM(terminal_tilegrid_tiles) = NULL; - #if CIRCUITPY_PROTOMATTER + #if CIRCUITPY_RGBMATRIX for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].protomatter.base.type == &protomatter_Protomatter_type) { - protomatter_protomatter_obj_t * pm = &displays[i].protomatter; - common_hal_protomatter_protomatter_reconstruct(pm, NULL); + if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { + rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; + common_hal_rgbmatrix_rgbmatrix_reconstruct(pm, NULL); } } #endif |
