diff --git a/.travis.yml b/.travis.yml index 1702089c37..de5f34c684 100755 --- a/.travis.yml +++ b/.travis.yml @@ -23,9 +23,9 @@ git: env: - TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="circuitplayground_express mini_sam_m4 grandcentral_m4_express capablerobot_usbhub pygamer pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr electronut_labs_blip" TRAVIS_SDK=arm:nrf - TRAVIS_BOARDS="metro_m0_express metro_m4_express metro_m4_airlift_lite pirkey_m0 trellis_m4_express trinket_m0 sparkfun_lumidrive sparkfun_redboard_turbo bast_pro_mini_m0" TRAVIS_SDK=arm - - TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech" TRAVIS_SDK=arm + - TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech pygamer_advance" TRAVIS_SDK=arm - TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1" TRAVIS_SDK=arm - - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge" TRAVIS_SDK=arm + - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge pybadge_airlift" TRAVIS_SDK=arm addons: artifacts: @@ -33,6 +33,16 @@ addons: - $(ls -d1 bin/*/*/* | tr "\n" ":") target_paths: / +# Some deploy jobs take over 10 minutes so use this keep alive hack to make sure Travis doesn't kill us. +before_deploy: | + function keep_alive() { + while true; do + echo -en "\a" + sleep 5 + done + } + keep_alive & + deploy: provider: releases api_key: diff --git a/Makefile b/Makefile index 8a4cf609f6..b9c489fd40 100644 --- a/Makefile +++ b/Makefile @@ -204,7 +204,7 @@ pseudoxml: all-source: locale/circuitpython.pot: all-source - find $(TRANSLATE_SOURCES) -iname "*.c" -print0 | sort -z | xargs -0 xgettext -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale + find $(TRANSLATE_SOURCES) -iname "*.c" -print0 | (LC_ALL=C sort -z) | xargs -0 xgettext -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale translate: locale/circuitpython.pot for po in $(shell ls locale/*.po); do msgmerge -U $$po -s --no-fuzzy-matching --add-location=file locale/circuitpython.pot; done diff --git a/docs/design_guide.rst b/docs/design_guide.rst index 2efbdc34c0..5d965f9074 100644 --- a/docs/design_guide.rst +++ b/docs/design_guide.rst @@ -60,6 +60,7 @@ For example, a user can then use ``deinit()```:: import digitalio import board + import time led = digitalio.DigitalInOut(board.D13) led.direction = digitalio.Direction.OUTPUT @@ -79,6 +80,7 @@ Alternatively, using a ``with`` statement ensures that the hardware is deinitial import digitalio import board + import time with digitalio.DigitalInOut(board.D13) as led: led.direction = digitalio.Direction.OUTPUT diff --git a/docs/library/builtins.rst b/docs/library/builtins.rst index 0061a8cea0..6cbf95d53c 100644 --- a/docs/library/builtins.rst +++ b/docs/library/builtins.rst @@ -182,7 +182,7 @@ Exceptions .. exception:: OSError - |see_cpython| `OSError`. CircuitPython doesn't implement the ``errno`` + |see_cpython| :py:class:`cpython:OSError`. CircuitPython doesn't implement the ``errno`` attribute, instead use the standard way to access exception arguments: ``exc.args[0]``. @@ -198,11 +198,11 @@ Exceptions .. exception:: SystemExit - |see_cpython| :py:class:`python:SystemExit`. + |see_cpython| :py:class:`cpython:SystemExit`. .. exception:: TypeError - |see_cpython| :py:class:`python:TypeError`. + |see_cpython| :py:class:`cpython:TypeError`. .. exception:: ValueError diff --git a/locale/ID.po b/locale/ID.po index ea16b3dec1..65e21e5e4c 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -447,6 +447,14 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 4c399471be..eb1c3cc739 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -437,6 +437,14 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/de_DE.po b/locale/de_DE.po index 5231231295..dc9199dbc0 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -441,6 +441,14 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "Der Befehl muss ein int zwischen 0 und 255 sein" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/en_US.po b/locale/en_US.po index f1b9bae28c..a7b7cb36bd 100644 --- a/locale/en_US.po +++ b/locale/en_US.po @@ -437,6 +437,14 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/en_x_pirate.po b/locale/en_x_pirate.po index 1c9ca9f1bb..dc157140c5 100644 --- a/locale/en_x_pirate.po +++ b/locale/en_x_pirate.po @@ -441,6 +441,14 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/es.po b/locale/es.po index 013266aa7c..441b1af5c5 100644 --- a/locale/es.po +++ b/locale/es.po @@ -3,7 +3,6 @@ # This file is distributed under the same license as the PACKAGE package. # Carlos Diaz , 2018. # Juan Biondi , 2018. -# msgid "" msgstr "" "Project-Id-Version: \n" @@ -24,7 +23,7 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" "\n" -"Código en ejecución. Esperando para recargar.\n" +"El código terminó su ejecución. Esperando para recargar.\n" #: py/obj.c msgid " File \"%q\"" @@ -57,14 +56,12 @@ msgstr "%q indices deben ser enteros, no %s" #: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/displayio/Group.c shared-bindings/displayio/Shape.c -#, fuzzy msgid "%q must be >= 1" msgstr "%q debe ser >= 1" #: shared-bindings/fontio/BuiltinFont.c -#, fuzzy msgid "%q should be an int" -msgstr "%q deberia ser un int" +msgstr "%q debe ser un int" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -200,8 +197,7 @@ msgstr "'return' fuera de una función" #: py/compile.c msgid "'yield' outside function" -msgstr "" -"No es posible reiniciar en modo bootloader porque no hay bootloader presente." +msgstr "'yield' fuera de una función" #: py/compile.c msgid "*x must be assignment target" @@ -224,9 +220,14 @@ msgid "A hardware interrupt channel is already in use" msgstr "El canal EXTINT ya está siendo utilizado" #: shared-bindings/bleio/Address.c -#, fuzzy, c-format +#, c-format +msgid "Address is not %d bytes long or is in wrong format" +msgstr "Direción no es %d bytes largo o esta en el formato incorrecto" + +#: shared-bindings/bleio/Address.c +#, c-format msgid "Address must be %d bytes long" -msgstr "Direción debe ser %d bytes de largo" +msgstr "La dirección debe ser %d bytes de largo" #: shared-bindings/bleio/Address.c msgid "Address type out of range" @@ -241,19 +242,16 @@ msgid "All SPI peripherals are in use" msgstr "Todos los periféricos SPI están siendo usados" #: ports/nrf/common-hal/busio/UART.c -#, fuzzy msgid "All UART peripherals are in use" msgstr "Todos los periféricos UART están siendo usados" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" -msgstr "Todos los canales de eventos estan en uso" +msgstr "Todos los canales de eventos estan siendo usados" #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "All sync event channels in use" -msgstr "" -"Todos los canales de eventos de sincronización(sync event channels) están " -"siendo utilizados" +msgstr "Todos los canales de eventos de sincronización (sync event channels) están siendo utilizados" #: shared-bindings/pulseio/PWMOut.c msgid "All timers for this pin are in use" @@ -265,7 +263,7 @@ msgstr "Todos los timers para este pin están siendo utilizados" #: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c #: shared-module/_pew/PewPew.c msgid "All timers in use" -msgstr "Todos los timers estan en uso" +msgstr "Todos los timers en uso" #: ports/nrf/common-hal/analogio/AnalogOut.c msgid "AnalogOut functionality not supported" @@ -273,7 +271,7 @@ msgstr "Funcionalidad AnalogOut no soportada" #: shared-bindings/analogio/AnalogOut.c msgid "AnalogOut is only 16 bits. Value must be less than 65536." -msgstr "AnalogOut solo toma 16 bits. El valor debe ser menos de 65536." +msgstr "AnalogOut es solo de 16 bits. Value debe ser menos a 65536." #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "AnalogOut not supported on given pin" @@ -285,7 +283,7 @@ msgstr "Otro envío ya está activo" #: shared-bindings/pulseio/PulseOut.c msgid "Array must contain halfwords (type 'H')" -msgstr "La matriz debe contener palabras medias (tipo 'H')" +msgstr "Array debe contener media palabra (type 'H')" #: shared-bindings/nvm/ByteArray.c msgid "Array values should be single bytes." @@ -293,9 +291,7 @@ msgstr "Valores del array deben ser bytes individuales." #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running.\n" -msgstr "" -"Se intentó la asignación del heap cuando el VM de MicroPython no estaba " -"corriendo.\n" +msgstr "Intento de allocation de heap cuando la VM de MicroPython no estaba corriendo.\n" #: main.c msgid "Auto-reload is off.\n" @@ -305,9 +301,7 @@ msgstr "Auto-recarga deshabilitada.\n" msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" -msgstr "" -"Auto-reload habilitado. Simplemente guarda los archivos via USB para " -"ejecutarlos o entra al REPL para desabilitarlos.\n" +msgstr "Auto-reload habilitado. Simplemente guarda los archivos via USB para ejecutarlos o entra al REPL para desabilitarlos.\n" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must share a clock unit" @@ -315,7 +309,7 @@ msgstr "Bit clock y word select deben compartir una unidad de reloj" #: shared-bindings/audiobusio/PDMIn.c msgid "Bit depth must be multiple of 8." -msgstr "La profundidad de bits debe ser múltiplo de 8." +msgstr "Bits depth debe ser múltiplo de 8." #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" @@ -323,11 +317,11 @@ msgstr "Ambos pines deben soportar interrupciones por hardware" #: shared-bindings/supervisor/__init__.c msgid "Brightness must be between 0 and 255" -msgstr "Brillo debe estar entro 0 y 255" +msgstr "El brillo debe estar entro 0 y 255" #: shared-bindings/displayio/Display.c msgid "Brightness not adjustable" -msgstr "Brillo no adjustable" +msgstr "El brillo no se puede ajustar" #: shared-module/usb_hid/Device.c #, c-format @@ -340,14 +334,13 @@ msgstr "Buffer debe ser de longitud 1 como minimo" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c -#, fuzzy, c-format +#, c-format msgid "Bus pin %d is already in use" -msgstr "DAC ya está siendo utilizado" +msgstr "Bus pin %d ya está siendo utilizado" #: shared-bindings/bleio/UUID.c -#, fuzzy msgid "Byte buffer must be 16 bytes." -msgstr "buffer debe de ser un objeto bytes-like" +msgstr "Byte buffer debe de ser 16 bytes" #: shared-bindings/nvm/ByteArray.c msgid "Bytes must be between 0 and 255." @@ -376,9 +369,8 @@ msgid "Cannot get pull while in output mode" msgstr "No puede ser pull mientras este en modo de salida" #: ports/nrf/common-hal/microcontroller/Processor.c -#, fuzzy msgid "Cannot get temperature" -msgstr "No se puede obtener la temperatura. status: 0x%02x" +msgstr "No se puede obtener la temperatura." #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" @@ -406,11 +398,11 @@ msgstr "No se puede asignar un valor cuando la dirección es input." #: py/objslice.c msgid "Cannot subclass slice" -msgstr "" +msgstr "Cannot subclass slice" #: shared-module/bitbangio/SPI.c msgid "Cannot transfer without MOSI and MISO pins." -msgstr "No se puede transferir sin pines MOSI y MISO." +msgstr "No se puede transmitir sin pines MOSI y MISO." #: extmod/moductypes.c msgid "Cannot unambiguously get sizeof scalar" @@ -422,15 +414,15 @@ msgstr "No se puede escribir sin pin MOSI." #: shared-bindings/bleio/Service.c msgid "Characteristic UUID doesn't match Service UUID" -msgstr "Characteristic UUID no iguala al Service UUID" +msgstr "Características UUID no concide con el Service UUID" #: ports/nrf/common-hal/bleio/Service.c msgid "Characteristic already in use by another Service." -msgstr "Characteristic esta en uso por otro servicio" +msgstr "Características ya esta en uso por otro Serivice" #: shared-bindings/bleio/CharacteristicBuffer.c msgid "CharacteristicBuffer writing not provided" -msgstr "" +msgstr "CharateristicBuffer escritura no proporcionada" #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." @@ -438,7 +430,7 @@ msgstr "Clock pin init fallido" #: shared-module/bitbangio/I2C.c msgid "Clock stretch too long" -msgstr "" +msgstr "Clock stretch demasiado largo " #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Clock unit in use" @@ -446,17 +438,24 @@ msgstr "Clock unit está siendo utilizado" #: shared-bindings/_pew/PewPew.c msgid "Column entry must be digitalio.DigitalInOut" -msgstr "La entrada en la columna debe ser digitalio.DigitalInOut" +msgstr "Entrada de columna debe ser digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c -#, fuzzy msgid "Command must be an int between 0 and 255" -msgstr "Bytes debe estar entre 0 y 255." +msgstr "Command debe estar entre 0 y 255." + +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" -msgstr "No pudo descodificar ble_uuid, err 0x%04x" +msgstr "No se puede descodificar ble_uuid, err 0x%04x" #: ports/atmel-samd/common-hal/busio/UART.c msgid "Could not initialize UART" @@ -472,7 +471,7 @@ msgstr "No se pudo asignar el segundo buffer" #: supervisor/shared/safe_mode.c msgid "Crash into the HardFault_Handler.\n" -msgstr "" +msgstr "Choque en el HardFault_Handler.\n" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -481,16 +480,15 @@ msgstr "DAC ya está siendo utilizado" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c msgid "Data 0 pin must be byte aligned" -msgstr "" +msgstr "El pin Data 0 debe estar alineado a bytes" #: shared-module/audioio/WaveFile.c msgid "Data chunk must follow fmt chunk" -msgstr "El Data Chunk debe seguir el fmt chunk" +msgstr "Trozo de datos debe seguir fmt chunk" #: ports/nrf/common-hal/bleio/Peripheral.c -#, fuzzy msgid "Data too large for advertisement packet" -msgstr "Los datos no caben en el paquete de anuncio." +msgstr "Data es muy grande para el paquete de advertisement." #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." @@ -521,15 +519,13 @@ msgid "Expected a %q" msgstr "Se espera un %q" #: shared-bindings/bleio/CharacteristicBuffer.c -#, fuzzy msgid "Expected a Characteristic" -msgstr "No se puede agregar la Característica." +msgstr "Se esperaba una Característica." #: shared-bindings/bleio/Characteristic.c shared-bindings/bleio/Descriptor.c #: shared-bindings/bleio/Service.c -#, fuzzy msgid "Expected a UUID" -msgstr "Se espera un %q" +msgstr "Se esperaba un UUID" #: shared-bindings/bleio/Central.c msgid "Expected an Address" @@ -542,7 +538,7 @@ msgstr "Se esperaba un tuple de %d, se obtuvo %d" #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." -msgstr "" +msgstr "Fallo enviando comando" #: ports/nrf/sd_mutex.c #, fuzzy, c-format @@ -552,12 +548,12 @@ msgstr "No se puede adquirir el mutex, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Service.c #, fuzzy, c-format msgid "Failed to add characteristic, err 0x%04x" -msgstr "No se puede añadir caracteristica, status: 0x%08lX" +msgstr "Fallo al añadir caracteristica, err: 0x%08lX" #: ports/nrf/common-hal/bleio/Peripheral.c -#, fuzzy, c-format +#, c-format msgid "Failed to add service, err 0x%04x" -msgstr "No se puede detener el anuncio. status: 0x%02x" +msgstr "Fallo al agregar servicio. err: 0x%02x" #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c msgid "Failed to allocate RX buffer" @@ -570,9 +566,8 @@ msgid "Failed to allocate RX buffer of %d bytes" msgstr "Falló la asignación del buffer RX de %d bytes" #: ports/nrf/common-hal/bleio/Adapter.c -#, fuzzy msgid "Failed to change softdevice state" -msgstr "No se puede cambiar el estado del softdevice, error: 0x%08lX" +msgstr "No se puede cambiar el estado del softdevice" #: ports/nrf/common-hal/bleio/Peripheral.c #, c-format @@ -584,24 +579,22 @@ msgid "Failed to connect: timeout" msgstr "" #: ports/nrf/common-hal/bleio/Scanner.c -#, fuzzy, c-format +#, c-format msgid "Failed to continue scanning, err 0x%04x" -msgstr "No se puede iniciar el escaneo. status: 0x%02x" +msgstr "No se puede iniciar el escaneo. err: 0x%02x" #: ports/nrf/common-hal/bleio/Central.c #, fuzzy msgid "Failed to discover services" -msgstr "No se puede descubrir servicios, status: 0x%08lX" +msgstr "No se puede descubrir servicios" #: ports/nrf/common-hal/bleio/Adapter.c -#, fuzzy msgid "Failed to get local address" -msgstr "No se puede obtener la dirección local, error: 0x%08lX" +msgstr "No se puede obtener la dirección local" #: ports/nrf/common-hal/bleio/Adapter.c -#, fuzzy msgid "Failed to get softdevice state" -msgstr "No se puede obtener el estado del softdevice, error: 0x%08lX" +msgstr "No se puede obtener el estado del softdevice" #: ports/nrf/common-hal/bleio/Characteristic.c #, c-format @@ -609,9 +602,9 @@ msgid "Failed to notify or indicate attribute value, err 0x%04x" msgstr "Error al notificar o indicar el valor del atributo, err 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c -#, fuzzy, c-format +#, c-format msgid "Failed to read CCCD value, err 0x%04x" -msgstr "No se puede leer el valor del atributo. status 0x%02x" +msgstr "No se puede leer el valor del atributo. err 0x%02x" #: ports/nrf/common-hal/bleio/Characteristic.c #, c-format @@ -619,19 +612,19 @@ msgid "Failed to read attribute value, err 0x%04x" msgstr "Error al leer valor del atributo, err 0x%04" #: ports/nrf/common-hal/bleio/Characteristic.c -#, fuzzy, c-format +#, c-format msgid "Failed to read gatts value, err 0x%04x" msgstr "No se puede escribir el valor del atributo. status: 0x%02x" #: ports/nrf/common-hal/bleio/UUID.c -#, fuzzy, c-format +#, c-format msgid "Failed to register Vendor-Specific UUID, err 0x%04x" -msgstr "No se puede agregar el Vendor Specific 128-bit UUID." +msgstr "Fallo al registrar el Vendor-Specific UUID, err 0x%04x" #: ports/nrf/sd_mutex.c -#, fuzzy, c-format +#, c-format msgid "Failed to release mutex, err 0x%04x" -msgstr "No se puede liberar el mutex, status: 0x%08lX" +msgstr "No se puede liberar el mutex, err 0x%04x" #: ports/nrf/common-hal/bleio/Peripheral.c #, c-format @@ -639,9 +632,9 @@ msgid "Failed to set device name, err 0x%04x" msgstr "" #: ports/nrf/common-hal/bleio/Peripheral.c -#, fuzzy, c-format +#, c-format msgid "Failed to start advertising, err 0x%04x" -msgstr "No se puede inicar el anuncio. status: 0x%02x" +msgstr "No se puede inicar el anuncio. err: 0x%04x" #: ports/nrf/common-hal/bleio/Central.c #, c-format @@ -649,14 +642,14 @@ msgid "Failed to start connecting, error 0x%04x" msgstr "" #: ports/nrf/common-hal/bleio/Scanner.c -#, fuzzy, c-format +#, c-format msgid "Failed to start scanning, err 0x%04x" -msgstr "No se puede iniciar el escaneo. status: 0x%02x" +msgstr "No se puede iniciar el escaneo. err 0x%04x" #: ports/nrf/common-hal/bleio/Peripheral.c -#, fuzzy, c-format +#, c-format msgid "Failed to stop advertising, err 0x%04x" -msgstr "No se puede detener el anuncio. status: 0x%02x" +msgstr "No se puede detener el anuncio. err: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c #, c-format @@ -664,14 +657,13 @@ msgid "Failed to write CCCD, err 0x%04x" msgstr "" #: ports/nrf/common-hal/bleio/Characteristic.c -#, fuzzy, c-format msgid "Failed to write attribute value, err 0x%04x" -msgstr "No se puede escribir el valor del atributo. status: 0x%02x" +msgstr "No se puede escribir el valor del atributo. err: 0x%04x" #: ports/nrf/common-hal/bleio/Characteristic.c -#, fuzzy, c-format +#, c-format msgid "Failed to write gatts value, err 0x%04x" -msgstr "No se puede escribir el valor del atributo. status: 0x%02x" +msgstr "No se puede escribir el valor del atributo. err: 0x%04x" #: py/moduerrno.c msgid "File exists" @@ -720,9 +712,7 @@ msgstr "operación I2C no soportada" msgid "" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "mpy-update for more info." -msgstr "" -"Archivo .mpy incompatible. Actualice todos los archivos .mpy. Consulte " -"http://adafru.it/mpy-update para más información" +msgstr "Archivo .mpy incompatible. Actualice todos los archivos .mpy. Consulte http://adafru.it/mpy-update para más información" #: shared-bindings/_pew/PewPew.c msgid "Incorrect buffer size" @@ -752,7 +742,7 @@ msgstr "Argumento inválido" #: shared-module/displayio/Bitmap.c msgid "Invalid bits per value" -msgstr "Bits no válidos por valor" +msgstr "Inválido bits por valor" #: ports/nrf/common-hal/busio/UART.c msgid "Invalid buffer size" @@ -760,7 +750,7 @@ msgstr "Tamaño de buffer inválido" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" -msgstr "Período de captura no válido. Rango válido: 1 - 500" +msgstr "Inválido periodo de captura. Rango válido: 1 - 500" #: shared-bindings/audioio/Mixer.c msgid "Invalid channel count" @@ -776,7 +766,7 @@ msgstr "Archivo inválido" #: shared-module/audioio/WaveFile.c msgid "Invalid format chunk size" -msgstr "" +msgstr "Formato de fragmento de formato no válido" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "Invalid number of bits" @@ -830,7 +820,7 @@ msgstr "LHS del agumento por palabra clave deberia ser un identificador" #: shared-module/displayio/Group.c msgid "Layer already in a group." -msgstr "" +msgstr "Layer ya pertenece a un grupo" #: shared-module/displayio/Group.c msgid "Layer must be a Group or TileGrid subclass." @@ -870,7 +860,7 @@ msgstr "Valor máximo de x cuando se refleja es %d" #: supervisor/shared/safe_mode.c msgid "MicroPython NLR jump failed. Likely memory corruption.\n" -msgstr "" +msgstr "MicroPython NLR salto fallido. Probable corrupción de memoria.\n" #: supervisor/shared/safe_mode.c msgid "MicroPython fatal error.\n" @@ -878,11 +868,11 @@ msgstr "Error fatal de MicroPython.\n" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" -msgstr "" +msgstr "Micrófono demora de inicio debe estar en el rango 0.0 a 1.0" #: shared-bindings/displayio/Group.c msgid "Must be a %q subclass." -msgstr "" +msgstr "Debe de ser una subclase de %q" #: ports/nrf/common-hal/bleio/Characteristic.c msgid "No CCCD for this Characteristic" @@ -923,7 +913,7 @@ msgstr "No hay hardware random disponible" #: ports/atmel-samd/common-hal/ps2io/Ps2.c msgid "No hardware support on clk pin" -msgstr "" +msgstr "Sin soporte de hardware en el pin clk" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c @@ -940,20 +930,18 @@ msgstr "No existe el archivo/directorio" #: ports/nrf/common-hal/bleio/Characteristic.c #: shared-bindings/bleio/CharacteristicBuffer.c -#, fuzzy msgid "Not connected" -msgstr "No se puede conectar a AP" +msgstr "No conectado" #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c msgid "Not playing" -msgstr "" +msgstr "No reproduciendo" #: shared-bindings/util.c msgid "" "Object has been deinitialized and can no longer be used. Create a new object." msgstr "" -"El objeto se ha desinicializado y ya no se puede utilizar. Crea un nuevo " -"objeto" +"El objeto se ha desinicializado y ya no se puede utilizar. Crea un nuevo objeto" #: ports/nrf/common-hal/busio/UART.c msgid "Odd parity is not supported" @@ -961,15 +949,15 @@ msgstr "Paridad impar no soportada" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Only 8 or 16 bit mono with " -msgstr "" +msgstr "Solo mono de 8 ó 16 bit con " #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" -"Solo formato de Windows, BMP sin compresión soportado: el tamaño del " -"encabezado dado es %d" +"Solo formato de Windows, sin comprimir BMP soportado: tamaño de encabezado " +"dado es %d" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -977,6 +965,8 @@ msgid "" "Only monochrome, indexed 8bpp, and 16bpp or greater BMPs supported: %d bpp " "given" msgstr "" +"Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:% d " +"bppdado" #: shared-bindings/_pixelbuf/PixelBuf.c #, fuzzy @@ -985,17 +975,19 @@ msgstr "solo se admiten segmentos con step=1 (alias None)" #: shared-bindings/audiobusio/PDMIn.c msgid "Oversample must be multiple of 8." -msgstr "" +msgstr "El sobremuestreo debe ser un múltiplo de 8" #: shared-bindings/pulseio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" -msgstr "" +msgstr "PWM duty_cycle debe ser entre 0 y 65535 inclusivo (16 bit resolution)" #: shared-bindings/pulseio/PWMOut.c msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +"PWM frecuencia no esta escrito cuando el variable_frequency es falso en " +"construcion" #: py/moduerrno.c msgid "Permission denied" @@ -1008,7 +1000,7 @@ msgstr "Pin no tiene capacidad ADC" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "Pixel beyond bounds of buffer" -msgstr "" +msgstr "Pixel beyond bounds of buffer" #: py/builtinhelp.c #, fuzzy @@ -1017,7 +1009,7 @@ msgstr "Incapaz de montar de nuevo el sistema de archivos" #: shared-bindings/ps2io/Ps2.c msgid "Pop from an empty Ps2 buffer" -msgstr "" +msgstr "Pop de un buffer Ps2 vacio" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload." @@ -1060,7 +1052,7 @@ msgstr "Canal derecho no soportado" #: shared-bindings/_pew/PewPew.c msgid "Row entry must be digitalio.DigitalInOut" -msgstr "" +msgstr "La entrada de la fila debe ser digitalio.DigitalInOut" #: main.c msgid "Running in safe mode! Auto-reload is off.\n" @@ -1090,17 +1082,17 @@ msgstr "Serializer está siendo utilizado" #: shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." -msgstr "Cortes y valores son de diferentes longitudes." +msgstr "Slice y value tienen diferentes longitudes" #: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c #: shared-bindings/displayio/TileGrid.c shared-bindings/pulseio/PulseIn.c msgid "Slices not supported" -msgstr "No se soportan los cortes" +msgstr "Rebanadas no soportadas" #: ports/nrf/common-hal/bleio/Adapter.c #, c-format msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" -msgstr "" +msgstr "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #: extmod/modure.c msgid "Splitting with sub-captures" @@ -1122,6 +1114,12 @@ msgid "" "If you didn't change the stack, then file an issue here with the contents of " "your CIRCUITPY drive:\n" msgstr "" +"El heap de CircuitPython estaba corrupto porque el stack era demasiado " +"pequeño.\n" +"Aumente los límites del tamaño del stacj y presione reset (después de " +"expulsarCIRCUITPY).\n" +"Si no cambió el stack, entonces reporte un issue aquí con el contenido desu " +"unidad CIRCUITPY:\n" #: supervisor/shared/safe_mode.c msgid "" @@ -1130,7 +1128,6 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "" "The microcontroller's power dipped. Please make sure your power supply " "provides\n" @@ -1176,7 +1173,7 @@ msgstr "Los índices de Tile deben ser 0 - 255" #: shared-bindings/displayio/TileGrid.c msgid "Tile width must exactly divide bitmap width" -msgstr "" +msgstr "Ancho del Tile debe dividir exactamente el ancho de mapa de bits" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " @@ -1188,7 +1185,7 @@ msgstr "Demasiados canales en sample." #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c msgid "Too many display busses" -msgstr "" +msgstr "Demasiados buses de pantalla" #: shared-bindings/displayio/Display.c msgid "Too many displays" @@ -1216,11 +1213,11 @@ msgstr "" #: shared-bindings/bleio/UUID.c msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" -msgstr "El string UUID no es 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx'" +msgstr "UUID string no es 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" #: shared-bindings/bleio/UUID.c msgid "UUID value is not str, int or byte buffer" -msgstr "El valor UUID no es str, int, or buffer byte" +msgstr "UUID valor no es un str, int o byte buffer" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -1246,12 +1243,12 @@ msgstr "Imposible escribir en nvm" #: ports/nrf/common-hal/bleio/UUID.c msgid "Unexpected nrfx uuid type" -msgstr "Tipo nrfx uuid inesperado" +msgstr "Tipo de uuid nrfx inesperado" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "Unmatched number of items on RHS (expected %d, got %d)." -msgstr "" +msgstr "Número incomparable de elementos en RHS (%d esperado,%d obtenido)" #: ports/atmel-samd/common-hal/busio/I2C.c msgid "Unsupported baudrate" @@ -1303,7 +1300,6 @@ msgstr "" "Para listar los módulos incorporados por favor haga `help(\"modules\")`.\n" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "" "You are running in safe mode which means something unanticipated happened.\n" msgstr "" @@ -1375,7 +1371,7 @@ msgstr "atributos aún no soportados" #: ports/nrf/common-hal/bleio/Characteristic.c msgid "bad GATT role" -msgstr "Rol GATT malo" +msgstr "mal GATT role" #: py/builtinevex.c msgid "bad compile mode" @@ -1416,20 +1412,19 @@ msgstr "El argumento de chr() no esta en el rango(256)" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "buf is too small. need %d bytes" -msgstr "buf es demasiado pequeño. necesita %d bytes." +msgstr "buf es demasiado pequeño. necesita %d bytes" #: shared-bindings/audioio/RawSample.c msgid "buffer must be a bytes-like object" msgstr "buffer debe de ser un objeto bytes-like" #: shared-module/struct/__init__.c -#, fuzzy msgid "buffer size must match format" -msgstr "los buffers deben de tener la misma longitud" +msgstr "el tamaño del buffer debe de coincidir con el formato" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "buffer slices must be of equal length" -msgstr "cortes del buffer necesitan ser de tamaño igual" +msgstr "Las secciones del buffer necesitan tener longitud igual" #: py/modstruct.c shared-bindings/struct/__init__.c #: shared-module/struct/__init__.c @@ -1442,7 +1437,7 @@ msgstr "los buffers deben de tener la misma longitud" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" -msgstr "botones deben ser digitalio.DigitalInOut" +msgstr "los botones necesitan ser digitalio.DigitalInOut" #: py/vm.c msgid "byte code not implemented" @@ -1451,7 +1446,7 @@ msgstr "codigo byte no implementado" #: shared-bindings/_pixelbuf/PixelBuf.c #, c-format msgid "byteorder is not an instance of ByteOrder (got a %s)" -msgstr "byteorder no es instancia de ByteOrder (encontramos un %s)" +msgstr "byteorder no es instancia de ByteOrder (encontarmos un %s)" #: ports/atmel-samd/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" @@ -1633,15 +1628,15 @@ msgstr "no se puedo realizar importación relativa" #: py/emitnative.c msgid "casting" -msgstr "emitiendo (casting)" +msgstr "" #: shared-bindings/bleio/Service.c msgid "characteristics includes an object that is not a Characteristic" -msgstr "charactericas incluye un objeto que no es Characteristic" +msgstr "characteristics incluye un objeto que no es una Characteristica" #: shared-bindings/_stage/Text.c msgid "chars buffer too small" -msgstr "chars buffer muy pequeño" +msgstr "chars buffer es demasiado pequeño" #: py/modbuiltins.c msgid "chr() arg not in range(0x110000)" @@ -1653,7 +1648,7 @@ msgstr "El argumento de chr() no esta en el rango(256)" #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" -msgstr "El burrer de color debe ser 3 bytes (RGB) ó 4 bytes (RGB + pad byte)" +msgstr "color buffer debe ser 3 bytes (RGB) ó 4 bytes (RGB + pad byte)" #: shared-bindings/displayio/Palette.c msgid "color buffer must be a buffer or int" @@ -1744,9 +1739,8 @@ msgid "end of format while looking for conversion specifier" msgstr "el final del formato mientras se busca el especificador de conversión" #: shared-bindings/displayio/Shape.c -#, fuzzy msgid "end_x should be an int" -msgstr "y deberia ser un int" +msgstr "end_x debe ser un int" #: ports/nrf/common-hal/busio/UART.c #, c-format @@ -1759,11 +1753,11 @@ msgstr "las excepciones deben derivar de BaseException" #: py/objstr.c msgid "expected ':' after format specifier" -msgstr "se espera ':' despues de un especificaro de tipo format" +msgstr "se esperaba ':' después de un especificador de tipo format" #: py/obj.c msgid "expected tuple/list" -msgstr "tupla/lista esperada" +msgstr "se esperaba una tupla/lista" #: py/modthread.c msgid "expecting a dict for keyword args" @@ -1807,7 +1801,7 @@ msgstr "firstbit debe ser MSB" #: py/objint.c msgid "float too big" -msgstr "float es demasiado grande" +msgstr "" #: shared-bindings/_stage/Text.c msgid "font must be 2048 bytes long" @@ -1891,7 +1885,7 @@ msgstr "formato incompleto" #: py/objstr.c msgid "incomplete format key" -msgstr "llave de formato incompleto" +msgstr "" #: extmod/modubinascii.c msgid "incorrect padding" @@ -1961,7 +1955,7 @@ msgstr "decorador de micropython inválido" #: shared-bindings/random/__init__.c msgid "invalid step" -msgstr "paso invalido" +msgstr "" #: py/compile.c py/parse.c msgid "invalid syntax" @@ -2066,7 +2060,7 @@ msgstr "múltiples *x en la asignación" #: py/objtype.c msgid "multiple bases have instance lay-out conflict" -msgstr "múltiples bases tienen conflicto de diseño" +msgstr "multiple bases tienen una instancia conel conflicto diseño" #: py/objtype.c msgid "multiple inheritance not supported" @@ -2089,9 +2083,8 @@ msgid "name '%q' is not defined" msgstr "name '%q' no esta definido" #: shared-bindings/bleio/Peripheral.c -#, fuzzy msgid "name must be a string" -msgstr "palabras clave deben ser strings" +msgstr "name debe de ser un string" #: py/runtime.c msgid "name not defined" @@ -2099,11 +2092,11 @@ msgstr "name no definido" #: py/compile.c msgid "name reused for argument" -msgstr "nombre reusado para argumento" +msgstr "name reusado para argumento" #: py/emitnative.c msgid "native yield" -msgstr "rendimiento nativo" +msgstr "yield nativo" #: py/runtime.c #, c-format @@ -2116,7 +2109,7 @@ msgstr "potencia negativa sin float support" #: py/objint_mpz.c py/runtime.c msgid "negative shift count" -msgstr "cuenta negativa de turnos" +msgstr "cuenta de corrimientos negativo" #: py/vm.c msgid "no active exception to reraise" @@ -2166,7 +2159,7 @@ msgstr "" #: shared-bindings/bleio/UUID.c msgid "not a 128-bit UUID" -msgstr "no es un UUID de 128-bits" +msgstr "no es 128-bit UUID" #: py/objstr.c msgid "not all arguments converted during string formatting" @@ -2271,13 +2264,12 @@ msgid "parameters must be registers in sequence r0 to r3" msgstr "los parametros deben ser registros en secuencia del r0 al r3" #: shared-bindings/displayio/Bitmap.c -#, fuzzy msgid "pixel coordinates out of bounds" -msgstr "address fuera de límites" +msgstr "coordenadas del pixel fuera de límites" #: shared-bindings/displayio/Bitmap.c msgid "pixel value requires too many bits" -msgstr "valor de píxel requiere demasiado bits" +msgstr "valor del pixel require demasiado bits" #: shared-bindings/displayio/TileGrid.c msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" @@ -2314,7 +2306,7 @@ msgstr "desbordamiento de cola(queue)" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "rawbuf is not the same size as buf" -msgstr "rawbuf no es el miso tamaño que buf" +msgstr "rawbuf no es el mismo tamaño que buf" #: shared-bindings/_pixelbuf/__init__.c #, fuzzy @@ -2340,7 +2332,7 @@ msgstr "retorno esperado '%q' pero se obtuvo '%q'" #: py/objstr.c msgid "rsplit(None,n)" -msgstr "" +msgstr "rsplit(None,n)" #: shared-bindings/audioio/RawSample.c msgid "" @@ -2401,7 +2393,7 @@ msgstr "y deberia ser un int" #: shared-bindings/random/__init__.c msgid "step must be non-zero" -msgstr "paso debe ser numero no-cero" +msgstr "paso debe ser numero no cero" #: shared-bindings/busio/UART.c msgid "stop must be 1 or 2" @@ -2409,7 +2401,7 @@ msgstr "stop debe ser 1 ó 2" #: shared-bindings/random/__init__.c msgid "stop not reachable from start" -msgstr "" +msgstr "stop no se puede alcanzar del principio" #: py/stream.c msgid "stream operation not supported" @@ -2458,15 +2450,15 @@ msgstr "error de sintaxis en el descriptor uctypes" #: shared-bindings/touchio/TouchIn.c msgid "threshold must be in the range 0-65536" -msgstr "threshold debe estar en el rango 0 a 65536" +msgstr "limite debe ser en el rango 0-65536" #: shared-bindings/displayio/TileGrid.c msgid "tile index out of bounds" -msgstr "" +msgstr "el indice del tile fuera de limite" #: shared-bindings/time/__init__.c msgid "time.struct_time() takes a 9-sequence" -msgstr "" +msgstr "time.struct_time() toma un sequencio 9" #: shared-bindings/time/__init__.c msgid "time.struct_time() takes exactly 1 argument" @@ -2474,16 +2466,15 @@ msgstr "time.struct_time() acepta exactamente 1 argumento" #: shared-bindings/busio/UART.c msgid "timeout >100 (units are now seconds, not msecs)" -msgstr "tiempo muerto >100 (unidades en segundos)" +msgstr "timepo muerto >100 (unidades en segundos)" #: shared-bindings/bleio/CharacteristicBuffer.c -#, fuzzy msgid "timeout must be >= 0.0" -msgstr "tiempo muerto debe ser 8" +msgstr "tiempo muerto debe ser >= 0.0" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" -msgstr "" +msgstr "timestamp fuera de rango para plataform time_t" #: shared-module/struct/__init__.c msgid "too many arguments provided with the given format" @@ -2504,7 +2495,7 @@ msgstr "tupla/lista tiene una longitud incorrecta" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "tuple/list required on RHS" -msgstr "tuple o lista se requiere en RHS" +msgstr "tuple/lista se require en RHS" #: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c msgid "tx and rx cannot both be None" @@ -2548,7 +2539,7 @@ msgstr "argumento por palabra clave inesperado '%q'" #: py/lexer.c msgid "unicode name escapes" -msgstr "" +msgstr "nombre en unicode escapa" #: py/parse.c msgid "unindent does not match any outer indentation level" @@ -2628,7 +2619,7 @@ msgstr "" #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" -msgstr "value_count debe ser > 0" +msgstr "" #: shared-bindings/bleio/Scanner.c msgid "window must be <= interval" @@ -2636,7 +2627,7 @@ msgstr "" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "write_args must be a list, tuple, or None" -msgstr "write_args debe ser lista, tuple, o None" +msgstr "" #: py/objstr.c msgid "wrong number of arguments" @@ -2791,13 +2782,6 @@ msgstr "paso cero" #~ msgid "Not connected." #~ msgstr "No conectado." -#~ msgid "" -#~ "Only 8 or 16 bit mono with MP_STRINGIFY(OVERSAMPLING) x oversampling is " -#~ "supported." -#~ msgstr "" -#~ "Solo 8 ó 16 bit mono con MP_STRINGIFY(OVERSAMPLING) x de sobremuestreo es " -#~ "soportado." - #~ msgid "Only Windows format, uncompressed BMP supported %d" #~ msgstr "Solo formato Windows, BMP sin comprimir soportado %d" diff --git a/locale/fil.po b/locale/fil.po index 951695bb79..3e8e53f08b 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -446,6 +446,14 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "Sa gitna ng 0 o 255 dapat ang bytes." +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/fr.po b/locale/fr.po index abed1204c5..4ce6d5e0ba 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -452,6 +452,14 @@ msgstr "L'entrée 'Column' doit être un digitalio.DigitalInOut" msgid "Command must be an int between 0 and 255" msgstr "La commande doit être un entier entre 0 et 255" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/it_IT.po b/locale/it_IT.po index 0637d2e493..47ed3d95c9 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -447,6 +447,14 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "I byte devono essere compresi tra 0 e 255" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/pl.po b/locale/pl.po index 4ea878146a..1361119cf0 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -440,6 +440,14 @@ msgstr "Kolumny muszą być typu digitalio.DigitalInOut" msgid "Command must be an int between 0 and 255" msgstr "Komenda musi być int pomiędzy 0 a 255" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index d924171566..897a057f97 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -443,6 +443,14 @@ msgstr "" msgid "Command must be an int between 0 and 255" msgstr "Os bytes devem estar entre 0 e 255." +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index c48cb6b2c7..5f03dc6aa4 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -441,6 +441,14 @@ msgstr "Liè tiáomù bìxū shì digitalio.DigitalInOut" msgid "Command must be an int between 0 and 255" msgstr "Mìnglìng bìxū shì 0 dào 255 zhī jiān de int" +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "" + #: ports/nrf/common-hal/bleio/UUID.c #, c-format msgid "Could not decode ble_uuid, err 0x%04x" diff --git a/ports/atmel-samd/boards/hallowing_m0_express/board.c b/ports/atmel-samd/boards/hallowing_m0_express/board.c index 6e0328e952..a0e160757d 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/board.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/board.c @@ -74,12 +74,12 @@ void board_init(void) { displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; busio_spi_obj_t *spi = common_hal_board_create_spi(); - common_hal_busio_spi_configure(spi, 12000000, 0, 0, 8); common_hal_displayio_fourwire_construct(bus, spi, &pin_PA28, // Command or data &pin_PA01, // Chip select - &pin_PA27); // Reset + &pin_PA27, // Reset + 12000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/pirkey_m0/pins.c b/ports/atmel-samd/boards/pirkey_m0/pins.c index e1f43c83cc..41d02e3291 100644 --- a/ports/atmel-samd/boards/pirkey_m0/pins.c +++ b/ports/atmel-samd/boards/pirkey_m0/pins.c @@ -5,8 +5,5 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA01) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/pybadge/board.c b/ports/atmel-samd/boards/pybadge/board.c index 64fb8e8526..38902315aa 100644 --- a/ports/atmel-samd/boards/pybadge/board.c +++ b/ports/atmel-samd/boards/pybadge/board.c @@ -73,7 +73,6 @@ void board_init(void) { busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL); common_hal_busio_spi_never_reset(spi); - common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8); displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; @@ -81,7 +80,8 @@ void board_init(void) { spi, &pin_PB05, // TFT_DC Command or data &pin_PB07, // TFT_CS Chip select - &pin_PA00); // TFT_RST Reset + &pin_PA00, // TFT_RST Reset + 60000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/pybadge_airlift/board.c b/ports/atmel-samd/boards/pybadge_airlift/board.c new file mode 100644 index 0000000000..a1f778df1c --- /dev/null +++ b/ports/atmel-samd/boards/pybadge_airlift/board.c @@ -0,0 +1,92 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" +#include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" +#include "tick.h" + +displayio_fourwire_obj_t board_display_obj; + +#define DELAY 0x80 + +uint8_t display_init_sequence[] = { + 0x01, 0 | DELAY, 150, // SWRESET + 0x11, 0 | DELAY, 255, // SLPOUT + 0x36, 1, 0x08, // _MADCTL bottom to top refresh in vsync aligned order. + 0x3a, 1, 0x55, // COLMOD - 16bit color + 0x21, 0 | DELAY, 10, // _INVON + 0x13, 0 | DELAY, 10, // _NORON + 0x29, 0 | DELAY, 255, // _DISPON +}; + +void board_init(void) { + busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; + common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL); + 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_PB05, // TFT_DC Command or data + &pin_PB06, // TFT_CS Chip select + &pin_PB07, // TFT_RST Reset + 60000000); + + displayio_display_obj_t* display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 320, // Width (after rotation) + 240, // Height (after rotation) + 0, // column start + 0, // row start + 90, // rotation + 16, // Color depth + MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + 0x37, // set vertical scroll command + display_init_sequence, + sizeof(display_init_sequence), + &pin_PA01, // backlight pin + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false); // data_as_commands +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h new file mode 100644 index 0000000000..ade74786d3 --- /dev/null +++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h @@ -0,0 +1,37 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit Pybadge Airlift" +#define MICROPY_HW_MCU_NAME "samd51j20" + +#define CIRCUITPY_MCU_FAMILY samd51 + +// This is for Rev B +#define MICROPY_HW_LED_STATUS (&pin_PA23) + +// These are pins not to reset. +// QSPI Data pins +#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11) +// DotStar pins, QSPI CS, and QSPI SCK +#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11) +#define MICROPY_PORT_C (0) +#define MICROPY_PORT_D (0) + +#define AUTORESET_DELAY_MS 500 + +// If you change this, then make sure to update the linker scripts as well to +// make sure you don't overwrite code +#define CIRCUITPY_INTERNAL_NVM_SIZE 8192 + +#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) + +#define DEFAULT_I2C_BUS_SCL (&pin_PA13) +#define DEFAULT_I2C_BUS_SDA (&pin_PA12) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB23) +#define DEFAULT_SPI_BUS_MISO (&pin_PB22) + +#define DEFAULT_UART_BUS_RX (&pin_PB17) +#define DEFAULT_UART_BUS_TX (&pin_PB16) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk new file mode 100644 index 0000000000..12683e995c --- /dev/null +++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk @@ -0,0 +1,23 @@ +LD_FILE = boards/samd51x19-bootloader-external-flash.ld +USB_VID = 0x239A +USB_PID = 0x8043 +USB_PRODUCT = "PyBadge AirLift" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = GD25Q16C +LONGINT_IMPL = MPZ + +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_GAMEPAD = 1 +CIRCUITPY_GAMEPADSHIFT = 1 +CIRCUITPY_STAGE = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 + +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge diff --git a/ports/atmel-samd/boards/pybadge_airlift/pins.c b/ports/atmel-samd/boards/pybadge_airlift/pins.c new file mode 100644 index 0000000000..d396502460 --- /dev/null +++ b/ports/atmel-samd/boards/pybadge_airlift/pins.c @@ -0,0 +1,75 @@ +#include "shared-bindings/board/__init__.h" + +#include "boards/board.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + {MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB09)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA04)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB01)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB03)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB02)}, + + {MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB17)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB16)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB03)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB02)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA16)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA18)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB14)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA15)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA20)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA21)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23)}, + + // UART + {MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB17)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB16)}, + + // I2C + {MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13)}, + + // SPI + {MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23)}, + + // Special named pins + {MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_PB04)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_PB14)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_ENABLE), MP_ROM_PTR(&pin_PA27)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LATCH), MP_ROM_PTR(&pin_PB00)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_OUT), MP_ROM_PTR(&pin_PB30)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_CLOCK), MP_ROM_PTR(&pin_PB31)}, + + // ESP control + {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_CS), MP_ROM_PTR(&pin_PA14)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), MP_ROM_PTR(&pin_PA31)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PA00)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PB12)}, + + // TFT control pins + {MP_OBJ_NEW_QSTR(MP_QSTR_TFT_LITE), MP_ROM_PTR(&pin_PA01)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_PB15)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_PB13)}, + {MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RST), MP_ROM_PTR(&pin_PB07)}, + {MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_PB06)}, + {MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_PB05)}, + + {MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj)}, + {MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj)}, + {MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj)}, + + {MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/pygamer/board.c b/ports/atmel-samd/boards/pygamer/board.c index c8a7b9c236..7b54b6fb53 100644 --- a/ports/atmel-samd/boards/pygamer/board.c +++ b/ports/atmel-samd/boards/pygamer/board.c @@ -73,7 +73,6 @@ void board_init(void) { busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL); common_hal_busio_spi_never_reset(spi); - common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8); displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; @@ -81,7 +80,8 @@ void board_init(void) { spi, &pin_PB05, // TFT_DC Command or data &pin_PB12, // TFT_CS Chip select - &pin_PA00); // TFT_RST Reset + &pin_PA00, // TFT_RST Reset + 60000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk index a1ff907475..69fb14358e 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk @@ -20,4 +20,4 @@ CIRCUITPY_STAGE = 1 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 -FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pygamer diff --git a/ports/atmel-samd/boards/pygamer/pins.c b/ports/atmel-samd/boards/pygamer/pins.c index 9d0d196e73..7e6eff43f9 100644 --- a/ports/atmel-samd/boards/pygamer/pins.c +++ b/ports/atmel-samd/boards/pygamer/pins.c @@ -63,8 +63,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RST), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_PB05) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_X), MP_ROM_PTR(&pin_PB06) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_Y), MP_ROM_PTR(&pin_PB07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_X), MP_ROM_PTR(&pin_PB07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_Y), MP_ROM_PTR(&pin_PB06) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, diff --git a/ports/atmel-samd/boards/pygamer_advance/board.c b/ports/atmel-samd/boards/pygamer_advance/board.c new file mode 100644 index 0000000000..d1c5edc999 --- /dev/null +++ b/ports/atmel-samd/boards/pygamer_advance/board.c @@ -0,0 +1,92 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" +#include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" +#include "tick.h" + +displayio_fourwire_obj_t board_display_obj; + +#define DELAY 0x80 + +uint8_t display_init_sequence[] = { + 0x01, 0 | DELAY, 150, // SWRESET + 0x11, 0 | DELAY, 255, // SLPOUT + 0x36, 1, 0x00, // _MADCTL bottom to top refresh in vsync aligned order. + 0x3a, 1, 0x55, // COLMOD - 16bit color + 0x21, 0 | DELAY, 10, // _INVON + 0x13, 0 | DELAY, 10, // _NORON + 0x29, 0 | DELAY, 255, // _DISPON +}; + +void board_init(void) { + busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus; + common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB12, NULL); + 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_PA00, // TFT_DC Command or data + &pin_PB15, // TFT_CS Chip select + &pin_PB05, // TFT_RST Reset + 60000000); + + displayio_display_obj_t* display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 320, // Width (after rotation) + 240, // Height (after rotation) + 0, // column start + 0, // row start + 90, // rotation + 16, // Color depth + MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + 0x37, // set vertical scroll command + display_init_sequence, + sizeof(display_init_sequence), + &pin_PA01, // backlight pin + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false); // data_as_commands +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h new file mode 100644 index 0000000000..c05aa4f062 --- /dev/null +++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h @@ -0,0 +1,36 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit PyGamer" +#define MICROPY_HW_MCU_NAME "samd51j20" + +#define CIRCUITPY_MCU_FAMILY samd51 + +#define MICROPY_HW_LED_STATUS (&pin_PA23) + +// These are pins not to reset. +// QSPI Data pins +#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11) +// DotStar pins, QSPI CS, and QSPI SCK +#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11) +#define MICROPY_PORT_C (0) +#define MICROPY_PORT_D (0) + +#define AUTORESET_DELAY_MS 500 + +// If you change this, then make sure to update the linker scripts as well to +// make sure you don't overwrite code +#define CIRCUITPY_INTERNAL_NVM_SIZE 8192 + +#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) + +#define DEFAULT_I2C_BUS_SCL (&pin_PA13) +#define DEFAULT_I2C_BUS_SDA (&pin_PA12) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB23) +#define DEFAULT_SPI_BUS_MISO (&pin_PB22) + +#define DEFAULT_UART_BUS_RX (&pin_PB17) +#define DEFAULT_UART_BUS_TX (&pin_PB16) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk new file mode 100644 index 0000000000..1bb2c553d6 --- /dev/null +++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk @@ -0,0 +1,23 @@ +LD_FILE = boards/samd51x19-bootloader-external-flash.ld +USB_VID = 0x239A +USB_PID = 0x803E +USB_PRODUCT = "PyGamer Advance" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = GD25Q64C +LONGINT_IMPL = MPZ + +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_GAMEPAD = 1 +CIRCUITPY_GAMEPADSHIFT = 1 +CIRCUITPY_STAGE = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 + +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge diff --git a/ports/atmel-samd/boards/pygamer_advance/pins.c b/ports/atmel-samd/boards/pygamer_advance/pins.c new file mode 100644 index 0000000000..9c2284db1a --- /dev/null +++ b/ports/atmel-samd/boards/pygamer_advance/pins.c @@ -0,0 +1,75 @@ +#include "shared-bindings/board/__init__.h" + +#include "boards/board.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB02) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) }, + + // UART + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB16) }, + + // I2C + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13) }, + + // SPI + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) }, + + // SDCS, dup of D4 + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PA14) }, + + // Special named pins + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_PB04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_ENABLE), MP_ROM_PTR(&pin_PA27) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LATCH), MP_ROM_PTR(&pin_PB00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_OUT), MP_ROM_PTR(&pin_PB30) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_CLOCK), MP_ROM_PTR(&pin_PB31) }, + + // TFT control pins + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_LITE), MP_ROM_PTR(&pin_PA01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_PB12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_PB13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RST), MP_ROM_PTR(&pin_PB05) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_PB15) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_PA00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_X), MP_ROM_PTR(&pin_PB07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_JOYSTICK_Y), MP_ROM_PTR(&pin_PB06) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/ugame10/board.c b/ports/atmel-samd/boards/ugame10/board.c index 38f63570a2..828f0c87d2 100644 --- a/ports/atmel-samd/boards/ugame10/board.c +++ b/ports/atmel-samd/boards/ugame10/board.c @@ -74,12 +74,12 @@ void board_init(void) { displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; busio_spi_obj_t *spi = common_hal_board_create_spi(); - common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8); common_hal_displayio_fourwire_construct(bus, spi, &pin_PA09, // Command or data &pin_PA08, // Chip select - NULL); // Reset + NULL, // Reset + 24000000); displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; diff --git a/ports/atmel-samd/boards/ugame10/brutalist-6.bdf b/ports/atmel-samd/boards/ugame10/brutalist-6.bdf new file mode 100644 index 0000000000..f9e21e76a9 --- /dev/null +++ b/ports/atmel-samd/boards/ugame10/brutalist-6.bdf @@ -0,0 +1,1147 @@ +STARTFONT 2.1 +FONT -FontForge-Brutalist-Regular-R-Normal--6-60-75-75-P-40-ISO8859-1 +SIZE 6 100 100 +FONTBOUNDINGBOX 4 6 0 0 +COMMENT "Generated by fontforge, http://fontforge.sourceforge.net" +STARTPROPERTIES 17 +FAMILY_NAME "brutalist" +WEIGHT_NAME "Regular" +SLANT "R" +SETWIDTH_NAME "Normal" +PIXEL_SIZE 6 +POINT_SIZE 60 +RESOLUTION_X 100 +RESOLUTION_Y 100 +SPACING "C" +AVERAGE_WIDTH 40 +CHARSET_REGISTRY "ISO8859" +CHARSET_ENCODING "1" +FONTNAME_REGISTRY "" +FONT_ASCENT 4 +FONT_DESCENT 2 +MIN_SPACE 6 +FIGURE_WIDTH 4 +ENDPROPERTIES +CHARS 96 +STARTCHAR space +ENCODING 32 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 1 3 -2 +BITMAP +00 +ENDCHAR +STARTCHAR exclam +ENCODING 33 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 6 0 -2 +BITMAP +80 +80 +80 +80 +00 +80 +ENDCHAR +STARTCHAR quotedbl +ENCODING 34 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 2 0 2 +BITMAP +A0 +A0 +ENDCHAR +STARTCHAR numbersign +ENCODING 35 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +A0 +E0 +A0 +A0 +E0 +A0 +ENDCHAR +STARTCHAR dollar +ENCODING 36 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +40 +E0 +C0 +60 +E0 +40 +ENDCHAR +STARTCHAR percent +ENCODING 37 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +A0 +20 +40 +40 +80 +A0 +ENDCHAR +STARTCHAR ampersand +ENCODING 38 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +40 +A0 +40 +A0 +A0 +60 +ENDCHAR +STARTCHAR quotesingle +ENCODING 39 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 2 0 2 +BITMAP +80 +80 +ENDCHAR +STARTCHAR parenleft +ENCODING 40 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +60 +80 +80 +80 +80 +60 +ENDCHAR +STARTCHAR parenright +ENCODING 41 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +C0 +20 +20 +20 +20 +C0 +ENDCHAR +STARTCHAR asterisk +ENCODING 42 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 3 0 0 +BITMAP +A0 +40 +A0 +ENDCHAR +STARTCHAR plus +ENCODING 43 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 3 0 0 +BITMAP +40 +E0 +40 +ENDCHAR +STARTCHAR comma +ENCODING 44 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 3 0 -2 +BITMAP +40 +40 +80 +ENDCHAR +STARTCHAR hyphen +ENCODING 45 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 1 0 1 +BITMAP +E0 +ENDCHAR +STARTCHAR period +ENCODING 46 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 1 0 -1 +BITMAP +80 +ENDCHAR +STARTCHAR slash +ENCODING 47 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +20 +20 +40 +40 +80 +80 +ENDCHAR +STARTCHAR zero +ENCODING 48 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +60 +A0 +A0 +A0 +C0 +ENDCHAR +STARTCHAR one +ENCODING 49 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 5 0 -1 +BITMAP +40 +C0 +40 +40 +40 +ENDCHAR +STARTCHAR two +ENCODING 50 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +20 +E0 +80 +E0 +ENDCHAR +STARTCHAR three +ENCODING 51 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +20 +E0 +20 +E0 +ENDCHAR +STARTCHAR four +ENCODING 52 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +E0 +20 +20 +ENDCHAR +STARTCHAR five +ENCODING 53 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +E0 +20 +E0 +ENDCHAR +STARTCHAR six +ENCODING 54 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +E0 +A0 +E0 +ENDCHAR +STARTCHAR seven +ENCODING 55 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +20 +20 +20 +20 +ENDCHAR +STARTCHAR eight +ENCODING 56 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +E0 +A0 +E0 +ENDCHAR +STARTCHAR nine +ENCODING 57 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +E0 +20 +E0 +ENDCHAR +STARTCHAR colon +ENCODING 58 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 3 1 0 +BITMAP +80 +00 +80 +ENDCHAR +STARTCHAR semicolon +ENCODING 59 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 5 0 -2 +BITMAP +40 +00 +40 +40 +80 +ENDCHAR +STARTCHAR less +ENCODING 60 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +20 +40 +80 +40 +20 +ENDCHAR +STARTCHAR equal +ENCODING 61 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 3 0 0 +BITMAP +E0 +00 +E0 +ENDCHAR +STARTCHAR greater +ENCODING 62 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +40 +20 +40 +80 +ENDCHAR +STARTCHAR question +ENCODING 63 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +20 +60 +40 +00 +40 +ENDCHAR +STARTCHAR at +ENCODING 64 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +A0 +E0 +E0 +80 +E0 +ENDCHAR +STARTCHAR A +ENCODING 65 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +A0 +E0 +A0 +ENDCHAR +STARTCHAR B +ENCODING 66 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +C0 +A0 +C0 +A0 +E0 +ENDCHAR +STARTCHAR C +ENCODING 67 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +80 +A0 +E0 +ENDCHAR +STARTCHAR D +ENCODING 68 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +C0 +A0 +A0 +A0 +C0 +ENDCHAR +STARTCHAR E +ENCODING 69 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +E0 +80 +E0 +ENDCHAR +STARTCHAR F +ENCODING 70 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +80 +E0 +80 +ENDCHAR +STARTCHAR G +ENCODING 71 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +80 +A0 +A0 +E0 +20 +ENDCHAR +STARTCHAR H +ENCODING 72 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +E0 +A0 +A0 +ENDCHAR +STARTCHAR I +ENCODING 73 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +40 +40 +40 +E0 +ENDCHAR +STARTCHAR J +ENCODING 74 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +20 +20 +20 +A0 +E0 +ENDCHAR +STARTCHAR K +ENCODING 75 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +C0 +E0 +A0 +A0 +ENDCHAR +STARTCHAR L +ENCODING 76 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +80 +80 +80 +E0 +ENDCHAR +STARTCHAR M +ENCODING 77 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +E0 +A0 +A0 +A0 +ENDCHAR +STARTCHAR N +ENCODING 78 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +E0 +E0 +E0 +A0 +ENDCHAR +STARTCHAR O +ENCODING 79 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR P +ENCODING 80 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +A0 +E0 +80 +ENDCHAR +STARTCHAR Q +ENCODING 81 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +A0 +A0 +A0 +E0 +20 +ENDCHAR +STARTCHAR R +ENCODING 82 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +A0 +A0 +C0 +A0 +ENDCHAR +STARTCHAR S +ENCODING 83 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +80 +E0 +20 +E0 +ENDCHAR +STARTCHAR T +ENCODING 84 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +40 +40 +40 +40 +ENDCHAR +STARTCHAR U +ENCODING 85 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR V +ENCODING 86 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +A0 +E0 +40 +ENDCHAR +STARTCHAR W +ENCODING 87 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +A0 +E0 +A0 +ENDCHAR +STARTCHAR X +ENCODING 88 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +40 +A0 +A0 +ENDCHAR +STARTCHAR Y +ENCODING 89 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +A0 +A0 +E0 +40 +40 +ENDCHAR +STARTCHAR Z +ENCODING 90 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +E0 +20 +40 +80 +E0 +ENDCHAR +STARTCHAR bracketleft +ENCODING 91 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +80 +80 +80 +80 +E0 +ENDCHAR +STARTCHAR backslash +ENCODING 92 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +80 +80 +40 +40 +20 +20 +ENDCHAR +STARTCHAR bracketright +ENCODING 93 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +20 +20 +20 +20 +E0 +ENDCHAR +STARTCHAR asciicircum +ENCODING 94 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 3 0 1 +BITMAP +40 +E0 +A0 +ENDCHAR +STARTCHAR underscore +ENCODING 95 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 1 0 -1 +BITMAP +E0 +ENDCHAR +STARTCHAR grave +ENCODING 96 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 2 1 2 +BITMAP +80 +40 +ENDCHAR +STARTCHAR a +ENCODING 97 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +60 +A0 +E0 +ENDCHAR +STARTCHAR b +ENCODING 98 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +E0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR c +ENCODING 99 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +80 +E0 +ENDCHAR +STARTCHAR d +ENCODING 100 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +20 +E0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR e +ENCODING 101 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +C0 +E0 +ENDCHAR +STARTCHAR f +ENCODING 102 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +60 +40 +E0 +40 +40 +40 +ENDCHAR +STARTCHAR g +ENCODING 103 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -2 +BITMAP +E0 +A0 +E0 +20 +E0 +ENDCHAR +STARTCHAR h +ENCODING 104 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +E0 +A0 +A0 +A0 +ENDCHAR +STARTCHAR i +ENCODING 105 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 2 5 1 -1 +BITMAP +80 +00 +80 +80 +C0 +ENDCHAR +STARTCHAR j +ENCODING 106 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +20 +00 +60 +20 +A0 +E0 +ENDCHAR +STARTCHAR k +ENCODING 107 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +80 +A0 +C0 +A0 +A0 +ENDCHAR +STARTCHAR l +ENCODING 108 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +C0 +40 +40 +40 +60 +ENDCHAR +STARTCHAR m +ENCODING 109 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +E0 +E0 +A0 +ENDCHAR +STARTCHAR n +ENCODING 110 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +A0 +A0 +ENDCHAR +STARTCHAR o +ENCODING 111 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR p +ENCODING 112 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -2 +BITMAP +E0 +A0 +A0 +E0 +80 +ENDCHAR +STARTCHAR q +ENCODING 113 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -2 +BITMAP +E0 +A0 +A0 +E0 +20 +ENDCHAR +STARTCHAR r +ENCODING 114 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +A0 +80 +80 +ENDCHAR +STARTCHAR s +ENCODING 115 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +80 +60 +E0 +ENDCHAR +STARTCHAR t +ENCODING 116 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -1 +BITMAP +40 +E0 +40 +40 +60 +ENDCHAR +STARTCHAR u +ENCODING 117 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +A0 +A0 +A0 +E0 +ENDCHAR +STARTCHAR v +ENCODING 118 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +A0 +A0 +E0 +40 +ENDCHAR +STARTCHAR w +ENCODING 119 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +A0 +A0 +E0 +A0 +ENDCHAR +STARTCHAR x +ENCODING 120 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +A0 +40 +A0 +A0 +ENDCHAR +STARTCHAR y +ENCODING 121 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 5 0 -2 +BITMAP +A0 +A0 +E0 +20 +E0 +ENDCHAR +STARTCHAR z +ENCODING 122 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 4 0 -1 +BITMAP +E0 +40 +80 +E0 +ENDCHAR +STARTCHAR braceleft +ENCODING 123 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +60 +40 +C0 +40 +40 +60 +ENDCHAR +STARTCHAR bar +ENCODING 124 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 1 6 1 -2 +BITMAP +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR braceright +ENCODING 125 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +C0 +40 +60 +40 +40 +C0 +ENDCHAR +STARTCHAR asciitilde +ENCODING 126 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 4 3 0 1 +BITMAP +50 +F0 +A0 +ENDCHAR +STARTCHAR uni007F +ENCODING 127 +SWIDTH 666 0 +DWIDTH 5 0 +BBX 3 6 0 -2 +BITMAP +E0 +A0 +A0 +A0 +A0 +E0 +ENDCHAR +ENDFONT diff --git a/ports/atmel-samd/boards/ugame10/brutalist.sfd b/ports/atmel-samd/boards/ugame10/brutalist.sfd new file mode 100644 index 0000000000..2a48515aa5 --- /dev/null +++ b/ports/atmel-samd/boards/ugame10/brutalist.sfd @@ -0,0 +1,1034 @@ +SplineFontDB: 3.0 +FontName: brutalistRegular +FullName: brutalist Regular +FamilyName: brutalist +Weight: Regular +Copyright: Copyright (c) 2019, sheep,,, +UComments: "2019-6-28: Created with FontForge (http://fontforge.org)" +Version: 001.000 +ItalicAngle: 0 +UnderlinePosition: -100 +UnderlineWidth: 50 +Ascent: 666 +Descent: 334 +InvalidEm: 0 +LayerCount: 2 +Layer: 0 0 "Back" 1 +Layer: 1 0 "Fore" 0 +XUID: [1021 455 -922482232 13638063] +OS2Version: 0 +OS2_WeightWidthSlopeOnly: 0 +OS2_UseTypoMetrics: 1 +CreationTime: 1561742286 +ModificationTime: 1561742286 +OS2TypoAscent: 0 +OS2TypoAOffset: 1 +OS2TypoDescent: 0 +OS2TypoDOffset: 1 +OS2TypoLinegap: 0 +OS2WinAscent: 0 +OS2WinAOffset: 1 +OS2WinDescent: 0 +OS2WinDOffset: 1 +HheadAscent: 0 +HheadAOffset: 1 +HheadDescent: 0 +HheadDOffset: 1 +OS2Vendor: 'PfEd' +DEI: 91125 +Encoding: ISO8859-1 +UnicodeInterp: none +NameList: AGL For New Fonts +DisplaySize: 6 +AntiAlias: 1 +FitToEm: 0 +WinInfo: 0 32 23 +OnlyBitmaps: 1 +BeginChars: 256 96 + +StartChar: space +Encoding: 32 32 0 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: exclam +Encoding: 33 33 1 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: quotedbl +Encoding: 34 34 2 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: numbersign +Encoding: 35 35 3 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: dollar +Encoding: 36 36 4 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: percent +Encoding: 37 37 5 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: ampersand +Encoding: 38 38 6 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: quotesingle +Encoding: 39 39 7 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: parenleft +Encoding: 40 40 8 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: parenright +Encoding: 41 41 9 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: asterisk +Encoding: 42 42 10 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: plus +Encoding: 43 43 11 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: comma +Encoding: 44 44 12 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: hyphen +Encoding: 45 45 13 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: period +Encoding: 46 46 14 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: slash +Encoding: 47 47 15 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: zero +Encoding: 48 48 16 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: one +Encoding: 49 49 17 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: two +Encoding: 50 50 18 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: three +Encoding: 51 51 19 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: four +Encoding: 52 52 20 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: five +Encoding: 53 53 21 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: six +Encoding: 54 54 22 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: seven +Encoding: 55 55 23 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: eight +Encoding: 56 56 24 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: nine +Encoding: 57 57 25 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: colon +Encoding: 58 58 26 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: semicolon +Encoding: 59 59 27 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: less +Encoding: 60 60 28 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: equal +Encoding: 61 61 29 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: greater +Encoding: 62 62 30 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: question +Encoding: 63 63 31 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: at +Encoding: 64 64 32 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: A +Encoding: 65 65 33 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: B +Encoding: 66 66 34 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: C +Encoding: 67 67 35 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: D +Encoding: 68 68 36 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: E +Encoding: 69 69 37 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: F +Encoding: 70 70 38 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: G +Encoding: 71 71 39 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: H +Encoding: 72 72 40 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: I +Encoding: 73 73 41 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: J +Encoding: 74 74 42 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: K +Encoding: 75 75 43 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: L +Encoding: 76 76 44 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: M +Encoding: 77 77 45 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: N +Encoding: 78 78 46 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: O +Encoding: 79 79 47 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: P +Encoding: 80 80 48 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: Q +Encoding: 81 81 49 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: R +Encoding: 82 82 50 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: S +Encoding: 83 83 51 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: T +Encoding: 84 84 52 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: U +Encoding: 85 85 53 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: V +Encoding: 86 86 54 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: W +Encoding: 87 87 55 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: X +Encoding: 88 88 56 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: Y +Encoding: 89 89 57 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: Z +Encoding: 90 90 58 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: bracketleft +Encoding: 91 91 59 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: backslash +Encoding: 92 92 60 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: bracketright +Encoding: 93 93 61 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: asciicircum +Encoding: 94 94 62 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: underscore +Encoding: 95 95 63 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: grave +Encoding: 96 96 64 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: a +Encoding: 97 97 65 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: b +Encoding: 98 98 66 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: c +Encoding: 99 99 67 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: d +Encoding: 100 100 68 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: e +Encoding: 101 101 69 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: f +Encoding: 102 102 70 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: g +Encoding: 103 103 71 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: h +Encoding: 104 104 72 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: i +Encoding: 105 105 73 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: j +Encoding: 106 106 74 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: k +Encoding: 107 107 75 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: l +Encoding: 108 108 76 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: m +Encoding: 109 109 77 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: n +Encoding: 110 110 78 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: o +Encoding: 111 111 79 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: p +Encoding: 112 112 80 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: q +Encoding: 113 113 81 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: r +Encoding: 114 114 82 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: s +Encoding: 115 115 83 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: t +Encoding: 116 116 84 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: u +Encoding: 117 117 85 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: v +Encoding: 118 118 86 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: w +Encoding: 119 119 87 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: x +Encoding: 120 120 88 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: y +Encoding: 121 121 89 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: z +Encoding: 122 122 90 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: braceleft +Encoding: 123 123 91 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: bar +Encoding: 124 124 92 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: braceright +Encoding: 125 125 93 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: asciitilde +Encoding: 126 126 94 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: uni007F +Encoding: 127 127 95 +Width: 666 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar +EndChars +BitmapFont: 6 96 4 2 1 +BDFStartProperties: 20 +FONT 1 "-FontForge-Brutalist-Regular-R-Normal--6-60-75-75-P-40-ISO8859-1" +SIZE 1 "6 100 100" +FONTBOUNDINGBOX 1 "4 6 0 -1" +FAMILY_NAME 16 "brutalist" +WEIGHT_NAME 16 "Regular" +SLANT 16 "R" +SETWIDTH_NAME 16 "Normal" +PIXEL_SIZE 18 6 +POINT_SIZE 18 60 +RESOLUTION_X 19 100 +RESOLUTION_Y 19 100 +SPACING 16 "C" +AVERAGE_WIDTH 18 40 +CHARSET_REGISTRY 16 "ISO8859" +CHARSET_ENCODING 16 "1" +FONTNAME_REGISTRY 16 "" +FONT_ASCENT 18 4 +FONT_DESCENT 18 2 +MIN_SPACE 18 6 +FIGURE_WIDTH 18 4 +BDFEndProperties +Resolution: 100 +BDFChar: 0 32 5 3 3 -2 -2 +z +BDFChar: 1 33 5 0 0 -2 3 +J:N0#!.Y%L +BDFChar: 2 34 5 0 2 2 3 +TV)8b +BDFChar: 3 35 5 0 2 -2 3 +T\uK9i1L&M +BDFChar: 4 36 5 0 2 -2 3 +5iBFci'78B +BDFChar: 5 37 5 0 2 -2 3 +THHKbJ=llB +BDFChar: 6 38 5 0 2 -2 3 +5bLB8TO7a" +BDFChar: 7 39 5 0 0 2 3 +J:IV" +BDFChar: 8 40 5 0 2 -2 3 +@"USART.CTRLA.bit.ENABLE != 0 || +#ifdef SAMD21 + if (potential_sercom->USART.CTRLA.bit.ENABLE != 0 || !(tx->sercom[i].pad == 0 || tx->sercom[i].pad == 2)) { continue; } +#endif +#ifdef SAMD51 + if (potential_sercom->USART.CTRLA.bit.ENABLE != 0 || + !(tx->sercom[i].pad == 0)) { + continue; + } +#endif tx_pinmux = PINMUX(tx->number, (i == 0) ? MUX_C : MUX_D); tx_pad = tx->sercom[i].pad; if (rx == mp_const_none) { diff --git a/ports/esp8266/common-hal/busio/UART.c b/ports/esp8266/common-hal/busio/UART.c index f10e3dc555..e72dce639c 100644 --- a/ports/esp8266/common-hal/busio/UART.c +++ b/ports/esp8266/common-hal/busio/UART.c @@ -40,7 +40,7 @@ extern UartDevice UartDev; void common_hal_busio_uart_construct(busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, - uint8_t receiver_buffer_size) { + uint16_t receiver_buffer_size) { if (rx != mp_const_none || tx != &pin_GPIO2) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, translate("Only tx supported on UART1 (GPIO2)."))); } diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 593914afc0..b9e9e55387 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -131,7 +131,7 @@ void uart_reset(void) { void common_hal_busio_uart_construct (busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, - uint8_t receiver_buffer_size) { + uint16_t receiver_buffer_size) { // Find a free UART peripheral. self->uarte = NULL; for (size_t i = 0 ; i < MP_ARRAY_SIZE(nrfx_uartes); i++) { diff --git a/ports/nrf/common-hal/neopixel_write/__init__.c b/ports/nrf/common-hal/neopixel_write/__init__.c index fe2bab9996..78e0038e8f 100644 --- a/ports/nrf/common-hal/neopixel_write/__init__.c +++ b/ports/nrf/common-hal/neopixel_write/__init__.c @@ -111,18 +111,23 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout // // If there is not enough memory, we will fall back to cycle counter // using DWT - uint32_t pattern_size = numBytes * 8 * sizeof(uint16_t) + 2 * sizeof(uint16_t); + +#define PATTERN_SIZE(numBytes) (numBytes * 8 * sizeof(uint16_t) + 2 * sizeof(uint16_t)) + + uint32_t pattern_size = PATTERN_SIZE(numBytes); uint16_t* pixels_pattern = NULL; bool pattern_on_heap = false; // Use the stack to store 1 pixels worth of PWM data for the status led. uint32_t to ensure alignment. - uint32_t one_pixel[8 * sizeof(uint16_t) + 1]; + // Make it at least as big as PATTERN_SIZE(3), for one pixel of RGB data. + // PATTERN_SIZE is a multiple of 4, so we don't need round up to make sure one_pixel is large enough. + uint32_t one_pixel[PATTERN_SIZE(3)/sizeof(uint32_t)]; NRF_PWM_Type* pwm = find_free_pwm(); // only malloc if there is PWM device available if ( pwm != NULL ) { - if (pattern_size <= sizeof(one_pixel) * sizeof(uint32_t)) { + if (pattern_size <= sizeof(one_pixel)) { pixels_pattern = (uint16_t *) one_pixel; } else { pixels_pattern = (uint16_t *) m_malloc_maybe(pattern_size, false); diff --git a/py/emitglue.c b/py/emitglue.c index 74bf8ddca2..7708689dd4 100644 --- a/py/emitglue.c +++ b/py/emitglue.c @@ -142,11 +142,12 @@ mp_obj_t mp_make_function_from_raw_code(const mp_raw_code_t *rc, mp_obj_t def_ar fun = mp_obj_new_fun_asm(rc->n_pos_args, rc->data.u_native.fun_data, rc->data.u_native.type_sig); break; #endif - default: - // rc->kind should always be set and BYTECODE is the only remaining case - assert(rc->kind == MP_CODE_BYTECODE); + case MP_CODE_BYTECODE: fun = mp_obj_new_fun_bc(def_args, def_kw_args, rc->data.u_byte.bytecode, rc->data.u_byte.const_table); break; + default: + // All other kinds are invalid. + mp_raise_RuntimeError(translate("Corrupt raw code")); } // check for generator functions and if so wrap in generator object diff --git a/py/persistentcode.c b/py/persistentcode.c index f6de782ed8..eb69bd4079 100644 --- a/py/persistentcode.c +++ b/py/persistentcode.c @@ -102,20 +102,35 @@ STATIC void extract_prelude(const byte **ip, const byte **ip2, bytecode_prelude_ #include "py/parsenum.h" +STATIC void raise_corrupt_mpy(void) { + mp_raise_RuntimeError(translate("Corrupt .mpy file")); +} + STATIC int read_byte(mp_reader_t *reader) { - return reader->readbyte(reader->data); + mp_uint_t b = reader->readbyte(reader->data); + if (b == MP_READER_EOF) { + raise_corrupt_mpy(); + } + return b; } STATIC void read_bytes(mp_reader_t *reader, byte *buf, size_t len) { while (len-- > 0) { - *buf++ = reader->readbyte(reader->data); + mp_uint_t b =reader->readbyte(reader->data); + if (b == MP_READER_EOF) { + raise_corrupt_mpy(); + } + *buf++ = b; } } STATIC size_t read_uint(mp_reader_t *reader) { size_t unum = 0; for (;;) { - byte b = reader->readbyte(reader->data); + mp_uint_t b = reader->readbyte(reader->data); + if (b == MP_READER_EOF) { + raise_corrupt_mpy(); + } unum = (unum << 7) | (b & 0x7f); if ((b & 0x80) == 0) { break; @@ -145,11 +160,12 @@ STATIC mp_obj_t load_obj(mp_reader_t *reader) { return mp_obj_new_str_from_vstr(obj_type == 's' ? &mp_type_str : &mp_type_bytes, &vstr); } else if (obj_type == 'i') { return mp_parse_num_integer(vstr.buf, vstr.len, 10, NULL); - } else { - assert(obj_type == 'f' || obj_type == 'c'); + } else if (obj_type == 'f' || obj_type == 'c') { return mp_parse_num_decimal(vstr.buf, vstr.len, obj_type == 'c', false, NULL); } } + raise_corrupt_mpy(); + return MP_OBJ_FROM_PTR(&mp_const_none_obj); } STATIC void load_bytecode_qstrs(mp_reader_t *reader, byte *ip, byte *ip_top) { diff --git a/shared-bindings/busio/UART.h b/shared-bindings/busio/UART.h index e171f8bb45..776a996be8 100644 --- a/shared-bindings/busio/UART.h +++ b/shared-bindings/busio/UART.h @@ -42,7 +42,7 @@ typedef enum { extern void common_hal_busio_uart_construct(busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, - uint8_t receiver_buffer_size); + uint16_t receiver_buffer_size); extern void common_hal_busio_uart_deinit(busio_uart_obj_t *self); extern bool common_hal_busio_uart_deinited(busio_uart_obj_t *self); diff --git a/shared-bindings/digitalio/DigitalInOut.c b/shared-bindings/digitalio/DigitalInOut.c index 6587ee7ea1..16472c12c1 100644 --- a/shared-bindings/digitalio/DigitalInOut.c +++ b/shared-bindings/digitalio/DigitalInOut.c @@ -49,8 +49,8 @@ //| ========================================================= //| //| A DigitalInOut is used to digitally control I/O pins. For analog control of -//| a pin, see the :py:class:`~digitalio.AnalogIn` and -//| :py:class:`~digitalio.AnalogOut` classes. +//| a pin, see the :py:class:`analogio.AnalogIn` and +//| :py:class:`analogio.AnalogOut` classes. //| //| .. class:: DigitalInOut(pin) diff --git a/shared-bindings/digitalio/Direction.c b/shared-bindings/digitalio/Direction.c index a3433d4b07..c8188fc899 100644 --- a/shared-bindings/digitalio/Direction.c +++ b/shared-bindings/digitalio/Direction.c @@ -43,7 +43,7 @@ //| :class:`Direction` -- defines the direction of a digital pin //| ============================================================= //| -//| .. class:: digitalio.DigitalInOut.Direction +//| .. class:: Direction //| //| Enum-like class to define which direction the digital values are //| going. diff --git a/shared-bindings/digitalio/DriveMode.c b/shared-bindings/digitalio/DriveMode.c index 477cd904c4..51e1e2ee50 100644 --- a/shared-bindings/digitalio/DriveMode.c +++ b/shared-bindings/digitalio/DriveMode.c @@ -31,7 +31,7 @@ //| :class:`DriveMode` -- defines the drive mode of a digital pin //| ============================================================= //| -//| .. class:: digitalio.DriveMode +//| .. class:: DriveMode //| //| Enum-like class to define the drive mode used when outputting //| digital values. diff --git a/shared-bindings/digitalio/Pull.c b/shared-bindings/digitalio/Pull.c index 8d03f6c051..813268db78 100644 --- a/shared-bindings/digitalio/Pull.c +++ b/shared-bindings/digitalio/Pull.c @@ -31,7 +31,7 @@ //| :class:`Pull` -- defines the pull of a digital input pin //| ============================================================= //| -//| .. class:: digitalio.Pull +//| .. class:: Pull //| //| Enum-like class to define the pull value, if any, used while reading //| digital values in. diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 84302a1752..1a36872a6e 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -78,7 +78,8 @@ //| The initialization sequence should always leave the display memory access inline with the scan //| of the display to minimize tearing artifacts. //| -//| :param displayio.FourWire or displayio.ParallelBus display_bus: The bus that the display is connected to +//| :param display_bus: The bus that the display is connected to +//| :type display_bus: displayio.FourWire or displayio.ParallelBus //| :param buffer init_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels //| :param int height: Height in pixels @@ -182,6 +183,7 @@ static displayio_display_obj_t* native_display(mp_obj_t display_obj) { //| Switches to displaying the given group of layers. When group is None, the default //| CircuitPython terminal will be shown. //| +//| :param Group group: The group to show. STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in) { displayio_display_obj_t *self = native_display(self_in); displayio_group_t* group = NULL; diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 8ffe54be09..af64a20286 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -46,7 +46,7 @@ //| Manage updating a display over SPI four wire protocol in the background while Python code runs. //| It doesn't handle display initialization. //| -//| .. class:: FourWire(spi_bus, *, command, chip_select, reset=None) +//| .. class:: FourWire(spi_bus, *, command, chip_select, reset=None, baudrate=24000000) //| //| Create a FourWire object associated with the given pins. //| @@ -59,14 +59,16 @@ //| :param microcontroller.Pin command: Data or command pin //| :param microcontroller.Pin chip_select: Chip select pin //| :param microcontroller.Pin reset: Reset pin. When None only software reset can be used +//| :param int baudrate: Maximum baudrate in Hz for the display on the bus //| STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_spi_bus, ARG_command, ARG_chip_select, ARG_reset }; + enum { ARG_spi_bus, ARG_command, ARG_chip_select, ARG_reset, ARG_baudrate }; static const mp_arg_t allowed_args[] = { { MP_QSTR_spi_bus, MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_command, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_reset, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_baudrate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 24000000} }, }; 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); @@ -97,7 +99,7 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_ } common_hal_displayio_fourwire_construct(self, - MP_OBJ_TO_PTR(spi), command, chip_select, reset); + MP_OBJ_TO_PTR(spi), command, chip_select, reset, args[ARG_baudrate].u_int); return self; } diff --git a/shared-bindings/displayio/FourWire.h b/shared-bindings/displayio/FourWire.h index b65b1b5b79..5dbd607649 100644 --- a/shared-bindings/displayio/FourWire.h +++ b/shared-bindings/displayio/FourWire.h @@ -36,7 +36,7 @@ extern const mp_obj_type_t displayio_fourwire_type; void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, busio_spi_obj_t* spi, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset); + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, uint32_t baudrate); void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self); diff --git a/shared-bindings/displayio/Group.c b/shared-bindings/displayio/Group.c index 76719c5808..5a35424ce4 100644 --- a/shared-bindings/displayio/Group.c +++ b/shared-bindings/displayio/Group.c @@ -295,7 +295,7 @@ STATIC mp_obj_t group_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t valu if (value == MP_OBJ_SENTINEL) { // load return common_hal_displayio_group_get(self, index); - } else if (value == mp_const_none) { + } else if (value == MP_OBJ_NULL) { common_hal_displayio_group_pop(self, index); } else { common_hal_displayio_group_set(self, index, value); diff --git a/shared-bindings/fontio/Glyph.c b/shared-bindings/fontio/Glyph.c index 80298fd16f..a232841521 100644 --- a/shared-bindings/fontio/Glyph.c +++ b/shared-bindings/fontio/Glyph.c @@ -37,7 +37,7 @@ //| //| Named tuple used to capture a single glyph and its attributes. //| -//| :param fontio.Bitmap bitmap: the bitmap including the glyph +//| :param displayio.Bitmap bitmap: the bitmap including the glyph //| :param int tile_index: the tile index within the bitmap //| :param int width: the width of the glyph's bitmap //| :param int height: the height of the glyph's bitmap diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c index b01456bba2..d38da56fc0 100644 --- a/shared-module/displayio/FourWire.c +++ b/shared-module/displayio/FourWire.c @@ -31,13 +31,14 @@ #include "py/gc.h" #include "shared-bindings/busio/SPI.h" #include "shared-bindings/digitalio/DigitalInOut.h" +#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/time/__init__.h" #include "tick.h" void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, busio_spi_obj_t* spi, const mcu_pin_obj_t* command, - const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset) { + const mcu_pin_obj_t* chip_select, const mcu_pin_obj_t* reset, uint32_t baudrate) { self->bus = spi; common_hal_busio_spi_never_reset(self->bus); @@ -45,7 +46,7 @@ void common_hal_displayio_fourwire_construct(displayio_fourwire_obj_t* self, // of the heap as well. gc_never_free(self->bus); - self->frequency = common_hal_busio_spi_get_frequency(spi); + self->frequency = baudrate; self->polarity = common_hal_busio_spi_get_polarity(spi); self->phase = common_hal_busio_spi_get_phase(spi); @@ -89,7 +90,7 @@ void common_hal_displayio_fourwire_send(mp_obj_t obj, bool command, uint8_t *dat displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj); if (command) { common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); - common_hal_time_delay_ms(1); + common_hal_mcu_delay_us(1); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); } common_hal_digitalio_digitalinout_set_value(&self->command, !command); diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index 43ce36ed37..0cd00e0ce6 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -219,10 +219,19 @@ void common_hal_displayio_tilegrid_set_tile(displayio_tilegrid_t *self, uint16_t } else { tile_area = &temp_area; } - tile_area->x1 = x * self->tile_width; + int16_t tx = (x - self->top_left_x) % self->width_in_tiles; + if (tx < 0) { + tx += self->width_in_tiles; + } + tile_area->x1 = tx * self->tile_width; tile_area->x2 = tile_area->x1 + self->tile_width; - tile_area->y1 = y * self->tile_height; + int16_t ty = (y - self->top_left_y) % self->height_in_tiles; + if (ty < 0) { + ty += self->height_in_tiles; + } + tile_area->y1 = ty * self->tile_height; tile_area->y2 = tile_area->y1 + self->tile_height; + if (self->partial_change) { displayio_area_expand(&self->dirty_area, &temp_area); } diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index c3afb3e008..414f850344 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -71,6 +71,8 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { if (tiles == NULL) { return; } + grid->y = 0; + grid->top_left_y = 0; if (remaining_pixels > 0) { grid->y -= (grid->tile_height - remaining_pixels); } diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index fa34ed0dac..c50d7f4eeb 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -99,6 +99,9 @@ void filesystem_init(bool create_allowed, bool force_create) { make_empty_file(&vfs_fat->fatfs, "/.Trashes"); make_empty_file(&vfs_fat->fatfs, "/.fseventsd/no_log"); + // create empty lib directory + f_mkdir(&vfs_fat->fatfs, "/lib"); + // and ensure everything is flushed supervisor_flash_flush(); } else if (res != FR_OK) { diff --git a/tests/import/mpy_invalid.py b/tests/import/mpy_invalid.py index 6a4e116e78..b9dd99a440 100644 --- a/tests/import/mpy_invalid.py +++ b/tests/import/mpy_invalid.py @@ -59,8 +59,8 @@ for i in range(len(user_files)): mod = 'mod%u' % i try: __import__(mod) - except ValueError as er: - print(mod, 'ValueError', er) + except Exception as e: + print(mod, type(e).__name__, e) # unmount and undo path addition uos.umount('/userfs') diff --git a/tests/import/mpy_invalid.py.exp b/tests/import/mpy_invalid.py.exp index e4f2b13e99..197eb4f7b2 100644 --- a/tests/import/mpy_invalid.py.exp +++ b/tests/import/mpy_invalid.py.exp @@ -1,3 +1,3 @@ -mod0 ValueError Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info. -mod1 ValueError Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info. -mod2 ValueError Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info. +mod0 RuntimeError Corrupt .mpy file +mod1 RuntimeError Corrupt .mpy file +mod2 MpyError Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info. diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index 7b28c31056..2c674c8ebd 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -29,7 +29,6 @@ class BitmapStub: self.rows[y] = bytes(row) f = bitmap_font.load_font(args.font, BitmapStub) -real_bb = [0, 0] # Load extra characters from the sample file. sample_characters = set() @@ -61,13 +60,11 @@ for c in all_characters: print("Font missing character:", c, ord(c)) filtered_characters = filtered_characters.replace(c, "") continue - x, y, dx, dy = g["bounds"] if g["shift"][1] != 0: raise RuntimeError("y shift") - real_bb[0] = max(real_bb[0], x - dx) - real_bb[1] = max(real_bb[1], y - dy) -tile_x, tile_y = real_bb +x, y, dx, dy = f.get_bounding_box() +tile_x, tile_y = x - dx, y - dy total_bits = tile_x * len(all_characters) total_bits += 32 - total_bits % 32 bytes_per_row = total_bits // 8