Merge remote-tracking branch 'adafruit/master' into improve_verification
This commit is contained in:
commit
cde6651721
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -224,6 +224,7 @@ jobs:
|
||||
- "pybadge_airlift"
|
||||
- "pyboard_v11"
|
||||
- "pycubed"
|
||||
- "pycubed_mram"
|
||||
- "pygamer"
|
||||
- "pygamer_advance"
|
||||
- "pyportal"
|
||||
|
45
locale/ID.po
45
locale/ID.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\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"
|
||||
@ -70,13 +70,22 @@ msgstr ""
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "buffers harus mempunyai panjang yang sama"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr ""
|
||||
@ -797,7 +806,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1050,7 +1060,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1058,7 +1068,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1089,11 +1099,11 @@ msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "tidak ada channel DMA ditemukan"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1142,6 +1152,10 @@ msgstr "Tidak ada dukungan hardware untuk pin"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -2012,6 +2026,10 @@ msgstr ""
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2114,6 +2132,10 @@ msgstr ""
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "heap kosong"
|
||||
@ -2804,10 +2826,14 @@ msgstr ""
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3127,7 +3153,8 @@ msgstr ""
|
||||
msgid "unreadable attribute"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr ""
|
||||
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\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"
|
||||
@ -70,12 +70,21 @@ msgstr ""
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr ""
|
||||
@ -786,7 +795,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1039,7 +1049,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1047,7 +1057,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1078,11 +1088,11 @@ msgstr ""
|
||||
msgid "No DMA channel found"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1131,6 +1141,10 @@ msgstr ""
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -1988,6 +2002,10 @@ msgstr ""
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2090,6 +2108,10 @@ msgstr ""
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr ""
|
||||
@ -2779,10 +2801,14 @@ msgstr ""
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3101,7 +3127,8 @@ msgstr ""
|
||||
msgid "unreadable attribute"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr ""
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2020-04-30 17:01+0000\n"
|
||||
"Last-Translator: Jeff Epler <jepler@gmail.com>\n"
|
||||
"Language-Team: German <https://later.unpythonic.net/projects/circuitpython/"
|
||||
@ -79,12 +79,21 @@ msgstr "Der Index %q befindet sich außerhalb des Bereiches"
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q Indizes müssen ganze Zahlen sein, nicht %s"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q muss >= 1 sein"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr "%q sollte ein int sein"
|
||||
@ -799,7 +808,8 @@ msgstr "Gruppe schon benutzt"
|
||||
msgid "Group full"
|
||||
msgstr "Gruppe voll"
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1055,7 +1065,7 @@ msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
"Die Startverzögerung des Mikrofons muss im Bereich von 0,0 bis 1,0 liegen"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1063,7 +1073,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr "Muss eine %q Unterklasse sein."
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1094,11 +1104,11 @@ msgstr "Kein DAC im Chip vorhanden"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "Kein DMA Kanal gefunden"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1147,6 +1157,10 @@ msgstr "Keine Hardwareunterstützung an diesem Pin"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -2023,6 +2037,10 @@ msgstr "chr() arg ist nicht in range(0x110000)"
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr "chr() arg ist nicht in range(256)"
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr "Farbpuffer muss 3 Bytes (RGB) oder 4 Bytes (RGB + pad byte) sein"
|
||||
@ -2126,6 +2144,10 @@ msgstr "Division durch Null"
|
||||
msgid "empty"
|
||||
msgstr "leer"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "leerer heap"
|
||||
@ -2824,10 +2846,14 @@ msgstr "Pixelkoordinaten außerhalb der Grenzen"
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr "pixel_shader muss displayio.Palette oder displayio.ColorConverter sein"
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3153,7 +3179,8 @@ msgstr ""
|
||||
msgid "unreadable attribute"
|
||||
msgstr "nicht lesbares Attribut"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr "Nicht unterstützter %q-Typ"
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -70,12 +70,21 @@ msgstr ""
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr ""
|
||||
@ -786,7 +795,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1039,7 +1049,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1047,7 +1057,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1078,11 +1088,11 @@ msgstr ""
|
||||
msgid "No DMA channel found"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1131,6 +1141,10 @@ msgstr ""
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -1988,6 +2002,10 @@ msgstr ""
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2090,6 +2108,10 @@ msgstr ""
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr ""
|
||||
@ -2779,10 +2801,14 @@ msgstr ""
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3101,7 +3127,8 @@ msgstr ""
|
||||
msgid "unreadable attribute"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr ""
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2020-03-30 22:11+0000\n"
|
||||
"Last-Translator: Tannewt <devnull@unpythonic.net>\n"
|
||||
"Language-Team: English <https://later.unpythonic.net/projects/circuitpython/"
|
||||
@ -77,12 +77,21 @@ msgstr ""
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr ""
|
||||
@ -795,7 +804,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1048,7 +1058,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1056,7 +1066,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1087,11 +1097,11 @@ msgstr "Shiver me timbers! There be no DAC on this chip"
|
||||
msgid "No DMA channel found"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1140,6 +1150,10 @@ msgstr ""
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -1997,6 +2011,10 @@ msgstr ""
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2099,6 +2117,10 @@ msgstr ""
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr ""
|
||||
@ -2788,10 +2810,14 @@ msgstr ""
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3110,7 +3136,8 @@ msgstr ""
|
||||
msgid "unreadable attribute"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr ""
|
||||
|
||||
|
45
locale/es.po
45
locale/es.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -72,12 +72,21 @@ msgstr "%q indice fuera de rango"
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q indices deben ser enteros, no %s"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q debe ser >= 1"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr "%q debe ser un int"
|
||||
@ -792,7 +801,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr "Group lleno"
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1047,7 +1057,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr "Micrófono demora de inicio debe estar en el rango 0.0 a 1.0"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1055,7 +1065,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr "Debe de ser una subclase de %q"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1086,11 +1096,11 @@ msgstr "El chip no tiene DAC"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "No se encontró el canal DMA"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1139,6 +1149,10 @@ msgstr "Sin soporte de hardware en pin"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -2017,6 +2031,10 @@ msgstr "El argumento de chr() esta fuera de rango(0x110000)"
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr "El argumento de chr() no esta en el rango(256)"
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr "color buffer debe ser 3 bytes (RGB) ó 4 bytes (RGB + pad byte)"
|
||||
@ -2121,6 +2139,10 @@ msgstr "división por cero"
|
||||
msgid "empty"
|
||||
msgstr "vacío"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "heap vacío"
|
||||
@ -2817,10 +2839,14 @@ msgstr "coordenadas del pixel fuera de límites"
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr "valor del pixel require demasiado bits"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr "pixel_shader debe ser displayio.Palette o displayio.ColorConverter"
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3142,7 +3168,8 @@ msgstr "No coinciden '{' en format"
|
||||
msgid "unreadable attribute"
|
||||
msgstr "atributo no legible"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr "tipo de %q no soportado"
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
|
||||
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
|
||||
"Language-Team: fil\n"
|
||||
@ -70,13 +70,22 @@ msgstr "%q indeks wala sa sakop"
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q indeks ay dapat integers, hindi %s"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "aarehas na haba dapat ang buffer slices"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
#, fuzzy
|
||||
msgid "%q should be an int"
|
||||
@ -800,7 +809,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr "Puno ang group"
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1055,7 +1065,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr "Ang delay ng startup ng mikropono ay dapat na nasa 0.0 hanggang 1.0"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1063,7 +1073,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1094,11 +1104,11 @@ msgstr "Walang DAC sa chip"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "Walang DMA channel na mahanap"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1147,6 +1157,10 @@ msgstr "Walang support sa hardware ang pin"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -2028,6 +2042,10 @@ msgstr "chr() arg wala sa sakop ng range(0x110000)"
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr "chr() arg wala sa sakop ng range(256)"
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr "color buffer ay dapat na 3 bytes (RGB) o 4 bytes (RGB + pad byte)"
|
||||
@ -2134,6 +2152,10 @@ msgstr "dibisyon ng zero"
|
||||
msgid "empty"
|
||||
msgstr "walang laman"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "walang laman ang heap"
|
||||
@ -2831,10 +2853,14 @@ msgstr "wala sa sakop ang address"
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter"
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3157,7 +3183,8 @@ msgstr "hindi tugma ang '{' sa format"
|
||||
msgid "unreadable attribute"
|
||||
msgstr "hindi mabasa ang attribute"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr "Hindi supportadong tipo ng %q"
|
||||
|
||||
|
45
locale/fr.po
45
locale/fr.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2020-05-05 20:24+0000\n"
|
||||
"Last-Translator: Jeff Epler <jepler@gmail.com>\n"
|
||||
"Language-Team: French <https://later.unpythonic.net/projects/circuitpython/"
|
||||
@ -81,12 +81,21 @@ msgstr "index %q hors gamme"
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr "les indices %q doivent être des entiers, pas %s"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q doit être >=1"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr "%q doit être un entier (int)"
|
||||
@ -810,7 +819,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr "Groupe plein"
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1069,7 +1079,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr "Le délais au démarrage du micro doit être entre 0.0 et 1.0"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1077,7 +1087,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1108,11 +1118,11 @@ msgstr "Pas de DAC sur la puce"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "Aucun canal DMA trouvé"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1161,6 +1171,10 @@ msgstr "Pas de support matériel pour cette broche"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -2058,6 +2072,10 @@ msgstr "argument de chr() hors de la gamme range(0x11000)"
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr "argument de chr() hors de la gamme range(256)"
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr "le tampon de couleur doit faire 3 octets (RVB) ou 4 (RVB + pad byte)"
|
||||
@ -2166,6 +2184,10 @@ msgstr "division par zéro"
|
||||
msgid "empty"
|
||||
msgstr "vide"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "tas vide"
|
||||
@ -2869,11 +2891,15 @@ msgstr "coordonnées de pixel hors limites"
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr "la valeur du pixel requiet trop de bits"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
"pixel_shader doit être un objet displayio.Palette ou displayio.ColorConverter"
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3197,7 +3223,8 @@ msgstr "'{' sans correspondance dans le format"
|
||||
msgid "unreadable attribute"
|
||||
msgstr "attribut illisible"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
#, fuzzy
|
||||
msgid "unsupported %q type"
|
||||
msgstr "type de %q non supporté"
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
|
||||
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@ -70,13 +70,22 @@ msgstr "indice %q fuori intervallo"
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr "gli indici %q devono essere interi, non %s"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "slice del buffer devono essere della stessa lunghezza"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
#, fuzzy
|
||||
msgid "%q should be an int"
|
||||
@ -800,7 +809,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr "Gruppo pieno"
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1059,7 +1069,7 @@ msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
"Il ritardo di avvio del microfono deve essere nell'intervallo tra 0.0 e 1.0"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1067,7 +1077,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1098,11 +1108,11 @@ msgstr "Nessun DAC sul chip"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "Nessun canale DMA trovato"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1151,6 +1161,10 @@ msgstr "Nessun supporto hardware sul pin"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -2028,6 +2042,10 @@ msgstr "argomento di chr() non è in range(0x110000)"
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr "argomento di chr() non è in range(256)"
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2135,6 +2153,10 @@ msgstr "divisione per zero"
|
||||
msgid "empty"
|
||||
msgstr "vuoto"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "heap vuoto"
|
||||
@ -2838,10 +2860,14 @@ msgstr "indirizzo fuori limite"
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr "pixel_shader deve essere displayio.Palette o displayio.ColorConverter"
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3164,7 +3190,8 @@ msgstr "'{' spaiato nella stringa di formattazione"
|
||||
msgid "unreadable attribute"
|
||||
msgstr "attributo non leggibile"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr "tipo di %q non supportato"
|
||||
|
||||
|
45
locale/ko.po
45
locale/ko.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -72,12 +72,21 @@ msgstr "%q 인덱스 범위를 벗어났습니다"
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q 는 >=1이어야합니다"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr "%q 는 정수(int) 여야합니다"
|
||||
@ -790,7 +799,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1043,7 +1053,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1051,7 +1061,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1082,11 +1092,11 @@ msgstr ""
|
||||
msgid "No DMA channel found"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1135,6 +1145,10 @@ msgstr ""
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -1993,6 +2007,10 @@ msgstr ""
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2095,6 +2113,10 @@ msgstr ""
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr ""
|
||||
@ -2784,10 +2806,14 @@ msgstr ""
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3106,7 +3132,8 @@ msgstr ""
|
||||
msgid "unreadable attribute"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr ""
|
||||
|
||||
|
45
locale/pl.po
45
locale/pl.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
|
||||
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
|
||||
"Language-Team: pl\n"
|
||||
@ -71,12 +71,21 @@ msgstr "%q poza zakresem"
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q indeks musi być liczbą całkowitą, a nie %s"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q musi być >= 1"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr "%q powinno być typu int"
|
||||
@ -789,7 +798,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr "Grupa pełna"
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1044,7 +1054,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr "Opóźnienie włączenia mikrofonu musi być w zakresie od 0.0 do 1.0"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1052,7 +1062,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1083,11 +1093,11 @@ msgstr "Brak DAC"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "Nie znaleziono kanału DMA"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1136,6 +1146,10 @@ msgstr "Brak sprzętowej obsługi na nóżce"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -1996,6 +2010,10 @@ msgstr "argument chr() poza zakresem range(0x110000)"
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr "argument chr() poza zakresem range(256)"
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr "bufor kolorów musi nieć 3 bajty (RGB) lub 4 bajty (RGB + wypełnienie)"
|
||||
@ -2099,6 +2117,10 @@ msgstr "dzielenie przez zero"
|
||||
msgid "empty"
|
||||
msgstr "puste"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "pusta sterta"
|
||||
@ -2788,11 +2810,15 @@ msgstr "współrzędne piksela poza zakresem"
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr "wartość piksela wymaga zbyt wielu bitów"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
"pixel_shader musi być typu displayio.Palette lub dispalyio.ColorConverter"
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3112,7 +3138,8 @@ msgstr "niepasujące '{' for formacie"
|
||||
msgid "unreadable attribute"
|
||||
msgstr "nieczytelny atrybut"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr "zły typ %q"
|
||||
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -70,13 +70,22 @@ msgstr ""
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
#, fuzzy
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "buffers devem ser o mesmo tamanho"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
#, fuzzy
|
||||
msgid "%q should be an int"
|
||||
@ -795,7 +804,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr "Grupo cheio"
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1051,7 +1061,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1059,7 +1069,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1090,11 +1100,11 @@ msgstr "Nenhum DAC no chip"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "Nenhum canal DMA encontrado"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1143,6 +1153,10 @@ msgstr "Nenhum suporte de hardware no pino"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -2009,6 +2023,10 @@ msgstr ""
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2111,6 +2129,10 @@ msgstr "divisão por zero"
|
||||
msgid "empty"
|
||||
msgstr "vazio"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "heap vazia"
|
||||
@ -2801,10 +2823,14 @@ msgstr ""
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3125,7 +3151,8 @@ msgstr ""
|
||||
msgid "unreadable attribute"
|
||||
msgstr "atributo ilegível"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr ""
|
||||
|
||||
|
45
locale/sv.po
45
locale/sv.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\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"
|
||||
@ -70,12 +70,21 @@ msgstr ""
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr ""
|
||||
@ -786,7 +795,8 @@ msgstr ""
|
||||
msgid "Group full"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr ""
|
||||
|
||||
@ -1039,7 +1049,7 @@ msgstr ""
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1047,7 +1057,7 @@ msgstr ""
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1078,11 +1088,11 @@ msgstr ""
|
||||
msgid "No DMA channel found"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr ""
|
||||
|
||||
@ -1131,6 +1141,10 @@ msgstr ""
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr ""
|
||||
@ -1988,6 +2002,10 @@ msgstr ""
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2090,6 +2108,10 @@ msgstr ""
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr ""
|
||||
@ -2779,10 +2801,14 @@ msgstr ""
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3101,7 +3127,8 @@ msgstr ""
|
||||
msgid "unreadable attribute"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr ""
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: circuitpython-cn\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-05-06 17:47+0800\n"
|
||||
"POT-Creation-Date: 2020-05-12 12:24-0700\n"
|
||||
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
|
||||
"Last-Translator: hexthat\n"
|
||||
"Language-Team: Chinese Hanyu Pinyin\n"
|
||||
@ -77,12 +77,21 @@ msgstr "%q suǒyǐn chāochū fànwéi"
|
||||
msgid "%q indices must be integers, not %s"
|
||||
msgstr "%q suǒyǐn bìxū shì zhěngshù, ér bùshì %s"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q list must be a list"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/_bleio/CharacteristicBuffer.c
|
||||
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
|
||||
#: shared-bindings/displayio/Shape.c
|
||||
#: shared-bindings/displayio/Shape.c shared-bindings/vectorio/Circle.c
|
||||
#: shared-bindings/vectorio/Rectangle.c
|
||||
msgid "%q must be >= 1"
|
||||
msgstr "%q bìxū dàyú huò děngyú 1"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "%q must be a tuple of length 2"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/fontio/BuiltinFont.c
|
||||
msgid "%q should be an int"
|
||||
msgstr "%q yīnggāi shì yīgè int"
|
||||
@ -797,7 +806,8 @@ msgstr "Jítuán yǐjīng shǐyòngguò"
|
||||
msgid "Group full"
|
||||
msgstr "Fēnzǔ yǐ mǎn"
|
||||
|
||||
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Hardware busy, try alternative pins"
|
||||
msgstr "Yìngjiàn máng, qǐng chángshì qítā zhēnjiǎo"
|
||||
|
||||
@ -1052,7 +1062,7 @@ msgstr "MicroPython zhìmìng cuòwù."
|
||||
msgid "Microphone startup delay must be in range 0.0 to 1.0"
|
||||
msgstr "Màikèfēng qǐdòng yánchí bìxū zài 0.0 Dào 1.0 De fànwéi nèi"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Missing MISO or MOSI Pin"
|
||||
msgstr "Quēshǎo MISO huò MOSI yǐn jiǎo"
|
||||
|
||||
@ -1060,7 +1070,7 @@ msgstr "Quēshǎo MISO huò MOSI yǐn jiǎo"
|
||||
msgid "Must be a %q subclass."
|
||||
msgstr "Bìxū shì %q zi lèi."
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "Must provide MISO or MOSI pin"
|
||||
msgstr "Bìxū tígōng MISO huò MOSI yǐn jiǎo"
|
||||
|
||||
@ -1091,11 +1101,11 @@ msgstr "Méiyǒu DAC zài xīnpiàn shàng de"
|
||||
msgid "No DMA channel found"
|
||||
msgstr "Wèi zhǎodào DMA píndào"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MISO Pin"
|
||||
msgstr "Méiyǒu MISO yǐn jiǎo"
|
||||
|
||||
#: ports/stm/common-hal/busio/SPI.c
|
||||
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c
|
||||
msgid "No MOSI Pin"
|
||||
msgstr "Méiyǒu MOSI yǐn jiǎo"
|
||||
|
||||
@ -1144,6 +1154,10 @@ msgstr "Méiyǒu zài yǐn jiǎo shàng de yìngjiàn zhīchí"
|
||||
msgid "No key was specified"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/time/__init__.c
|
||||
msgid "No long integer support"
|
||||
msgstr ""
|
||||
|
||||
#: ports/stm/common-hal/pulseio/PWMOut.c
|
||||
msgid "No more timers available on this pin."
|
||||
msgstr "Gāi yǐn jiǎo shàng méiyǒu kěyòng de dìngshí qì."
|
||||
@ -2021,6 +2035,10 @@ msgstr "chr() cān shǔ bùzài fànwéi (0x110000)"
|
||||
msgid "chr() arg not in range(256)"
|
||||
msgstr "chr() cān shǔ bùzài fànwéi (256)"
|
||||
|
||||
#: shared-module/vectorio/Circle.c
|
||||
msgid "circle can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Palette.c
|
||||
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
|
||||
msgstr ""
|
||||
@ -2127,6 +2145,10 @@ msgstr "bèi líng chú"
|
||||
msgid "empty"
|
||||
msgstr "kòngxián"
|
||||
|
||||
#: shared-bindings/vectorio/Polygon.c
|
||||
msgid "empty %q list"
|
||||
msgstr ""
|
||||
|
||||
#: extmod/moduheapq.c extmod/modutimeq.c
|
||||
msgid "empty heap"
|
||||
msgstr "kōng yīn yīnxiào"
|
||||
@ -2818,10 +2840,14 @@ msgstr "xiàngsù zuòbiāo chāochū biānjiè"
|
||||
msgid "pixel value requires too many bits"
|
||||
msgstr "xiàngsù zhí xūyào tài duō wèi"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
|
||||
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
|
||||
msgstr "pixel_shader bìxū shì displayio.Palette huò displayio.ColorConverter"
|
||||
|
||||
#: shared-module/vectorio/Polygon.c
|
||||
msgid "polygon can only be registered in one parent"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
|
||||
#: ports/cxd56/common-hal/pulseio/PulseIn.c
|
||||
#: ports/nrf/common-hal/pulseio/PulseIn.c
|
||||
@ -3142,7 +3168,8 @@ msgstr "géshì wèi pǐpèi '{'"
|
||||
msgid "unreadable attribute"
|
||||
msgstr "bùkě dú shǔxìng"
|
||||
|
||||
#: shared-bindings/displayio/TileGrid.c
|
||||
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/Polygon.c
|
||||
#: shared-bindings/vectorio/VectorShape.c
|
||||
msgid "unsupported %q type"
|
||||
msgstr "bù zhīchí %q lèixíng"
|
||||
|
||||
|
@ -13,6 +13,7 @@ LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 60
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -14,3 +14,5 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
|
@ -17,6 +17,8 @@ CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_PIXELBUF = 0
|
||||
CIRCUITPY_RTC = 0
|
||||
# So not all of displayio, sorry!
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
SUPEROPT_GC = 0
|
||||
CFLAGS_INLINE_LIMIT = 55
|
||||
|
@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 60
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -14,6 +14,8 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_FREQUENCYIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
# supersized, not ultra-supersized
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 60
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -10,3 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1
|
||||
EXTERNAL_FLASH_DEVICE_COUNT = 1
|
||||
EXTERNAL_FLASH_DEVICES = GD25Q16C
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_VECTORIO = 1
|
||||
|
||||
|
@ -15,3 +15,7 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
# No DAC on SAMR21G
|
||||
CIRCUITPY_AUDIOIO = 0
|
||||
|
||||
# Too much flash for Korean translations
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
|
@ -19,6 +19,7 @@ CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
CIRCUITPY_RTC = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 55
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -17,6 +17,8 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_RTC = 0
|
||||
# too itsy bitsy for all of displayio
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 60
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -13,6 +13,7 @@ LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 60
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -34,6 +34,7 @@ CIRCUITPY_NETWORK = 0
|
||||
CIRCUITPY_ROTARYIO = 0
|
||||
CIRCUITPY_SAMD = 0
|
||||
CIRCUITPY_TOUCHIO = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CIRCUITPY_AUDIOMIXER = 1
|
||||
CIRCUITPY_AUDIOIO = 1
|
||||
|
@ -3,6 +3,7 @@
|
||||
#define MICROPY_HW_MCU_NAME "samd51j19"
|
||||
#define CIRCUITPY_MCU_FAMILY samd51
|
||||
|
||||
#define MICROPY_HW_LED_STATUS (&pin_PA16)
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_PA21)
|
||||
|
||||
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
|
||||
@ -16,6 +17,7 @@
|
||||
|
||||
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
|
||||
|
||||
// External flash W25Q80DV
|
||||
#define EXTERNAL_FLASH_QSPI_DUAL
|
||||
|
||||
#define BOARD_HAS_CRYSTAL 1
|
||||
|
@ -1,4 +1,3 @@
|
||||
LD_FILE = boards/samd51x19-bootloader-external-flash.ld
|
||||
USB_VID = 0x04D8
|
||||
USB_PID = 0xEC44
|
||||
USB_PRODUCT = "PyCubed"
|
||||
@ -12,6 +11,8 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
|
||||
EXTERNAL_FLASH_DEVICES = W25Q80DV
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_DRIVE_LABEL = "PYCUBED"
|
||||
|
||||
# Not needed.
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
|
61
ports/atmel-samd/boards/pycubed_mram/board.c
Normal file
61
ports/atmel-samd/boards/pycubed_mram/board.c
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "boards/board.h"
|
||||
#include "py/mpconfig.h"
|
||||
#include "shared-bindings/nvm/ByteArray.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "hal/include/hal_gpio.h"
|
||||
#include "shared-bindings/pulseio/PWMOut.h"
|
||||
|
||||
nvm_bytearray_obj_t bootcnt = {
|
||||
.base = {
|
||||
.type = &nvm_bytearray_type
|
||||
},
|
||||
.len = ( uint32_t) 8192,
|
||||
.start_address = (uint8_t*) (0x00080000 - 8192)
|
||||
};
|
||||
|
||||
|
||||
void board_init(void) {
|
||||
pulseio_pwmout_obj_t pwm;
|
||||
common_hal_pulseio_pwmout_construct(&pwm, &pin_PA23, 4096, 2, false);
|
||||
common_hal_pulseio_pwmout_never_reset(&pwm);
|
||||
}
|
||||
|
||||
bool board_requests_safe_mode(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_board(void) {
|
||||
uint8_t value_out = 0;
|
||||
common_hal_nvm_bytearray_get_bytes(&bootcnt,0,1,&value_out);
|
||||
++value_out;
|
||||
common_hal_nvm_bytearray_set_bytes(&bootcnt,0,&value_out,1);
|
||||
}
|
39
ports/atmel-samd/boards/pycubed_mram/mpconfigboard.h
Normal file
39
ports/atmel-samd/boards/pycubed_mram/mpconfigboard.h
Normal file
@ -0,0 +1,39 @@
|
||||
#define MICROPY_HW_BOARD_NAME "PyCubedv04-MRAM"
|
||||
#define MICROPY_HW_MCU_NAME "samd51j19"
|
||||
#define CIRCUITPY_MCU_FAMILY samd51
|
||||
|
||||
#define MICROPY_HW_LED_STATUS (&pin_PA16)
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_PA21)
|
||||
|
||||
#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
|
||||
#define MICROPY_PORT_B (PORT_PA21 | PORT_PB10 | PORT_PB11)
|
||||
#define MICROPY_PORT_C (0)
|
||||
#define MICROPY_PORT_D (0)
|
||||
|
||||
#define SPI_FLASH_WP_PIN &pin_PA10
|
||||
#define SPI_FLASH_HOLD_PIN &pin_PA11
|
||||
|
||||
// External flash MR2xH40 MRAM
|
||||
#define EXTERNAL_FLASH_QSPI_SINGLE
|
||||
#define EXTERNAL_FLASH_NO_JEDEC
|
||||
|
||||
#define AUTORESET_DELAY_MS 500
|
||||
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 8192
|
||||
|
||||
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE)
|
||||
|
||||
#define BOARD_HAS_CRYSTAL 1
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_PB13)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_PB12)
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_PA13)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_PA12)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_PA14)
|
||||
|
||||
#define DEFAULT_UART_BUS_TX (&pin_PB02)
|
||||
#define DEFAULT_UART_BUS_RX (&pin_PB03)
|
||||
|
||||
#define IGNORE_PIN_PA24 1
|
||||
#define IGNORE_PIN_PA25 1
|
27
ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk
Normal file
27
ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk
Normal file
@ -0,0 +1,27 @@
|
||||
USB_VID = 0x04D8
|
||||
USB_PID = 0xEC44
|
||||
USB_PRODUCT = "PyCubed"
|
||||
USB_MANUFACTURER = "maholli"
|
||||
|
||||
CHIP_VARIANT = SAMD51J19A
|
||||
CHIP_FAMILY = samd51
|
||||
|
||||
QSPI_FLASH_FILESYSTEM = 1
|
||||
EXTERNAL_FLASH_DEVICE_COUNT = 1
|
||||
EXTERNAL_FLASH_DEVICES = MR2xH40
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_DRIVE_LABEL = "PYCUBED"
|
||||
|
||||
# Not needed.
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
CIRCUITPY_FRAMEBUFFERIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_RGBMATRIX = 0
|
||||
CIRCUITPY_PS2IO = 0
|
||||
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD
|
55
ports/atmel-samd/boards/pycubed_mram/pins.c
Normal file
55
ports/atmel-samd/boards/pycubed_mram/pins.c
Normal file
@ -0,0 +1,55 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
#include "boards/board.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_xSDCS), MP_ROM_PTR(&pin_PA27) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_RELAY_A), MP_ROM_PTR(&pin_PB15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BURN1), MP_ROM_PTR(&pin_PB31) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_BURN2), MP_ROM_PTR(&pin_PA15) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PA06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_L1PROG), MP_ROM_PTR(&pin_PA07) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AIN4), MP_ROM_PTR(&pin_PA04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_AIN5), MP_ROM_PTR(&pin_PA05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_CHRG), MP_ROM_PTR(&pin_PB08) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PA17), MP_ROM_PTR(&pin_PA17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PA18), MP_ROM_PTR(&pin_PA18) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PA19), MP_ROM_PTR(&pin_PA19) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PA20), MP_ROM_PTR(&pin_PA20) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PA22), MP_ROM_PTR(&pin_PA22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PB16), MP_ROM_PTR(&pin_PB16) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PB17), MP_ROM_PTR(&pin_PB17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PB22), MP_ROM_PTR(&pin_PB22) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PB23), MP_ROM_PTR(&pin_PB23) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_RF1_RST), MP_ROM_PTR(&pin_PB00) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RF1_CS), MP_ROM_PTR(&pin_PB30) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RF1_IO0), MP_ROM_PTR(&pin_PB05) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RF1_IO4), MP_ROM_PTR(&pin_PB04) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_RF2_RST), MP_ROM_PTR(&pin_PB14) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RF2_CS), MP_ROM_PTR(&pin_PB09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RF2_IO1), MP_ROM_PTR(&pin_PB06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RF2_BSY), MP_ROM_PTR(&pin_PB07) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_EN_GPS), MP_ROM_PTR(&pin_PB01) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB02) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB03) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB12) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB13) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_WDT_WDI), MP_ROM_PTR(&pin_PA23) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA21) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
|
||||
};
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
|
@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 60
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -13,5 +13,6 @@ LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_AUDIOIO = 0
|
||||
CIRCUITPY_AUDIOBUSIO = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
|
||||
|
@ -13,6 +13,7 @@ LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 60
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -18,6 +18,7 @@ CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_GAMEPAD = 0
|
||||
CIRCUITPY_I2CSLAVE = 0
|
||||
CIRCUITPY_RTC = 0
|
||||
CIRCUITPY_VECTORIO = 0
|
||||
|
||||
CFLAGS_INLINE_LIMIT = 60
|
||||
SUPEROPT_GC = 0
|
||||
|
@ -166,7 +166,10 @@ bool spi_flash_write_data(uint32_t address, uint8_t* data, uint32_t length) {
|
||||
bool spi_flash_read_data(uint32_t address, uint8_t* data, uint32_t length) {
|
||||
samd_peripherals_disable_and_clear_cache();
|
||||
|
||||
#ifdef EXTERNAL_FLASH_QSPI_DUAL
|
||||
#ifdef EXTERNAL_FLASH_QSPI_SINGLE
|
||||
QSPI->INSTRCTRL.bit.INSTR = CMD_READ_DATA;
|
||||
uint32_t mode = QSPI_INSTRFRAME_WIDTH_SINGLE_BIT_SPI;
|
||||
#elif defined(EXTERNAL_FLASH_QSPI_DUAL)
|
||||
QSPI->INSTRCTRL.bit.INSTR = CMD_DUAL_READ;
|
||||
uint32_t mode = QSPI_INSTRFRAME_WIDTH_DUAL_OUTPUT;
|
||||
#else
|
||||
@ -174,6 +177,15 @@ bool spi_flash_read_data(uint32_t address, uint8_t* data, uint32_t length) {
|
||||
uint32_t mode = QSPI_INSTRFRAME_WIDTH_QUAD_OUTPUT;
|
||||
#endif
|
||||
|
||||
#ifdef EXTERNAL_FLASH_QSPI_SINGLE
|
||||
QSPI->INSTRFRAME.reg = mode |
|
||||
QSPI_INSTRFRAME_ADDRLEN_24BITS |
|
||||
QSPI_INSTRFRAME_TFRTYPE_READMEMORY |
|
||||
QSPI_INSTRFRAME_INSTREN |
|
||||
QSPI_INSTRFRAME_ADDREN |
|
||||
QSPI_INSTRFRAME_DATAEN |
|
||||
QSPI_INSTRFRAME_DUMMYLEN(0);
|
||||
#else
|
||||
QSPI->INSTRFRAME.reg = mode |
|
||||
QSPI_INSTRFRAME_ADDRLEN_24BITS |
|
||||
QSPI_INSTRFRAME_TFRTYPE_READMEMORY |
|
||||
@ -181,6 +193,7 @@ bool spi_flash_read_data(uint32_t address, uint8_t* data, uint32_t length) {
|
||||
QSPI_INSTRFRAME_ADDREN |
|
||||
QSPI_INSTRFRAME_DATAEN |
|
||||
QSPI_INSTRFRAME_DUMMYLEN(8);
|
||||
#endif
|
||||
|
||||
memcpy(data, ((uint8_t *) QSPI_AHB) + address, length);
|
||||
// TODO(tannewt): Fix DMA and enable it.
|
||||
|
@ -40,7 +40,7 @@
|
||||
#endif
|
||||
|
||||
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
|
||||
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (84*1024)
|
||||
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (80*1024)
|
||||
|
||||
#define BOOTLOADER_SIZE (0x4000) // 12 kiB
|
||||
#define CIRCUITPY_BLE_CONFIG_SIZE (12*1024)
|
||||
|
@ -11,6 +11,7 @@ MCU_CHIP = nrf52833
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_AESIO = 1
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_BUSIO = 1
|
||||
CIRCUITPY_DISPLAYIO = 0
|
||||
@ -29,4 +30,4 @@ CIRCUITPY_ULAB = 0
|
||||
|
||||
# These defines must be overridden before mpconfigboard.h is included, which is
|
||||
# why they are passed on the command line.
|
||||
CFLAGS += -DSPIM3_BUFFER_SIZE=0 -DSOFTDEVICE_RAM_SIZE='(32*1024)'
|
||||
CFLAGS += -DSPIM3_BUFFER_SIZE=0 -DSOFTDEVICE_RAM_SIZE='(32*1024)' -DNRFX_SPIM3_ENABLED=0
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_CSN), MP_ROM_PTR(&pin_P0_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_CSN), MP_ROM_PTR(&pin_P1_06) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_P1_04) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_P0_09) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_P0_10) },
|
||||
|
@ -41,12 +41,14 @@
|
||||
#define NRFX_SPIM1_ENABLED 1
|
||||
#endif
|
||||
#define NRFX_SPIM2_ENABLED 1
|
||||
#ifndef NRFX_SPIM3_ENABLED
|
||||
#if defined(NRF52840_XXAA) || defined(NRF52833_XXAA)
|
||||
#define NRFX_SPIM_EXTENDED_ENABLED 1
|
||||
#define NRFX_SPIM3_ENABLED 1
|
||||
#elif CIRCUITPY_NRF_NUM_I2C == 2
|
||||
#define NRFX_SPIM3_ENABLED 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#define NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY 7
|
||||
|
@ -145,6 +145,9 @@ endif
|
||||
ifeq ($(CIRCUITPY_DISPLAYIO),1)
|
||||
SRC_PATTERNS += displayio/% terminalio/% fontio/%
|
||||
endif
|
||||
ifeq ($(CIRCUITPY_VECTORIO),1)
|
||||
SRC_PATTERNS += vectorio/%
|
||||
endif
|
||||
ifeq ($(CIRCUITPY_FRAMEBUFFERIO),1)
|
||||
SRC_PATTERNS += framebufferio/%
|
||||
endif
|
||||
@ -358,6 +361,11 @@ SRC_SHARED_MODULE_ALL = \
|
||||
displayio/Shape.c \
|
||||
displayio/TileGrid.c \
|
||||
displayio/__init__.c \
|
||||
vectorio/Circle.c \
|
||||
vectorio/Rectangle.c \
|
||||
vectorio/Polygon.c \
|
||||
vectorio/VectorShape.c \
|
||||
vectorio/__init__.c \
|
||||
fontio/BuiltinFont.c \
|
||||
fontio/__init__.c \
|
||||
framebufferio/FramebufferDisplay.c \
|
||||
|
@ -352,6 +352,13 @@ extern const struct _mp_obj_module_t framebufferio_module;
|
||||
#define FRAMEBUFFERIO_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_VECTORIO
|
||||
extern const struct _mp_obj_module_t vectorio_module;
|
||||
#define VECTORIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_vectorio), (mp_obj_t)&vectorio_module },
|
||||
#else
|
||||
#define VECTORIO_MODULE
|
||||
#endif
|
||||
|
||||
#if CIRCUITPY_FREQUENCYIO
|
||||
extern const struct _mp_obj_module_t frequencyio_module;
|
||||
#define FREQUENCYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_frequencyio), (mp_obj_t)&frequencyio_module },
|
||||
@ -642,6 +649,7 @@ extern const struct _mp_obj_module_t ustack_module;
|
||||
DISPLAYIO_MODULE \
|
||||
FONTIO_MODULE \
|
||||
TERMINALIO_MODULE \
|
||||
VECTORIO_MODULE \
|
||||
ERRNO_MODULE \
|
||||
FRAMEBUFFERIO_MODULE \
|
||||
FREQUENCYIO_MODULE \
|
||||
|
@ -94,6 +94,9 @@ CFLAGS += -DCIRCUITPY_DISPLAYIO=$(CIRCUITPY_DISPLAYIO)
|
||||
CIRCUITPY_FRAMEBUFFERIO ?= 0
|
||||
CFLAGS += -DCIRCUITPY_FRAMEBUFFERIO=$(CIRCUITPY_FRAMEBUFFERIO)
|
||||
|
||||
CIRCUITPY_VECTORIO ?= $(CIRCUITPY_DISPLAYIO)
|
||||
CFLAGS += -DCIRCUITPY_VECTORIO=$(CIRCUITPY_VECTORIO)
|
||||
|
||||
CIRCUITPY_FREQUENCYIO ?= $(CIRCUITPY_FULL_BUILD)
|
||||
CFLAGS += -DCIRCUITPY_FREQUENCYIO=$(CIRCUITPY_FREQUENCYIO)
|
||||
|
||||
|
@ -184,6 +184,14 @@ void struct_time_to_tm(mp_obj_t t, timeutils_struct_time_t *tm) {
|
||||
tm->tm_yday = mp_obj_get_int(elems[7]);
|
||||
// elems[8] tm_isdst is not supported
|
||||
}
|
||||
#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE
|
||||
// Function to return a NotImplementedError on platforms that don't
|
||||
// support long integers
|
||||
STATIC mp_obj_t time_not_implemented(void) {
|
||||
mp_raise_NotImplementedError(translate("No long integer support"));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_0(time_not_implemented_obj, time_not_implemented);
|
||||
#endif
|
||||
|
||||
#if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE
|
||||
mp_obj_t MP_WEAK rtc_get_time_source_time(void) {
|
||||
@ -303,6 +311,12 @@ STATIC const mp_rom_map_elem_t time_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&time_time_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_monotonic_ns), MP_ROM_PTR(&time_monotonic_ns_obj) },
|
||||
#endif
|
||||
#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE
|
||||
{ MP_ROM_QSTR(MP_QSTR_localtime), MP_ROM_PTR(&time_not_implemented_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_mktime), MP_ROM_PTR(&time_not_implemented_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&time_not_implemented_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_monotonic_ns), MP_ROM_PTR(&time_not_implemented_obj) },
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC MP_DEFINE_CONST_DICT(time_module_globals, time_module_globals_table);
|
||||
|
81
shared-bindings/vectorio/Circle.c
Normal file
81
shared-bindings/vectorio/Circle.c
Normal file
@ -0,0 +1,81 @@
|
||||
|
||||
#include "shared-bindings/vectorio/Circle.h"
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "py/objproperty.h"
|
||||
#include "py/objtype.h"
|
||||
#include "py/runtime.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
|
||||
//| .. currentmodule:: vectorio
|
||||
//|
|
||||
//| :class:`Circle` -- Represents a circle by its radius
|
||||
//| ==========================================================================
|
||||
//|
|
||||
//| .. class:: Circle(radius)
|
||||
//|
|
||||
//| Circle is positioned on screen by its center point.
|
||||
//|
|
||||
//| :param int radius: The radius of the circle in pixels
|
||||
//|
|
||||
static mp_obj_t vectorio_circle_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_radius };
|
||||
static const mp_arg_t allowed_args[] = {
|
||||
{ MP_QSTR_radius, MP_ARG_REQUIRED | MP_ARG_INT },
|
||||
};
|
||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
||||
|
||||
mp_int_t radius = args[ARG_radius].u_int;
|
||||
if (radius < 1) {
|
||||
mp_raise_ValueError_varg(translate("%q must be >= 1"), MP_QSTR_radius);
|
||||
}
|
||||
|
||||
vectorio_circle_t *self = m_new_obj(vectorio_circle_t);
|
||||
self->base.type = &vectorio_circle_type;
|
||||
common_hal_vectorio_circle_construct(self, radius);
|
||||
|
||||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
|
||||
//| .. attribute:: radius
|
||||
//|
|
||||
//| The radius of the circle in pixels.
|
||||
//|
|
||||
STATIC mp_obj_t vectorio_circle_obj_get_radius(mp_obj_t self_in) {
|
||||
vectorio_circle_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
return mp_obj_new_int(common_hal_vectorio_circle_get_radius(self));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(vectorio_circle_get_radius_obj, vectorio_circle_obj_get_radius);
|
||||
|
||||
STATIC mp_obj_t vectorio_circle_obj_set_radius(mp_obj_t self_in, mp_obj_t radius) {
|
||||
vectorio_circle_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
common_hal_vectorio_circle_set_radius(self, mp_obj_get_int(radius));
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_circle_set_radius_obj, vectorio_circle_obj_set_radius);
|
||||
|
||||
const mp_obj_property_t vectorio_circle_radius_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_circle_get_radius_obj,
|
||||
(mp_obj_t)&vectorio_circle_set_radius_obj,
|
||||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t vectorio_circle_locals_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_radius), MP_ROM_PTR(&vectorio_circle_radius_obj) },
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(vectorio_circle_locals_dict, vectorio_circle_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t vectorio_circle_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_Circle,
|
||||
.make_new = vectorio_circle_make_new,
|
||||
.locals_dict = (mp_obj_dict_t*)&vectorio_circle_locals_dict,
|
||||
};
|
||||
|
22
shared-bindings/vectorio/Circle.h
Normal file
22
shared-bindings/vectorio/Circle.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_CIRCLE_H
|
||||
#define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_CIRCLE_H
|
||||
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
#include "shared-module/vectorio/Circle.h"
|
||||
#include "shared-module/displayio/area.h"
|
||||
|
||||
extern const mp_obj_type_t vectorio_circle_type;
|
||||
|
||||
void common_hal_vectorio_circle_construct(vectorio_circle_t *self, uint16_t radius);
|
||||
|
||||
void common_hal_vectorio_circle_set_on_dirty(vectorio_circle_t *self, vectorio_event_t notification);
|
||||
|
||||
uint32_t common_hal_vectorio_circle_get_pixel(void *circle, int16_t x, int16_t y);
|
||||
|
||||
void common_hal_vectorio_circle_get_area(void *circle, displayio_area_t *out_area);
|
||||
|
||||
|
||||
int16_t common_hal_vectorio_circle_get_radius(void *circle);
|
||||
void common_hal_vectorio_circle_set_radius(void *circle, int16_t radius);
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_CIRCLE_H
|
139
shared-bindings/vectorio/Polygon.c
Normal file
139
shared-bindings/vectorio/Polygon.c
Normal file
@ -0,0 +1,139 @@
|
||||
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
#include "shared-bindings/vectorio/Polygon.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "py/objproperty.h"
|
||||
#include "py/objtype.h"
|
||||
#include "py/runtime.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
|
||||
#define VECTORIO_POLYGON_DEBUG(...) (void)0
|
||||
// #define VECTORIO_POLYGON_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
|
||||
// Converts a list of points tuples to a flat list of ints for speedier internal use.
|
||||
// Also validates the points.
|
||||
static mp_obj_t _to_points_list(mp_obj_t points_tuple_list) {
|
||||
size_t len = 0;
|
||||
mp_obj_t *items;
|
||||
mp_obj_list_get(points_tuple_list, &len, &items);
|
||||
VECTORIO_POLYGON_DEBUG("polygon_points_list len: %d\n", len);
|
||||
|
||||
if ( len == 0 ) {
|
||||
mp_raise_TypeError_varg(translate("empty %q list"), MP_QSTR_point);
|
||||
}
|
||||
|
||||
mp_obj_t points_list = mp_obj_new_list(0, NULL);
|
||||
|
||||
for ( size_t i = 0; i < len; ++i) {
|
||||
size_t tuple_len = 0;
|
||||
mp_obj_t *tuple_items;
|
||||
mp_obj_tuple_get(items[i], &tuple_len, &tuple_items);
|
||||
|
||||
if (tuple_len != 2) {
|
||||
mp_raise_ValueError_varg(translate("%q must be a tuple of length 2"), MP_QSTR_point);
|
||||
}
|
||||
int value;
|
||||
if (!mp_obj_get_int_maybe(tuple_items[0], &value)) {
|
||||
mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point);
|
||||
}
|
||||
mp_obj_list_append(points_list, MP_OBJ_NEW_SMALL_INT(value));
|
||||
if (!mp_obj_get_int_maybe(tuple_items[1], &value)) {
|
||||
mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point);
|
||||
}
|
||||
mp_obj_list_append(points_list, MP_OBJ_NEW_SMALL_INT(value));
|
||||
}
|
||||
return points_list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//| .. currentmodule:: vectorio
|
||||
//|
|
||||
//| :class:`Polygon` -- Represents a closed shape by ordered vertices
|
||||
//| ==========================================================================
|
||||
//|
|
||||
//| .. class:: Polygon( List[ Tuple[ x, y ], ... ] )
|
||||
//|
|
||||
//| :param [Point] points_array: Vertices for the polygon
|
||||
//|
|
||||
static mp_obj_t vectorio_polygon_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_points_list };
|
||||
static const mp_arg_t allowed_args[] = {
|
||||
{ MP_QSTR_points, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
|
||||
};
|
||||
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);
|
||||
|
||||
if (!MP_OBJ_IS_TYPE(args[ARG_points_list].u_obj, &mp_type_list)) {
|
||||
mp_raise_TypeError_varg(translate("%q list must be a list"), MP_QSTR_point);
|
||||
}
|
||||
mp_obj_t points_list = _to_points_list(args[ARG_points_list].u_obj);
|
||||
|
||||
vectorio_polygon_t *self = m_new_obj(vectorio_polygon_t);
|
||||
self->base.type = &vectorio_polygon_type;
|
||||
|
||||
common_hal_vectorio_polygon_construct(self, points_list);
|
||||
|
||||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
|
||||
//| .. attribute:: points
|
||||
//|
|
||||
//| Set a new look and shape for this polygon
|
||||
//|
|
||||
STATIC mp_obj_t vectorio_polygon_obj_get_points(mp_obj_t self_in) {
|
||||
vectorio_polygon_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
mp_obj_t list = mp_obj_new_list(0, NULL);
|
||||
|
||||
size_t len = 0;
|
||||
mp_obj_t *items;
|
||||
mp_obj_list_get(common_hal_vectorio_polygon_get_points(self), &len, &items);
|
||||
|
||||
for (size_t i = 0; i < len; i += 2) {
|
||||
mp_obj_t tuple[] = { items[i], items[i+1] };
|
||||
mp_obj_list_append(
|
||||
list,
|
||||
mp_obj_new_tuple(2, tuple)
|
||||
);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(vectorio_polygon_get_points_obj, vectorio_polygon_obj_get_points);
|
||||
|
||||
STATIC mp_obj_t vectorio_polygon_obj_set_points(mp_obj_t self_in, mp_obj_t points) {
|
||||
vectorio_polygon_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
||||
mp_obj_t points_list = _to_points_list(points);
|
||||
|
||||
common_hal_vectorio_polygon_set_points(self, points_list);
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_polygon_set_points_obj, vectorio_polygon_obj_set_points);
|
||||
|
||||
const mp_obj_property_t vectorio_polygon_points_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_polygon_get_points_obj,
|
||||
(mp_obj_t)&vectorio_polygon_set_points_obj,
|
||||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t vectorio_polygon_locals_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_points), MP_ROM_PTR(&vectorio_polygon_points_obj) },
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(vectorio_polygon_locals_dict, vectorio_polygon_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t vectorio_polygon_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_Polygon,
|
||||
.make_new = vectorio_polygon_make_new,
|
||||
.locals_dict = (mp_obj_dict_t*)&vectorio_polygon_locals_dict,
|
||||
};
|
||||
|
24
shared-bindings/vectorio/Polygon.h
Normal file
24
shared-bindings/vectorio/Polygon.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_POLYGON_H
|
||||
#define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_POLYGON_H
|
||||
|
||||
#include "shared-module/vectorio/Polygon.h"
|
||||
#include "shared-module/displayio/area.h"
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
|
||||
extern const mp_obj_type_t vectorio_polygon_type;
|
||||
|
||||
void common_hal_vectorio_polygon_construct(vectorio_polygon_t *self, mp_obj_t points_list);
|
||||
void common_hal_vectorio_polygon_set_on_dirty(vectorio_polygon_t *self, vectorio_event_t notification);
|
||||
|
||||
|
||||
uint32_t common_hal_vectorio_polygon_get_pixel(void *polygon, int16_t x, int16_t y);
|
||||
|
||||
void common_hal_vectorio_polygon_get_area(void *polygon, displayio_area_t *out_area);
|
||||
|
||||
|
||||
|
||||
mp_obj_t common_hal_vectorio_polygon_get_points(vectorio_polygon_t *self);
|
||||
void common_hal_vectorio_polygon_set_points(vectorio_polygon_t *self, mp_obj_t points_list);
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_POLYGON_H
|
56
shared-bindings/vectorio/Rectangle.c
Normal file
56
shared-bindings/vectorio/Rectangle.c
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
#include "shared-bindings/vectorio/Rectangle.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "py/objtype.h"
|
||||
#include "py/runtime.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
|
||||
//| .. currentmodule:: vectorio
|
||||
//|
|
||||
//| :class:`Rectangle` -- Represents a rectangle by defining its bounds
|
||||
//| ==========================================================================
|
||||
//|
|
||||
//| .. class:: Rectangle(width, height)
|
||||
//|
|
||||
//| :param int width: The number of pixels wide
|
||||
//| :param int height: The number of pixels high
|
||||
//|
|
||||
static mp_obj_t vectorio_rectangle_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_height };
|
||||
static const mp_arg_t allowed_args[] = {
|
||||
{ MP_QSTR_width, MP_ARG_REQUIRED | MP_ARG_INT },
|
||||
{ MP_QSTR_height, MP_ARG_REQUIRED | MP_ARG_INT },
|
||||
};
|
||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
||||
|
||||
mp_int_t width = args[ARG_width].u_int;
|
||||
if (width < 1) {
|
||||
mp_raise_ValueError_varg(translate("%q must be >= 1"), MP_QSTR_width);
|
||||
}
|
||||
mp_int_t height = args[ARG_height].u_int;
|
||||
if (height < 1) {
|
||||
mp_raise_ValueError_varg(translate("%q must be >= 1"), MP_QSTR_height);
|
||||
}
|
||||
|
||||
vectorio_rectangle_t *self = m_new_obj(vectorio_rectangle_t);
|
||||
self->base.type = &vectorio_rectangle_type;
|
||||
common_hal_vectorio_rectangle_construct(self, width, height);
|
||||
|
||||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = {
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(vectorio_rectangle_locals_dict, vectorio_rectangle_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t vectorio_rectangle_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_Rectangle,
|
||||
.make_new = vectorio_rectangle_make_new,
|
||||
.locals_dict = (mp_obj_dict_t*)&vectorio_rectangle_locals_dict,
|
||||
};
|
15
shared-bindings/vectorio/Rectangle.h
Normal file
15
shared-bindings/vectorio/Rectangle.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H
|
||||
#define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H
|
||||
|
||||
#include "shared-module/vectorio/Rectangle.h"
|
||||
#include "shared-module/displayio/area.h"
|
||||
|
||||
extern const mp_obj_type_t vectorio_rectangle_type;
|
||||
|
||||
void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height);
|
||||
|
||||
uint32_t common_hal_vectorio_rectangle_get_pixel(void *rectangle, int16_t x, int16_t y);
|
||||
|
||||
void common_hal_vectorio_rectangle_get_area(void *rectangle, displayio_area_t *out_area);
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H
|
195
shared-bindings/vectorio/VectorShape.c
Normal file
195
shared-bindings/vectorio/VectorShape.c
Normal file
@ -0,0 +1,195 @@
|
||||
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
#include "shared-bindings/vectorio/VectorShape.h"
|
||||
#include "shared-bindings/vectorio/Circle.h"
|
||||
#include "shared-bindings/vectorio/Polygon.h"
|
||||
#include "shared-bindings/vectorio/Rectangle.h"
|
||||
|
||||
#include "shared-bindings/displayio/ColorConverter.h"
|
||||
#include "shared-bindings/displayio/Palette.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "lib/utils/context_manager_helpers.h"
|
||||
|
||||
#include "py/binary.h"
|
||||
#include "py/objproperty.h"
|
||||
#include "py/objtype.h"
|
||||
#include "py/runtime.h"
|
||||
#include "supervisor/shared/translate.h"
|
||||
|
||||
|
||||
//| .. currentmodule:: vectorio
|
||||
//|
|
||||
//| :class:`VectorShape` -- Binds a vector shape to a location and pixel color
|
||||
//| ==========================================================================
|
||||
//|
|
||||
//| .. class:: VectorShape( shape, pixel_shader, x=0, y=0)
|
||||
//|
|
||||
//| :param vectorio.Polygon shape: The shape to draw.
|
||||
//| :param displayio.Palette pixel_shader: The pixel shader that produces colors from values
|
||||
//| :param int x: Initial x position of the center axis of the shape within the parent.
|
||||
//| :param int y: Initial y position of the center axis of the shape within the parent.
|
||||
//|
|
||||
STATIC mp_obj_t vectorio_vector_shape_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_shape, ARG_pixel_shader, ARG_x, ARG_y };
|
||||
static const mp_arg_t allowed_args[] = {
|
||||
{ MP_QSTR_shape, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED },
|
||||
{ MP_QSTR_pixel_shader, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED },
|
||||
{ MP_QSTR_x, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
|
||||
{ MP_QSTR_y, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
|
||||
};
|
||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
||||
|
||||
mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj;
|
||||
if (!MP_OBJ_IS_TYPE(pixel_shader, &displayio_colorconverter_type) &&
|
||||
!MP_OBJ_IS_TYPE(pixel_shader, &displayio_palette_type)) {
|
||||
mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_pixel_shader);
|
||||
}
|
||||
|
||||
int16_t x = args[ARG_x].u_int;
|
||||
int16_t y = args[ARG_y].u_int;
|
||||
|
||||
mp_obj_t shape = args[ARG_shape].u_obj;
|
||||
vectorio_ishape_t ishape;
|
||||
// Wire up shape functions
|
||||
if (MP_OBJ_IS_TYPE(shape, &vectorio_polygon_type)) {
|
||||
ishape.shape = shape;
|
||||
ishape.get_area = &common_hal_vectorio_polygon_get_area;
|
||||
ishape.get_pixel = &common_hal_vectorio_polygon_get_pixel;
|
||||
} else if (MP_OBJ_IS_TYPE(shape, &vectorio_rectangle_type)) {
|
||||
ishape.shape = shape;
|
||||
ishape.get_area = &common_hal_vectorio_rectangle_get_area;
|
||||
ishape.get_pixel = &common_hal_vectorio_rectangle_get_pixel;
|
||||
} else if (MP_OBJ_IS_TYPE(shape, &vectorio_circle_type)) {
|
||||
ishape.shape = shape;
|
||||
ishape.get_area = &common_hal_vectorio_circle_get_area;
|
||||
ishape.get_pixel = &common_hal_vectorio_circle_get_pixel;
|
||||
} else {
|
||||
mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_shape);
|
||||
}
|
||||
|
||||
vectorio_vector_shape_t *self = m_new_obj(vectorio_vector_shape_t);
|
||||
self->base.type = &vectorio_vector_shape_type;
|
||||
common_hal_vectorio_vector_shape_construct(self,
|
||||
ishape, pixel_shader, x, y
|
||||
);
|
||||
|
||||
// Wire up event callbacks
|
||||
vectorio_event_t on_dirty = {
|
||||
.obj = self,
|
||||
.event = &common_hal_vectorio_vector_shape_set_dirty
|
||||
};
|
||||
|
||||
if (MP_OBJ_IS_TYPE(shape, &vectorio_polygon_type)) {
|
||||
common_hal_vectorio_polygon_set_on_dirty(self->ishape.shape, on_dirty);
|
||||
} else if (MP_OBJ_IS_TYPE(shape, &vectorio_rectangle_type)) {
|
||||
} else if (MP_OBJ_IS_TYPE(shape, &vectorio_circle_type)) {
|
||||
common_hal_vectorio_circle_set_on_dirty(self->ishape.shape, on_dirty);
|
||||
} else {
|
||||
mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_shape);
|
||||
}
|
||||
|
||||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
|
||||
//| .. attribute:: x
|
||||
//|
|
||||
//| X position of the center point of the shape in the parent.
|
||||
//|
|
||||
STATIC mp_obj_t vectorio_vector_shape_obj_get_x(mp_obj_t self_in) {
|
||||
vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
return MP_OBJ_NEW_SMALL_INT(common_hal_vectorio_vector_shape_get_x(self));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_x_obj, vectorio_vector_shape_obj_get_x);
|
||||
|
||||
STATIC mp_obj_t vectorio_vector_shape_obj_set_x(mp_obj_t self_in, mp_obj_t x_obj) {
|
||||
vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
||||
mp_int_t x = mp_obj_get_int(x_obj);
|
||||
common_hal_vectorio_vector_shape_set_x(self, x);
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_x_obj, vectorio_vector_shape_obj_set_x);
|
||||
|
||||
const mp_obj_property_t vectorio_vector_shape_x_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_x_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_x_obj,
|
||||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
|
||||
//| .. attribute:: y
|
||||
//|
|
||||
//| Y position of the center point of the shape in the parent.
|
||||
//|
|
||||
STATIC mp_obj_t vectorio_vector_shape_obj_get_y(mp_obj_t self_in) {
|
||||
vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
return MP_OBJ_NEW_SMALL_INT(common_hal_vectorio_vector_shape_get_y(self));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_y_obj, vectorio_vector_shape_obj_get_y);
|
||||
|
||||
STATIC mp_obj_t vectorio_vector_shape_obj_set_y(mp_obj_t self_in, mp_obj_t y_obj) {
|
||||
vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
||||
mp_int_t y = mp_obj_get_int(y_obj);
|
||||
common_hal_vectorio_vector_shape_set_y(self, y);
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_y_obj, vectorio_vector_shape_obj_set_y);
|
||||
|
||||
const mp_obj_property_t vectorio_vector_shape_y_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_y_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_y_obj,
|
||||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
|
||||
//| .. attribute:: pixel_shader
|
||||
//|
|
||||
//| The pixel shader of the shape.
|
||||
//|
|
||||
STATIC mp_obj_t vectorio_vector_shape_obj_get_pixel_shader(mp_obj_t self_in) {
|
||||
vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
return common_hal_vectorio_vector_shape_get_pixel_shader(self);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_pixel_shader_obj, vectorio_vector_shape_obj_get_pixel_shader);
|
||||
|
||||
STATIC mp_obj_t vectorio_vector_shape_obj_set_pixel_shader(mp_obj_t self_in, mp_obj_t pixel_shader) {
|
||||
vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
if (!MP_OBJ_IS_TYPE(pixel_shader, &displayio_palette_type) && !MP_OBJ_IS_TYPE(pixel_shader, &displayio_colorconverter_type)) {
|
||||
mp_raise_TypeError(translate("pixel_shader must be displayio.Palette or displayio.ColorConverter"));
|
||||
}
|
||||
|
||||
common_hal_vectorio_vector_shape_set_pixel_shader(self, pixel_shader);
|
||||
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_pixel_shader_obj, vectorio_vector_shape_obj_set_pixel_shader);
|
||||
|
||||
const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_pixel_shader_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_pixel_shader_obj,
|
||||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t vectorio_vector_shape_locals_dict_table[] = {
|
||||
// Properties
|
||||
{ MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) },
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(vectorio_vector_shape_locals_dict, vectorio_vector_shape_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t vectorio_vector_shape_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_VectorShape,
|
||||
.make_new = vectorio_vector_shape_make_new,
|
||||
.locals_dict = (mp_obj_dict_t*)&vectorio_vector_shape_locals_dict,
|
||||
};
|
27
shared-bindings/vectorio/VectorShape.h
Normal file
27
shared-bindings/vectorio/VectorShape.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H
|
||||
#define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H
|
||||
|
||||
#include "shared-module/vectorio/VectorShape.h"
|
||||
#include "shared-module/displayio/area.h"
|
||||
|
||||
extern const mp_obj_type_t vectorio_vector_shape_type;
|
||||
|
||||
void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self,
|
||||
vectorio_ishape_t ishape,
|
||||
mp_obj_t pixel_shader, uint16_t x, uint16_t y);
|
||||
|
||||
void common_hal_vectorio_vector_shape_set_dirty(void *self);
|
||||
|
||||
mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self);
|
||||
void common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x);
|
||||
|
||||
mp_int_t common_hal_vectorio_vector_shape_get_y(vectorio_vector_shape_t *self);
|
||||
void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y);
|
||||
|
||||
mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self);
|
||||
void common_hal_vectorio_vector_shape_set_pixel_shader(vectorio_vector_shape_t *self, mp_obj_t pixel_shader);
|
||||
|
||||
|
||||
void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displayio_buffer_transform_t *group_transform);
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H
|
46
shared-bindings/vectorio/__init__.c
Normal file
46
shared-bindings/vectorio/__init__.c
Normal file
@ -0,0 +1,46 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
|
||||
#include "shared-bindings/vectorio/Circle.h"
|
||||
#include "shared-bindings/vectorio/Polygon.h"
|
||||
#include "shared-bindings/vectorio/Rectangle.h"
|
||||
#include "shared-bindings/vectorio/VectorShape.h"
|
||||
|
||||
//| :mod:`vectorio` --- Lightweight 2d shapes for displays
|
||||
//| =========================================================================
|
||||
//|
|
||||
//| .. module:: vectorio
|
||||
//| :synopsis: Adds vector graphics to displayio
|
||||
//| :platform: SAMD21, SAMD51, nRF52
|
||||
//|
|
||||
//| The `vectorio` module contains classes to construct shapes
|
||||
//| by describing their points rather than providing them in bitmaps.
|
||||
//|
|
||||
//| Libraries
|
||||
//|
|
||||
//| .. toctree::
|
||||
//| :maxdepth: 3
|
||||
//|
|
||||
//| Circle
|
||||
//| Polygon
|
||||
//| Rectangle
|
||||
//| VectorShape
|
||||
//|
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t vectorio_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_vectorio) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_Circle), MP_ROM_PTR(&vectorio_circle_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_Polygon), MP_ROM_PTR(&vectorio_polygon_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_Rectangle), MP_ROM_PTR(&vectorio_rectangle_type) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_VectorShape), MP_ROM_PTR(&vectorio_vector_shape_type) },
|
||||
};
|
||||
|
||||
STATIC MP_DEFINE_CONST_DICT(vectorio_module_globals, vectorio_module_globals_table);
|
||||
|
||||
const mp_obj_module_t vectorio_module = {
|
||||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t*)&vectorio_module_globals,
|
||||
};
|
@ -29,6 +29,11 @@
|
||||
#include "py/runtime.h"
|
||||
#include "shared-bindings/displayio/TileGrid.h"
|
||||
|
||||
#if CIRCUITPY_VECTORIO
|
||||
#include "shared-bindings/vectorio/VectorShape.h"
|
||||
#endif
|
||||
|
||||
|
||||
void common_hal_displayio_group_construct(displayio_group_t* self, uint32_t max_size, uint32_t scale, mp_int_t x, mp_int_t y) {
|
||||
displayio_group_child_t* children = m_new(displayio_group_child_t, max_size);
|
||||
displayio_group_construct(self, children, max_size, scale, x, y);
|
||||
@ -117,6 +122,12 @@ static void _update_child_transforms(displayio_group_t* self) {
|
||||
}
|
||||
for (size_t i = 0; i < self->size; i++) {
|
||||
mp_obj_t layer = self->children[i].native;
|
||||
#if CIRCUITPY_VECTORIO
|
||||
if (MP_OBJ_IS_TYPE(layer, &vectorio_vector_shape_type)) {
|
||||
vectorio_vector_shape_update_transform(layer, &self->absolute_transform);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (MP_OBJ_IS_TYPE(layer, &displayio_tilegrid_type)) {
|
||||
displayio_tilegrid_update_transform(layer, &self->absolute_transform);
|
||||
} else if (MP_OBJ_IS_TYPE(layer, &displayio_group_type)) {
|
||||
@ -200,7 +211,15 @@ void common_hal_displayio_group_set_y(displayio_group_t* self, mp_int_t y) {
|
||||
}
|
||||
|
||||
static mp_obj_t _add_layer(displayio_group_t* self, mp_obj_t layer) {
|
||||
mp_obj_t native_layer = mp_instance_cast_to_native_base(layer, &displayio_group_type);
|
||||
mp_obj_t native_layer;
|
||||
#if CIRCUITPY_VECTORIO
|
||||
native_layer = mp_instance_cast_to_native_base(layer, &vectorio_vector_shape_type);
|
||||
if (native_layer != MP_OBJ_NULL) {
|
||||
vectorio_vector_shape_update_transform(native_layer, &self->absolute_transform);
|
||||
return native_layer;
|
||||
}
|
||||
#endif
|
||||
native_layer = mp_instance_cast_to_native_base(layer, &displayio_group_type);
|
||||
if (native_layer == MP_OBJ_NULL) {
|
||||
native_layer = mp_instance_cast_to_native_base(layer, &displayio_tilegrid_type);
|
||||
if (native_layer == MP_OBJ_NULL) {
|
||||
@ -229,6 +248,14 @@ static void _remove_layer(displayio_group_t* self, size_t index) {
|
||||
mp_obj_t layer = self->children[index].native;
|
||||
displayio_area_t layer_area;
|
||||
bool rendered_last_frame = false;
|
||||
#if CIRCUITPY_VECTORIO
|
||||
if (MP_OBJ_IS_TYPE(layer, &vectorio_vector_shape_type)) {
|
||||
bool has_dirty_area = vectorio_vector_shape_get_dirty_area(layer, &layer_area);
|
||||
rendered_last_frame = has_dirty_area;
|
||||
vectorio_vector_shape_update_transform(layer, NULL);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (MP_OBJ_IS_TYPE(layer, &displayio_tilegrid_type)) {
|
||||
displayio_tilegrid_t* tilegrid = layer;
|
||||
rendered_last_frame = displayio_tilegrid_get_previous_area(tilegrid, &layer_area);
|
||||
@ -317,6 +344,15 @@ bool displayio_group_fill_area(displayio_group_t *self, const _displayio_colorsp
|
||||
bool full_coverage = false;
|
||||
for (int32_t i = self->size - 1; i >= 0 ; i--) {
|
||||
mp_obj_t layer = self->children[i].native;
|
||||
#if CIRCUITPY_VECTORIO
|
||||
if (MP_OBJ_IS_TYPE(layer, &vectorio_vector_shape_type)) {
|
||||
if (vectorio_vector_shape_fill_area(layer, colorspace, area, mask, buffer)) {
|
||||
full_coverage = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (MP_OBJ_IS_TYPE(layer, &displayio_tilegrid_type)) {
|
||||
if (displayio_tilegrid_fill_area(layer, colorspace, area, mask, buffer)) {
|
||||
full_coverage = true;
|
||||
@ -336,6 +372,12 @@ void displayio_group_finish_refresh(displayio_group_t *self) {
|
||||
self->item_removed = false;
|
||||
for (int32_t i = self->size - 1; i >= 0 ; i--) {
|
||||
mp_obj_t layer = self->children[i].native;
|
||||
#if CIRCUITPY_VECTORIO
|
||||
if (MP_OBJ_IS_TYPE(layer, &vectorio_vector_shape_type)) {
|
||||
vectorio_vector_shape_finish_refresh(layer);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (MP_OBJ_IS_TYPE(layer, &displayio_tilegrid_type)) {
|
||||
displayio_tilegrid_finish_refresh(layer);
|
||||
} else if (MP_OBJ_IS_TYPE(layer, &displayio_group_type)) {
|
||||
@ -352,6 +394,12 @@ displayio_area_t* displayio_group_get_refresh_areas(displayio_group_t *self, dis
|
||||
|
||||
for (int32_t i = self->size - 1; i >= 0 ; i--) {
|
||||
mp_obj_t layer = self->children[i].native;
|
||||
#if CIRCUITPY_VECTORIO
|
||||
if (MP_OBJ_IS_TYPE(layer, &vectorio_vector_shape_type)) {
|
||||
tail = vectorio_vector_shape_get_refresh_areas(layer, tail);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (MP_OBJ_IS_TYPE(layer, &displayio_tilegrid_type)) {
|
||||
tail = displayio_tilegrid_get_refresh_areas(layer, tail);
|
||||
} else if (MP_OBJ_IS_TYPE(layer, &displayio_group_type)) {
|
||||
|
@ -40,6 +40,9 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#define DISPLAYIO_CORE_DEBUG(...) (void)0
|
||||
// #define DISPLAYIO_CORE_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
void displayio_display_core_construct(displayio_display_core_t* self,
|
||||
mp_obj_t bus, uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation,
|
||||
uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word) {
|
||||
@ -298,6 +301,7 @@ void displayio_display_core_start_refresh(displayio_display_core_t* self) {
|
||||
|
||||
void displayio_display_core_finish_refresh(displayio_display_core_t* self) {
|
||||
if (self->current_group != NULL) {
|
||||
DISPLAYIO_CORE_DEBUG("displayiocore group_finish_refresh\n");
|
||||
displayio_group_finish_refresh(self->current_group);
|
||||
}
|
||||
self->full_refresh = false;
|
||||
|
56
shared-module/vectorio/Circle.c
Normal file
56
shared-module/vectorio/Circle.c
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
#include "shared-bindings/vectorio/Circle.h"
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
#include "shared-module/displayio/area.h"
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "stdlib.h"
|
||||
|
||||
|
||||
void common_hal_vectorio_circle_construct(vectorio_circle_t *self, uint16_t radius) {
|
||||
self->radius = radius;
|
||||
self->on_dirty.obj = NULL;
|
||||
}
|
||||
|
||||
void common_hal_vectorio_circle_set_on_dirty(vectorio_circle_t *self, vectorio_event_t on_dirty) {
|
||||
if (self->on_dirty.obj != NULL) {
|
||||
mp_raise_TypeError(translate("circle can only be registered in one parent"));
|
||||
}
|
||||
self->on_dirty = on_dirty;
|
||||
}
|
||||
|
||||
|
||||
uint32_t common_hal_vectorio_circle_get_pixel(void *obj, int16_t x, int16_t y) {
|
||||
vectorio_circle_t *self = obj;
|
||||
int16_t radius = abs(self->radius);
|
||||
x = abs(x);
|
||||
y = abs(y);
|
||||
if (x+y <= radius) return 1;
|
||||
if (x > radius) return 0;
|
||||
if (y > radius) return 0;
|
||||
const bool pythagorasSmallerThanRadius = (int32_t)x*x + (int32_t)y*y <= (int32_t)radius*radius;
|
||||
return pythagorasSmallerThanRadius ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
void common_hal_vectorio_circle_get_area(void *circle, displayio_area_t *out_area) {
|
||||
vectorio_circle_t *self = circle;
|
||||
out_area->x1 = -1 * self->radius - 1;
|
||||
out_area->y1 = -1 * self->radius - 1;
|
||||
out_area->x2 = self->radius + 1;
|
||||
out_area->y2 = self->radius + 1;
|
||||
}
|
||||
|
||||
int16_t common_hal_vectorio_circle_get_radius(void *obj) {
|
||||
vectorio_circle_t *self = obj;
|
||||
return self->radius;
|
||||
}
|
||||
|
||||
void common_hal_vectorio_circle_set_radius(void *obj, int16_t radius) {
|
||||
vectorio_circle_t *self = obj;
|
||||
self->radius = abs(radius);
|
||||
if (self->on_dirty.obj != NULL) {
|
||||
self->on_dirty.event(self->on_dirty.obj);
|
||||
}
|
||||
}
|
||||
|
17
shared-module/vectorio/Circle.h
Normal file
17
shared-module/vectorio/Circle.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_CIRCLE_H
|
||||
#define MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_CIRCLE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
uint16_t radius;
|
||||
vectorio_event_t on_dirty;
|
||||
} vectorio_circle_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_CIRCLE_H
|
||||
|
110
shared-module/vectorio/Polygon.c
Normal file
110
shared-module/vectorio/Polygon.c
Normal file
@ -0,0 +1,110 @@
|
||||
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
#include "shared-bindings/vectorio/Polygon.h"
|
||||
#include "shared-module/displayio/area.h"
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "stdlib.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#define VECTORIO_POLYGON_DEBUG(...) (void)0
|
||||
// #define VECTORIO_POLYGON_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
|
||||
void common_hal_vectorio_polygon_construct(vectorio_polygon_t *self, mp_obj_t points_list) {
|
||||
VECTORIO_POLYGON_DEBUG("%p polygon_construct\n", self);
|
||||
self->points_list = points_list;
|
||||
self->on_dirty.obj = NULL;
|
||||
}
|
||||
|
||||
|
||||
mp_obj_t common_hal_vectorio_polygon_get_points(vectorio_polygon_t *self) {
|
||||
return self->points_list;
|
||||
}
|
||||
void common_hal_vectorio_polygon_set_points(vectorio_polygon_t *self, mp_obj_t points_list) {
|
||||
self->points_list = points_list;
|
||||
if (self->on_dirty.obj != NULL) {
|
||||
self->on_dirty.event(self->on_dirty.obj);
|
||||
}
|
||||
}
|
||||
|
||||
void common_hal_vectorio_polygon_set_on_dirty(vectorio_polygon_t *self, vectorio_event_t notification) {
|
||||
if ( self->on_dirty.obj != NULL ) {
|
||||
mp_raise_TypeError(translate("polygon can only be registered in one parent"));
|
||||
}
|
||||
self->on_dirty = notification;
|
||||
}
|
||||
|
||||
|
||||
void common_hal_vectorio_polygon_get_area(void *polygon, displayio_area_t *area) {
|
||||
VECTORIO_POLYGON_DEBUG("%p polygon get_area", polygon);
|
||||
vectorio_polygon_t *self = polygon;
|
||||
size_t len;
|
||||
mp_obj_t *points;
|
||||
mp_obj_list_get(self->points_list, &len, &points);
|
||||
VECTORIO_POLYGON_DEBUG(" len: %2d, points: %d\n", len, len/2);
|
||||
|
||||
area->x1 = SHRT_MAX;
|
||||
area->y1 = SHRT_MAX;
|
||||
area->x2 = SHRT_MIN;
|
||||
area->y2 = SHRT_MIN;
|
||||
for (size_t i=0; i < len; ++i) {
|
||||
mp_int_t x = mp_obj_get_int(points[i]);
|
||||
++i;
|
||||
mp_int_t y = mp_obj_get_int(points[i]);
|
||||
if (x <= area->x1) area->x1 = x-1;
|
||||
if (y <= area->y1) area->y1 = y-1;
|
||||
if (x >= area->x2) area->x2 = x+1;
|
||||
if (y >= area->y2) area->y2 = y+1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// <0 if the point is to the left of the line vector
|
||||
// 0 if the point is on the line
|
||||
// >0 if the point is to the right of the line vector
|
||||
__attribute__((always_inline)) static inline int line_side( mp_int_t x1, mp_int_t y1, mp_int_t x2, mp_int_t y2, int16_t px, int16_t py ) {
|
||||
return (px - x1) * (y2 - y1)
|
||||
- (py - y1) * (x2 - x1);
|
||||
}
|
||||
|
||||
|
||||
uint32_t common_hal_vectorio_polygon_get_pixel(void *obj, int16_t x, int16_t y) {
|
||||
VECTORIO_POLYGON_DEBUG("%p polygon get_pixel %d, %d\n", obj, x, y);
|
||||
vectorio_polygon_t *self = obj;
|
||||
size_t len;
|
||||
mp_obj_t *points;
|
||||
mp_obj_list_get(self->points_list, &len, &points);
|
||||
|
||||
if (len == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int winding_number = 0;
|
||||
mp_int_t x1 = mp_obj_get_int(points[0]);
|
||||
mp_int_t y1 = mp_obj_get_int(points[1]);
|
||||
for (size_t i=2; i <= len + 1; ++i) {
|
||||
VECTORIO_POLYGON_DEBUG(" {(%3d, %3d),", x1, y1);
|
||||
mp_int_t x2 = mp_obj_get_int(points[i % len]);
|
||||
++i;
|
||||
mp_int_t y2 = mp_obj_get_int(points[i % len]);
|
||||
VECTORIO_POLYGON_DEBUG(" (%3d, %3d)}\n", x2, y2);
|
||||
if ( y1 <= y ) {
|
||||
if ( y2 > y && line_side(x1, y1, x2, y2, x, y) > 0 ) {
|
||||
// Wind up, point is to the right of the edge vector
|
||||
++winding_number;
|
||||
VECTORIO_POLYGON_DEBUG(" wind:%2d winding_number:%2d\n", 1, winding_number);
|
||||
}
|
||||
} else if ( y2 <= y && line_side(x1, y1, x2, y2, x, y) < 0 ) {
|
||||
// Wind down, point is to the left of the edge vector
|
||||
--winding_number;
|
||||
VECTORIO_POLYGON_DEBUG(" wind:%2d winding_number:%2d\n", -1, winding_number);
|
||||
}
|
||||
|
||||
x1 = x2;
|
||||
y1 = y2;
|
||||
}
|
||||
return winding_number == 0 ? 0 : 1;
|
||||
}
|
||||
|
16
shared-module/vectorio/Polygon.h
Normal file
16
shared-module/vectorio/Polygon.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|
||||
#define MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
// A micropython List[ x, y, ... ]
|
||||
mp_obj_t points_list;
|
||||
vectorio_event_t on_dirty;
|
||||
} vectorio_polygon_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H
|
35
shared-module/vectorio/Rectangle.c
Normal file
35
shared-module/vectorio/Rectangle.c
Normal file
@ -0,0 +1,35 @@
|
||||
#include "shared-bindings/vectorio/Rectangle.h"
|
||||
#include "shared-module/displayio/area.h"
|
||||
|
||||
#include "py/runtime.h"
|
||||
|
||||
|
||||
void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height) {
|
||||
self->width = width;
|
||||
self->height = height;
|
||||
}
|
||||
|
||||
|
||||
uint32_t common_hal_vectorio_rectangle_get_pixel(void *obj, int16_t x, int16_t y) {
|
||||
vectorio_rectangle_t *self = obj;
|
||||
if (x < 0 || x > self->width || y > self->height || y < 0) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void common_hal_vectorio_rectangle_get_area(void *rectangle, displayio_area_t *out_area) {
|
||||
vectorio_rectangle_t *self = rectangle;
|
||||
out_area->x1 = -1;
|
||||
out_area->y1 = -1;
|
||||
out_area->x2 = self->width;
|
||||
out_area->y2 = self->height;
|
||||
}
|
||||
|
||||
|
||||
uint32_t common_hal_vectorio_rectangle_get_height(void *rectangle) {
|
||||
vectorio_rectangle_t *self = rectangle;
|
||||
return self->height;
|
||||
}
|
||||
|
15
shared-module/vectorio/Rectangle.h
Normal file
15
shared-module/vectorio/Rectangle.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_RECTANGLE_H
|
||||
#define MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_RECTANGLE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
} vectorio_rectangle_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_RECTANGLE_H
|
||||
|
336
shared-module/vectorio/VectorShape.c
Normal file
336
shared-module/vectorio/VectorShape.c
Normal file
@ -0,0 +1,336 @@
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
#include "shared-module/vectorio/__init__.h"
|
||||
#include "shared-bindings/vectorio/VectorShape.h"
|
||||
|
||||
#include "py/runtime.h"
|
||||
#include "shared-bindings/time/__init__.h"
|
||||
#include "shared-bindings/displayio/ColorConverter.h"
|
||||
#include "shared-bindings/displayio/Palette.h"
|
||||
|
||||
#include "shared-bindings/vectorio/Circle.h"
|
||||
#include "shared-bindings/vectorio/Polygon.h"
|
||||
#include "shared-bindings/vectorio/Rectangle.h"
|
||||
|
||||
// Lifecycle actions.
|
||||
#define VECTORIO_SHAPE_DEBUG(...) (void)0
|
||||
// #define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
|
||||
// Used in both logging and ifdefs, for extra variables
|
||||
// #define VECTORIO_PERF(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
|
||||
// Really verbose.
|
||||
#define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0
|
||||
// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
|
||||
inline __attribute__((always_inline))
|
||||
static int32_t max(int32_t a, int32_t b) {
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
|
||||
inline __attribute__((always_inline))
|
||||
static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *out_area) {
|
||||
VECTORIO_SHAPE_DEBUG("%p get_screen_area tform:{x:%d y:%d dx:%d dy:%d scl:%d w:%d h:%d mx:%d my:%d tr:%d}", self,
|
||||
self->absolute_transform->x, self->absolute_transform->y, self->absolute_transform->dx, self->absolute_transform->dy, self->absolute_transform->scale,
|
||||
self->absolute_transform->width, self->absolute_transform->height, self->absolute_transform->mirror_x, self->absolute_transform->mirror_y, self->absolute_transform->transpose_xy
|
||||
);
|
||||
self->ishape.get_area(self->ishape.shape, out_area);
|
||||
VECTORIO_SHAPE_DEBUG(" in:{(%5d,%5d), (%5d,%5d)}", out_area->x1, out_area->y1, out_area->x2, out_area->y2);
|
||||
if (self->absolute_transform->transpose_xy) {
|
||||
int16_t swap = out_area->x1;
|
||||
out_area->x1 = (out_area->y1 + self->y) * self->absolute_transform->dx + self->absolute_transform->x;
|
||||
out_area->y1 = (swap + self->x) * self->absolute_transform->dy + self->absolute_transform->y;
|
||||
swap = out_area->x2;
|
||||
out_area->x2 = (out_area->y2 + self->y) * self->absolute_transform->dx + self->absolute_transform->x;
|
||||
out_area->y2 = (swap + self->x) * self->absolute_transform->dy + self->absolute_transform->y;
|
||||
} else {
|
||||
out_area->x1 = (out_area->x1 + self->x) * self->absolute_transform->dx + self->absolute_transform->x;
|
||||
out_area->y1 = (out_area->y1 + self->y) * self->absolute_transform->dy + self->absolute_transform->y;
|
||||
out_area->x2 = (out_area->x2 + self->x) * self->absolute_transform->dx + self->absolute_transform->x;
|
||||
out_area->y2 = (out_area->y2 + self->y) * self->absolute_transform->dy + self->absolute_transform->y;
|
||||
}
|
||||
// We might have mirrored due to dx
|
||||
if (out_area->x2 < out_area->x1) {
|
||||
int16_t swap = out_area->x1;
|
||||
out_area->x1 = out_area->x2;
|
||||
out_area->x2 = swap;
|
||||
}
|
||||
if (out_area->y2 < out_area->y1) {
|
||||
int16_t swap = out_area->y1;
|
||||
out_area->y1 = out_area->y2;
|
||||
out_area->y2 = swap;
|
||||
}
|
||||
VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2);
|
||||
}
|
||||
|
||||
|
||||
// For use by Group to know where it needs to redraw on layer removal.
|
||||
bool vectorio_vector_shape_get_dirty_area(vectorio_vector_shape_t *self, displayio_area_t *out_area) {
|
||||
displayio_area_copy(&self->ephemeral_dirty_area, out_area);
|
||||
return true; // For now just always redraw.
|
||||
}
|
||||
|
||||
|
||||
// This must be invoked each time a shape changes its position or its shape in any way.
|
||||
void common_hal_vectorio_vector_shape_set_dirty(void *vector_shape) {
|
||||
vectorio_vector_shape_t *self = vector_shape;
|
||||
// In screen space. Need to offset the shape space.
|
||||
displayio_area_t current_area;
|
||||
_get_screen_area(self, ¤t_area);
|
||||
VECTORIO_SHAPE_DEBUG("%p shape_dirty current:{(%3d,%3d), (%3d,%3d)} dirty:{(%3d,%3d), (%3d,%3d)}",
|
||||
self,
|
||||
current_area.x1, current_area.y1, current_area.x2, current_area.y2,
|
||||
self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2);
|
||||
self->dirty = true;
|
||||
// Dirty area tracks the shape's footprint between draws. It's reset on refresh finish,
|
||||
displayio_area_expand(&self->ephemeral_dirty_area, ¤t_area);
|
||||
VECTORIO_SHAPE_DEBUG(" -> expanded:{(%3d,%3d), (%3d,%3d)}\n", self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2);
|
||||
}
|
||||
|
||||
|
||||
static displayio_buffer_transform_t null_transform = {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.dx = 1,
|
||||
.dy = 1,
|
||||
.scale = 1,
|
||||
.width = 0,
|
||||
.height = 0,
|
||||
.mirror_x = false,
|
||||
.mirror_y = false,
|
||||
.transpose_xy = false
|
||||
};
|
||||
|
||||
|
||||
void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self,
|
||||
vectorio_ishape_t ishape,
|
||||
mp_obj_t pixel_shader, uint16_t x, uint16_t y) {
|
||||
VECTORIO_SHAPE_DEBUG("%p vector_shape_construct x:%3d, y:%3d\n", self, x, y);
|
||||
self->x = x;
|
||||
self->y = y;
|
||||
self->pixel_shader = pixel_shader;
|
||||
self->ishape = ishape;
|
||||
self->dirty = true;
|
||||
self->absolute_transform = &null_transform; // Critical to have a valid transform before getting screen area.
|
||||
_get_screen_area(self, &self->ephemeral_dirty_area);
|
||||
self->ephemeral_dirty_area.next = NULL;
|
||||
}
|
||||
|
||||
|
||||
mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self) {
|
||||
VECTORIO_SHAPE_DEBUG("%p get_x\n", self);
|
||||
return self->x;
|
||||
}
|
||||
|
||||
|
||||
void common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x) {
|
||||
VECTORIO_SHAPE_DEBUG("%p set_x %d\n", self, x);
|
||||
if (self->x == x) {
|
||||
return;
|
||||
}
|
||||
self->x = x;
|
||||
common_hal_vectorio_vector_shape_set_dirty(self);
|
||||
}
|
||||
|
||||
|
||||
mp_int_t common_hal_vectorio_vector_shape_get_y(vectorio_vector_shape_t *self) {
|
||||
VECTORIO_SHAPE_DEBUG("%p get_y\n", self);
|
||||
return self->y;
|
||||
}
|
||||
|
||||
|
||||
void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y) {
|
||||
VECTORIO_SHAPE_DEBUG("%p set_y %d\n", self, y);
|
||||
if (self->y == y) {
|
||||
return;
|
||||
}
|
||||
self->y = y;
|
||||
common_hal_vectorio_vector_shape_set_dirty(self);
|
||||
}
|
||||
|
||||
|
||||
mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self) {
|
||||
VECTORIO_SHAPE_DEBUG("%p get_pixel_shader\n", self);
|
||||
return self->pixel_shader;
|
||||
}
|
||||
|
||||
void common_hal_vectorio_vector_shape_set_pixel_shader(vectorio_vector_shape_t *self, mp_obj_t pixel_shader) {
|
||||
VECTORIO_SHAPE_DEBUG("%p set_pixel_shader\n", self);
|
||||
self->pixel_shader = pixel_shader;
|
||||
common_hal_vectorio_vector_shape_set_dirty(self);
|
||||
}
|
||||
|
||||
|
||||
bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displayio_colorspace_t* colorspace, const displayio_area_t* area, uint32_t* mask, uint32_t *buffer) {
|
||||
// Shape areas are relative to 0,0. This will allow rotation about a known axis.
|
||||
// The consequence is that the area reported by the shape itself is _relative_ to 0,0.
|
||||
// To make it relative to the VectorShape position, we must shift it.
|
||||
// Pixels are drawn on the screen_area (shifted) coordinate space, while pixels are _determined_ from
|
||||
// the shape_area (unshifted) space.
|
||||
#ifdef VECTORIO_PERF
|
||||
uint64_t start = common_hal_time_monotonic_ns();
|
||||
uint64_t pixel_time = 0;
|
||||
#endif
|
||||
displayio_area_t overlap;
|
||||
VECTORIO_SHAPE_DEBUG("%p fill_area dirty:%d fill: {(%5d,%5d), (%5d,%5d)} dirty: {(%5d,%5d), (%5d,%5d)}",
|
||||
self, self->dirty,
|
||||
area->x1, area->y1, area->x2, area->y2,
|
||||
self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2
|
||||
);
|
||||
if (!displayio_area_compute_overlap(area, &self->ephemeral_dirty_area, &overlap)) {
|
||||
VECTORIO_SHAPE_DEBUG(" no overlap\n");
|
||||
return false;
|
||||
}
|
||||
VECTORIO_SHAPE_DEBUG(", overlap: {(%3d,%3d), (%3d,%3d)}", overlap.x1, overlap.y1, overlap.x2, overlap.y2);
|
||||
|
||||
bool full_coverage = displayio_area_equal(area, &overlap);
|
||||
|
||||
uint8_t pixels_per_byte = 8 / colorspace->depth;
|
||||
|
||||
uint32_t linestride_px = displayio_area_width(area);
|
||||
uint32_t line_dirty_offset_px = (overlap.y1 - area->y1) * linestride_px;
|
||||
uint32_t column_dirty_offset_px = overlap.x1 - area->x1;
|
||||
VECTORIO_SHAPE_DEBUG(", linestride:%3d line_offset:%3d col_offset:%3d depth:%2d ppb:%2d shape:%s",
|
||||
linestride_px, line_dirty_offset_px, column_dirty_offset_px, colorspace->depth, pixels_per_byte, mp_obj_get_type_str(self->ishape.shape));
|
||||
|
||||
displayio_input_pixel_t input_pixel;
|
||||
displayio_output_pixel_t output_pixel;
|
||||
|
||||
uint32_t mask_start_px = line_dirty_offset_px;
|
||||
for (input_pixel.y = overlap.y1; input_pixel.y < overlap.y2; ++input_pixel.y) {
|
||||
mask_start_px += column_dirty_offset_px;
|
||||
for (input_pixel.x = overlap.x1; input_pixel.x < overlap.x2; ++input_pixel.x) {
|
||||
// Check the mask first to see if the pixel has already been set.
|
||||
uint32_t pixel_index = mask_start_px + (input_pixel.x - overlap.x1);
|
||||
uint32_t *mask_doubleword = &(mask[pixel_index / 32]);
|
||||
uint8_t mask_bit = pixel_index % 32;
|
||||
VECTORIO_SHAPE_PIXEL_DEBUG("%p pixel_index: %5u mask_bit: %2u", self, pixel_index, mask_bit);
|
||||
if ((*mask_doubleword & (1u << mask_bit)) != 0) {
|
||||
VECTORIO_SHAPE_PIXEL_DEBUG(" masked\n");
|
||||
continue;
|
||||
}
|
||||
output_pixel.pixel = 0;
|
||||
|
||||
// Get the target pixel based on the shape's coordinate space
|
||||
int16_t pixel_to_get_x;
|
||||
int16_t pixel_to_get_y;
|
||||
if (self->absolute_transform->transpose_xy) {
|
||||
pixel_to_get_x = (input_pixel.y - self->absolute_transform->dy * self->x - self->absolute_transform->y) / self->absolute_transform->dy;
|
||||
pixel_to_get_y = (input_pixel.x - self->absolute_transform->dx * self->y - self->absolute_transform->x) / self->absolute_transform->dx;
|
||||
} else {
|
||||
pixel_to_get_x = (input_pixel.x - self->absolute_transform->dx * self->x) / self->absolute_transform->dx;
|
||||
pixel_to_get_y = (input_pixel.y - self->absolute_transform->dy * self->y) / self->absolute_transform->dy;
|
||||
}
|
||||
VECTORIO_SHAPE_PIXEL_DEBUG(" get_pixel %p (%3d, %3d) -> ( %3d, %3d )", self->ishape.shape, input_pixel.x, input_pixel.y, pixel_to_get_x, pixel_to_get_y);
|
||||
#ifdef VECTORIO_PERF
|
||||
uint64_t pre_pixel = common_hal_time_monotonic_ns();
|
||||
#endif
|
||||
input_pixel.pixel = self->ishape.get_pixel(self->ishape.shape, pixel_to_get_x, pixel_to_get_y);
|
||||
#ifdef VECTORIO_PERF
|
||||
uint64_t post_pixel = common_hal_time_monotonic_ns();
|
||||
pixel_time += post_pixel - pre_pixel;
|
||||
#endif
|
||||
VECTORIO_SHAPE_PIXEL_DEBUG(" -> %d", input_pixel.pixel);
|
||||
|
||||
output_pixel.opaque = true;
|
||||
if (self->pixel_shader == mp_const_none) {
|
||||
output_pixel.pixel = input_pixel.pixel;
|
||||
} else if (MP_OBJ_IS_TYPE(self->pixel_shader, &displayio_palette_type)) {
|
||||
output_pixel.opaque = displayio_palette_get_color(self->pixel_shader, colorspace, input_pixel.pixel, &output_pixel.pixel);
|
||||
} else if (MP_OBJ_IS_TYPE(self->pixel_shader, &displayio_colorconverter_type)) {
|
||||
displayio_colorconverter_convert(self->pixel_shader, colorspace, &input_pixel, &output_pixel);
|
||||
}
|
||||
if (!output_pixel.opaque) {
|
||||
VECTORIO_SHAPE_PIXEL_DEBUG(" (encountered transparent pixel; input area is not fully covered)\n");
|
||||
full_coverage = false;
|
||||
} else {
|
||||
*mask_doubleword |= 1u << mask_bit;
|
||||
if (colorspace->depth == 16) {
|
||||
VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %04x 16\n", output_pixel.pixel);
|
||||
*(((uint16_t*) buffer) + pixel_index) = output_pixel.pixel;
|
||||
} else if (colorspace->depth == 8) {
|
||||
VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %02x 8\n", output_pixel.pixel);
|
||||
*(((uint8_t*) buffer) + pixel_index) = output_pixel.pixel;
|
||||
} else if (colorspace->depth < 8) {
|
||||
// Reorder the offsets to pack multiple rows into a byte (meaning they share a column).
|
||||
if (!colorspace->pixels_in_byte_share_row) {
|
||||
uint16_t width = linestride_px;
|
||||
uint16_t row = pixel_index / width;
|
||||
uint16_t col = pixel_index % width;
|
||||
pixel_index = col * pixels_per_byte + (row / pixels_per_byte) * pixels_per_byte * width + row % pixels_per_byte;
|
||||
}
|
||||
uint8_t shift = (pixel_index % pixels_per_byte) * colorspace->depth;
|
||||
if (colorspace->reverse_pixels_in_byte) {
|
||||
// Reverse the shift by subtracting it from the leftmost shift.
|
||||
shift = (pixels_per_byte - 1) * colorspace->depth - shift;
|
||||
}
|
||||
VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %2d %d\n", output_pixel.pixel, colorspace->depth);
|
||||
((uint8_t*)buffer)[pixel_index / pixels_per_byte] |= output_pixel.pixel << shift;
|
||||
}
|
||||
}
|
||||
}
|
||||
mask_start_px += linestride_px - column_dirty_offset_px;
|
||||
}
|
||||
#ifdef VECTORIO_PERF
|
||||
uint64_t end = common_hal_time_monotonic_ns();
|
||||
uint32_t pixels = (overlap.x2 - overlap.x1) * (overlap.y2 - overlap.y1);
|
||||
VECTORIO_PERF("draw %16s -> shape:{%4dpx, %4.1fms,%9.1fpps fill} shape_pixels:{%6.1fus total, %4.1fus/px}\n",
|
||||
mp_obj_get_type_str(self->ishape.shape),
|
||||
(overlap.x2 - overlap.x1) * (overlap.y2 - overlap.y1),
|
||||
(double)((end - start) / 1000000.0),
|
||||
(double)(max(1, pixels * (1000000000.0 / (end - start)))),
|
||||
(double)(pixel_time / 1000.0),
|
||||
(double)(pixel_time / 1000.0 / pixels)
|
||||
);
|
||||
#endif
|
||||
VECTORIO_SHAPE_DEBUG(" -> pixels:%4d\n");
|
||||
return full_coverage;
|
||||
}
|
||||
|
||||
|
||||
void vectorio_vector_shape_finish_refresh(vectorio_vector_shape_t *self) {
|
||||
if ( !self->dirty ) {
|
||||
return;
|
||||
}
|
||||
VECTORIO_SHAPE_DEBUG("%p finish_refresh was:{(%3d,%3d), (%3d,%3d)}\n", self, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2);
|
||||
self->dirty = false;
|
||||
// Reset dirty area tracking to current footprint
|
||||
_get_screen_area(self, &self->ephemeral_dirty_area);
|
||||
self->ephemeral_dirty_area.next = NULL;
|
||||
VECTORIO_SHAPE_DEBUG("%p finish_refresh now:{(%3d,%3d), (%3d,%3d)}\n", self, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2);
|
||||
|
||||
if (MP_OBJ_IS_TYPE(self->pixel_shader, &displayio_palette_type)) {
|
||||
displayio_palette_finish_refresh(self->pixel_shader);
|
||||
} else if (MP_OBJ_IS_TYPE(self->pixel_shader, &displayio_colorconverter_type)) {
|
||||
displayio_colorconverter_finish_refresh(self->pixel_shader);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Assembles a singly linked list of dirty areas from all components on the display.
|
||||
displayio_area_t* vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_t *self, displayio_area_t* tail) {
|
||||
if (self->dirty
|
||||
|| (MP_OBJ_IS_TYPE(self->pixel_shader, &displayio_palette_type) && displayio_palette_needs_refresh(self->pixel_shader))
|
||||
|| (MP_OBJ_IS_TYPE(self->pixel_shader, &displayio_colorconverter_type) && displayio_colorconverter_needs_refresh(self->pixel_shader))
|
||||
) {
|
||||
VECTORIO_SHAPE_DEBUG("%p get_refresh_area dirty:%d {(%3d,%3d), (%3d,%3d)}", self, self->dirty, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2);
|
||||
common_hal_vectorio_vector_shape_set_dirty(self);
|
||||
// vector.add_to_head
|
||||
self->ephemeral_dirty_area.next = tail;
|
||||
VECTORIO_SHAPE_DEBUG(" this_area: %p next: %p after: %p\n", &self->ephemeral_dirty_area, tail, tail == NULL ? NULL : tail->next);
|
||||
return &self->ephemeral_dirty_area;
|
||||
}
|
||||
return tail;
|
||||
}
|
||||
|
||||
void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displayio_buffer_transform_t *group_transform) {
|
||||
self->absolute_transform = group_transform == NULL ? &null_transform : group_transform;
|
||||
common_hal_vectorio_vector_shape_set_dirty(self);
|
||||
}
|
||||
|
||||
|
53
shared-module/vectorio/VectorShape.h
Normal file
53
shared-module/vectorio/VectorShape.h
Normal file
@ -0,0 +1,53 @@
|
||||
|
||||
#ifndef MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_SHAPE_H
|
||||
#define MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_SHAPE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "shared-module/displayio/area.h"
|
||||
#include "shared-module/displayio/Palette.h"
|
||||
|
||||
typedef void get_area_function(mp_obj_t shape, displayio_area_t *out_area);
|
||||
typedef uint32_t get_pixel_function(mp_obj_t shape, int16_t x, int16_t y);
|
||||
|
||||
// This struct binds a shape's common Shape support functions (its vector shape interface)
|
||||
// to its instance pointer. We only check at construction time what the type of the
|
||||
// associated shape is and link the correct functions up.
|
||||
// Later when using the shape for drawing logic these functions may be invoked
|
||||
// unconditionally. This simplifies the addition of new types and restricts the
|
||||
// respective responsibilities of VectorShape and actual shape implementations.
|
||||
typedef struct {
|
||||
mp_obj_t shape;
|
||||
get_area_function *get_area;
|
||||
get_pixel_function *get_pixel;
|
||||
} vectorio_ishape_t;
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
vectorio_ishape_t ishape;
|
||||
mp_obj_t pixel_shader;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
displayio_buffer_transform_t *absolute_transform;
|
||||
bool dirty; // True if we need to draw
|
||||
// Tracks current shape footprint and expands outward as the shape dirties and changes.
|
||||
// This is suboptimal if you move your shape far. Could add more state to only redraw
|
||||
// exactly what we left behind.
|
||||
displayio_area_t ephemeral_dirty_area;
|
||||
} vectorio_vector_shape_t;
|
||||
|
||||
displayio_area_t* vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_t *self, displayio_area_t *tail);
|
||||
|
||||
bool vectorio_vector_shape_get_dirty_area(vectorio_vector_shape_t *self, displayio_area_t *current_dirty_area);
|
||||
|
||||
// Area is always in absolute screen coordinates.
|
||||
bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displayio_colorspace_t *colorspace, const displayio_area_t *area, uint32_t *mask, uint32_t *buffer);
|
||||
|
||||
// Fills in out_area with the maximum bounds of all related pixels in the last rendered frame. Returns
|
||||
// false if the vector shape wasn't rendered in the last frame.
|
||||
bool vectorio_vector_shape_get_previous_area(vectorio_vector_shape_t *self, displayio_area_t *out_area);
|
||||
void vectorio_vector_shape_finish_refresh(vectorio_vector_shape_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_SHAPE_H
|
3
shared-module/vectorio/__init__.c
Normal file
3
shared-module/vectorio/__init__.c
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
// Don't need anything in here yet
|
||||
|
15
shared-module/vectorio/__init__.h
Normal file
15
shared-module/vectorio/__init__.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_INIT_H
|
||||
#define MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_INIT_H
|
||||
|
||||
#include "py/obj.h"
|
||||
|
||||
typedef void event_function(mp_obj_t obj);
|
||||
|
||||
typedef struct {
|
||||
mp_obj_t obj;
|
||||
event_function *event;
|
||||
} vectorio_event_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -43,5 +43,6 @@
|
||||
#define CMD_QUAD_READ 0x6b
|
||||
#define CMD_ENABLE_RESET 0x66
|
||||
#define CMD_RESET 0x99
|
||||
#define CMD_WAKE 0xab
|
||||
|
||||
#endif // MICROPY_INCLUDED_ATMEL_SAMD_EXTERNAL_FLASH_COMMON_COMMANDS_H
|
||||
|
@ -64,6 +64,15 @@ typedef struct {
|
||||
// True when the status register is a single byte. This implies the Quad Enable bit is in the
|
||||
// first byte and the Read Status Register 2 command (0x35) is unsupported.
|
||||
bool single_status_byte: 1;
|
||||
|
||||
// Does not support using a ready bit within the status register
|
||||
bool no_ready_bit: 1;
|
||||
|
||||
// Does not support the erase command (0x20)
|
||||
bool no_erase_cmd: 1;
|
||||
|
||||
// Device does not have a reset command
|
||||
bool no_reset_cmd: 1;
|
||||
} external_flash_device;
|
||||
|
||||
// Settings for the Adesto Tech AT25DF081A 1MiB SPI flash. It's on the SAMD21
|
||||
@ -426,6 +435,27 @@ typedef struct {
|
||||
.single_status_byte = false, \
|
||||
}
|
||||
|
||||
// Settings for the Everspin MR20H40 / MR25H40 magnetic non-volatile RAM
|
||||
// Datasheet: https://www.everspin.com/supportdocs/MR25H40CDFR
|
||||
#define MR2xH40 {\
|
||||
.total_size = (1 << 22), /* 4 MiB */ \
|
||||
.start_up_time_us = 10000, \
|
||||
.manufacturer_id = 0xef, /*no JDEC*/ \
|
||||
.memory_type = 0x40, /*no JDEC*/ \
|
||||
.capacity = 0x14, /*no JDEC*/ \
|
||||
.max_clock_speed_mhz = 10, \
|
||||
.quad_enable_bit_mask = 0x00, \
|
||||
.has_sector_protection = false, \
|
||||
.supports_fast_read = false, \
|
||||
.supports_qspi = false, \
|
||||
.supports_qspi_writes = false, \
|
||||
.write_status_register_split = false, \
|
||||
.single_status_byte = true, \
|
||||
.no_ready_bit = true, \
|
||||
.no_erase_cmd = true, \
|
||||
.no_reset_cmd = true, \
|
||||
}
|
||||
|
||||
// Settings for the Macronix MX25L1606 2MiB SPI flash.
|
||||
// Datasheet:
|
||||
#define MX25L1606 {\
|
||||
|
@ -27,7 +27,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "supervisor/flash.h"
|
||||
#include "supervisor/spi_flash_api.h"
|
||||
#include "supervisor/shared/external_flash/common_commands.h"
|
||||
@ -58,9 +57,13 @@ static supervisor_allocation* supervisor_cache = NULL;
|
||||
|
||||
// Wait until both the write enable and write in progress bits have cleared.
|
||||
static bool wait_for_flash_ready(void) {
|
||||
uint8_t read_status_response[1] = {0x00};
|
||||
bool ok = true;
|
||||
// Both the write enable and write in progress bits should be low.
|
||||
if (flash_device->no_ready_bit){
|
||||
// For NVM without a ready bit in status register
|
||||
return ok;
|
||||
}
|
||||
uint8_t read_status_response[1] = {0x00};
|
||||
do {
|
||||
ok = spi_flash_read_command(CMD_READ_STATUS, read_status_response, 1);
|
||||
} while (ok && (read_status_response[0] & 0x3) != 0);
|
||||
@ -92,15 +95,18 @@ static bool write_flash(uint32_t address, const uint8_t* data, uint32_t data_len
|
||||
}
|
||||
// Don't bother writing if the data is all 1s. Thats equivalent to the flash
|
||||
// state after an erase.
|
||||
bool all_ones = true;
|
||||
for (uint16_t i = 0; i < data_length; i++) {
|
||||
if (data[i] != 0xff) {
|
||||
all_ones = false;
|
||||
break;
|
||||
if (!flash_device->no_erase_cmd){
|
||||
// Only do this if the device has an erase command
|
||||
bool all_ones = true;
|
||||
for (uint16_t i = 0; i < data_length; i++) {
|
||||
if (data[i] != 0xff) {
|
||||
all_ones = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (all_ones) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (all_ones) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (uint32_t bytes_written = 0;
|
||||
@ -121,6 +127,10 @@ static bool write_flash(uint32_t address, const uint8_t* data, uint32_t data_len
|
||||
static bool page_erased(uint32_t sector_address) {
|
||||
// Check the first few bytes to catch the common case where there is data
|
||||
// without using a bunch of memory.
|
||||
if (flash_device->no_erase_cmd){
|
||||
// skip this if device doesn't have an erase command.
|
||||
return true;
|
||||
}
|
||||
uint8_t short_buffer[4];
|
||||
if (read_flash(sector_address, short_buffer, 4)) {
|
||||
for (uint16_t i = 0; i < 4; i++) {
|
||||
@ -151,10 +161,16 @@ static bool page_erased(uint32_t sector_address) {
|
||||
static bool erase_sector(uint32_t sector_address) {
|
||||
// Before we erase the sector we need to wait for any writes to finish and
|
||||
// and then enable the write again.
|
||||
if (flash_device->no_erase_cmd){
|
||||
// skip this if device doesn't have an erase command.
|
||||
return true;
|
||||
}
|
||||
if (!wait_for_flash_ready() || !write_enable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (flash_device->no_erase_cmd) {
|
||||
return true;
|
||||
}
|
||||
spi_flash_sector_command(CMD_SECTOR_ERASE, sector_address);
|
||||
return true;
|
||||
}
|
||||
@ -192,25 +208,33 @@ void supervisor_flash_init(void) {
|
||||
|
||||
spi_flash_init();
|
||||
|
||||
#ifdef EXTERNAL_FLASH_NO_JEDEC
|
||||
// For NVM that don't have JEDEC response
|
||||
spi_flash_command(CMD_WAKE);
|
||||
for (uint8_t i = 0; i < EXTERNAL_FLASH_DEVICE_COUNT; i++) {
|
||||
const external_flash_device* possible_device = &possible_devices[i];
|
||||
flash_device = possible_device;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
// The response will be 0xff if the flash needs more time to start up.
|
||||
uint8_t jedec_id_response[3] = {0xff, 0xff, 0xff};
|
||||
while (jedec_id_response[0] == 0xff) {
|
||||
spi_flash_read_command(CMD_READ_JEDEC_ID, jedec_id_response, 3);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < EXTERNAL_FLASH_DEVICE_COUNT; i++) {
|
||||
const external_flash_device* possible_device = &possible_devices[i];
|
||||
if (jedec_id_response[0] == possible_device->manufacturer_id &&
|
||||
jedec_id_response[1] == possible_device->memory_type &&
|
||||
jedec_id_response[2] == possible_device->capacity) {
|
||||
flash_device = possible_device;
|
||||
break;
|
||||
for (uint8_t i = 0; i < EXTERNAL_FLASH_DEVICE_COUNT; i++) {
|
||||
const external_flash_device* possible_device = &possible_devices[i];
|
||||
if (jedec_id_response[0] == possible_device->manufacturer_id &&
|
||||
jedec_id_response[1] == possible_device->memory_type &&
|
||||
jedec_id_response[2] == possible_device->capacity) {
|
||||
flash_device = possible_device;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (flash_device == NULL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (flash_device == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We don't know what state the flash is in so wait for any remaining writes and then reset.
|
||||
uint8_t read_status_response[1] = {0x00};
|
||||
@ -219,14 +243,16 @@ void supervisor_flash_init(void) {
|
||||
spi_flash_read_command(CMD_READ_STATUS, read_status_response, 1);
|
||||
} while ((read_status_response[0] & 0x1) != 0);
|
||||
if (!flash_device->single_status_byte) {
|
||||
// The suspended write/erase bit should be low.
|
||||
do {
|
||||
spi_flash_read_command(CMD_READ_STATUS2, read_status_response, 1);
|
||||
} while ((read_status_response[0] & 0x80) != 0);
|
||||
// The suspended write/erase bit should be low.
|
||||
do {
|
||||
spi_flash_read_command(CMD_READ_STATUS2, read_status_response, 1);
|
||||
} while ((read_status_response[0] & 0x80) != 0);
|
||||
}
|
||||
|
||||
spi_flash_command(CMD_ENABLE_RESET);
|
||||
spi_flash_command(CMD_RESET);
|
||||
if (!(flash_device->no_reset_cmd)){
|
||||
spi_flash_command(CMD_ENABLE_RESET);
|
||||
spi_flash_command(CMD_RESET);
|
||||
}
|
||||
|
||||
// Wait 30us for the reset
|
||||
common_hal_mcu_delay_us(30);
|
||||
|
Loading…
Reference in New Issue
Block a user