Merge branch 'adafruit:main' into YD_ESP32_S3

This commit is contained in:
Bill Sideris 2023-04-09 01:32:21 +03:00 committed by GitHub
commit 20f84767dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
118 changed files with 2263 additions and 703 deletions

View File

@ -125,6 +125,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -195,6 +196,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1229,6 +1234,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1236,6 +1242,7 @@ msgid "Invalid %q"
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "%q pada tidak valid"
@ -3856,11 +3863,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3885,14 +3888,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr "parameter harus menjadi register dalam urutan r0 sampai r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4305,10 +4304,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -122,6 +122,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -192,6 +193,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1217,6 +1222,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1224,6 +1230,7 @@ msgid "Invalid %q"
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr ""
@ -3827,11 +3834,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3856,14 +3859,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4276,10 +4275,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -126,6 +126,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -196,6 +197,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1229,6 +1234,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1236,6 +1242,7 @@ msgid "Invalid %q"
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Neplatný pin %q"
@ -3842,11 +3849,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3871,14 +3874,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4291,10 +4290,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -6,8 +6,8 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2023-03-28 14:18+0000\n"
"Last-Translator: Luc <some_physics@live.com>\n"
"PO-Revision-Date: 2023-03-31 14:39+0000\n"
"Last-Translator: Ettore Atalan <atalanttore@googlemail.com>\n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -134,6 +134,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr "%q in %q muss von Typ %q sein, nicht %q"
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -205,6 +206,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr "%q muss ein Array vom Typ 'H' sein"
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1253,6 +1258,7 @@ msgstr "Der Interne WatchDog Timer ist abgelaufen."
msgid "Interrupt error."
msgstr "Interrupt Fehler."
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1260,6 +1266,7 @@ msgid "Invalid %q"
msgstr "Ungültiger %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Ungültiger %q Pin"
@ -1305,7 +1312,7 @@ msgstr "Ungültige data_pins[%d]"
#: shared-module/msgpack/__init__.c
msgid "Invalid format"
msgstr ""
msgstr "Ungültiges Format"
#: shared-module/audiocore/WaveFile.c
msgid "Invalid format chunk size"
@ -3927,11 +3934,7 @@ msgstr "Ausgabe-Array ist zu klein"
msgid "out must be a float dense array"
msgstr "Ausgabe muss ein floatdichtes Array sein"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "Außerhalb des Bereichs der Quelle"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr "Außerhalb des Bereichs des Ziels"
@ -3956,14 +3959,10 @@ msgstr "Die Parameter müssen Register der Reihenfolge a2 bis a5 sein"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "Parameter müssen Register im Bereich von r0 bis r3 sein"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "Pixelkoordinaten außerhalb der Grenzen"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr "Der Pixelwert erfordert zu viele Bits"
#: 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"
@ -4378,10 +4377,6 @@ msgstr "Wert muss in %d Byte(s) passen"
msgid "value out of range of target"
msgstr "Wert außerhalb des Zielbereiches"
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "value_count muss größer als 0 sein"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "watchdog nicht initialisiert"
@ -4469,6 +4464,15 @@ msgstr "zi muss eine Gleitkommazahl sein"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi muss die Form (n_section, 2) haben"
#~ msgid "out of range of source"
#~ msgstr "Außerhalb des Bereichs der Quelle"
#~ msgid "pixel value requires too many bits"
#~ msgstr "Der Pixelwert erfordert zu viele Bits"
#~ msgid "value_count must be > 0"
#~ msgstr "value_count muss größer als 0 sein"
#~ msgid "64 bit types"
#~ msgstr "64 bit-Typen"

View File

@ -130,6 +130,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -200,6 +201,10 @@ msgstr "%q πρέπει να είναι bytearray ή array τύπου 'h', 'H',
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1237,6 +1242,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1244,6 +1250,7 @@ msgid "Invalid %q"
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr ""
@ -3849,11 +3856,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3878,14 +3881,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4298,10 +4297,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -129,6 +129,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -199,6 +200,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1230,6 +1235,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1237,6 +1243,7 @@ msgid "Invalid %q"
msgstr "Invalid %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Invalid %q pin"
@ -3853,11 +3860,7 @@ msgstr "out array is too small"
msgid "out must be a float dense array"
msgstr "out must be a float dense array"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "out of range of source"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr "out of range of target"
@ -3882,14 +3885,10 @@ msgstr "parameters must be registers in sequence a2 to a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "parameters must be registers in sequence r0 to r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "pixel coordinates out of bounds"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr "pixel value requires too many bits"
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader must be displayio.Palette or displayio.ColorConverter"
@ -4302,10 +4301,6 @@ msgstr "value must fit in %d byte(s)"
msgid "value out of range of target"
msgstr "value out of range of target"
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "value_count must be > 0"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "WatchDog not initialised"
@ -4393,6 +4388,15 @@ msgstr "zi must be of float type"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi must be of shape (n_section, 2)"
#~ msgid "out of range of source"
#~ msgstr "out of range of source"
#~ msgid "pixel value requires too many bits"
#~ msgstr "pixel value requires too many bits"
#~ msgid "value_count must be > 0"
#~ msgstr "value_count must be > 0"
#~ msgid "64 bit types"
#~ msgstr "64 bit types"

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2023-03-25 02:42+0000\n"
"PO-Revision-Date: 2023-04-07 00:49+0000\n"
"Last-Translator: Jose David M <jquintana202020@gmail.com>\n"
"Language-Team: \n"
"Language: es\n"
@ -137,6 +137,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr "%q en %q debe ser del tipo %q, no %q"
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -207,6 +208,10 @@ msgstr "%q debe ser un byte-matriz o matriz de tipo 'h', 'H', 'b', o 'B'"
msgid "%q must be array of type 'H'"
msgstr "%q debe ser un arreglo de tipo 'H'"
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr "%q debe ser una matriz de tipo 'h'"
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1263,6 +1268,7 @@ msgstr "El temporizador interno watchdog terminó."
msgid "Interrupt error."
msgstr "Error de interrupción."
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1270,6 +1276,7 @@ msgid "Invalid %q"
msgstr "%q inválido"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Pin %q inválido"
@ -1315,7 +1322,7 @@ msgstr "Inválidos los data_pins[%d]"
#: shared-module/msgpack/__init__.c
msgid "Invalid format"
msgstr ""
msgstr "Formato inválido"
#: shared-module/audiocore/WaveFile.c
msgid "Invalid format chunk size"
@ -3925,11 +3932,7 @@ msgstr "La matriz de salida es demasiado pequeña"
msgid "out must be a float dense array"
msgstr "la matriz de salida debe ser densa de números float"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "fuera de rango de fuente"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr "fuera de rango del objetivo"
@ -3954,14 +3957,10 @@ msgstr "los parámetros deben ser registros en secuencia de a2 a a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "los parametros deben ser registros en secuencia del r0 al r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "coordenadas del pixel fuera de límites"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr "valor del pixel require demasiado bits"
#: 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"
@ -4375,10 +4374,6 @@ msgstr "el valor debe caber en %d byte(s)"
msgid "value out of range of target"
msgstr "valor fuera de alcance al blanco"
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "value_count debe ser > 0"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "watchdog no inicializado"
@ -4466,6 +4461,15 @@ msgstr "zi debe ser de tipo flotante"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi debe ser una forma (n_section,2)"
#~ msgid "out of range of source"
#~ msgstr "fuera de rango de fuente"
#~ msgid "pixel value requires too many bits"
#~ msgstr "valor del pixel require demasiado bits"
#~ msgid "value_count must be > 0"
#~ msgstr "value_count debe ser > 0"
#~ msgid "64 bit types"
#~ msgstr "tipos de 64 bit"

View File

@ -123,6 +123,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -193,6 +194,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1229,6 +1234,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1236,6 +1242,7 @@ msgid "Invalid %q"
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Mali ang %q pin"
@ -3862,11 +3869,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3891,15 +3894,11 @@ msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence a2 hanggang a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence r0 hanggang r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
#, fuzzy
msgid "pixel coordinates out of bounds"
msgstr "wala sa sakop ang address"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: 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"
@ -4312,10 +4311,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -134,6 +134,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr "%q dans %q doit être de type %q, pas %q"
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -204,6 +205,10 @@ msgstr "%q doit être a bytearray ou array de type 'h', 'H', 'b', ou 'B'"
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1269,6 +1274,7 @@ msgstr "Le minuteur du watchdog interne a expiré."
msgid "Interrupt error."
msgstr "Erreur d'interruption."
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1276,6 +1282,7 @@ msgid "Invalid %q"
msgstr "%q invalide"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Broche invalide pour '%q'"
@ -3943,11 +3950,7 @@ msgstr "matrice de sortie est trop petite"
msgid "out must be a float dense array"
msgstr "la matrice sortante doit être de type float"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "dépassement des bornes de source"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr "dépassement des bornes de target"
@ -3972,14 +3975,10 @@ msgstr "les paramètres doivent être des registres dans la séquence a2 à a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "les paramètres doivent être des registres dans la séquence r0 à r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "coordonnées de pixel hors limites"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr "la valeur du pixel requiet trop de bits"
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4394,10 +4393,6 @@ msgstr "la valeur doit tenir dans %d octet(s)"
msgid "value out of range of target"
msgstr "valeur hors de porté de la cible"
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "'value_count' doit être > 0"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "chien de garde (watchdog) non initialisé"
@ -4485,6 +4480,15 @@ msgstr "zi doit être de type float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi doit être de forme (n_section, 2)"
#~ msgid "out of range of source"
#~ msgstr "dépassement des bornes de source"
#~ msgid "pixel value requires too many bits"
#~ msgstr "la valeur du pixel requiet trop de bits"
#~ msgid "value_count must be > 0"
#~ msgstr "'value_count' doit être > 0"
#~ msgid "64 bit types"
#~ msgstr "types à 64 bit"

View File

@ -122,6 +122,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -192,6 +193,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1217,6 +1222,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1224,6 +1230,7 @@ msgid "Invalid %q"
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr ""
@ -3827,11 +3834,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3856,14 +3859,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4276,10 +4275,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -126,6 +126,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -196,6 +197,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1231,6 +1236,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1238,6 +1244,7 @@ msgid "Invalid %q"
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Pin %q non valido"
@ -3871,11 +3878,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3901,15 +3904,11 @@ msgstr "parametri devono essere i registri in sequenza da a2 a a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "parametri devono essere i registri in sequenza da a2 a a5"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
#, fuzzy
msgid "pixel coordinates out of bounds"
msgstr "indirizzo fuori limite"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: 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"
@ -4322,10 +4321,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -129,6 +129,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -199,6 +200,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1230,6 +1235,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1237,6 +1243,7 @@ msgid "Invalid %q"
msgstr "不正な %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "不正な%qピン"
@ -3849,11 +3856,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "ソースが範囲外"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3878,14 +3881,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4300,10 +4299,6 @@ msgstr "値は%dバイトに収まらなければなりません"
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "value_countは0より大きくなければなりません"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
@ -4391,6 +4386,12 @@ msgstr "ziはfloat値でなければなりません"
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "out of range of source"
#~ msgstr "ソースが範囲外"
#~ msgid "value_count must be > 0"
#~ msgstr "value_countは0より大きくなければなりません"
#~ msgid "No key was specified"
#~ msgstr "キーが指定されていません"

View File

@ -123,6 +123,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -193,6 +194,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1220,6 +1225,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1227,6 +1233,7 @@ msgid "Invalid %q"
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr ""
@ -3831,11 +3838,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3860,14 +3863,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4280,10 +4279,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -122,6 +122,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -192,6 +193,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1225,6 +1230,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1232,6 +1238,7 @@ msgid "Invalid %q"
msgstr "Ongeldige %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Ongeldige %q pin"
@ -3861,11 +3868,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "buiten bereik van bron"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr "buiten bereik van doel"
@ -3890,14 +3893,10 @@ msgstr "parameters moeten registers zijn in de volgorde a2 tot a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "parameters moeten registers zijn in de volgorde r0 tot r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "pixel coördinaten buiten bereik"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr "pixel waarde vereist te veel bits"
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader moet displayio.Palette of displayio.ColorConverter zijn"
@ -4310,10 +4309,6 @@ msgstr "waarde moet in %d byte(s) passen"
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "value_count moet groter dan 0 zijn"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "watchdog niet geïnitialiseerd"
@ -4401,6 +4396,15 @@ msgstr "zi moet van type float zijn"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi moet vorm (n_section, 2) hebben"
#~ msgid "out of range of source"
#~ msgstr "buiten bereik van bron"
#~ msgid "pixel value requires too many bits"
#~ msgstr "pixel waarde vereist te veel bits"
#~ msgid "value_count must be > 0"
#~ msgstr "value_count moet groter dan 0 zijn"
#~ msgid "No key was specified"
#~ msgstr "Een sleutel was niet gespecificeerd"

View File

@ -124,6 +124,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -194,6 +195,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1225,6 +1230,7 @@ msgstr ""
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1232,6 +1238,7 @@ msgid "Invalid %q"
msgstr "Nieprawidłowe %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Zła nóżka %q"
@ -3836,11 +3843,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3865,14 +3868,10 @@ msgstr "parametry muszą być rejestrami w kolejności a2 do a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "parametry muszą być rejestrami w kolejności r0 do r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "współrzędne piksela poza zakresem"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr "wartość piksela wymaga zbyt wielu bitów"
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4286,10 +4285,6 @@ msgstr "wartość musi mieścić się w %d bajtach"
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "value_count musi być > 0"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""
@ -4377,6 +4372,12 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
#~ msgid "pixel value requires too many bits"
#~ msgstr "wartość piksela wymaga zbyt wielu bitów"
#~ msgid "value_count must be > 0"
#~ msgstr "value_count musi być > 0"
#~ msgid "No key was specified"
#~ msgstr "Nie określono klucza"

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2023-03-25 02:42+0000\n"
"PO-Revision-Date: 2023-04-07 00:49+0000\n"
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
"Language-Team: \n"
"Language: pt_BR\n"
@ -135,6 +135,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr "%q em %q deve ser do tipo %q e não %q"
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -205,6 +206,10 @@ msgstr "%q deve ser um bytearray ou uma matriz do tipo 'h', 'H', 'b', ou 'B'"
msgid "%q must be array of type 'H'"
msgstr "%q deve ser uma matriz do tipo 'H'"
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr "%q deve ser uma matriz do tipo 'h'"
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1259,6 +1264,7 @@ msgstr "O temporizador do watchdog interno expirou."
msgid "Interrupt error."
msgstr "Erro de interrupção."
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1266,6 +1272,7 @@ msgid "Invalid %q"
msgstr "%q Inválido"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Pino do %q inválido"
@ -1311,7 +1318,7 @@ msgstr "data_pins[%d] inválido"
#: shared-module/msgpack/__init__.c
msgid "Invalid format"
msgstr ""
msgstr "Formato inválido"
#: shared-module/audiocore/WaveFile.c
msgid "Invalid format chunk size"
@ -3924,11 +3931,7 @@ msgstr "a matriz externa é muito pequena"
msgid "out must be a float dense array"
msgstr "deve ser uma matriz densa flutuante"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "fora do alcance da fonte"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr "fora do alcance do alvo"
@ -3955,14 +3958,10 @@ msgstr "os parâmetros devem ser registradores na sequência a2 até a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "os parâmetros devem ser registradores na sequência r0 até r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "as coordenadas do pixel estão fora dos limites"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr "o valor do pixel requer bits demais"
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "o pixel_shader deve ser displayio.Palette ou displayio.ColorConverter"
@ -4375,10 +4374,6 @@ msgstr "o valor deve caber em %d byte(s)"
msgid "value out of range of target"
msgstr "valor fora do alcance do alvo"
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "o value_count deve ser > 0"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "o watchdog não foi inicializado"
@ -4466,6 +4461,15 @@ msgstr "zi deve ser de um tipo float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi deve estar na forma (n_section, 2)"
#~ msgid "out of range of source"
#~ msgstr "fora do alcance da fonte"
#~ msgid "pixel value requires too many bits"
#~ msgstr "o valor do pixel requer bits demais"
#~ msgid "value_count must be > 0"
#~ msgstr "o value_count deve ser > 0"
#~ msgid "64 bit types"
#~ msgstr "Tipos 64 bit"

View File

@ -129,6 +129,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -199,6 +200,10 @@ msgstr "%q должно быть bytearray или array типа 'h', 'H', 'b',
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1262,6 +1267,7 @@ msgstr "Внутренний сторожевой таймер истек."
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1269,6 +1275,7 @@ msgid "Invalid %q"
msgstr "Недопустимый %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Недопустимый пин %q"
@ -3890,11 +3897,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3919,14 +3922,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4339,10 +4338,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
"PO-Revision-Date: 2023-03-25 02:42+0000\n"
"PO-Revision-Date: 2023-04-07 00:49+0000\n"
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: sv\n"
@ -134,6 +134,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr "%q i %q måste vara av typen %q, inte %q"
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -206,6 +207,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr "%q måste vara en array av typen 'H'"
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr "%q måste vara en matris av typen 'h'"
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1244,6 +1249,7 @@ msgstr "Intern watchdog-timer har löpt ut."
msgid "Interrupt error."
msgstr "Interrupt-fel."
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1251,6 +1257,7 @@ msgid "Invalid %q"
msgstr "Ogiltig %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Ogiltig %q-pinne"
@ -1296,7 +1303,7 @@ msgstr "Ogiltig data_pins[%d]"
#: shared-module/msgpack/__init__.c
msgid "Invalid format"
msgstr ""
msgstr "Ogiltigt format"
#: shared-module/audiocore/WaveFile.c
msgid "Invalid format chunk size"
@ -3887,11 +3894,7 @@ msgstr "matrisen för out är för liten"
msgid "out must be a float dense array"
msgstr "out måste vara en float dense array"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "utanför räckvidd för source"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr "utanför räckvidd för target"
@ -3916,14 +3919,10 @@ msgstr "parametrarna måste registreras i följd a2-a5"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "parametrarna måste registreras i följd r0-r3"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "pixelkoordinater utanför gränserna"
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr "pixelvärdet kräver för många bitar"
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4337,10 +4336,6 @@ msgstr "värdet måste passa i %d byte(s)"
msgid "value out of range of target"
msgstr "värde utanför målintervall"
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "value_count måste vara > 0"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "watchdog är inte initierad"
@ -4428,6 +4423,15 @@ msgstr "zi måste vara av typ float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi måste vara i formen (n_section, 2)"
#~ msgid "out of range of source"
#~ msgstr "utanför räckvidd för source"
#~ msgid "pixel value requires too many bits"
#~ msgstr "pixelvärdet kräver för många bitar"
#~ msgid "value_count must be > 0"
#~ msgstr "value_count måste vara > 0"
#~ msgid "64 bit types"
#~ msgstr "64-bitars typer"

View File

@ -130,6 +130,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr ""
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -200,6 +201,10 @@ msgstr "%q 'h', 'H', 'b' ya da 'B' tipi bir bytearray ya da array olmalı"
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1235,6 +1240,7 @@ msgstr "Dahili bekçi zamanlayıcısının süresi doldu."
msgid "Interrupt error."
msgstr ""
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1242,6 +1248,7 @@ msgid "Invalid %q"
msgstr "Geçersiz %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Geersi %q pin"
@ -3849,11 +3856,7 @@ msgstr ""
msgid "out must be a float dense array"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr ""
@ -3878,14 +3881,10 @@ msgstr ""
msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "pixel value requires too many bits"
msgstr ""
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
@ -4298,10 +4297,6 @@ msgstr ""
msgid "value out of range of target"
msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr ""
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr ""

View File

@ -137,6 +137,7 @@ msgid "%q in %q must be of type %q, not %q"
msgstr "%q zhōng de %q bì xū shì %q lèi xíng, ér bù shì %q"
#: ports/espressif/common-hal/espulp/ULP.c
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/microcontroller/Pin.c
@ -208,6 +209,10 @@ msgstr ""
msgid "%q must be array of type 'H'"
msgstr "%q bì xū shì lèi xíng wéi 'H' de shù zǔ"
#: shared-bindings/synthio/MidiTrack.c shared-bindings/synthio/__init__.c
msgid "%q must be array of type 'h'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q"
@ -1251,6 +1256,7 @@ msgstr "Nèibù kān mén gǒu dìngshí qì chāoshí."
msgid "Interrupt error."
msgstr "zhōng duàn cuò wù."
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c
@ -1258,6 +1264,7 @@ msgid "Invalid %q"
msgstr "wú xiào %q"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
#: ports/mimxrt10xx/common-hal/microcontroller/Pin.c
#: shared-bindings/microcontroller/Pin.c
msgid "Invalid %q pin"
msgstr "Wúxiào de %q yǐn jiǎo"
@ -3891,11 +3898,7 @@ msgstr "chū zhèn liè tài xiǎo"
msgid "out must be a float dense array"
msgstr "chū bì xū shì yí gè fú dòng mì jí zhèn liè"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
msgstr "yuán fàn wéi wài"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "out of range of target"
msgstr "mù biāo fàn wéi wài"
@ -3920,14 +3923,10 @@ msgstr "cānshù bìxū shì xùliè a2 zhì a5 de dēngjì shù"
msgid "parameters must be registers in sequence r0 to r3"
msgstr "cānshù bìxū shì xùliè r0 zhì r3 de dēngjì qì"
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
#: shared-bindings/bitmaptools/__init__.c
msgid "pixel coordinates out of bounds"
msgstr "xiàngsù zuòbiāo chāochū biānjiè"
#: shared-bindings/displayio/Bitmap.c
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/vectorio/VectorShape.c
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader bìxū shì displayio.Palette huò displayio.ColorConverter"
@ -4343,10 +4342,6 @@ msgstr "Zhí bìxū fúhé %d zì jié"
msgid "value out of range of target"
msgstr "zhí fàn wéi wài de mù biāo"
#: shared-bindings/displayio/Bitmap.c
msgid "value_count must be > 0"
msgstr "zhí jìshù bìxū wèi > 0"
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
msgstr "wèi chū shǐ huà jiān shì qì"
@ -4434,6 +4429,15 @@ msgstr "zi bìxū wèi fú diǎn xíng"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)"
#~ msgid "out of range of source"
#~ msgstr "yuán fàn wéi wài"
#~ msgid "pixel value requires too many bits"
#~ msgstr "xiàngsù zhí xūyào tài duō wèi"
#~ msgid "value_count must be > 0"
#~ msgstr "zhí jìshù bìxū wèi > 0"
#~ msgid "64 bit types"
#~ msgstr "64 wèi lèixíng"

View File

@ -42,18 +42,18 @@
// PB03 is physical pin "SCL" on the Metro M4 express
// so you can't use this code AND an i2c peripheral
// at the same time unless you change this
void port_start_background_task(void) {
void port_start_background_tick(void) {
REG_PORT_DIRSET1 = (1 << 3);
REG_PORT_OUTSET1 = (1 << 3);
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
REG_PORT_OUTCLR1 = (1 << 3);
}
#else
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}
#endif

View File

@ -44,6 +44,8 @@ CIRCUITPY_AUDIOIO = 1
CIRCUITPY_AUDIOMIXER = 1
CIRCUITPY_DISPLAYIO = 1
CIRCUITPY_KEYPAD = 1
CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS = 0
CIRCUITPY_KEYPAD_KEYMATRIX = 0
CIRCUITPY_MATH = 1
CIRCUITPY_STAGE = 1
CIRCUITPY_SYNTHIO = 1

View File

@ -156,7 +156,7 @@ void frequencyin_interrupt_handler(uint8_t index) {
}
// Check if we've reached the upper limit of detection
if (!supervisor_background_tasks_ok() || self->errored_too_fast) {
if (!supervisor_background_ticks_ok() || self->errored_too_fast) {
self->errored_too_fast = true;
frequencyin_emergency_cancel_capture(i);
}

View File

@ -100,11 +100,12 @@ endif
CIRCUITPY_ALARM ?= 1
CIRCUITPY_PS2IO ?= 1
CIRCUITPY_SAMD ?= 1
CIRCUITPY_FLOPPYIO ?= $(CIRCUITPY_FULL_BUILD)
CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD)
CIRCUITPY_PS2IO ?= 1
CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FRAMEBUFFERIO)
CIRCUITPY_SAMD ?= 1
CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12
CIRCUITPY_WATCHDOG ?= 1
endif # samd51

View File

@ -28,9 +28,9 @@
#include "py/runtime.h"
#include "supervisor/port.h"
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}
void port_background_tick(void) {

View File

@ -34,7 +34,7 @@ void port_background_tick(void) {
}
void port_background_task(void) {
}
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}

View File

@ -51,8 +51,8 @@ void port_background_tick(void) {
void port_background_task(void) {
}
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}

View File

@ -1,4 +1,4 @@
USB_VID = 0x239A
USB_VID = 0x303A
USB_PID = 0x8148
USB_PRODUCT = "Deneyap Kart 1A v2"

View File

@ -41,7 +41,7 @@ CONFIG_SPIRAM_MEMTEST=y
#
# LWIP
#
CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3"
CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapKart1A_v2"
# end of LWIP
# end of Component config

13
ports/espressif/boards/m5stack_stick_c/axp192.h Normal file → Executable file
View File

@ -144,21 +144,28 @@
#define AXP192_BATT_TEMP_HIGH_THRESH 0x39
#define AXP192_BATT_TEMP_HIGH_THRESH_DEFAULT 0b11111100
#define AXP192_APS_LOW_BATT_LEVEL_1 0x3A
#define AXP192_APS_LOW_BATT_LEVEL_2 0x3B
#define AXP192_APS_LOW_BATT_VOLTAGE_3_695V 0b10010100
#define AXP192_APS_LOW_BATT_VOLTAGE_3_600V 0b10000011
#define AXP192_IRQ_1_ENABLE 0x40
#define AXP192_IRQ_2_ENABLE 0x41
#define AXP192_IRQ_3_ENABLE 0x42
#define AXP192_IRQ_3_PEK_SHORT_PRESS 0b00000010
#define AXP192_IRQ_3_PEK_LONG_PRESS 0b00000001
#define AXP192_IRQ_4_ENABLE 0x43
#define AXP192_IRQ_4_LOW_VOLTAGE_WARNING 0b00000001
#define AXP192_IRQ_5_ENABLE 0x4a
#define AXP192_IRQ_X_DISABLE_ALL 0b00000000
#define AXP192_IRQ_1_STATUS 0x44
#define AXP192_IRQ_2_STATUS 0x45
#define AXP192_IRQ_3_STATUS 0x46
#define AXP192_IRQ_4_STATUS 0x47
#define AXP192_IRQ_5_STATUS 0x4d
#define AXP192_IRQ_3_PEK_SHORT_PRESS 0b00000010
#define AXP192_IRQ_3_PEK_LONG_PRESS 0b00000001
#define AXP192_ADC_ACIN_VOLTAGE_H 0x56
#define AXP192_ADC_ACIN_VOLTAGE_L 0x57
#define AXP192_ADC_ACIN_CURRENT_H 0x58

80
ports/espressif/boards/m5stack_stick_c/board.c Normal file → Executable file
View File

@ -127,6 +127,24 @@ static bool pmic_init(void) {
return false;
}
// Reg: 3Ah
// APS Low battery warning level 1: 3.695V
write_buf[0] = AXP192_APS_LOW_BATT_LEVEL_1;
write_buf[1] = AXP192_APS_LOW_BATT_VOLTAGE_3_695V;
rc = common_hal_busio_i2c_write(internal_i2c, AXP192_I2C_ADDRESS, write_buf, sizeof(write_buf));
if (rc != 0) {
return false;
}
// Reg: 3Bh
// APS Low battery warning level 2: 3.600V
write_buf[0] = AXP192_APS_LOW_BATT_LEVEL_2;
write_buf[1] = AXP192_APS_LOW_BATT_VOLTAGE_3_600V;
rc = common_hal_busio_i2c_write(internal_i2c, AXP192_I2C_ADDRESS, write_buf, sizeof(write_buf));
if (rc != 0) {
return false;
}
// Reg: 82h
// ADC all on
write_buf[0] = AXP192_ADC_ENABLE_1;
@ -204,7 +222,7 @@ static bool pmic_init(void) {
return false;
}
// Reg: 28h
// Reg: 26h
// DCDC1 (ESP32 VDD): 3.350V
write_buf[0] = AXP192_DCDC1_OUT_VOLTAGE;
write_buf[1] = AXP192_DCDC1_OUT_VOLTAGE_3_350V;
@ -213,6 +231,54 @@ static bool pmic_init(void) {
return false;
}
// Reg: 40h
// IRQ enable control register 1
write_buf[0] = AXP192_IRQ_1_ENABLE;
write_buf[1] = AXP192_IRQ_X_DISABLE_ALL;
rc = common_hal_busio_i2c_write(internal_i2c, AXP192_I2C_ADDRESS, write_buf, sizeof(write_buf));
if (rc != 0) {
return false;
}
// Reg: 41h
// IRQ enable control register 2
write_buf[0] = AXP192_IRQ_2_ENABLE;
write_buf[1] = AXP192_IRQ_X_DISABLE_ALL;
rc = common_hal_busio_i2c_write(internal_i2c, AXP192_I2C_ADDRESS, write_buf, sizeof(write_buf));
if (rc != 0) {
return false;
}
// Reg: 42h
// IRQ enable control register 3
// Enable power on key short and long press interrupt
write_buf[0] = AXP192_IRQ_2_ENABLE;
write_buf[1] = AXP192_IRQ_3_PEK_SHORT_PRESS |
AXP192_IRQ_3_PEK_LONG_PRESS;
rc = common_hal_busio_i2c_write(internal_i2c, AXP192_I2C_ADDRESS, write_buf, sizeof(write_buf));
if (rc != 0) {
return false;
}
// Reg: 43h
// IRQ enable control register 4
// Enable power on key short and long press interrupt
write_buf[0] = AXP192_IRQ_2_ENABLE;
write_buf[1] = AXP192_IRQ_4_LOW_VOLTAGE_WARNING;
rc = common_hal_busio_i2c_write(internal_i2c, AXP192_I2C_ADDRESS, write_buf, sizeof(write_buf));
if (rc != 0) {
return false;
}
// Reg: 44h
// IRQ enable control register 5
write_buf[0] = AXP192_IRQ_2_ENABLE;
write_buf[1] = AXP192_IRQ_X_DISABLE_ALL;
rc = common_hal_busio_i2c_write(internal_i2c, AXP192_I2C_ADDRESS, write_buf, sizeof(write_buf));
if (rc != 0) {
return false;
}
return true;
}
@ -279,7 +345,17 @@ void board_init(void) {
}
if (!display_init()) {
mp_printf(&mp_plat_print, "could not initialize ili9342c LCD");
mp_printf(&mp_plat_print, "could not initialize the display");
return;
}
}
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
// Set IR led gpio high to prevent power drain from the led
if (pin_number == 9) {
gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT);
gpio_set_level(pin_number, true);
return true;
}
return false;
}

View File

@ -30,6 +30,7 @@
#define MICROPY_HW_MCU_NAME "ESP32"
#define MICROPY_HW_LED_STATUS (&pin_GPIO10)
#define MICROPY_HW_LED_STATUS_INVERTED (1)
#define CIRCUITPY_BOARD_I2C (2)
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO22, .sda = &pin_GPIO21}, \

View File

@ -37,6 +37,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
// internal devices interrupt
{ MP_ROM_QSTR(MP_QSTR_SYS_INT), MP_ROM_PTR(&pin_GPIO35) },
// pmu AXP192
{ MP_ROM_QSTR(MP_QSTR_PMU_N_VBUSEN), MP_ROM_PTR(&pin_GPIO27) },
// pdm microphone
{ MP_ROM_QSTR(MP_QSTR_PDM_MIC_CLK), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_PDM_MIC_DATA), MP_ROM_PTR(&pin_GPIO34) },

View File

@ -64,7 +64,7 @@ float common_hal_mcu_processor_get_voltage(void) {
uint32_t common_hal_mcu_processor_get_frequency(void) {
#if defined(CONFIG_IDF_TARGET_ESP32)
return CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 100000;
return CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000;
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
return CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ * 1000000;
#elif defined(CONFIG_IDF_TARGET_ESP32S2)

View File

@ -45,70 +45,79 @@
StackType_t socket_select_stack[2 * configMINIMAL_STACK_SIZE];
STATIC int open_socket_fds[CONFIG_LWIP_MAX_SOCKETS];
/* Socket state table:
* 0 := Closed (unused)
* 1 := Open
* 2 := Closing (remove from rfds)
* Index into socket_fd_state is calculated from actual lwip fd. idx := fd - LWIP_SOCKET_OFFSET
*/
#define FDSTATE_CLOSED 0
#define FDSTATE_OPEN 1
#define FDSTATE_CLOSING 2
STATIC uint8_t socket_fd_state[CONFIG_LWIP_MAX_SOCKETS];
STATIC socketpool_socket_obj_t *user_socket[CONFIG_LWIP_MAX_SOCKETS];
StaticTask_t socket_select_task_handle;
StaticTask_t socket_select_task_buffer;
TaskHandle_t socket_select_task_handle;
STATIC int socket_change_fd = -1;
STATIC void socket_select_task(void *arg) {
uint64_t signal;
fd_set readfds;
fd_set excptfds;
while (true) {
fd_set readfds;
fd_set errfds;
FD_ZERO(&readfds);
FD_ZERO(&errfds);
FD_ZERO(&excptfds);
FD_SET(socket_change_fd, &readfds);
FD_SET(socket_change_fd, &errfds);
int max_fd = socket_change_fd;
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_fds); i++) {
int sockfd = open_socket_fds[i];
if (sockfd < 0) {
continue;
for (size_t i = 0; i < MP_ARRAY_SIZE(socket_fd_state); i++) {
if ((socket_fd_state[i] == FDSTATE_OPEN) && (user_socket[i] == NULL)) {
int sockfd = i + LWIP_SOCKET_OFFSET;
max_fd = MAX(max_fd, sockfd);
FD_SET(sockfd, &readfds);
FD_SET(sockfd, &excptfds);
}
max_fd = MAX(max_fd, sockfd);
FD_SET(sockfd, &readfds);
FD_SET(sockfd, &errfds);
}
int num_triggered = select(max_fd + 1, &readfds, NULL, &errfds, NULL);
// Check for bad file descriptor and queue up the background task before
// circling around.
if (num_triggered == -1 && errno == EBADF) {
// One for the change fd and one for the closed socket.
num_triggered = 2;
int num_triggered = select(max_fd + 1, &readfds, NULL, &excptfds, NULL);
// Hard error (or someone closed a socket on another thread)
if (num_triggered == -1) {
assert(errno == EBADF);
continue;
}
// Try and find the bad file and remove it from monitoring.
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_fds); i++) {
int sockfd = open_socket_fds[i];
if (sockfd < 0) {
continue;
}
int err;
int optlen = sizeof(int);
int ret = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &err, (socklen_t *)&optlen);
if (ret < 0) {
open_socket_fds[i] = -1;
// Raise num_triggered so that we skip the assert and queue the background task.
num_triggered = 2;
}
}
assert(num_triggered >= 0);
assert(num_triggered > 0);
assert(!FD_ISSET(socket_change_fd, &excptfds));
// Notice event trigger
if (FD_ISSET(socket_change_fd, &readfds)) {
read(socket_change_fd, &signal, sizeof(signal));
num_triggered -= 1;
num_triggered--;
}
// Handle active FDs, close the dead ones
for (size_t i = 0; i < MP_ARRAY_SIZE(socket_fd_state); i++) {
int sockfd = i + LWIP_SOCKET_OFFSET;
if (socket_fd_state[i] != FDSTATE_CLOSED) {
if (FD_ISSET(sockfd, &readfds) || FD_ISSET(sockfd, &excptfds)) {
if (socket_fd_state[i] == FDSTATE_CLOSING) {
socket_fd_state[i] = FDSTATE_CLOSED;
num_triggered--;
}
}
}
}
if (num_triggered > 0) {
// Wake up CircuitPython by queuing request
supervisor_workflow_request_background();
// Wake up CircuitPython. We know it is asleep because we are lower
// priority.
port_wake_main_task();
ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
}
}
close(socket_change_fd);
socket_change_fd = -1;
vTaskDelete(NULL);
}
@ -117,75 +126,62 @@ void socket_user_reset(void) {
esp_vfs_eventfd_config_t config = ESP_VFS_EVENTD_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_vfs_eventfd_register(&config));
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_fds); i++) {
open_socket_fds[i] = -1;
// Clear initial socket states
for (size_t i = 0; i < MP_ARRAY_SIZE(socket_fd_state); i++) {
socket_fd_state[i] = FDSTATE_CLOSED;
user_socket[i] = NULL;
}
socket_change_fd = eventfd(0, 0);
// Run this at the same priority as CP so that the web workflow background task can be
// queued while CP is running. Both tasks can still sleep and, therefore, sleep overall.
(void)xTaskCreateStaticPinnedToCore(socket_select_task,
socket_select_task_handle = xTaskCreateStaticPinnedToCore(socket_select_task,
"socket_select",
2 * configMINIMAL_STACK_SIZE,
NULL,
uxTaskPriorityGet(NULL),
socket_select_stack,
&socket_select_task_handle,
&socket_select_task_buffer,
xPortGetCoreID());
}
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_fds); i++) {
if (open_socket_fds[i] >= 0 && user_socket[i]) {
common_hal_socketpool_socket_close(user_socket[i]);
int num = open_socket_fds[i];
// Close automatically clears socket handle
lwip_shutdown(num, SHUT_RDWR);
lwip_close(num);
open_socket_fds[i] = -1;
user_socket[i] = NULL;
} else {
// Not init - close open user sockets
for (size_t i = 0; i < MP_ARRAY_SIZE(socket_fd_state); i++) {
if ((socket_fd_state[i] == FDSTATE_OPEN) && user_socket[i]) {
common_hal_socketpool_socket_close(user_socket[i]);
}
}
}
}
// Unblock select task (ok if not blocked yet)
void socketpool_socket_poll_resume(void) {
if (socket_select_task_handle) {
xTaskNotifyGive(socket_select_task_handle);
}
}
// The writes below send an event to the socket select task so that it redoes the
// select with the new open socket set.
STATIC bool register_open_socket(int fd) {
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_fds); i++) {
if (open_socket_fds[i] == -1) {
open_socket_fds[i] = fd;
user_socket[i] = false;
uint64_t signal = 1;
write(socket_change_fd, &signal, sizeof(signal));
return true;
}
if (fd < FD_SETSIZE) {
socket_fd_state[fd - LWIP_SOCKET_OFFSET] = FDSTATE_OPEN;
user_socket[fd - LWIP_SOCKET_OFFSET] = NULL;
uint64_t signal = 1;
write(socket_change_fd, &signal, sizeof(signal));
socketpool_socket_poll_resume();
return true;
}
return false;
}
STATIC void unregister_open_socket(int fd) {
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_fds); i++) {
if (open_socket_fds[i] == fd) {
open_socket_fds[i] = -1;
user_socket[i] = false;
// Write must be 8 bytes for an eventfd.
uint64_t signal = 1;
write(socket_change_fd, &signal, sizeof(signal));
return;
}
}
}
STATIC void mark_user_socket(int fd, socketpool_socket_obj_t *obj) {
for (size_t i = 0; i < MP_ARRAY_SIZE(open_socket_fds); i++) {
if (open_socket_fds[i] == fd) {
user_socket[i] = obj;
return;
}
}
socket_fd_state[fd - LWIP_SOCKET_OFFSET] = FDSTATE_OPEN;
user_socket[fd - LWIP_SOCKET_OFFSET] = obj;
// No need to wakeup select task
}
bool socketpool_socket(socketpool_socketpool_obj_t *self,
STATIC bool _socketpool_socket(socketpool_socketpool_obj_t *self,
socketpool_socketpool_addressfamily_t family, socketpool_socketpool_sock_t type,
socketpool_socket_obj_t *sock) {
int addr_family;
@ -193,9 +189,11 @@ bool socketpool_socket(socketpool_socketpool_obj_t *self,
if (family == SOCKETPOOL_AF_INET) {
addr_family = AF_INET;
ipproto = IPPROTO_IP;
#if LWIP_IPV6
} else { // INET6
addr_family = AF_INET6;
ipproto = IPPROTO_IPV6;
#endif
}
int socket_type;
@ -218,14 +216,28 @@ bool socketpool_socket(socketpool_socketpool_obj_t *self,
if (socknum < 0) {
return false;
}
// This shouldn't happen since we have room for the same number of sockets as LWIP.
if (!register_open_socket(socknum)) {
lwip_close(socknum);
return false;
}
sock->num = socknum;
// Sockets should be nonblocking in most cases
lwip_fcntl(socknum, F_SETFL, O_NONBLOCK);
return true;
}
// special entry for workflow listener (register system socket)
bool socketpool_socket(socketpool_socketpool_obj_t *self,
socketpool_socketpool_addressfamily_t family, socketpool_socketpool_sock_t type,
socketpool_socket_obj_t *sock) {
if (!_socketpool_socket(self, family, type, sock)) {
return false;
}
// This shouldn't happen since we have room for the same number of sockets as LWIP.
if (!register_open_socket(sock->num)) {
lwip_close(sock->num);
return false;
}
return true;
}
@ -238,7 +250,7 @@ socketpool_socket_obj_t *common_hal_socketpool_socket(socketpool_socketpool_obj_
socketpool_socket_obj_t *sock = m_new_obj_with_finaliser(socketpool_socket_obj_t);
sock->base.type = &socketpool_socket_type;
if (!socketpool_socket(self, family, type, sock)) {
if (!_socketpool_socket(self, family, type, sock)) {
mp_raise_RuntimeError(translate("Out of sockets"));
}
mark_user_socket(sock->num, sock);
@ -279,17 +291,16 @@ int socketpool_socket_accept(socketpool_socket_obj_t *self, uint8_t *ip, uint32_
// We got a socket. New client socket will not be non-blocking by default, so make it non-blocking.
lwip_fcntl(newsoc, F_SETFL, O_NONBLOCK);
if (!register_open_socket(newsoc)) {
lwip_close(newsoc);
return -MP_EBADF;
}
if (accepted != NULL) {
// Close the active socket because we have another we accepted.
if (!common_hal_socketpool_socket_get_closed(accepted)) {
common_hal_socketpool_socket_close(accepted);
// Error if called with open socket object.
assert(common_hal_socketpool_socket_get_closed(accepted));
// Register if system socket
if (!register_open_socket(newsoc)) {
lwip_close(newsoc);
return -MP_EBADF;
}
// Replace the old accepted socket with the new one.
accepted->num = newsoc;
accepted->pool = self->pool;
@ -353,12 +364,21 @@ void socketpool_socket_close(socketpool_socket_obj_t *self) {
return;
}
self->connected = false;
if (self->num >= 0) {
lwip_shutdown(self->num, SHUT_RDWR);
lwip_close(self->num);
unregister_open_socket(self->num);
self->num = -1;
int fd = self->num;
// Ignore bogus/closed sockets
if (fd >= LWIP_SOCKET_OFFSET) {
if (user_socket[fd - LWIP_SOCKET_OFFSET] == NULL) {
socket_fd_state[fd - LWIP_SOCKET_OFFSET] = FDSTATE_CLOSING;
lwip_shutdown(fd, SHUT_RDWR);
lwip_close(fd);
} else {
lwip_shutdown(fd, SHUT_RDWR);
lwip_close(fd);
socket_fd_state[fd - LWIP_SOCKET_OFFSET] = FDSTATE_CLOSED;
user_socket[fd - LWIP_SOCKET_OFFSET] = NULL;
}
}
self->num = -1;
}
void common_hal_socketpool_socket_close(socketpool_socket_obj_t *self) {
@ -420,7 +440,7 @@ bool common_hal_socketpool_socket_get_connected(socketpool_socket_obj_t *self) {
}
bool common_hal_socketpool_socket_listen(socketpool_socket_obj_t *self, int backlog) {
return lwip_listen(self->num, backlog);
return lwip_listen(self->num, backlog) == 0;
}
mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t *self,
@ -479,10 +499,9 @@ int socketpool_socket_recv_into(socketpool_socket_obj_t *self,
}
RUN_BACKGROUND_TASKS;
received = lwip_recv(self->num, (void *)buf, len, 0);
// In non-blocking mode, fail instead of looping
if (received == -1 && self->timeout_ms == 0) {
if (errno == ENOTCONN) {
if (received < 1 && self->timeout_ms == 0) {
if ((received == 0) || (errno == ENOTCONN)) {
self->connected = false;
return -MP_ENOTCONN;
}

View File

@ -48,3 +48,5 @@ typedef struct {
} socketpool_socket_obj_t;
void socket_user_reset(void);
// Unblock workflow socket select thread (platform specific)
void socketpool_socket_poll_resume(void);

View File

@ -242,6 +242,10 @@ void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_
esp_wifi_set_config(WIFI_IF_AP, config);
}
bool common_hal_wifi_radio_get_ap_active(wifi_radio_obj_t *self) {
return self->ap_mode && esp_netif_is_netif_up(self->ap_netif);
}
void common_hal_wifi_radio_stop_ap(wifi_radio_obj_t *self) {
set_mode_ap(self, false);
}
@ -347,6 +351,10 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
return WIFI_RADIO_ERROR_NONE;
}
bool common_hal_wifi_radio_get_connected(wifi_radio_obj_t *self) {
return self->sta_mode && esp_netif_is_netif_up(self->netif);
}
mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) {
if (!esp_netif_is_netif_up(self->netif)) {
return mp_const_none;

View File

@ -34,7 +34,7 @@ void port_background_task(void) {
}
void port_background_tick(void) {
}
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}

View File

@ -38,7 +38,6 @@ INC += \
-Iboards/$(BOARD) \
-Iperipherals/ \
-Iperipherals/mimxrt10xx/ \
-Isdk/CMSIS/Include \
-Isdk/devices/$(CHIP_FAMILY) \
-Isdk/devices/$(CHIP_FAMILY)/drivers \
-Isdk/drivers/common

View File

@ -37,8 +37,8 @@ void PLACE_IN_ITCM(port_background_task)(void) {
void port_background_tick(void) {
}
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}

View File

@ -18,6 +18,7 @@ CIRCUITPY_AUDIOIO = 0
CIRCUITPY_AUDIOMIXER = 1
CIRCUITPY_AUDIOMP3 = 1
CIRCUITPY_AUDIOPWMIO = 1
CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12
CIRCUITPY_BUSDEVICE = 1
CIRCUITPY_COUNTIO = 0
CIRCUITPY_FREQUENCYIO = 0

View File

@ -44,10 +44,10 @@
#include "common-hal/audiopwmio/PWMAudioOut.h"
#endif
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}
void port_background_tick(void) {

View File

@ -28,10 +28,10 @@
#include "py/runtime.h"
#include "supervisor/port.h"
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}
void port_background_tick(void) {

View File

@ -0,0 +1,29 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 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 "supervisor/board.h"
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -0,0 +1,14 @@
#define MICROPY_HW_BOARD_NAME "Adafruit Feather RP2040 CAN"
#define MICROPY_HW_MCU_NAME "rp2040"
#define MICROPY_HW_NEOPIXEL (&pin_GPIO21)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2)
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO14)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO15)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO8)
#define DEFAULT_UART_BUS_RX (&pin_GPIO1)
#define DEFAULT_UART_BUS_TX (&pin_GPIO0)

View File

@ -0,0 +1,9 @@
USB_VID = 0x239A
USB_PID = 0x8130
USB_PRODUCT = "Feather RP2040 CAN"
USB_MANUFACTURER = "Adafruit"
CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2
EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ"

View File

@ -0,0 +1,4 @@
// Put board-specific pico-sdk definitions here. This file must exist.
// Allow extra time for xosc to start.
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64

View File

@ -0,0 +1,56 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) },
{ MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) },
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO15) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO20) },
{ MP_ROM_QSTR(MP_QSTR_CAN_STANDBY), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_CAN_TX0_RTS), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_CAN_RESET), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_CAN_CS), MP_ROM_PTR(&pin_GPIO19) },
{ MP_ROM_QSTR(MP_QSTR_CAN_INTERRUPT), MP_ROM_PTR(&pin_GPIO22) },
{ MP_ROM_QSTR(MP_QSTR_CAN_RX0_BF), MP_ROM_PTR(&pin_GPIO23) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

View File

@ -0,0 +1,29 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 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 "supervisor/board.h"
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -0,0 +1,14 @@
#define MICROPY_HW_BOARD_NAME "Adafruit Feather RP2040 USB Host"
#define MICROPY_HW_MCU_NAME "rp2040"
#define MICROPY_HW_NEOPIXEL (&pin_GPIO21)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2)
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO14)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO15)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO8)
#define DEFAULT_UART_BUS_RX (&pin_GPIO1)
#define DEFAULT_UART_BUS_TX (&pin_GPIO0)

View File

@ -0,0 +1,9 @@
USB_VID = 0x239A
USB_PID = 0x812A
USB_PRODUCT = "Feather RP2040 USB Host"
USB_MANUFACTURER = "Adafruit"
CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2
EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ"

View File

@ -0,0 +1,4 @@
// Put board-specific pico-sdk definitions here. This file must exist.
// Allow extra time for xosc to start.
#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64

View File

@ -0,0 +1,53 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) },
{ MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) },
{ MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO15) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) },
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO20) },
{ MP_ROM_QSTR(MP_QSTR_USB_HOST_DATA_PLUS), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_USB_HOST_DATA_MINUS), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_USB_HOST_5V_POWER), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

View File

@ -0,0 +1,129 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 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 "supervisor/board.h"
#include "mpconfigboard.h"
#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
#define DELAY 0x80
// display init sequence according to Adafruit_CircuitPython_ST7735R
// https://github.com/adafruit/Adafruit_CircuitPython_ST7735R
uint8_t display_init_sequence[] = {
// sw reset
0x01, 0 | DELAY, 0x96,
// SLPOUT and Delay
0x11, 0 | DELAY, 0xFF,
0xB1, 0x03, 0x01, 0x2C, 0x2D, // _FRMCTR1
0xB3, 0x06, 0x01, 0x2C, 0x2D, 0x01, 0x2C, 0x2D, // _FRMCTR3
0xB4, 0x01, 0x07, // _INVCTR line inversion
0xC0, 0x03, 0xA2, 0x02, 0x84, // _PWCTR1 GVDD = 4.7V, 1.0uA
0xC1, 0x01, 0xC5, // _PWCTR2 VGH=14.7V, VGL=-7.35V
0xC2, 0x02, 0x0A, 0x00, // _PWCTR3 Opamp current small, Boost frequency
0xC3, 0x02, 0x8A, 0x2A,
0xC4, 0x02, 0x8A, 0xEE,
0xC5, 0x01, 0x0E, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x20, 0x00, // _INVOFF
0x36, 0x01, 0x18, // _MADCTL bottom to top refresh
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie,
// fix on VTL
0x3A, 0x01, 0x05, // COLMOD - 16bit color
0xE0, 0x10, 0x02, 0x1C, 0x07, 0x12, 0x37, 0x32, 0x29, 0x2D, 0x29, 0x25, 0x2B, 0x39, 0x00, 0x01, 0x03, 0x10, // _GMCTRP1 Gamma
0xE1, 0x10, 0x03, 0x1D, 0x07, 0x06, 0x2E, 0x2C, 0x29, 0x2D, 0x2E, 0x2E, 0x37, 0x3F, 0x00, 0x00, 0x02, 0x10, // _GMCTRN1
0x13, 0 | DELAY, 0x0A, // _NORON
0x29, 0 | DELAY, 0x64, // _DISPON
// 0x36, 0x01, 0xC0, // _MADCTL Default rotation plus BGR encoding
0x36, 0x01, 0xC8, // _MADCTL Default rotation plus RGB encoding
0x21, 0x00, // _INVON
};
static void display_init(void) {
busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus;
common_hal_busio_spi_construct(
spi,
&pin_GPIO10, // CLK
&pin_GPIO11, // MOSI
NULL, // MISO not connected
false // Not half-duplex
);
common_hal_busio_spi_never_reset(spi);
displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus;
bus->base.type = &displayio_fourwire_type;
common_hal_displayio_fourwire_construct(
bus,
spi,
&pin_GPIO8, // DC
&pin_GPIO9, // CS
&pin_GPIO12, // RST
40000000, // baudrate
0, // polarity
0 // phase
);
displayio_display_obj_t *display = &displays[0].display;
display->base.type = &displayio_display_type;
common_hal_displayio_display_construct(
display,
bus,
160, // width (after rotation)
80, // height (after rotation)
26, // column start
1, // row start
90, // rotation
16, // color depth
false, // grayscale
false, // pixels in a byte share a row. Only valid for depths < 8
1, // bytes per cell. Only valid for depths < 8
false, // reverse_pixels_in_byte. Only valid for depths < 8
true, // reverse_pixels_in_word
MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command
MIPI_COMMAND_WRITE_MEMORY_START, // write memory command
display_init_sequence,
sizeof(display_init_sequence),
&pin_GPIO25, // backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness
false, // single_byte_bounds
false, // data_as_commands
true, // auto_refresh
60, // native_frames_per_second
true, // backlight_on_high
false, // SH1107_addressing
50000 // backlight pwm frequency
);
}
void board_init(void) {
// Display
display_init();
}
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

View File

@ -0,0 +1,11 @@
#define MICROPY_HW_BOARD_NAME "Waveshare RP2040-LCD-0.96"
#define MICROPY_HW_MCU_NAME "rp2040"
#define CIRCUITPY_BOARD_I2C (1)
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO21, .sda = &pin_GPIO20}}
#define CIRCUITPY_BOARD_SPI (1)
#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO19, .miso = &pin_GPIO16}}
#define CIRCUITPY_BOARD_UART (1)
#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO0, .rx = &pin_GPIO1}}

View File

@ -0,0 +1,11 @@
USB_VID = 0x2E8A
USB_PID = 0x1021
USB_PRODUCT = "Waveshare RP2040-LCD-0.96"
USB_MANUFACTURER = "Waveshare Electronics"
CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2
EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"
CIRCUITPY__EVE = 1

View File

@ -0,0 +1 @@
// Put board-specific pico-sdk definitions here. This file must exist.

View File

@ -0,0 +1,57 @@
#include "shared-bindings/board/__init__.h"
#include "shared-module/displayio/__init__.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
{ MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) },
{ MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) },
{ MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) },
{ MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) },
{ MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) },
{ MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) },
{ MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) },
{ MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) },
{ MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) },
{ MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) },
{ MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) },
{ MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) },
// ADC
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) },
{ MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) },
{ MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) },
{ MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) },
// 0.96 inch LCD ST7735s
{ MP_ROM_QSTR(MP_QSTR_LCD_DC), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO9) },
{ MP_ROM_QSTR(MP_QSTR_LCD_CLK), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_LCD_DIN), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_LCD_BL), MP_ROM_PTR(&pin_GPIO25) },
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) },
// Power pins
{ MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_GPIO23) },
{ MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) },
{ MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

View File

@ -706,8 +706,6 @@ bool socketpool_socket(socketpool_socketpool_obj_t *self,
case MOD_NETWORK_SOCK_STREAM: {
// Register the socket object as our callback argument.
tcp_arg(socket->pcb.tcp, (void *)socket);
// Register our error callback.
tcp_err(socket->pcb.tcp, _lwip_tcp_error);
break;
}
case MOD_NETWORK_SOCK_DGRAM: {
@ -916,10 +914,11 @@ void socketpool_socket_close(socketpool_socket_obj_t *socket) {
case SOCKETPOOL_SOCK_STREAM: {
// Deregister callback (pcb.tcp is set to NULL below so must deregister now)
tcp_arg(socket->pcb.tcp, NULL);
tcp_err(socket->pcb.tcp, NULL);
tcp_recv(socket->pcb.tcp, NULL);
if (socket->pcb.tcp->state != LISTEN) {
tcp_err(socket->pcb.tcp, NULL);
tcp_recv(socket->pcb.tcp, NULL);
// Schedule a callback to abort the connection if it's not cleanly closed after
// the given timeout. The callback must be set before calling tcp_close since
// the latter may free the pcb; if it doesn't then the callback will be active.
@ -977,6 +976,7 @@ void common_hal_socketpool_socket_connect(socketpool_socket_obj_t *socket,
// Register our receive callback.
MICROPY_PY_LWIP_ENTER
tcp_recv(socket->pcb.tcp, _lwip_tcp_recv);
tcp_err(socket->pcb.tcp, _lwip_tcp_error);
socket->state = STATE_CONNECTING;
err = tcp_connect(socket->pcb.tcp, &dest, port, _lwip_tcp_connected);
if (err != ERR_OK) {

View File

@ -75,4 +75,7 @@ typedef struct _lwip_socket_obj_t {
socketpool_socketpool_obj_t *pool;
} socketpool_socket_obj_t;
// Not required for RPi socket positive callbacks
#define socketpool_socket_poll_resume(x)
void socket_user_reset(void);

View File

@ -186,6 +186,10 @@ void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_
bindings_cyw43_wifi_enforce_pm();
}
bool common_hal_wifi_radio_get_ap_active(wifi_radio_obj_t *self) {
return cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_AP) == CYW43_LINK_UP;
}
void common_hal_wifi_radio_stop_ap(wifi_radio_obj_t *self) {
if (!common_hal_wifi_radio_get_enabled(self)) {
mp_raise_RuntimeError(translate("wifi is not enabled"));
@ -275,6 +279,10 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
return WIFI_RADIO_ERROR_UNSPECIFIED;
}
bool common_hal_wifi_radio_get_connected(wifi_radio_obj_t *self) {
return cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_STA) == CYW43_LINK_UP;
}
mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) {
mp_raise_NotImplementedError(NULL);
}

View File

@ -19,6 +19,7 @@ CIRCUITPY_PWMIO ?= 1
CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_DISPLAYIO)
CIRCUITPY_ROTARYIO ?= 1
CIRCUITPY_ROTARYIO_SOFTENCODER = 1
CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12
# Things that need to be implemented.
# Use PWM internally

View File

@ -37,7 +37,7 @@ void port_background_task(void) {
}
void port_background_tick(void) {
}
void port_start_background_task(void) {
void port_start_background_tick(void) {
}
void port_finish_background_task(void) {
void port_finish_background_tick(void) {
}

View File

@ -30,15 +30,30 @@ SRC_BITMAP := \
displayio_min.c \
shared-bindings/aesio/aes.c \
shared-bindings/aesio/__init__.c \
shared-bindings/audiocore/__init__.c \
shared-bindings/audiocore/RawSample.c \
shared-bindings/audiocore/WaveFile.c \
shared-bindings/audiomixer/__init__.c \
shared-bindings/audiomixer/Mixer.c \
shared-bindings/audiomixer/MixerVoice.c \
shared-bindings/bitmaptools/__init__.c \
shared-bindings/displayio/Bitmap.c \
shared-bindings/rainbowio/__init__.c \
shared-bindings/struct/__init__.c \
shared-bindings/synthio/__init__.c \
shared-bindings/synthio/MidiTrack.c \
shared-bindings/synthio/Synthesizer.c \
shared-bindings/traceback/__init__.c \
shared-bindings/util.c \
shared-bindings/zlib/__init__.c \
shared-module/aesio/aes.c \
shared-module/aesio/__init__.c \
shared-module/audiocore/__init__.c \
shared-module/audiocore/RawSample.c \
shared-module/audiocore/WaveFile.c \
shared-module/audiomixer/__init__.c \
shared-module/audiomixer/Mixer.c \
shared-module/audiomixer/MixerVoice.c \
shared-module/bitmaptools/__init__.c \
shared-module/displayio/area.c \
shared-module/displayio/Bitmap.c \
@ -47,6 +62,9 @@ SRC_BITMAP := \
shared-module/os/getenv.c \
shared-module/rainbowio/__init__.c \
shared-module/struct/__init__.c \
shared-module/synthio/__init__.c \
shared-module/synthio/MidiTrack.c \
shared-module/synthio/Synthesizer.c \
shared-module/traceback/__init__.c \
shared-module/zlib/__init__.c \
@ -54,12 +72,17 @@ SRC_C += $(SRC_BITMAP)
CFLAGS += \
-DCIRCUITPY_AESIO=1 \
-DCIRCUITPY_AUDIOCORE=1 \
-DCIRCUITPY_AUDIOMIXER=1 \
-DCIRCUITPY_AUDIOCORE_DEBUG=1 \
-DCIRCUITPY_BITMAPTOOLS=1 \
-DCIRCUITPY_DISPLAYIO_UNIX=1 \
-DCIRCUITPY_OS_GETENV=1 \
-DCIRCUITPY_GIFIO=1 \
-DCIRCUITPY_OS_GETENV=1 \
-DCIRCUITPY_RAINBOWIO=1 \
-DCIRCUITPY_STRUCT=1 \
-DCIRCUITPY_SYNTHIO=1 \
-DCIRCUITPY_SYNTHIO_MAX_CHANNELS=14 \
-DCIRCUITPY_TRACEBACK=1 \
-DCIRCUITPY_ZLIB=1

View File

@ -648,6 +648,7 @@ SRC_SHARED_MODULE_ALL = \
supervisor/__init__.c \
supervisor/StatusBar.c \
synthio/MidiTrack.c \
synthio/Synthesizer.c \
synthio/__init__.c \
terminalio/Terminal.c \
terminalio/__init__.c \

View File

@ -439,8 +439,8 @@ struct _supervisor_allocation_node;
const char *readline_hist[8]; \
struct _supervisor_allocation_node *first_embedded_allocation; \
void supervisor_run_background_tasks_if_tick(void);
#define RUN_BACKGROUND_TASKS (supervisor_run_background_tasks_if_tick())
void background_callback_run_all(void);
#define RUN_BACKGROUND_TASKS (background_callback_run_all())
#define MICROPY_VM_HOOK_LOOP RUN_BACKGROUND_TASKS;
#define MICROPY_VM_HOOK_RETURN RUN_BACKGROUND_TASKS;

View File

@ -107,6 +107,11 @@ CFLAGS += -DCIRCUITPY_AUDIOCORE=$(CIRCUITPY_AUDIOCORE)
CIRCUITPY_AUDIOMIXER ?= $(CIRCUITPY_AUDIOIO)
CFLAGS += -DCIRCUITPY_AUDIOMIXER=$(CIRCUITPY_AUDIOMIXER)
ifndef CIRCUITPY_AUDIOCORE_DEBUG
CIRCUITPY_AUDIOCORE_DEBUG ?= 0
endif
CFLAGS += -DCIRCUITPY_AUDIOCORE_DEBUG=$(CIRCUITPY_AUDIOCORE_DEBUG)
ifndef CIRCUITPY_AUDIOMP3
ifeq ($(CIRCUITPY_FULL_BUILD),1)
CIRCUITPY_AUDIOMP3 = $(CIRCUITPY_AUDIOCORE)
@ -286,6 +291,15 @@ CFLAGS += -DCIRCUITPY_JSON=$(CIRCUITPY_JSON)
CIRCUITPY_KEYPAD ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_KEYPAD=$(CIRCUITPY_KEYPAD)
CIRCUITPY_KEYPAD_KEYS ?= $(CIRCUITPY_KEYPAD)
CFLAGS += -DCIRCUITPY_KEYPAD_KEYS=$(CIRCUITPY_KEYPAD_KEYS)
CIRCUITPY_KEYPAD_KEYMATRIX ?= $(CIRCUITPY_KEYPAD)
CFLAGS += -DCIRCUITPY_KEYPAD_KEYMATRIX=$(CIRCUITPY_KEYPAD_KEYMATRIX)
CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS ?= $(CIRCUITPY_KEYPAD)
CFLAGS += -DCIRCUITPY_KEYPAD_SHIFTREGISTERKEYS=$(CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS)
CIRCUITPY_MATH ?= 1
CFLAGS += -DCIRCUITPY_MATH=$(CIRCUITPY_MATH)
@ -437,6 +451,10 @@ CFLAGS += -DCIRCUITPY_SUPERVISOR=$(CIRCUITPY_SUPERVISOR)
CIRCUITPY_SYNTHIO ?= $(CIRCUITPY_AUDIOCORE)
CFLAGS += -DCIRCUITPY_SYNTHIO=$(CIRCUITPY_SYNTHIO)
CIRCUITPY_SYNTHIO_MAX_CHANNELS ?= 2
CFLAGS += -DCIRCUITPY_SYNTHIO_MAX_CHANNELS=$(CIRCUITPY_SYNTHIO_MAX_CHANNELS)
CIRCUITPY_SYS ?= 1
CFLAGS += -DCIRCUITPY_SYS=$(CIRCUITPY_SYS)

View File

@ -97,7 +97,7 @@
//| ...
STATIC mp_obj_t audiobusio_i2sout_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
#if !CIRCUITPY_AUDIOBUSIO_I2SOUT
mp_raise_NotImplementedError(translate("I2SOut not available"));
mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_I2SOut);
return NULL; // Not reachable.
#else
enum { ARG_bit_clock, ARG_word_select, ARG_data, ARG_left_justified };

View File

@ -94,7 +94,7 @@
//| ...
STATIC mp_obj_t audiobusio_pdmin_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
#if !CIRCUITPY_AUDIOBUSIO_PDMIN
mp_raise_NotImplementedError(translate("PDMIn not available"));
mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_PDMIn);
#else
enum { ARG_clock_pin, ARG_data_pin, ARG_sample_rate, ARG_bit_depth, ARG_mono, ARG_oversample, ARG_startup_delay };
static const mp_arg_t allowed_args[] = {

View File

@ -40,7 +40,7 @@
//| def __init__(
//| self, buffer: ReadableBuffer, *, channel_count: int = 1, sample_rate: int = 8000
//| ) -> None:
//| """Create a RawSample based on the given buffer of signed values. If channel_count is more than
//| """Create a RawSample based on the given buffer of values. If channel_count is more than
//| 1 then each channel's samples should alternate. In other words, for a two channel buffer, the
//| first sample will be for channel 1, the second sample will be for channel two, the third for
//| channel 1 and so on.

View File

@ -32,6 +32,7 @@
#include "shared-bindings/audiocore/WaveFile.h"
#include "shared-bindings/util.h"
#include "supervisor/shared/translate/translate.h"
#include "extmod/vfs_posix.h"
//| class WaveFile:
//| """Load a wave file for audio playback

View File

@ -29,7 +29,6 @@
#include "py/obj.h"
#include "py/runtime.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/audiocore/__init__.h"
#include "shared-bindings/audiocore/RawSample.h"
#include "shared-bindings/audiocore/WaveFile.h"
@ -37,10 +36,57 @@
//| """Support for audio samples"""
#if CIRCUITPY_AUDIOCORE_DEBUG
// (no docstrings so that the debug functions are not shown on docs.circuitpython.org)
STATIC mp_obj_t audiocore_get_buffer(mp_obj_t sample_in) {
uint8_t *buffer = NULL;
uint32_t buffer_length = 0;
audioio_get_buffer_result_t gbr = audiosample_get_buffer(sample_in, false, 0, &buffer, &buffer_length);
mp_obj_t result[2] = {mp_obj_new_int_from_uint(gbr), mp_const_none};
if (gbr != GET_BUFFER_ERROR) {
// copies the data because the gc semantics of get_buffer are unclear
result[1] = mp_obj_new_bytes(buffer, buffer_length);
}
return mp_obj_new_tuple(2, result);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(audiocore_get_buffer_obj, audiocore_get_buffer);
STATIC mp_obj_t audiocore_get_structure(mp_obj_t sample_in) {
bool single_buffer, samples_signed;
uint32_t max_buffer_length;
uint8_t spacing;
audiosample_get_buffer_structure(sample_in, false, &single_buffer, &samples_signed, &max_buffer_length, &spacing);
mp_obj_t result[4] = {
mp_obj_new_int_from_uint(single_buffer),
mp_obj_new_int_from_uint(samples_signed),
mp_obj_new_int_from_uint(max_buffer_length),
mp_obj_new_int_from_uint(spacing),
};
return mp_obj_new_tuple(4, result);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(audiocore_get_structure_obj, audiocore_get_structure);
STATIC mp_obj_t audiocore_reset_buffer(mp_obj_t sample_in) {
audiosample_reset_buffer(sample_in, false, 0);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(audiocore_reset_buffer_obj, audiocore_reset_buffer);
#endif
STATIC const mp_rom_map_elem_t audiocore_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_audiocore) },
{ MP_ROM_QSTR(MP_QSTR_RawSample), MP_ROM_PTR(&audioio_rawsample_type) },
{ MP_ROM_QSTR(MP_QSTR_WaveFile), MP_ROM_PTR(&audioio_wavefile_type) },
#if CIRCUITPY_AUDIOCORE_DEBUG
{ MP_ROM_QSTR(MP_QSTR_get_buffer), MP_ROM_PTR(&audiocore_get_buffer_obj) },
{ MP_ROM_QSTR(MP_QSTR_reset_buffer), MP_ROM_PTR(&audiocore_reset_buffer_obj) },
{ MP_ROM_QSTR(MP_QSTR_get_structure), MP_ROM_PTR(&audiocore_get_structure_obj) },
#endif
};
STATIC MP_DEFINE_CONST_DICT(audiocore_module_globals, audiocore_module_globals_table);

View File

@ -33,8 +33,6 @@
#include "py/binary.h"
#include "py/objproperty.h"
#include "py/runtime.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/audiocore/RawSample.h"
#include "shared-bindings/util.h"
#include "supervisor/shared/translate/translate.h"

View File

@ -27,9 +27,7 @@
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOMIXER_MIXER_H
#define MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOMIXER_MIXER_H
#include "common-hal/microcontroller/Pin.h"
#include "shared-module/audiomixer/Mixer.h"
#include "shared-bindings/audiocore/RawSample.h"
extern const mp_obj_type_t audiomixer_mixer_type;
extern const mp_obj_type_t audiomixer_mixervoice_type;

View File

@ -32,8 +32,6 @@
#include "py/binary.h"
#include "py/objproperty.h"
#include "py/runtime.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/audiocore/RawSample.h"
#include "shared-bindings/util.h"
#include "supervisor/shared/translate/translate.h"
@ -115,7 +113,7 @@ STATIC mp_obj_t audiomixer_mixervoice_obj_set_level(size_t n_args, const mp_obj_
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
float level = mp_obj_get_float(args[ARG_level].u_obj);
mp_float_t level = mp_obj_get_float(args[ARG_level].u_obj);
if (level > 1 || level < 0) {
mp_raise_ValueError(translate("level must be between 0 and 1"));

View File

@ -26,9 +26,6 @@
#ifndef SHARED_BINDINGS_AUDIOMIXER_MIXERVOICE_H_
#define SHARED_BINDINGS_AUDIOMIXER_MIXERVOICE_H_
#include "common-hal/microcontroller/Pin.h"
#include "shared-bindings/audiocore/RawSample.h"
#include "shared-module/audiomixer/MixerVoice.h"
#include "shared-module/audiomixer/Mixer.h"
@ -39,8 +36,8 @@ void common_hal_audiomixer_mixervoice_construct(audiomixer_mixervoice_obj_t *sel
void common_hal_audiomixer_mixervoice_set_parent(audiomixer_mixervoice_obj_t *self, audiomixer_mixer_obj_t *parent);
void common_hal_audiomixer_mixervoice_play(audiomixer_mixervoice_obj_t *self, mp_obj_t sample, bool loop);
void common_hal_audiomixer_mixervoice_stop(audiomixer_mixervoice_obj_t *self);
float common_hal_audiomixer_mixervoice_get_level(audiomixer_mixervoice_obj_t *self);
void common_hal_audiomixer_mixervoice_set_level(audiomixer_mixervoice_obj_t *self, float gain);
mp_float_t common_hal_audiomixer_mixervoice_get_level(audiomixer_mixervoice_obj_t *self);
void common_hal_audiomixer_mixervoice_set_level(audiomixer_mixervoice_obj_t *self, mp_float_t gain);
bool common_hal_audiomixer_mixervoice_get_playing(audiomixer_mixervoice_obj_t *self);

View File

@ -29,7 +29,6 @@
#include "py/obj.h"
#include "py/runtime.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/audiomixer/Mixer.h"
//| """Support for audio mixing"""

View File

@ -868,7 +868,86 @@ STATIC mp_obj_t bitmaptools_dither(size_t n_args, const mp_obj_t *pos_args, mp_m
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_dither_obj, 0, bitmaptools_dither);
// requires all 5 arguments
//| def draw_circle(
//| dest_bitmap: displayio.Bitmap, x: int, y: int, radius: int, value: int
//| ) -> None:
//| """Draws a circle into a bitmap specified using a center (x0,y0) and radius r.
//|
//| :param bitmap dest_bitmap: Destination bitmap that will be written into
//| :param int x: x-pixel position of the circle's center
//| :param int y: y-pixel position of the circle's center
//| :param int radius: circle's radius
//| :param int value: Bitmap palette index that will be written into the
//| circle in the destination bitmap
//|
//| .. code-block:: Python
//|
//| import board
//| import displayio
//| import bitmaptools
//|
//| display = board.DISPLAY
//| main_group = displayio.Group()
//| display.root_group = main_group
//|
//| palette = displayio.Palette(2)
//| palette[0] = 0xffffff
//| palette[1] = 0x440044
//|
//| bmp = displayio.Bitmap(128,128, 2)
//| bmp.fill(0)
//|
//| bitmaptools.circle(64,64, 32, 1)
//|
//| tilegrid = displayio.TileGrid(bitmap=bmp, pixel_shader=palette)
//| main_group.append(tilegrid)
//|
//| while True:
//| pass
//|
//| """
//|
//| ...
//|
STATIC mp_obj_t bitmaptools_obj_draw_circle(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum {ARG_dest_bitmap, ARG_x, ARG_y, ARG_radius, ARG_value};
static const mp_arg_t allowed_args[] = {
{MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ},
{MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT},
{MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT},
{MP_QSTR_radius, MP_ARG_REQUIRED | MP_ARG_INT},
{MP_QSTR_value, 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);
displayio_bitmap_t *destination = MP_OBJ_TO_PTR(args[ARG_dest_bitmap].u_obj); // the destination bitmap
uint32_t value, color_depth;
value = args[ARG_value].u_int;
color_depth = (1 << destination->bits_per_value);
if (color_depth <= value) {
mp_raise_ValueError(translate("out of range of target"));
}
int16_t x = args[ARG_x].u_int;
int16_t y = args[ARG_y].u_int;
int16_t radius = args[ARG_radius].u_int;
mp_arg_validate_int_range(x, 0, destination->width, MP_QSTR_x);
mp_arg_validate_int_range(y, 0, destination->height, MP_QSTR_y);
mp_arg_validate_int_min(radius, 0, MP_QSTR_radius);
common_hal_bitmaptools_draw_circle(destination, x, y, radius, value);
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_circle_obj, 0, bitmaptools_obj_draw_circle);
STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitmaptools) },
@ -880,6 +959,7 @@ STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_boundary_fill), MP_ROM_PTR(&bitmaptools_boundary_fill_obj) },
{ MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&bitmaptools_draw_line_obj) },
{ MP_ROM_QSTR(MP_QSTR_draw_polygon), MP_ROM_PTR(&bitmaptools_draw_polygon_obj) },
{ MP_ROM_QSTR(MP_QSTR_draw_circle), MP_ROM_PTR(&bitmaptools_draw_circle_obj) },
{ MP_ROM_QSTR(MP_QSTR_dither), MP_ROM_PTR(&bitmaptools_dither_obj) },
{ MP_ROM_QSTR(MP_QSTR_DitherAlgorithm), MP_ROM_PTR(&bitmaptools_dither_algorithm_type) },
};

View File

@ -64,6 +64,11 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination,
int16_t x1, int16_t y1,
uint32_t value);
void common_hal_bitmaptools_draw_circle(displayio_bitmap_t *destination,
int16_t x, int16_t y,
int16_t radius,
uint32_t value);
void common_hal_bitmaptools_draw_polygon(displayio_bitmap_t *destination, void *xs, void *ys, size_t points_len, int point_size, uint32_t value, bool close);
void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, mp_obj_t *file, int element_size, int bits_per_pixel, bool reverse_pixels_in_word, bool swap_bytes, bool reverse_rows);
void common_hal_bitmaptools_arrayblit(displayio_bitmap_t *self, void *data, int element_size, int x1, int y1, int x2, int y2, bool skip_specified, uint32_t skip_index);

View File

@ -97,7 +97,7 @@
//|
//| display_bus.send(42, struct.pack(">hh", 0, odg.bitmap.width - 1))
//| display_bus.send(43, struct.pack(">hh", 0, odg.bitmap.height - 1))
//| display_bus.send(44, d.bitmap)
//| display_bus.send(44, odg.bitmap)
//|
//| # The following optional code will free the OnDiskGif and allocated resources
//| # after use. This may be required before loading a new GIF in situations

View File

@ -167,9 +167,9 @@ STATIC mp_obj_t keypad_event_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
STATIC void keypad_event_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
keypad_event_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_printf(print, "<Event: key_number %d %s>",
mp_printf(print, "<Event: key_number %d %q>",
common_hal_keypad_event_get_key_number(self),
common_hal_keypad_event_get_pressed(self) ? "pressed" : "released");
common_hal_keypad_event_get_pressed(self) ? MP_QSTR_pressed : MP_QSTR_released);
}
STATIC const mp_rom_map_elem_t keypad_event_locals_dict_table[] = {

View File

@ -71,6 +71,7 @@
//| ...
STATIC mp_obj_t keypad_keymatrix_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
#if CIRCUITPY_KEYPAD_KEYMATRIX
keypad_keymatrix_obj_t *self = m_new_obj(keypad_keymatrix_obj_t);
self->base.type = &keypad_keymatrix_type;
enum { ARG_row_pins, ARG_column_pins, ARG_columns_to_anodes, ARG_interval, ARG_max_events };
@ -114,8 +115,13 @@ STATIC mp_obj_t keypad_keymatrix_make_new(const mp_obj_type_t *type, size_t n_ar
common_hal_keypad_keymatrix_construct(self, num_row_pins, row_pins_array, num_column_pins, column_pins_array, args[ARG_columns_to_anodes].u_bool, interval, max_events);
return MP_OBJ_FROM_PTR(self);
#else
mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_KeyMatrix);
#endif
}
#if CIRCUITPY_KEYPAD_KEYMATRIX
//| def deinit(self) -> None:
//| """Stop scanning and release the pins."""
//| ...
@ -228,9 +234,13 @@ STATIC const mp_rom_map_elem_t keypad_keymatrix_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(keypad_keymatrix_locals_dict, keypad_keymatrix_locals_dict_table);
#endif
const mp_obj_type_t keypad_keymatrix_type = {
{ &mp_type_type },
.name = MP_QSTR_KeyMatrix,
.make_new = keypad_keymatrix_make_new,
#if CIRCUITPY_KEYPAD_KEYMATRIX
.locals_dict = (mp_obj_t)&keypad_keymatrix_locals_dict,
#endif
};

View File

@ -73,6 +73,7 @@
//| ...
STATIC mp_obj_t keypad_keys_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
#if CIRCUITPY_KEYPAD_KEYS
keypad_keys_obj_t *self = m_new_obj(keypad_keys_obj_t);
self->base.type = &keypad_keys_type;
enum { ARG_pins, ARG_value_when_pressed, ARG_pull, ARG_interval, ARG_max_events };
@ -106,8 +107,13 @@ STATIC mp_obj_t keypad_keys_make_new(const mp_obj_type_t *type, size_t n_args, s
common_hal_keypad_keys_construct(self, num_pins, pins_array, value_when_pressed, args[ARG_pull].u_bool, interval, max_events);
return MP_OBJ_FROM_PTR(self);
#else
mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_Keys);
#endif
}
#if CIRCUITPY_KEYPAD_KEYS
//| def deinit(self) -> None:
//| """Stop scanning and release the pins."""
//| ...
@ -162,10 +168,13 @@ STATIC const mp_rom_map_elem_t keypad_keys_locals_dict_table[] = {
};
STATIC MP_DEFINE_CONST_DICT(keypad_keys_locals_dict, keypad_keys_locals_dict_table);
#endif
const mp_obj_type_t keypad_keys_type = {
{ &mp_type_type },
.name = MP_QSTR_Keys,
.make_new = keypad_keys_make_new,
#if CIRCUITPY_KEYPAD_KEYS
.locals_dict = (mp_obj_t)&keypad_keys_locals_dict,
#endif
};

View File

@ -82,6 +82,7 @@
//| ...
STATIC mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
#if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS
keypad_shiftregisterkeys_obj_t *self = m_new_obj(keypad_shiftregisterkeys_obj_t);
self->base.type = &keypad_shiftregisterkeys_type;
enum { ARG_clock, ARG_data, ARG_latch, ARG_value_to_latch, ARG_key_count, ARG_value_when_pressed, ARG_interval, ARG_max_events };
@ -113,8 +114,12 @@ STATIC mp_obj_t keypad_shiftregisterkeys_make_new(const mp_obj_type_t *type, siz
self, clock, data, latch, value_to_latch, key_count, value_when_pressed, interval, max_events);
return MP_OBJ_FROM_PTR(self);
#else
mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_ShiftRegisterKeys);
#endif
}
#if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS
//| def deinit(self) -> None:
//| """Stop scanning and release the pins."""
//| ...
@ -169,10 +174,13 @@ STATIC const mp_rom_map_elem_t keypad_shiftregisterkeys_locals_dict_table[] = {
};
STATIC MP_DEFINE_CONST_DICT(keypad_shiftregisterkeys_locals_dict, keypad_shiftregisterkeys_locals_dict_table);
#endif
const mp_obj_type_t keypad_shiftregisterkeys_type = {
{ &mp_type_type },
.name = MP_QSTR_ShiftRegisterKeys,
.make_new = keypad_shiftregisterkeys_make_new,
#if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS
.locals_dict = (mp_obj_t)&keypad_shiftregisterkeys_locals_dict,
#endif
};

View File

@ -32,13 +32,19 @@
#include "py/runtime.h"
#include "shared-bindings/util.h"
#include "shared-bindings/synthio/MidiTrack.h"
#include "shared-bindings/synthio/__init__.h"
#include "supervisor/shared/translate/translate.h"
//| class MidiTrack:
//| """Simple square-wave MIDI synth"""
//| """Simple MIDI synth"""
//|
//| def __init__(
//| self, buffer: ReadableBuffer, tempo: int, *, sample_rate: int = 11025
//| self,
//| buffer: ReadableBuffer,
//| tempo: int,
//| *,
//| sample_rate: int = 11025,
//| waveform: ReadableBuffer = None
//| ) -> None:
//| """Create a MidiTrack from the given stream of MIDI events. Only "Note On" and "Note Off" events
//| are supported; channel numbers and key velocities are ignored. Up to two notes may be on at the
@ -47,6 +53,7 @@
//| :param ~circuitpython_typing.ReadableBuffer buffer: Stream of MIDI events, as stored in a MIDI file track chunk
//| :param int tempo: Tempo of the streamed events, in MIDI ticks per second
//| :param int sample_rate: The desired playback sample rate; higher sample rate requires more memory
//| :param ReadableBuffer waveform: A single-cycle waveform. Default is a 50% duty cycle square wave. If specified, must be a ReadableBuffer of type 'h' (signed 16 bit)
//|
//| Simple melody::
//|
@ -65,11 +72,12 @@
//| print("stopped")"""
//| ...
STATIC mp_obj_t synthio_miditrack_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
enum { ARG_buffer, ARG_tempo, ARG_sample_rate };
enum { ARG_buffer, ARG_tempo, ARG_sample_rate, ARG_waveform };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED },
{ MP_QSTR_tempo, MP_ARG_INT | MP_ARG_REQUIRED },
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} },
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
@ -77,13 +85,18 @@ STATIC mp_obj_t synthio_miditrack_make_new(const mp_obj_type_t *type, size_t n_a
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ);
mp_buffer_info_t bufinfo_waveform;
synthio_synth_parse_waveform(&bufinfo_waveform, args[ARG_waveform].u_obj);
synthio_miditrack_obj_t *self = m_new_obj(synthio_miditrack_obj_t);
self->base.type = &synthio_miditrack_type;
common_hal_synthio_miditrack_construct(self,
(uint8_t *)bufinfo.buf, bufinfo.len,
args[ARG_tempo].u_int,
args[ARG_sample_rate].u_int);
args[ARG_sample_rate].u_int,
bufinfo_waveform.buf,
bufinfo_waveform.len / 2);
return MP_OBJ_FROM_PTR(self);
}

View File

@ -32,7 +32,7 @@
extern const mp_obj_type_t synthio_miditrack_type;
void common_hal_synthio_miditrack_construct(synthio_miditrack_obj_t *self,
const uint8_t *buffer, uint32_t len, uint32_t tempo, uint32_t sample_rate);
const uint8_t *buffer, uint32_t len, uint32_t tempo, uint32_t sample_rate, const int16_t *waveform, uint16_t waveform_len);
void common_hal_synthio_miditrack_deinit(synthio_miditrack_obj_t *self);
bool common_hal_synthio_miditrack_deinited(synthio_miditrack_obj_t *self);

View File

@ -0,0 +1,246 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Artyom Skrobov
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <stdint.h>
#include "shared/runtime/context_manager_helpers.h"
#include "py/binary.h"
#include "py/objproperty.h"
#include "py/runtime.h"
#include "shared-bindings/util.h"
#include "shared-bindings/synthio/Synthesizer.h"
#include "shared-bindings/synthio/__init__.h"
#include "supervisor/shared/translate/translate.h"
//| class Synthesizer:
//| def __init__(self, *, sample_rate: int = 11025, waveform: ReadableBuffer = None) -> None:
//| """Create a synthesizer object.
//|
//| This API is experimental.
//|
//| At least 2 simultaneous notes are supported. mimxrt10xx and rp2040 platforms support up to
//| 12 notes.
//|
//| Notes use MIDI note numbering, with 60 being C4 or Middle C, approximately 262Hz.
//|
//| :param int sample_rate: The desired playback sample rate; higher sample rate requires more memory
//| :param ReadableBuffer waveform: A single-cycle waveform. Default is a 50% duty cycle square wave. If specified, must be a ReadableBuffer of type 'h' (signed 16 bit). It is permitted to modify this buffer during synthesis. This can be used, for instance, to control the overall volume or timbre of the notes.
//| """
STATIC mp_obj_t synthio_synthesizer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
enum { ARG_sample_rate, ARG_waveform };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} },
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
mp_buffer_info_t bufinfo_waveform;
synthio_synth_parse_waveform(&bufinfo_waveform, args[ARG_waveform].u_obj);
synthio_synthesizer_obj_t *self = m_new_obj(synthio_synthesizer_obj_t);
self->base.type = &synthio_synthesizer_type;
common_hal_synthio_synthesizer_construct(self,
args[ARG_sample_rate].u_int,
bufinfo_waveform.buf,
bufinfo_waveform.len / 2);
return MP_OBJ_FROM_PTR(self);
}
STATIC void check_for_deinit(synthio_synthesizer_obj_t *self) {
if (common_hal_synthio_synthesizer_deinited(self)) {
raise_deinited_error();
}
}
//| def press(self, /, press: Sequence[int] = ()) -> None:
//| """Turn some notes on. Notes use MIDI numbering, with 60 being middle C, approximately 262Hz.
//|
//| Pressing a note that was already pressed has no effect.
//|
//| :param Sequence[int] press: Any sequence of integer notes."""
STATIC mp_obj_t synthio_synthesizer_press(mp_obj_t self_in, mp_obj_t press) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
common_hal_synthio_synthesizer_press(self, press);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(synthio_synthesizer_press_obj, synthio_synthesizer_press);
//
//| def release_then_press(
//| self, release: Sequence[int] = (), press: Sequence[int] = ()
//| ) -> None:
//| """Turn some notes on and/or off. Notes use MIDI numbering, with 60 being middle C.
//|
//| It is OK to release note that was not actually turned on.
//|
//| Pressing a note that was already pressed has no effect.
//|
//| Releasing and pressing the note again has little effect, but does reset the phase
//| of the note, which may be perceptible as a small glitch.
//|
//| :param Sequence[int] release: Any sequence of integer notes.
//| :param Sequence[int] press: Any sequence of integer notes."""
STATIC mp_obj_t synthio_synthesizer_release_then_press(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_release, ARG_press };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_release, MP_ARG_OBJ, {.u_obj = mp_const_empty_tuple } },
{ MP_QSTR_press, MP_ARG_OBJ, {.u_obj = mp_const_empty_tuple } },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
check_for_deinit(self);
common_hal_synthio_synthesizer_release(self, args[ARG_release].u_obj);
common_hal_synthio_synthesizer_press(self, args[ARG_press].u_obj);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(synthio_synthesizer_release_then_press_obj, 1, synthio_synthesizer_release_then_press);
//
//| def release_all_then_press(self, /, press: Sequence[int]) -> None:
//| """Turn any currently-playing notes off, then turn on the given notes
//|
//| Releasing and pressing the note again has little effect, but does reset the phase
//| of the note, which may be perceptible as a small glitch.
//|
//| :param Sequence[int] press: Any sequence of integer notes."""
STATIC mp_obj_t synthio_synthesizer_release_all_then_press(mp_obj_t self_in, mp_obj_t press) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
common_hal_synthio_synthesizer_release_all(self);
common_hal_synthio_synthesizer_press(self, press);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(synthio_synthesizer_release_all_then_press_obj, synthio_synthesizer_release_all_then_press);
//
//| def release_all(self) -> None:
//| """Turn any currently-playing notes off"""
STATIC mp_obj_t synthio_synthesizer_release_all(mp_obj_t self_in) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
common_hal_synthio_synthesizer_release_all(self);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(synthio_synthesizer_release_all_obj, synthio_synthesizer_release_all);
//| def deinit(self) -> None:
//| """Deinitialises the object and releases any memory resources for reuse."""
//| ...
STATIC mp_obj_t synthio_synthesizer_deinit(mp_obj_t self_in) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_synthio_synthesizer_deinit(self);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(synthio_synthesizer_deinit_obj, synthio_synthesizer_deinit);
//| def __enter__(self) -> MidiTrack:
//| """No-op used by Context Managers."""
//| ...
// Provided by context manager helper.
//|
//| def __exit__(self) -> None:
//| """Automatically deinitializes the hardware when exiting a context. See
//| :ref:`lifetime-and-contextmanagers` for more info."""
//| ...
STATIC mp_obj_t synthio_synthesizer_obj___exit__(size_t n_args, const mp_obj_t *args) {
(void)n_args;
common_hal_synthio_synthesizer_deinit(args[0]);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(synthio_synthesizer___exit___obj, 4, 4, synthio_synthesizer_obj___exit__);
//| sample_rate: int
//| """32 bit value that tells how quickly samples are played in Hertz (cycles per second)."""
STATIC mp_obj_t synthio_synthesizer_obj_get_sample_rate(mp_obj_t self_in) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
return MP_OBJ_NEW_SMALL_INT(common_hal_synthio_synthesizer_get_sample_rate(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_synthesizer_get_sample_rate_obj, synthio_synthesizer_obj_get_sample_rate);
MP_PROPERTY_GETTER(synthio_synthesizer_sample_rate_obj,
(mp_obj_t)&synthio_synthesizer_get_sample_rate_obj);
//| pressed: Tuple[int]
//| """A sequence of the currently pressed notes (read-only property)"""
//|
STATIC mp_obj_t synthio_synthesizer_obj_get_pressed(mp_obj_t self_in) {
synthio_synthesizer_obj_t *self = MP_OBJ_TO_PTR(self_in);
check_for_deinit(self);
return common_hal_synthio_synthesizer_get_pressed_notes(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(synthio_synthesizer_get_pressed_obj, synthio_synthesizer_obj_get_pressed);
MP_PROPERTY_GETTER(synthio_synthesizer_pressed_obj,
(mp_obj_t)&synthio_synthesizer_get_pressed_obj);
//| max_polyphony: int
//| """Maximum polyphony of the synthesizer (read-only class property)"""
//|
STATIC const mp_rom_map_elem_t synthio_synthesizer_locals_dict_table[] = {
// Methods
{ MP_ROM_QSTR(MP_QSTR_press), MP_ROM_PTR(&synthio_synthesizer_press_obj) },
{ MP_ROM_QSTR(MP_QSTR_release_all), MP_ROM_PTR(&synthio_synthesizer_release_all_obj) },
{ MP_ROM_QSTR(MP_QSTR_release_then_press), MP_ROM_PTR(&synthio_synthesizer_release_then_press_obj) },
{ MP_ROM_QSTR(MP_QSTR_release_all_then_press), MP_ROM_PTR(&synthio_synthesizer_release_all_then_press_obj) },
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&synthio_synthesizer_deinit_obj) },
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&synthio_synthesizer___exit___obj) },
// Properties
{ MP_ROM_QSTR(MP_QSTR_sample_rate), MP_ROM_PTR(&synthio_synthesizer_sample_rate_obj) },
{ MP_ROM_QSTR(MP_QSTR_max_polyphony), MP_ROM_INT(CIRCUITPY_SYNTHIO_MAX_CHANNELS) },
{ MP_ROM_QSTR(MP_QSTR_pressed), MP_ROM_PTR(&synthio_synthesizer_pressed_obj) },
};
STATIC MP_DEFINE_CONST_DICT(synthio_synthesizer_locals_dict, synthio_synthesizer_locals_dict_table);
STATIC const audiosample_p_t synthio_synthesizer_proto = {
MP_PROTO_IMPLEMENT(MP_QSTR_protocol_audiosample)
.sample_rate = (audiosample_sample_rate_fun)common_hal_synthio_synthesizer_get_sample_rate,
.bits_per_sample = (audiosample_bits_per_sample_fun)common_hal_synthio_synthesizer_get_bits_per_sample,
.channel_count = (audiosample_channel_count_fun)common_hal_synthio_synthesizer_get_channel_count,
.reset_buffer = (audiosample_reset_buffer_fun)synthio_synthesizer_reset_buffer,
.get_buffer = (audiosample_get_buffer_fun)synthio_synthesizer_get_buffer,
.get_buffer_structure = (audiosample_get_buffer_structure_fun)synthio_synthesizer_get_buffer_structure,
};
const mp_obj_type_t synthio_synthesizer_type = {
{ &mp_type_type },
.name = MP_QSTR_Synthesizer,
.flags = MP_TYPE_FLAG_EXTENDED,
.make_new = synthio_synthesizer_make_new,
.locals_dict = (mp_obj_dict_t *)&synthio_synthesizer_locals_dict,
MP_TYPE_EXTENDED_FIELDS(
.protocol = &synthio_synthesizer_proto,
),
};

View File

@ -0,0 +1,45 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Artyom Skrobov
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* 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.
*/
#pragma once
#include "shared-module/synthio/Synthesizer.h"
extern const mp_obj_type_t synthio_synthesizer_type;
void common_hal_synthio_synthesizer_construct(synthio_synthesizer_obj_t *self,
uint32_t sample_rate, const int16_t *waveform, uint16_t waveform_len);
void common_hal_synthio_synthesizer_deinit(synthio_synthesizer_obj_t *self);
bool common_hal_synthio_synthesizer_deinited(synthio_synthesizer_obj_t *self);
uint32_t common_hal_synthio_synthesizer_get_sample_rate(synthio_synthesizer_obj_t *self);
uint8_t common_hal_synthio_synthesizer_get_bits_per_sample(synthio_synthesizer_obj_t *self);
uint8_t common_hal_synthio_synthesizer_get_channel_count(synthio_synthesizer_obj_t *self);
void common_hal_synthio_synthesizer_release(synthio_synthesizer_obj_t *self, mp_obj_t to_release);
void common_hal_synthio_synthesizer_press(synthio_synthesizer_obj_t *self, mp_obj_t to_press);
void common_hal_synthio_synthesizer_release_all(synthio_synthesizer_obj_t *self);
mp_obj_t common_hal_synthio_synthesizer_get_pressed_notes(synthio_synthesizer_obj_t *self);

View File

@ -30,9 +30,11 @@
#include "py/obj.h"
#include "py/runtime.h"
#include "extmod/vfs_fat.h"
#include "extmod/vfs_posix.h"
#include "shared-bindings/synthio/__init__.h"
#include "shared-bindings/synthio/MidiTrack.h"
#include "shared-bindings/synthio/Synthesizer.h"
//| """Support for MIDI synthesis"""
//|
@ -42,6 +44,7 @@
//|
//| :param typing.BinaryIO file: Already opened MIDI file
//| :param int sample_rate: The desired playback sample rate; higher sample rate requires more memory
//| :param ReadableBuffer waveform: A single-cycle waveform. Default is a 50% duty cycle square wave. If specified, must be a ReadableBuffer of type 'h' (signed 16 bit)
//|
//|
//| Playing a MIDI file from flash::
@ -62,10 +65,11 @@
//| ...
//|
STATIC mp_obj_t synthio_from_file(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_file, ARG_sample_rate };
enum { ARG_file, ARG_sample_rate, ARG_waveform };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED },
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 11025} },
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none } },
};
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);
@ -74,6 +78,10 @@ STATIC mp_obj_t synthio_from_file(size_t n_args, const mp_obj_t *pos_args, mp_ma
}
pyb_file_obj_t *file = MP_OBJ_TO_PTR(args[ARG_file].u_obj);
mp_buffer_info_t bufinfo_waveform;
synthio_synth_parse_waveform(&bufinfo_waveform, args[ARG_waveform].u_obj);
uint8_t chunk_header[14];
f_rewind(&file->fp);
UINT bytes_read;
@ -113,9 +121,13 @@ STATIC mp_obj_t synthio_from_file(size_t n_args, const mp_obj_t *pos_args, mp_ma
result->base.type = &synthio_miditrack_type;
common_hal_synthio_miditrack_construct(result, buffer, track_size,
tempo, args[ARG_sample_rate].u_int);
tempo, args[ARG_sample_rate].u_int, bufinfo_waveform.buf, bufinfo_waveform.len / 2);
#if MICROPY_MALLOC_USES_ALLOCATED_SIZE
m_free(buffer, track_size);
#else
m_free(buffer);
#endif
return MP_OBJ_FROM_PTR(result);
}
@ -125,6 +137,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(synthio_from_file_obj, 1, synthio_from_file);
STATIC const mp_rom_map_elem_t synthio_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_synthio) },
{ MP_ROM_QSTR(MP_QSTR_MidiTrack), MP_ROM_PTR(&synthio_miditrack_type) },
{ MP_ROM_QSTR(MP_QSTR_Synthesizer), MP_ROM_PTR(&synthio_synthesizer_type) },
{ MP_ROM_QSTR(MP_QSTR_from_file), MP_ROM_PTR(&synthio_from_file_obj) },
};

View File

@ -24,11 +24,6 @@
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO___INIT___H
#define MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO___INIT___H
#pragma once
#include "py/obj.h"
// Nothing now.
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_SYNTHIO___INIT___H
extern int16_t shared_bindings_synthio_square_wave[];

View File

@ -310,7 +310,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_stop_station_obj, wifi_radio_stop_station);
//| authmode: Optional[AuthMode] = None,
//| max_connections: Optional[int] = 4
//| ) -> None:
//| """Starts an Access Point with the specified ssid and password.
//| """Starts running an access point with the specified ssid and password.
//|
//| If ``channel`` is given, the access point will use that channel unless
//| a station is already operating on a different channel.
@ -376,7 +376,7 @@ STATIC mp_obj_t wifi_radio_start_ap(size_t n_args, const mp_obj_t *pos_args, mp_
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(wifi_radio_start_ap_obj, 1, wifi_radio_start_ap);
//| def stop_ap(self) -> None:
//| """Stops the Access Point."""
//| """Stops the access point."""
//| ...
STATIC mp_obj_t wifi_radio_stop_ap(mp_obj_t self) {
common_hal_wifi_radio_stop_ap(self);
@ -384,6 +384,16 @@ STATIC mp_obj_t wifi_radio_stop_ap(mp_obj_t self) {
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_stop_ap_obj, wifi_radio_stop_ap);
//| ap_active: bool
//| """True if running as an access point. (read-only)"""
STATIC mp_obj_t wifi_radio_get_ap_active(mp_obj_t self) {
return mp_obj_new_bool(common_hal_wifi_radio_get_ap_active(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_active_obj, wifi_radio_get_ap_active);
MP_PROPERTY_GETTER(wifi_radio_ap_active_obj,
(mp_obj_t)&wifi_radio_get_ap_active_obj);
//| def connect(
//| self,
//| ssid: Union[str | ReadableBuffer],
@ -464,11 +474,20 @@ STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_m
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(wifi_radio_connect_obj, 1, wifi_radio_connect);
//| connected: bool
//| """True if connected to an access point (read-only)."""
STATIC mp_obj_t wifi_radio_get_connected(mp_obj_t self) {
return mp_obj_new_bool(common_hal_wifi_radio_get_connected(self));
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_connected_obj, wifi_radio_get_connected);
MP_PROPERTY_GETTER(wifi_radio_connected_obj,
(mp_obj_t)&wifi_radio_get_connected_obj);
//| ipv4_gateway: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the station gateway when connected to an access point. None otherwise."""
//| """IP v4 Address of the station gateway when connected to an access point. None otherwise. (read-only)"""
STATIC mp_obj_t wifi_radio_get_ipv4_gateway(mp_obj_t self) {
return common_hal_wifi_radio_get_ipv4_gateway(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_gateway_obj, wifi_radio_get_ipv4_gateway);
@ -476,10 +495,9 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_gateway_obj,
(mp_obj_t)&wifi_radio_get_ipv4_gateway_obj);
//| ipv4_gateway_ap: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the access point gateway, when enabled. None otherwise."""
//| """IP v4 Address of the access point gateway, when enabled. None otherwise. (read-only)"""
STATIC mp_obj_t wifi_radio_get_ipv4_gateway_ap(mp_obj_t self) {
return common_hal_wifi_radio_get_ipv4_gateway_ap(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_gateway_ap_obj, wifi_radio_get_ipv4_gateway_ap);
@ -487,10 +505,9 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_gateway_ap_obj,
(mp_obj_t)&wifi_radio_get_ipv4_gateway_ap_obj);
//| ipv4_subnet: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the station subnet when connected to an access point. None otherwise."""
//| """IP v4 Address of the station subnet when connected to an access point. None otherwise. (read-only)"""
STATIC mp_obj_t wifi_radio_get_ipv4_subnet(mp_obj_t self) {
return common_hal_wifi_radio_get_ipv4_subnet(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_subnet_obj, wifi_radio_get_ipv4_subnet);
@ -498,10 +515,9 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_subnet_obj,
(mp_obj_t)&wifi_radio_get_ipv4_subnet_obj);
//| ipv4_subnet_ap: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the access point subnet, when enabled. None otherwise."""
//| """IP v4 Address of the access point subnet, when enabled. None otherwise. (read-only)"""
STATIC mp_obj_t wifi_radio_get_ipv4_subnet_ap(mp_obj_t self) {
return common_hal_wifi_radio_get_ipv4_subnet_ap(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_subnet_ap_obj, wifi_radio_get_ipv4_subnet_ap);
@ -538,10 +554,9 @@ STATIC mp_obj_t wifi_radio_set_ipv4_address(size_t n_args, const mp_obj_t *pos_a
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(wifi_radio_set_ipv4_address_obj, 1, wifi_radio_set_ipv4_address);
//| ipv4_address: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the station when connected to an access point. None otherwise."""
//| """IP v4 Address of the station when connected to an access point. None otherwise. (read-only)"""
STATIC mp_obj_t _wifi_radio_get_ipv4_address(mp_obj_t self) {
return common_hal_wifi_radio_get_ipv4_address(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_address_obj, _wifi_radio_get_ipv4_address);
@ -552,7 +567,6 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_address_obj,
//| """IP v4 Address of the access point, when enabled. None otherwise."""
STATIC mp_obj_t wifi_radio_get_ipv4_address_ap(mp_obj_t self) {
return common_hal_wifi_radio_get_ipv4_address_ap(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_address_ap_obj, wifi_radio_get_ipv4_address_ap);
@ -563,7 +577,6 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_address_ap_obj,
//| """IP v4 Address of the DNS server to be used."""
STATIC mp_obj_t wifi_radio_get_ipv4_dns(mp_obj_t self) {
return common_hal_wifi_radio_get_ipv4_dns(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_dns_obj, wifi_radio_get_ipv4_dns);
@ -582,7 +595,6 @@ MP_PROPERTY_GETSET(wifi_radio_ipv4_dns_obj,
//| """Network object containing BSSID, SSID, authmode, channel, country and RSSI when connected to an access point. None otherwise."""
STATIC mp_obj_t wifi_radio_get_ap_info(mp_obj_t self) {
return common_hal_wifi_radio_get_ap_info(self);
}
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_info_obj, wifi_radio_get_ap_info);
@ -656,12 +668,14 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_start_ap), MP_ROM_PTR(&wifi_radio_start_ap_obj) },
{ MP_ROM_QSTR(MP_QSTR_stop_ap), MP_ROM_PTR(&wifi_radio_stop_ap_obj) },
{ MP_ROM_QSTR(MP_QSTR_ap_active), MP_ROM_PTR(&wifi_radio_ap_active_obj) },
{ MP_ROM_QSTR(MP_QSTR_start_dhcp), MP_ROM_PTR(&wifi_radio_start_dhcp_client_obj) },
{ MP_ROM_QSTR(MP_QSTR_stop_dhcp), MP_ROM_PTR(&wifi_radio_stop_dhcp_client_obj) },
{ MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&wifi_radio_connect_obj) },
// { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) },
{ MP_ROM_QSTR(MP_QSTR_connected), MP_ROM_PTR(&wifi_radio_connected_obj) },
{ MP_ROM_QSTR(MP_QSTR_ap_info), MP_ROM_PTR(&wifi_radio_ap_info_obj) },
{ MP_ROM_QSTR(MP_QSTR_ipv4_dns), MP_ROM_PTR(&wifi_radio_ipv4_dns_obj) },
@ -674,9 +688,6 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_set_ipv4_address), MP_ROM_PTR(&wifi_radio_set_ipv4_address_obj) },
// { MP_ROM_QSTR(MP_QSTR_access_point_active), MP_ROM_PTR(&wifi_radio_access_point_active_obj) },
// { MP_ROM_QSTR(MP_QSTR_start_access_point), MP_ROM_PTR(&wifi_radio_start_access_point_obj) },
{ MP_ROM_QSTR(MP_QSTR_ping), MP_ROM_PTR(&wifi_radio_ping_obj) },
};

View File

@ -95,11 +95,13 @@ extern void common_hal_wifi_radio_stop_station(wifi_radio_obj_t *self);
extern void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_t ssid_len, uint8_t *password, size_t password_len, uint8_t channel, uint32_t authmodes, uint8_t max_connections);
extern void common_hal_wifi_radio_stop_ap(wifi_radio_obj_t *self);
extern bool common_hal_wifi_radio_get_ap_active(wifi_radio_obj_t *self);
extern void common_hal_wifi_radio_start_dhcp_client(wifi_radio_obj_t *self);
extern void common_hal_wifi_radio_stop_dhcp_client(wifi_radio_obj_t *self);
extern wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t *ssid, size_t ssid_len, uint8_t *password, size_t password_len, uint8_t channel, mp_float_t timeout, uint8_t *bssid, size_t bssid_len);
extern bool common_hal_wifi_radio_get_connected(wifi_radio_obj_t *self);
extern mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self);
extern mp_obj_t common_hal_wifi_radio_get_ipv4_dns(wifi_radio_obj_t *self);

View File

@ -33,7 +33,10 @@
#include "py/runtime.h"
#include "shared-module/audiocore/__init__.h"
#include "shared-module/audiocore/RawSample.h"
#if defined(__arm__) && __arm__
#include "cmsis_compiler.h"
#endif
void common_hal_audiomixer_mixer_construct(audiomixer_mixer_obj_t *self,
uint8_t voice_count,
@ -140,7 +143,7 @@ static inline uint32_t mult16signed(uint32_t val, int32_t mul) {
float mod_mul = (float)mul / (float)((1 << 15) - 1);
for (int8_t i = 0; i < 2; i++) {
int16_t ai = (val >> (sizeof(uint16_t) * 8 * i));
int32_t intermediate = ai * mod_mul;
int32_t intermediate = (int32_t)(ai * mod_mul);
if (intermediate > SHRT_MAX) {
intermediate = SHRT_MAX;
} else if (intermediate < SHRT_MIN) {

View File

@ -42,12 +42,12 @@ void common_hal_audiomixer_mixervoice_set_parent(audiomixer_mixervoice_obj_t *se
self->parent = parent;
}
float common_hal_audiomixer_mixervoice_get_level(audiomixer_mixervoice_obj_t *self) {
return (float)self->level / (1 << 15);
mp_float_t common_hal_audiomixer_mixervoice_get_level(audiomixer_mixervoice_obj_t *self) {
return (mp_float_t)self->level / (1 << 15);
}
void common_hal_audiomixer_mixervoice_set_level(audiomixer_mixervoice_obj_t *self, float level) {
self->level = level * (1 << 15);
void common_hal_audiomixer_mixervoice_set_level(audiomixer_mixervoice_obj_t *self, mp_float_t level) {
self->level = (uint16_t)(level * (1 << 15));
}
void common_hal_audiomixer_mixervoice_play(audiomixer_mixervoice_obj_t *self, mp_obj_t sample, bool loop) {

View File

@ -3,7 +3,7 @@
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Kevin Matocha
* Copyright (c) 2021 Kevin Matocha, Jose David Montoya
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -40,6 +40,9 @@
#include <stdio.h>
#include <string.h>
#define BITMAP_DEBUG(...) (void)0
// #define BITMAP_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__)
void common_hal_bitmaptools_rotozoom(displayio_bitmap_t *self, int16_t ox, int16_t oy,
int16_t dest_clip0_x, int16_t dest_clip0_y,
int16_t dest_clip1_x, int16_t dest_clip1_y,
@ -918,3 +921,64 @@ void common_hal_bitmaptools_alphablend(displayio_bitmap_t *dest, displayio_bitma
}
}
}
STATIC void draw_circle(displayio_bitmap_t *destination,
int16_t x, int16_t y,
int16_t radius, uint32_t value) {
int16_t d, yb;
mp_arg_validate_int_range(x, SHRT_MIN, SHRT_MAX, MP_QSTR_x);
mp_arg_validate_int_range(y, SHRT_MIN, SHRT_MAX, MP_QSTR_y);
x = MIN(x, destination->width);
x = MAX(0, x);
y = MIN(y, destination->height);
y = MAX(0, y);
BITMAP_DEBUG("x, y, radius (%4d, %4d, %4d)\n", x, y, radius);
yb = radius;
d = 3 - 2 * radius;
// Bresenham's circle algorithm
for (int xb = 0; xb <= yb; xb++) {
displayio_bitmap_write_pixel(destination, xb + x, yb + y, value);
displayio_bitmap_write_pixel(destination, -xb + x, -yb + y, value);
displayio_bitmap_write_pixel(destination, -xb + x, yb + y, value);
displayio_bitmap_write_pixel(destination, xb + x, -yb + y, value);
displayio_bitmap_write_pixel(destination, yb + x, xb + y, value);
displayio_bitmap_write_pixel(destination, -yb + x, xb + y, value);
displayio_bitmap_write_pixel(destination, -yb + x, -xb + y, value);
displayio_bitmap_write_pixel(destination, yb + x, -xb + y, value);
if (d <= 0) {
d = d + (4 * xb) + 6;
} else {
d = d + 4 * (xb - yb) + 10;
yb = yb - 1;
}
}
}
void common_hal_bitmaptools_draw_circle(displayio_bitmap_t *destination,
int16_t x, int16_t y,
int16_t radius,
uint32_t value) {
// update the dirty area
int16_t xbb0, xbb1, ybb0, ybb1;
xbb0 = x - radius;
xbb1 = x + radius;
ybb0 = y - radius;
ybb1 = y + radius;
displayio_area_t area = { xbb0, ybb0, xbb1, ybb1, NULL };
displayio_area_t bitmap_area = { 0, 0, destination->width, destination->height, NULL };
displayio_area_compute_overlap(&area, &bitmap_area, &area);
displayio_bitmap_set_dirty_area(destination, &area);
draw_circle(destination, x, y, radius, value);
}

View File

@ -136,7 +136,9 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
// Set the group after initialization otherwise we may send pixels while we delay in
// initialization.
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
if (!circuitpython_splash.in_group) {
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
}
common_hal_displayio_display_set_auto_refresh(self, auto_refresh);
}
@ -437,7 +439,9 @@ void reset_display(displayio_display_obj_t *self) {
circuitpython_splash.x = 0; // reset position in case someone moved it.
circuitpython_splash.y = 0;
supervisor_start_terminal(self->core.width, self->core.height);
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
if (!circuitpython_splash.in_group) {
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
}
}
void displayio_display_collect_ptrs(displayio_display_obj_t *self) {

View File

@ -27,10 +27,6 @@
#include "py/runtime.h"
#include "shared-bindings/synthio/MidiTrack.h"
#define LOUDNESS 0x4000 // 0.5
#define BITS_PER_SAMPLE 16
#define BYTES_PER_SAMPLE (BITS_PER_SAMPLE / 8)
#define SILENCE 0x80
STATIC NORETURN void raise_midi_stream_error(uint32_t pos) {
mp_raise_ValueError_varg(translate("Error in MIDI stream at position %d"), pos);
@ -47,36 +43,42 @@ STATIC uint8_t parse_note(const uint8_t *buffer, uint32_t len, uint32_t *pos) {
return note;
}
STATIC void terminate_span(synthio_miditrack_obj_t *self, uint16_t *dur, uint16_t *max_dur) {
STATIC void terminate_span(synthio_miditrack_obj_t *self, uint16_t *dur) {
if (*dur) {
self->track[self->total_spans - 1].dur = *dur;
if (*dur > *max_dur) {
*max_dur = *dur;
}
*dur = 0;
} else {
self->total_spans--;
}
}
STATIC void add_span(synthio_miditrack_obj_t *self, uint8_t note1, uint8_t note2) {
synthio_midi_span_t span = { 0, {note1, note2} };
self->track = m_realloc(self->track,
(self->total_spans + 1) * sizeof(synthio_midi_span_t));
self->track[self->total_spans++] = span;
STATIC void add_span(synthio_miditrack_obj_t *self, const synthio_midi_span_t *span) {
self->track = m_renew(synthio_midi_span_t, self->track, self->total_spans, self->total_spans + 1);
self->track[self->total_spans++] = *span;
}
STATIC void change_span_note(synthio_miditrack_obj_t *self, uint8_t old_note, uint8_t new_note, uint16_t *dur) {
synthio_midi_span_t span = self->track[self->total_spans - 1];
if (synthio_span_change_note(&span, old_note, new_note)) {
terminate_span(self, dur);
add_span(self, &span);
*dur = 0;
}
}
void common_hal_synthio_miditrack_construct(synthio_miditrack_obj_t *self,
const uint8_t *buffer, uint32_t len, uint32_t tempo, uint32_t sample_rate) {
const uint8_t *buffer, uint32_t len, uint32_t tempo, uint32_t sample_rate,
const int16_t *waveform, uint16_t waveform_length) {
synthio_midi_span_t initial = { 0, {SILENCE, SILENCE} };
self->sample_rate = sample_rate;
self->synth.sample_rate = sample_rate;
self->track = m_malloc(sizeof(synthio_midi_span_t), false);
synthio_span_init(self->track);
self->next_span = 0;
self->total_spans = 1;
*self->track = initial;
self->synth.waveform = waveform;
self->synth.waveform_length = waveform_length;
uint16_t dur = 0, max_dur = 0;
uint16_t dur = 0;
uint32_t pos = 0;
while (pos < len) {
uint8_t c;
@ -91,37 +93,19 @@ void common_hal_synthio_miditrack_construct(synthio_miditrack_obj_t *self,
raise_midi_stream_error(pos);
}
// dur is carried over here so that if a note on/off message doesn't actually produce a change, the
// underlying "span" is extended. Otherwise, it is zeroed out in the call to `terminate_span`.
dur += delta * sample_rate / tempo;
switch (buffer[pos++] >> 4) {
case 8: { // Note Off
uint8_t note = parse_note(buffer, len, &pos);
// Ignore if not a note which is playing
synthio_midi_span_t last_span = self->track[self->total_spans - 1];
if (last_span.note[0] == note || last_span.note[1] == note) {
terminate_span(self, &dur, &max_dur);
if (last_span.note[0] == note) {
add_span(self, last_span.note[1], SILENCE);
} else {
add_span(self, last_span.note[0], SILENCE);
}
}
change_span_note(self, note, SYNTHIO_SILENCE, &dur);
break;
}
case 9: { // Note On
uint8_t note = parse_note(buffer, len, &pos);
// Ignore if two notes are already playing
synthio_midi_span_t last_span = self->track[self->total_spans - 1];
if (last_span.note[1] == SILENCE) {
terminate_span(self, &dur, &max_dur);
if (last_span.note[0] == SILENCE) {
add_span(self, note, SILENCE);
} else {
add_span(self, last_span.note[0], note);
}
}
change_span_note(self, SYNTHIO_SILENCE, note, &dur);
break;
}
case 10:
@ -142,27 +126,29 @@ void common_hal_synthio_miditrack_construct(synthio_miditrack_obj_t *self,
raise_midi_stream_error(pos);
}
}
terminate_span(self, &dur, &max_dur);
terminate_span(self, &dur);
self->buffer_length = max_dur * BYTES_PER_SAMPLE;
self->buffer = m_malloc(self->buffer_length, false);
uint16_t max_dur = 0;
for (int i = 0; i < self->total_spans; i++) {
max_dur = MAX(self->track[i].dur, max_dur);
}
synthio_synth_init(&self->synth, max_dur);
}
void common_hal_synthio_miditrack_deinit(synthio_miditrack_obj_t *self) {
m_free(self->buffer);
self->buffer = NULL;
m_free(self->track);
synthio_synth_deinit(&self->synth);
m_del(synthio_midi_span_t, self->track, self->total_spans + 1);
self->track = NULL;
}
bool common_hal_synthio_miditrack_deinited(synthio_miditrack_obj_t *self) {
return self->buffer == NULL;
return synthio_synth_deinited(&self->synth);
}
uint32_t common_hal_synthio_miditrack_get_sample_rate(synthio_miditrack_obj_t *self) {
return self->sample_rate;
return self->synth.sample_rate;
}
uint8_t common_hal_synthio_miditrack_get_bits_per_sample(synthio_miditrack_obj_t *self) {
return BITS_PER_SAMPLE;
return SYNTHIO_BITS_PER_SAMPLE;
}
uint8_t common_hal_synthio_miditrack_get_channel_count(synthio_miditrack_obj_t *self) {
return 1;
@ -170,47 +156,29 @@ uint8_t common_hal_synthio_miditrack_get_channel_count(synthio_miditrack_obj_t *
void synthio_miditrack_reset_buffer(synthio_miditrack_obj_t *self,
bool single_channel_output, uint8_t channel) {
synthio_synth_reset_buffer(&self->synth, single_channel_output, channel);
self->synth.span.dur = 0;
self->next_span = 0;
}
STATIC const uint16_t notes[] = {8372, 8870, 9397, 9956, 10548, 11175, 11840,
12544, 13290, 14080, 14917, 15804}; // 9th octave
audioio_get_buffer_result_t synthio_miditrack_get_buffer(synthio_miditrack_obj_t *self,
bool single_channel_output, uint8_t channel, uint8_t **buffer, uint32_t *buffer_length) {
if (self->next_span >= self->total_spans) {
*buffer_length = 0;
return GET_BUFFER_DONE;
if (self->synth.span.dur == 0) {
if (self->next_span >= self->total_spans) {
*buffer_length = 0;
return GET_BUFFER_DONE;
}
self->synth.span = self->track[self->next_span++];
}
synthio_midi_span_t span = self->track[self->next_span++];
*buffer_length = span.dur * BYTES_PER_SAMPLE;
uint8_t octave1 = span.note[0] / 12; // 0..10
uint8_t octave2 = span.note[1] / 12; // 0..10
int32_t base_freq1 = notes[span.note[0] % 12];
int32_t base_freq2 = notes[span.note[1] % 12];
int32_t sample_rate = self->sample_rate;
synthio_synth_synthesize(&self->synth, buffer, buffer_length, single_channel_output ? 0 : channel);
for (uint16_t i = 0; i < span.dur; i++) {
int16_t semiperiod1 = span.note[0] == SILENCE ? 0 :
((base_freq1 * i * 2) / sample_rate) >> (10 - octave1);
int16_t semiperiod2 = span.note[1] == SILENCE ? semiperiod1 :
((base_freq2 * i * 2) / sample_rate) >> (10 - octave2);
self->buffer[i] = ((semiperiod1 % 2 + semiperiod2 % 2) - 1) * LOUDNESS;
}
*buffer = (uint8_t *)self->buffer;
return self->next_span >= self->total_spans ?
return (self->synth.span.dur == 0 && self->next_span >= self->total_spans) ?
GET_BUFFER_DONE : GET_BUFFER_MORE_DATA;
}
void synthio_miditrack_get_buffer_structure(synthio_miditrack_obj_t *self, bool single_channel_output,
bool *single_buffer, bool *samples_signed, uint32_t *max_buffer_length, uint8_t *spacing) {
*single_buffer = true;
*samples_signed = true;
*max_buffer_length = self->buffer_length;
*spacing = 1;
return synthio_synth_get_buffer_structure(&self->synth, single_channel_output, single_buffer, samples_signed, max_buffer_length, spacing);
}

View File

@ -31,19 +31,12 @@
#include "shared-module/synthio/__init__.h"
typedef struct {
uint16_t dur;
uint8_t note[2];
} synthio_midi_span_t;
typedef struct {
mp_obj_base_t base;
uint32_t sample_rate;
uint16_t *buffer;
uint16_t buffer_length;
synthio_midi_span_t *track;
synthio_synth_t synth;
uint16_t next_span;
uint16_t total_spans;
synthio_midi_span_t *track;
} synthio_miditrack_obj_t;

View File

@ -0,0 +1,105 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Artyom Skrobov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/runtime.h"
#include "shared-bindings/synthio/Synthesizer.h"
void common_hal_synthio_synthesizer_construct(synthio_synthesizer_obj_t *self,
uint32_t sample_rate, const int16_t *waveform, uint16_t waveform_length) {
self->synth.sample_rate = sample_rate;
self->synth.waveform = waveform;
self->synth.waveform_length = waveform_length;
synthio_synth_init(&self->synth, SYNTHIO_MAX_DUR);
common_hal_synthio_synthesizer_release_all(self);
}
void common_hal_synthio_synthesizer_deinit(synthio_synthesizer_obj_t *self) {
synthio_synth_deinit(&self->synth);
}
bool common_hal_synthio_synthesizer_deinited(synthio_synthesizer_obj_t *self) {
return synthio_synth_deinited(&self->synth);
}
uint32_t common_hal_synthio_synthesizer_get_sample_rate(synthio_synthesizer_obj_t *self) {
return self->synth.sample_rate;
}
uint8_t common_hal_synthio_synthesizer_get_bits_per_sample(synthio_synthesizer_obj_t *self) {
return SYNTHIO_BITS_PER_SAMPLE;
}
uint8_t common_hal_synthio_synthesizer_get_channel_count(synthio_synthesizer_obj_t *self) {
return 1;
}
void synthio_synthesizer_reset_buffer(synthio_synthesizer_obj_t *self,
bool single_channel_output, uint8_t channel) {
synthio_synth_reset_buffer(&self->synth, single_channel_output, channel);
}
audioio_get_buffer_result_t synthio_synthesizer_get_buffer(synthio_synthesizer_obj_t *self,
bool single_channel_output, uint8_t channel, uint8_t **buffer, uint32_t *buffer_length) {
self->synth.span.dur = SYNTHIO_MAX_DUR;
synthio_synth_synthesize(&self->synth, buffer, buffer_length, single_channel_output ? channel : 0);
return GET_BUFFER_MORE_DATA;
}
void synthio_synthesizer_get_buffer_structure(synthio_synthesizer_obj_t *self, bool single_channel_output,
bool *single_buffer, bool *samples_signed, uint32_t *max_buffer_length, uint8_t *spacing) {
return synthio_synth_get_buffer_structure(&self->synth, single_channel_output, single_buffer, samples_signed, max_buffer_length, spacing);
}
void common_hal_synthio_synthesizer_release_all(synthio_synthesizer_obj_t *self) {
synthio_span_init(&self->synth.span);
}
void common_hal_synthio_synthesizer_release(synthio_synthesizer_obj_t *self, mp_obj_t to_release) {
mp_obj_iter_buf_t iter_buf;
mp_obj_t iterable = mp_getiter(to_release, &iter_buf);
mp_obj_t item;
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
synthio_span_change_note(&self->synth.span, mp_arg_validate_int_range(mp_obj_get_int(item), 0, 127, MP_QSTR_note), SYNTHIO_SILENCE);
}
}
void common_hal_synthio_synthesizer_press(synthio_synthesizer_obj_t *self, mp_obj_t to_press) {
mp_obj_iter_buf_t iter_buf;
mp_obj_t iterable = mp_getiter(to_press, &iter_buf);
mp_obj_t item;
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
synthio_span_change_note(&self->synth.span, SYNTHIO_SILENCE, mp_arg_validate_int_range(mp_obj_get_int(item), 0, 127, MP_QSTR_note));
}
}
mp_obj_t common_hal_synthio_synthesizer_get_pressed_notes(synthio_synthesizer_obj_t *self) {
mp_obj_tuple_t *result = MP_OBJ_TO_PTR(mp_obj_new_tuple(synthio_span_count_active_channels(&self->synth.span), NULL));
for (size_t i = 0, j = 0; i < CIRCUITPY_SYNTHIO_MAX_CHANNELS; i++) {
if (self->synth.span.note[i] != SYNTHIO_SILENCE) {
result->items[j++] = MP_OBJ_NEW_SMALL_INT(self->synth.span.note[i]);
}
}
return MP_OBJ_FROM_PTR(result);
}

View File

@ -0,0 +1,53 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2021 Artyom Skrobov
* Copyright (c) 2023 Jeff Epler for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* 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.
*/
#pragma once
#include "py/obj.h"
#include "shared-module/synthio/__init__.h"
typedef struct {
mp_obj_base_t base;
synthio_synth_t synth;
} synthio_synthesizer_obj_t;
// These are not available from Python because it may be called in an interrupt.
void synthio_synthesizer_reset_buffer(synthio_synthesizer_obj_t *self,
bool single_channel_output,
uint8_t channel);
audioio_get_buffer_result_t synthio_synthesizer_get_buffer(synthio_synthesizer_obj_t *self,
bool single_channel_output,
uint8_t channel,
uint8_t **buffer,
uint32_t *buffer_length); // length in bytes
void synthio_synthesizer_get_buffer_structure(synthio_synthesizer_obj_t *self, bool single_channel_output,
bool *single_buffer, bool *samples_signed,
uint32_t *max_buffer_length, uint8_t *spacing);

Some files were not shown because too many files have changed in this diff Show More