From 696c035b674e26674b82cef8fb486d0ee39cd010 Mon Sep 17 00:00:00 2001 From: Lucian Copeland Date: Fri, 25 Jun 2021 17:43:18 -0400 Subject: [PATCH 001/418] Add STM32 sleep memory --- ports/stm/common-hal/alarm/SleepMemory.c | 34 ++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/ports/stm/common-hal/alarm/SleepMemory.c b/ports/stm/common-hal/alarm/SleepMemory.c index 3b89efbca3..dc19222d63 100644 --- a/ports/stm/common-hal/alarm/SleepMemory.c +++ b/ports/stm/common-hal/alarm/SleepMemory.c @@ -29,21 +29,45 @@ #include "py/runtime.h" #include "common-hal/alarm/SleepMemory.h" +#include STM32_HAL_H + +#define STM_BKPSRAM_SIZE 0x1000 +#define STM_BKPSRAM_START BKPSRAM_BASE + +STATIC bool initialized = false; + +STATIC void lazy_init(void) { + if (!initialized) { + __HAL_RCC_BKPSRAM_CLK_ENABLE(); + HAL_PWREx_EnableBkUpReg(); + HAL_PWR_EnableBkUpAccess(); + initialized = true; + } +} + void alarm_sleep_memory_reset(void) { } uint32_t common_hal_alarm_sleep_memory_get_length(alarm_sleep_memory_obj_t *self) { - mp_raise_NotImplementedError(translate("Sleep Memory not available")); - return 0; + lazy_init(); + return STM_BKPSRAM_SIZE; } bool common_hal_alarm_sleep_memory_set_bytes(alarm_sleep_memory_obj_t *self, uint32_t start_index, const uint8_t *values, uint32_t len) { - mp_raise_NotImplementedError(translate("Sleep Memory not available")); - return false; + if (start_index + len > STM_BKPSRAM_SIZE) { + return false; + } + lazy_init(); + memcpy((uint8_t *)(STM_BKPSRAM_START + start_index), values, len); + return true; } void common_hal_alarm_sleep_memory_get_bytes(alarm_sleep_memory_obj_t *self, uint32_t start_index, uint8_t *values, uint32_t len) { - mp_raise_NotImplementedError(translate("Sleep Memory not available")); + if (start_index + len > STM_BKPSRAM_SIZE) { + return; + } + lazy_init(); + memcpy(values, (uint8_t *)(STM_BKPSRAM_START + start_index), len); return; } From 70cbb4eddb5fb748e4610eb45b8bdb86748aebb5 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 23 Jul 2021 15:17:09 -0700 Subject: [PATCH 002/418] Support multiple status neopixels Use the 10 neopixels on the playgrounds for status. Fixes #5039 --- .../circuitplayground_express/mpconfigboard.h | 3 +++ .../mpconfigboard.h | 3 +++ .../mpconfigboard.h | 3 +++ .../circuitplayground_bluefruit/board.c | 26 +++++++++++++------ .../mpconfigboard.h | 3 +++ supervisor/shared/status_leds.c | 12 +++++---- 6 files changed, 37 insertions(+), 13 deletions(-) diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h index 105205f191..9020c243b1 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h @@ -3,6 +3,9 @@ #define MICROPY_HW_LED_STATUS (&pin_PA17) +#define MICROPY_HW_NEOPIXEL (&pin_PB23) +#define MICROPY_HW_NEOPIXEL_COUNT (10) + // Don't allow touch on A0 (PA02), because it's connected to the speaker. #define PA02_NO_TOUCH (true) diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h index 852e9651b1..5073c5e403 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -3,6 +3,9 @@ #define MICROPY_HW_LED_STATUS (&pin_PA17) +#define MICROPY_HW_NEOPIXEL (&pin_PB23) +#define MICROPY_HW_NEOPIXEL_COUNT (10) + // Don't allow touch on A0 (PA02), because it's connected to the speaker. #define PA02_NO_TOUCH (true) diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h index a0bb560752..20cfc617a2 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h @@ -3,6 +3,9 @@ #define MICROPY_HW_LED_STATUS (&pin_PA17) +#define MICROPY_HW_NEOPIXEL (&pin_PB23) +#define MICROPY_HW_NEOPIXEL_COUNT (10) + // Don't allow touch on A0 (PA02), because it's connected to the speaker. #define PA02_NO_TOUCH (true) diff --git a/ports/nrf/boards/circuitplayground_bluefruit/board.c b/ports/nrf/boards/circuitplayground_bluefruit/board.c index a0013e7215..938d92aff1 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/board.c +++ b/ports/nrf/boards/circuitplayground_bluefruit/board.c @@ -33,14 +33,7 @@ #include "nrf_gpio.h" void board_init(void) { -} - -bool board_requests_safe_mode(void) { - return false; -} - -void reset_board(void) { - // Turn off board.POWER_SWITCH (power-saving switch) on each soft reload, to prevent confusion. + // Turn on power to sensors and neopixels. nrf_gpio_cfg(POWER_SWITCH_PIN->number, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, @@ -48,6 +41,23 @@ void reset_board(void) { NRF_GPIO_PIN_S0S1, NRF_GPIO_PIN_NOSENSE); nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false); +} +void board_deinit(void) { + // Turn off power to sensors and neopixels. + nrf_gpio_cfg(POWER_SWITCH_PIN->number, + NRF_GPIO_PIN_DIR_OUTPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + nrf_gpio_pin_write(POWER_SWITCH_PIN->number, true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { board_reset_user_neopixels(&pin_P0_13, 10); } diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h index da32230a6f..69bff08761 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h @@ -32,6 +32,9 @@ #define MICROPY_HW_LED_STATUS (&pin_P1_14) +#define MICROPY_HW_NEOPIXEL (&pin_P0_13) +#define MICROPY_HW_NEOPIXEL_COUNT (10) + // Board does not have a 32kHz crystal. It does have a 32MHz crystal. #define BOARD_HAS_32KHZ_XTAL (0) diff --git a/supervisor/shared/status_leds.c b/supervisor/shared/status_leds.c index d57aba1973..d7ba5f1fea 100644 --- a/supervisor/shared/status_leds.c +++ b/supervisor/shared/status_leds.c @@ -41,7 +41,7 @@ static digitalio_digitalinout_obj_t _status_power; uint8_t rgb_status_brightness = 63; #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/neopixel_write/__init__.h" -static uint8_t status_neopixel_color[3]; +static uint8_t status_neopixel_color[3 * MICROPY_HW_NEOPIXEL_COUNT]; static digitalio_digitalinout_obj_t status_neopixel; #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) @@ -240,10 +240,12 @@ void new_status_color(uint32_t rgb) { #endif #ifdef MICROPY_HW_NEOPIXEL - status_neopixel_color[0] = (rgb_adjusted >> 8) & 0xff; - status_neopixel_color[1] = (rgb_adjusted >> 16) & 0xff; - status_neopixel_color[2] = rgb_adjusted & 0xff; - common_hal_neopixel_write(&status_neopixel, status_neopixel_color, 3); + for (size_t i = 0; i < MICROPY_HW_NEOPIXEL_COUNT; i++) { + status_neopixel_color[3 * i + 0] = (rgb_adjusted >> 8) & 0xff; + status_neopixel_color[3 * i + 1] = (rgb_adjusted >> 16) & 0xff; + status_neopixel_color[3 * i + 2] = rgb_adjusted & 0xff; + } + common_hal_neopixel_write(&status_neopixel, status_neopixel_color, 3 * MICROPY_HW_NEOPIXEL_COUNT); #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) status_apa102_color[5] = rgb_adjusted & 0xff; From e7fe0d9a71c45faecca171a3c7648a2672fd2f55 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 23 Jul 2021 15:42:06 -0700 Subject: [PATCH 003/418] Fix single neopixel status boards --- supervisor/shared/status_leds.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/supervisor/shared/status_leds.c b/supervisor/shared/status_leds.c index d7ba5f1fea..6c89026223 100644 --- a/supervisor/shared/status_leds.c +++ b/supervisor/shared/status_leds.c @@ -39,8 +39,13 @@ static digitalio_digitalinout_obj_t _status_power; #ifdef MICROPY_HW_NEOPIXEL uint8_t rgb_status_brightness = 63; - #include "shared-bindings/digitalio/DigitalInOut.h" - #include "shared-bindings/neopixel_write/__init__.h" +#include "shared-bindings/digitalio/DigitalInOut.h" +#include "shared-bindings/neopixel_write/__init__.h" + +#ifndef MICROPY_HW_NEOPIXEL_COUNT +#define MICROPY_HW_NEOPIXEL_COUNT (1) +#endif + static uint8_t status_neopixel_color[3 * MICROPY_HW_NEOPIXEL_COUNT]; static digitalio_digitalinout_obj_t status_neopixel; From 0808ce3224ce36b4485f7c1f5ab5ea05ed3249d4 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Fri, 23 Jul 2021 13:31:58 +0000 Subject: [PATCH 004/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1012 of 1012 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 3d6fc34ed4..dd2ccb5833 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-07-23 12:45+0000\n" +"PO-Revision-Date: 2021-07-24 15:35+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -1222,7 +1222,7 @@ msgstr "Erro de entrada/saída" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" +msgstr "Falta o jmp_pin. A instrução %d salta no pino" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format From df9be614eaed96c39b7d7f0c1f23db71b37810c7 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 23 Jul 2021 15:24:05 +0000 Subject: [PATCH 005/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1012 of 1012 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index e60a3152c5..a8603151d6 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-07-22 18:33+0000\n" +"PO-Revision-Date: 2021-07-24 15:35+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -1207,7 +1207,7 @@ msgstr "Indata-/utdatafel" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" +msgstr "Saknar jmp_pin. Instruktion %d hoppar på pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format @@ -2846,7 +2846,7 @@ msgstr "" #: extmod/ulab/code/ndarray.c msgid "cannot assign new shape" -msgstr "" +msgstr "kan inte tilldela en ny form" #: extmod/ulab/code/ndarray_operators.c msgid "cannot cast output with casting rule" @@ -3600,7 +3600,7 @@ msgstr "memoryview: längden är inte en multipel av itemsize" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "mode must be complete, or reduced" -msgstr "" +msgstr "mode måste vara complete, eller reduced" #: py/builtinimport.c msgid "module not found" @@ -3846,11 +3846,11 @@ msgstr "operander kan inte sändas tillsammans" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "operation is defined for 2D arrays only" -msgstr "" +msgstr "operation definierad endast för 2D-matriser" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "operation is defined for ndarrays only" -msgstr "" +msgstr "operation definierad endast för ndarrays" #: extmod/ulab/code/ndarray.c msgid "operation is implemented for 1D Boolean arrays only" From f2b9e98a21e73f79a327b90981e58a2a46ab0028 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 24 Jul 2021 14:11:04 -0500 Subject: [PATCH 006/418] docs: Add list of supported board to module page --- conf.py | 11 ++++++++++- docs/autoapi/templates/python/module.rst | 12 ++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index acdb2a34da..d36a920156 100644 --- a/conf.py +++ b/conf.py @@ -24,6 +24,7 @@ import subprocess import sys import urllib.parse import time +from collections import defaultdict from sphinx.transforms import SphinxTransform from docutils import nodes @@ -47,9 +48,15 @@ subprocess.check_output(["make", "stubs"]) #modules_support_matrix = shared_bindings_matrix.support_matrix_excluded_boards() modules_support_matrix = shared_bindings_matrix.support_matrix_by_board() +modules_support_matrix_reverse = defaultdict(list) +for board, modules in modules_support_matrix.items(): + for module in modules: + modules_support_matrix_reverse[module].append(board) +modules_support_matrix_reverse = dict((module, ", ".join(boards)) for module, boards in modules_support_matrix_reverse.items()) html_context = { - 'support_matrix': modules_support_matrix + 'support_matrix': modules_support_matrix, + 'support_matrix_reverse': modules_support_matrix_reverse } # -- General configuration ------------------------------------------------ @@ -94,6 +101,8 @@ autoapi_template_dir = 'docs/autoapi/templates' autoapi_python_class_content = "both" autoapi_python_use_implicit_namespaces = True autoapi_root = "shared-bindings" +def autoapi_prepare_jinja_env(jinja_env): + jinja_env.globals['support_matrix_reverse'] = modules_support_matrix_reverse redirects_file = 'docs/redirects.txt' diff --git a/docs/autoapi/templates/python/module.rst b/docs/autoapi/templates/python/module.rst index 63a1aaa76d..7db1c73d37 100644 --- a/docs/autoapi/templates/python/module.rst +++ b/docs/autoapi/templates/python/module.rst @@ -14,6 +14,18 @@ {% endif %} +{% if support_matrix_reverse[obj.name] is defined %} +.. raw:: html + +

+

+ Module Availability + Available on: {{ support_matrix_reverse[obj.name] }} +
+

+ +{% endif %} + {% block subpackages %} {% set visible_subpackages = obj.subpackages|selectattr("display")|list %} {% if visible_subpackages %} From dcd5b5ab50b46360efd6489b6e8906b36b68d645 Mon Sep 17 00:00:00 2001 From: Tod Kurt Date: Sat, 24 Jul 2021 13:12:44 -0700 Subject: [PATCH 007/418] added Arduino Nano RP2040 Connect alternate flash chip --- .../boards/arduino_nano_rp2040_connect/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk index 4eb0ac75b3..4fd752cf36 100644 --- a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk +++ b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk @@ -7,6 +7,6 @@ USB_MANUFACTURER = "Arduino" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "AT25SF128A" +EXTERNAL_FLASH_DEVICES = "AT25SF128A, IS25LP128F" CIRCUITPY__EVE = 1 From 0d401e7bc8271887d360174f91d86e9e4a253c83 Mon Sep 17 00:00:00 2001 From: Tod Kurt Date: Sat, 24 Jul 2021 13:22:02 -0700 Subject: [PATCH 008/418] fix whitespace on new flash chip for Arduino Nano RP2040 --- .../boards/arduino_nano_rp2040_connect/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk index 4fd752cf36..4cef8395c5 100644 --- a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk +++ b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/mpconfigboard.mk @@ -7,6 +7,6 @@ USB_MANUFACTURER = "Arduino" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "AT25SF128A, IS25LP128F" +EXTERNAL_FLASH_DEVICES = "AT25SF128A, IS25LP128F" CIRCUITPY__EVE = 1 From 49dc5805eee1b107eb7aabed1cdfe9ca36fe595e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 24 Jul 2021 17:39:38 -0700 Subject: [PATCH 009/418] Fix CAN pin assignment on Feather STM32F405 Express board. --- ports/stm/boards/feather_stm32f405_express/pins.c | 4 ++-- ports/stm/peripherals/stm32f4/stm32f405xx/periph.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/stm/boards/feather_stm32f405_express/pins.c b/ports/stm/boards/feather_stm32f405_express/pins.c index 1d91bc2f03..74ed49dd3d 100644 --- a/ports/stm/boards/feather_stm32f405_express/pins.c +++ b/ports/stm/boards/feather_stm32f405_express/pins.c @@ -50,7 +50,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_PD02) }, { MP_ROM_QSTR(MP_QSTR_SDIO_DATA), MP_ROM_PTR(&sdio_data_tuple) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB09) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB09) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/stm/peripherals/stm32f4/stm32f405xx/periph.c b/ports/stm/peripherals/stm32f4/stm32f405xx/periph.c index 451e4220c4..cc1aaa6875 100644 --- a/ports/stm/peripherals/stm32f4/stm32f405xx/periph.c +++ b/ports/stm/peripherals/stm32f4/stm32f405xx/periph.c @@ -220,7 +220,7 @@ const mcu_periph_obj_t mcu_sdio_data3_list[1] = { // CAN CAN_TypeDef *mcu_can_banks[2] = {CAN1, CAN2}; -const mcu_periph_obj_t mcu_can_tx_list[6] = { +const mcu_periph_obj_t mcu_can_rx_list[6] = { PERIPH(1, 9, &pin_PA11), PERIPH(1, 9, &pin_PB08), PERIPH(1, 9, &pin_PD00), @@ -230,7 +230,7 @@ const mcu_periph_obj_t mcu_can_tx_list[6] = { PERIPH(2, 9, &pin_PB05), }; -const mcu_periph_obj_t mcu_can_rx_list[6] = { +const mcu_periph_obj_t mcu_can_tx_list[6] = { PERIPH(1, 9, &pin_PA12), PERIPH(1, 9, &pin_PB09), PERIPH(1, 9, &pin_PD01), From f3a286a7eae3f780dad107351e7fe3ce1174f8b7 Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 25 Jul 2021 14:45:35 -0400 Subject: [PATCH 010/418] can we add busdevice and have room? --- .../boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index cee8049231..a617947f9c 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -21,6 +21,7 @@ CIRCUITPY_RTC = 0 CIRCUITPY_USB_MIDI = 0 CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_BUSDEVICE = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID From 57c6279b4039b8d770c3f54e7bfeff320f461350 Mon Sep 17 00:00:00 2001 From: evildave666 Date: Mon, 26 Jul 2021 13:59:25 +0900 Subject: [PATCH 011/418] Added new linker file --- ports/stm/boards/STM32F411_nofs.ld | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 ports/stm/boards/STM32F411_nofs.ld diff --git a/ports/stm/boards/STM32F411_nofs.ld b/ports/stm/boards/STM32F411_nofs.ld new file mode 100644 index 0000000000..3091a59275 --- /dev/null +++ b/ports/stm/boards/STM32F411_nofs.ld @@ -0,0 +1,26 @@ +/* + GNU linker script for STM32F411 without nvm and an external flash chip. + No space is reserved for a filesystem. +*/ + +/* Specify the memory areas */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */ + FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */ + FLASH_FIRMWARE (rx) : ORIGIN = 0x08004000, LENGTH = 496K /* sectors 1,2,3 are 16k, sector 4 is 64K, sectors 5,6,7 are 128K */ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K +} + +/* produce a link error if there is not this amount of RAM for these sections */ +_minimum_stack_size = 24K; +_minimum_heap_size = 16K; + +/* Define the top end of the stack. The stack is full descending so begins just + above last byte of RAM. Note that EABI requires the stack to be 8-byte + aligned for a call. */ +_estack = ORIGIN(RAM) + LENGTH(RAM); + +/* RAM extents for the garbage collector */ +_ram_start = ORIGIN(RAM); +_ram_end = ORIGIN(RAM) + LENGTH(RAM); From f059bab2532a1d0a1addbac5d6878ee71f61e511 Mon Sep 17 00:00:00 2001 From: evildave666 Date: Mon, 26 Jul 2021 14:13:41 +0900 Subject: [PATCH 012/418] Modify mpconfigboard.mk to point to the new linker file and re-include modules --- .../stm32f411ce_blackpill_with_flash/mpconfigboard.mk | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index 37dccadb99..7ea5fc4a82 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -15,11 +15,4 @@ MCU_VARIANT = STM32F411xE MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_default.ld -LD_FILE = boards/STM32F411_nvm_nofs.ld - -# Too big for the flash -CIRCUITPY_AUDIOCORE = 0 -CIRCUITPY_AUDIOPWMIO = 0 -CIRCUITPY_SYNTHIO = 0 -CIRCUITPY_BITMAPTOOLS = 0 -CIRCUITPY_VECTORIO = 0 +LD_FILE = boards/STM32F411_nofs.ld From 4e786494ddf938b84ce39b71fdeeef10281b3768 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Jul 2021 13:04:27 -0500 Subject: [PATCH 013/418] Remove settings.py/txt as alternatives for boot.py Closes: #5064 --- README.rst | 3 +-- main.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 86c5660417..9a16c001df 100644 --- a/README.rst +++ b/README.rst @@ -140,8 +140,7 @@ Behavior - Autoreload is disabled while the REPL is active. - Main is one of these: ``code.txt``, ``code.py``, ``main.py``, ``main.txt`` -- Boot is one of these: ``settings.txt``, ``settings.py``, ``boot.py``, - ``boot.txt`` +- Boot is one of these: ``boot.py``, ``boot.txt`` API ~~~ diff --git a/main.c b/main.c index c6801dca7d..13caf4beb7 100755 --- a/main.c +++ b/main.c @@ -631,7 +631,7 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { && safe_mode == NO_SAFE_MODE && MP_STATE_VM(vfs_mount_table) != NULL; - static const char * const boot_py_filenames[] = STRING_LIST("settings.txt", "settings.py", "boot.py", "boot.txt"); + static const char * const boot_py_filenames[] = STRING_LIST("boot.py", "boot.txt"); bool skip_boot_output = false; if (ok_to_run) { From 11ca505fdb4637644c6a2c05c9c16c2310a6a00a Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 26 Jul 2021 19:57:12 -0400 Subject: [PATCH 014/418] add board.LED wherever possible --- .../atmel-samd/boards/arduino_mkr1300/pins.c | 4 +++ .../atmel-samd/boards/arduino_mkrzero/pins.c | 4 +++ .../boards/arduino_nano_33_iot/pins.c | 9 +++++ ports/atmel-samd/boards/arduino_zero/pins.c | 7 ++++ .../atmel-samd/boards/catwan_usbstick/pins.c | 3 ++ .../boards/circuitbrains_basic_m0/pins.c | 2 ++ .../boards/circuitbrains_deluxe_m4/pins.c | 5 +++ ports/atmel-samd/boards/datum_distance/pins.c | 5 +++ ports/atmel-samd/boards/datum_imu/pins.c | 5 +++ ports/atmel-samd/boards/datum_light/pins.c | 5 +++ ports/atmel-samd/boards/datum_weather/pins.c | 4 +++ .../atmel-samd/boards/dynossat_edu_eps/pins.c | 5 +++ .../atmel-samd/boards/dynossat_edu_obc/pins.c | 7 ++++ .../boards/escornabot_makech/pins.c | 2 ++ .../boards/feather_m0_adalogger/pins.c | 13 ++++++++ .../boards/loc_ber_m4_base_board/pins.c | 10 +++--- ports/atmel-samd/boards/meowmeow/pins.c | 8 +++++ .../atmel-samd/boards/ndgarage_ndbit6/pins.c | 1 + .../boards/ndgarage_ndbit6_v2/pins.c | 1 + ports/atmel-samd/boards/openbook_m4/pins.c | 3 ++ ports/atmel-samd/boards/picoplanet/pins.c | 6 ++++ .../boards/silicognition-m4-shim/pins.c | 2 ++ ports/atmel-samd/boards/snekboard/pins.c | 6 ++++ .../boards/sparkfun_lumidrive/pins.c | 13 +++++--- .../sparkfun_qwiic_micro_no_flash/pins.c | 3 ++ .../sparkfun_qwiic_micro_with_flash/pins.c | 3 ++ .../boards/sparkfun_redboard_turbo/pins.c | 12 +++++++ .../boards/stackrduino_m0_pro/pins.c | 7 ++++ ports/atmel-samd/boards/xinabox_cc03/pins.c | 5 +++ ports/mimxrt10xx/boards/imxrt1010_evk/pins.c | 2 ++ ports/mimxrt10xx/boards/imxrt1020_evk/pins.c | 1 + ports/mimxrt10xx/boards/imxrt1060_evk/pins.c | 1 + ports/mimxrt10xx/boards/teensy40/pins.c | 27 +++++++++++++++ ports/mimxrt10xx/boards/teensy41/pins.c | 33 ++++++++++++++++++- ports/nrf/boards/clue_nrf52840_express/pins.c | 1 + ports/nrf/boards/electronut_labs_blip/pins.c | 1 + ports/nrf/boards/electronut_labs_papyr/pins.c | 1 + .../nrf/boards/feather_bluefruit_sense/pins.c | 1 + .../boards/feather_nrf52840_express/pins.c | 1 + ports/nrf/boards/hiibot_bluefi/pins.c | 1 + ports/nrf/boards/ikigaisense_vita/pins.c | 1 + .../boards/itsybitsy_nrf52840_express/pins.c | 1 + .../nrf/boards/metro_nrf52840_express/pins.c | 3 +- ports/nrf/boards/particle_argon/pins.c | 3 ++ ports/nrf/boards/particle_boron/pins.c | 3 ++ ports/nrf/boards/particle_xenon/pins.c | 3 ++ .../tinkeringtech_scoutmakes_azul/pins.c | 1 + 47 files changed, 234 insertions(+), 11 deletions(-) diff --git a/ports/atmel-samd/boards/arduino_mkr1300/pins.c b/ports/atmel-samd/boards/arduino_mkr1300/pins.c index 7a73e89bf9..5f08cfb9ae 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/pins.c +++ b/ports/atmel-samd/boards/arduino_mkr1300/pins.c @@ -16,7 +16,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA17) }, @@ -35,6 +38,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_RFM9X_CS), MP_ROM_PTR(&pin_PA14) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB08) }, + { 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) }, diff --git a/ports/atmel-samd/boards/arduino_mkrzero/pins.c b/ports/atmel-samd/boards/arduino_mkrzero/pins.c index 2494076ab1..490d12d613 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/pins.c +++ b/ports/atmel-samd/boards/arduino_mkrzero/pins.c @@ -35,9 +35,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PA14) }, { MP_ROM_QSTR(MP_QSTR_SD_CD), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB09) }, + { 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) }, diff --git a/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c b/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c index 6b23cbf091..7269f2ad3f 100644 --- a/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c +++ b/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c @@ -5,16 +5,21 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA09) }, { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB03) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB22) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA07) }, @@ -24,12 +29,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA20) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA21) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, { 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/arduino_zero/pins.c b/ports/atmel-samd/boards/arduino_zero/pins.c index 7ebcc9a6e3..ec53e80166 100644 --- a/ports/atmel-samd/boards/arduino_zero/pins.c +++ b/ports/atmel-samd/boards/arduino_zero/pins.c @@ -7,10 +7,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA14) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA09) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) }, @@ -22,12 +25,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, + { 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) }, diff --git a/ports/atmel-samd/boards/catwan_usbstick/pins.c b/ports/atmel-samd/boards/catwan_usbstick/pins.c index 346bd9c10c..b7eb7f2115 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/pins.c +++ b/ports/atmel-samd/boards/catwan_usbstick/pins.c @@ -9,6 +9,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_RFM9X_D5), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_RFM9X_RST), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_RFM9X_CS), MP_ROM_PTR(&pin_PA17) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA14) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA22) }, diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c b/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c index 5acad5e988..9e8b72784c 100644 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c @@ -18,7 +18,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA23) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA22) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED),MP_ROM_PTR(&pin_PA14) }, { MP_OBJ_NEW_QSTR(MP_QSTR_STATUS_LED),MP_ROM_PTR(&pin_PA14) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c index 45fcd04640..b7cc0f41a7 100755 --- a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c +++ b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c @@ -20,8 +20,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA23) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA22) }, { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA21) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA20) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB17) }, @@ -33,8 +35,11 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA15) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PB15) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PB14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB13) }, { MP_OBJ_NEW_QSTR(MP_QSTR_STATUS_LED),MP_ROM_PTR(&pin_PB13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED),MP_ROM_PTR(&pin_PB13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB12) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PB31) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PA27) }, diff --git a/ports/atmel-samd/boards/datum_distance/pins.c b/ports/atmel-samd/boards/datum_distance/pins.c index 8e4f1101e8..78d2ed28f7 100644 --- a/ports/atmel-samd/boards/datum_distance/pins.c +++ b/ports/atmel-samd/boards/datum_distance/pins.c @@ -19,7 +19,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, + + { MP_ROM_QSTR(MP_QSTR_TX_LED), MP_ROM_PTR(&pin_PA27) }, + { 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) }, diff --git a/ports/atmel-samd/boards/datum_imu/pins.c b/ports/atmel-samd/boards/datum_imu/pins.c index eabd2567ef..938c0c38ba 100644 --- a/ports/atmel-samd/boards/datum_imu/pins.c +++ b/ports/atmel-samd/boards/datum_imu/pins.c @@ -21,7 +21,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, + + { MP_ROM_QSTR(MP_QSTR_TX_LED), MP_ROM_PTR(&pin_PA27) }, + { 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) }, diff --git a/ports/atmel-samd/boards/datum_light/pins.c b/ports/atmel-samd/boards/datum_light/pins.c index 8e4f1101e8..78d2ed28f7 100644 --- a/ports/atmel-samd/boards/datum_light/pins.c +++ b/ports/atmel-samd/boards/datum_light/pins.c @@ -19,7 +19,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, + + { MP_ROM_QSTR(MP_QSTR_TX_LED), MP_ROM_PTR(&pin_PA27) }, + { 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) }, diff --git a/ports/atmel-samd/boards/datum_weather/pins.c b/ports/atmel-samd/boards/datum_weather/pins.c index 8e4f1101e8..93147a335d 100644 --- a/ports/atmel-samd/boards/datum_weather/pins.c +++ b/ports/atmel-samd/boards/datum_weather/pins.c @@ -20,6 +20,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, + + { MP_ROM_QSTR(MP_QSTR_TX_LED), MP_ROM_PTR(&pin_PA27) }, + { 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) }, diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c index f960e6bb0e..c9eceac0a2 100644 --- a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c +++ b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c @@ -19,19 +19,24 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_INT_IMU_OBC), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_PWRMON_SDA), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_PWRMON_SCL), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_PWRMON_ALERT), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_V_3V3_MEAS), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_V_5V_MEAS), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_FLASH_SCK), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_FLASH_MOSI), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_FLASH_MISO), MP_ROM_PTR(&pin_PA21) }, { MP_ROM_QSTR(MP_QSTR_FLASH_CS), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA06) }, + { 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) }, diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c index 8cc58d92c0..54f51f85d4 100644 --- a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c +++ b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c @@ -7,17 +7,21 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB03) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB01) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB15) }, { MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB14) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB13) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA11) }, @@ -32,11 +36,14 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_PA30) }, { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_PA31) }, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_INT_IMU), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_SAT_POWER), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_OVTEMP), MP_ROM_PTR(&pin_PB00) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA08) }, + { 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) }, diff --git a/ports/atmel-samd/boards/escornabot_makech/pins.c b/ports/atmel-samd/boards/escornabot_makech/pins.c index 86a70cb041..44cb307739 100644 --- a/ports/atmel-samd/boards/escornabot_makech/pins.c +++ b/ports/atmel-samd/boards/escornabot_makech/pins.c @@ -3,6 +3,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // LEDs { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA10) }, diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c index 63d134952b..34017ccaad 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c +++ b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c @@ -7,31 +7,44 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) }, { MP_ROM_QSTR(MP_QSTR_SD_CD), MP_ROM_PTR(&pin_PA21) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_PA17) }, + { 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) }, diff --git a/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c b/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c index 6d0f34c7da..76f4c0657c 100644 --- a/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c +++ b/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c @@ -13,8 +13,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA16) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA17) }, { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA07) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB22) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14) }, @@ -35,15 +37,15 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PB03) }, { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PB02) }, - { 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_OBJ_NEW_QSTR(MP_QSTR_SCK_2), MP_ROM_PTR(&pin_PB10) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI_2), MP_ROM_PTR(&pin_PA08) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MISO_2), MP_ROM_PTR(&pin_PA09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_CS_2), MP_ROM_PTR(&pin_PB11) }, { MP_OBJ_NEW_QSTR(MP_QSTR_WP_2), MP_ROM_PTR(&pin_PA10) }, { MP_OBJ_NEW_QSTR(MP_QSTR_HOLD_2), MP_ROM_PTR(&pin_PA11) }, + + { 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/meowmeow/pins.c b/ports/atmel-samd/boards/meowmeow/pins.c index 41d122d874..da128fef40 100644 --- a/ports/atmel-samd/boards/meowmeow/pins.c +++ b/ports/atmel-samd/boards/meowmeow/pins.c @@ -13,10 +13,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB03) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14) }, @@ -28,12 +31,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA30) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA31) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA01) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA14) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, + { 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) }, diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c index 2ea5630079..ebfa9c36f0 100644 --- a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c +++ b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c @@ -31,6 +31,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA23) }, { 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/ndgarage_ndbit6_v2/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c index f0615df5aa..8c296f81e8 100644 --- a/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c +++ b/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c @@ -29,6 +29,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/atmel-samd/boards/openbook_m4/pins.c b/ports/atmel-samd/boards/openbook_m4/pins.c index 45a7bc1dd0..8bd108b45c 100644 --- a/ports/atmel-samd/boards/openbook_m4/pins.c +++ b/ports/atmel-samd/boards/openbook_m4/pins.c @@ -28,7 +28,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D48), MP_ROM_PTR(&pin_PB31) }, // UART diff --git a/ports/atmel-samd/boards/picoplanet/pins.c b/ports/atmel-samd/boards/picoplanet/pins.c index 4c9b11e3d5..0f56bfb6d5 100644 --- a/ports/atmel-samd/boards/picoplanet/pins.c +++ b/ports/atmel-samd/boards/picoplanet/pins.c @@ -6,8 +6,14 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_D5),MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_GREEN_LED),MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_D6),MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_RED_LED),MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_LED),MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_D7),MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED),MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c index b7afd044e9..287890df35 100644 --- a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c +++ b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c @@ -43,7 +43,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA20) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA21) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB03) }, diff --git a/ports/atmel-samd/boards/snekboard/pins.c b/ports/atmel-samd/boards/snekboard/pins.c index 48bdc672e0..ec4becc0f7 100644 --- a/ports/atmel-samd/boards/snekboard/pins.c +++ b/ports/atmel-samd/boards/snekboard/pins.c @@ -3,14 +3,19 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA09) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_POWER1), MP_ROM_PTR(&pin_PA12) }, @@ -22,6 +27,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_POWER4), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_DIR4), MP_ROM_PTR(&pin_PA21) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c b/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c index 52c0753d41..692fc6c1ca 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c @@ -3,13 +3,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) }, // - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) }, // - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) }, // - { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) }, // + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, - { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, // + + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, + { 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/sparkfun_qwiic_micro_no_flash/pins.c b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c index 9562dc3b80..58113dd47f 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c @@ -18,7 +18,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PA23) }, diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c index 9562dc3b80..58113dd47f 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c @@ -18,7 +18,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PA23) }, diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c b/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c index 485589fcaf..833de278ec 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c @@ -7,10 +7,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA14) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA09) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) }, @@ -22,13 +25,22 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) }, + + { MP_ROM_QSTR(MP_QSTR_RX_LED), MP_ROM_PTR(&pin_PA31) }, + { MP_ROM_QSTR(MP_QSTR_TX_LED), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_RGB_LED), MP_ROM_PTR(&pin_PA30) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, + { 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) }, diff --git a/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c b/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c index e0278aca0d..349ce61a9f 100644 --- a/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c +++ b/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c @@ -10,10 +10,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA08) }, @@ -28,11 +31,15 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA28) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_PA28) }, { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_CHRG_EN), MP_ROM_PTR(&pin_PA13) }, + { 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) }, diff --git a/ports/atmel-samd/boards/xinabox_cc03/pins.c b/ports/atmel-samd/boards/xinabox_cc03/pins.c index f7c035d0b2..a5d459796c 100644 --- a/ports/atmel-samd/boards/xinabox_cc03/pins.c +++ b/ports/atmel-samd/boards/xinabox_cc03/pins.c @@ -3,11 +3,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_GREEN), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_BLUE), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) }, + { 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) } diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c index dac4fc0d6e..46b590edd3 100644 --- a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c @@ -35,6 +35,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_USER_LED), MP_ROM_PTR(&pin_GPIO_11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO_11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO_SD_05) }, // Audio Interface diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c index 2052a12429..0e665bef32 100644 --- a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c @@ -32,6 +32,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_B1_14) }, { MP_OBJ_NEW_QSTR(MP_QSTR_USER_LED), MP_ROM_PTR(&pin_GPIO_AD_B0_05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO_AD_B0_05) }, // SD Card { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CLK), MP_ROM_PTR(&pin_GPIO_SD_B0_03) }, diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c index b24e4dc86d..11e21bd983 100644 --- a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c @@ -34,6 +34,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_USER_LED), MP_ROM_PTR(&pin_GPIO_AD_B0_09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO_AD_B0_09) }, // Camera Sensor Interface { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_VSYNC), MP_ROM_PTR(&pin_GPIO_AD_B1_06) }, diff --git a/ports/mimxrt10xx/boards/teensy40/pins.c b/ports/mimxrt10xx/boards/teensy40/pins.c index 64b4aa7f69..83aa986729 100644 --- a/ports/mimxrt10xx/boards/teensy40/pins.c +++ b/ports/mimxrt10xx/boards/teensy40/pins.c @@ -7,9 +7,11 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_AD_B0_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_AD_B0_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_GPIO_AD_B0_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_EMC_04) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_EMC_05) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_EMC_06) }, @@ -19,64 +21,89 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_B1_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_B0_11) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_B0_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_B0_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO_B0_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_B0_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO_B0_01) }, // Top edge { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_B0_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO_B0_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_AD_B1_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B1_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO_AD_B1_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_B1_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO_AD_B1_06) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_B1_06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO_AD_B1_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_B1_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_AD_B1_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SDA0), MP_ROM_PTR(&pin_GPIO_AD_B1_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL0), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO_AD_B1_10) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO_AD_B1_10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO_AD_B1_11) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO_AD_B1_11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO_AD_B1_08) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO_AD_B1_08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, // Back side { MP_OBJ_NEW_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO_AD_B0_12) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_GPIO_AD_B0_12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO_AD_B0_13) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_GPIO_AD_B0_13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO_AD_B1_14) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A12), MP_ROM_PTR(&pin_GPIO_AD_B1_14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO_AD_B1_15) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A13), MP_ROM_PTR(&pin_GPIO_AD_B1_15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO_EMC_32) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_GPIO_EMC_31) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_GPIO_EMC_37) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_GPIO_EMC_36) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_GPIO_B0_12) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO_EMC_07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO_SD_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_DAT1), MP_ROM_PTR(&pin_GPIO_SD_B0_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO_SD_B0_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_DAT0), MP_ROM_PTR(&pin_GPIO_SD_B0_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO_SD_B0_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO_SD_B0_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO_SD_B0_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_CMD), MP_ROM_PTR(&pin_GPIO_SD_B0_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_GPIO_SD_B0_04) }, { MP_OBJ_NEW_QSTR(MP_QSTR_DAT3), MP_ROM_PTR(&pin_GPIO_SD_B0_04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_GPIO_SD_B0_05) }, { MP_OBJ_NEW_QSTR(MP_QSTR_DAT2), MP_ROM_PTR(&pin_GPIO_SD_B0_05) }, diff --git a/ports/mimxrt10xx/boards/teensy41/pins.c b/ports/mimxrt10xx/boards/teensy41/pins.c index cf24513019..c54db941a9 100644 --- a/ports/mimxrt10xx/boards/teensy41/pins.c +++ b/ports/mimxrt10xx/boards/teensy41/pins.c @@ -6,10 +6,13 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // With USB on left. Bottom edge. { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_AD_B0_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_AD_B0_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_GPIO_AD_B0_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_EMC_04) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_EMC_05) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_EMC_06) }, @@ -19,20 +22,26 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_B1_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_B0_11) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_B0_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_B0_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO_B0_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_B0_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO_B0_01) }, // Bottom Edge extended for 4.1 { MP_OBJ_NEW_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO_AD_B0_12) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_GPIO_AD_B0_12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO_AD_B0_13) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_GPIO_AD_B0_13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO_AD_B1_14) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A12), MP_ROM_PTR(&pin_GPIO_AD_B1_14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO_AD_B1_15) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A13), MP_ROM_PTR(&pin_GPIO_AD_B1_15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO_EMC_32) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_GPIO_EMC_31) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_GPIO_EMC_37) }, @@ -41,29 +50,41 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // Top edge { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_B0_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO_B0_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_AD_B1_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B1_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO_AD_B1_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_B1_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO_AD_B1_06) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_B1_06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO_AD_B1_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_B1_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_AD_B1_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SDA0), MP_ROM_PTR(&pin_GPIO_AD_B1_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL0), MP_ROM_PTR(&pin_GPIO_AD_B1_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO_AD_B1_10) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO_AD_B1_10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO_AD_B1_11) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO_AD_B1_11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO_AD_B1_08) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO_AD_B1_08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, @@ -81,34 +102,44 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // SD Card slot { MP_OBJ_NEW_QSTR(MP_QSTR_DAT1), MP_ROM_PTR(&pin_GPIO_SD_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO_SD_B0_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DAT0), MP_ROM_PTR(&pin_GPIO_SD_B0_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D43), MP_ROM_PTR(&pin_GPIO_SD_B0_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO_SD_B0_01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D44), MP_ROM_PTR(&pin_GPIO_SD_B0_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_CMD), MP_ROM_PTR(&pin_GPIO_SD_B0_00) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D45), MP_ROM_PTR(&pin_GPIO_SD_B0_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DAT3), MP_ROM_PTR(&pin_GPIO_SD_B0_05) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D46), MP_ROM_PTR(&pin_GPIO_SD_B0_05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DAT2), MP_ROM_PTR(&pin_GPIO_SD_B0_04) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D47), MP_ROM_PTR(&pin_GPIO_SD_B0_04) }, // Flash expansion spot and PSRAM expansion spot on a shared QSPI BUS { MP_OBJ_NEW_QSTR(MP_QSTR_D48), MP_ROM_PTR(&pin_GPIO_EMC_24) }, { MP_OBJ_NEW_QSTR(MP_QSTR_PSRAM_CS), MP_ROM_PTR(&pin_GPIO_EMC_24) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D49), MP_ROM_PTR(&pin_GPIO_EMC_27) }, { MP_OBJ_NEW_QSTR(MP_QSTR_QSPI_IO1), MP_ROM_PTR(&pin_GPIO_EMC_27) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D50), MP_ROM_PTR(&pin_GPIO_EMC_28) }, { MP_OBJ_NEW_QSTR(MP_QSTR_QSPI_IO2), MP_ROM_PTR(&pin_GPIO_EMC_28) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D51), MP_ROM_PTR(&pin_GPIO_EMC_22) }, { MP_OBJ_NEW_QSTR(MP_QSTR_FLASH_CS), MP_ROM_PTR(&pin_GPIO_EMC_22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D52), MP_ROM_PTR(&pin_GPIO_EMC_26) }, { MP_OBJ_NEW_QSTR(MP_QSTR_QSPI_IO0), MP_ROM_PTR(&pin_GPIO_EMC_26) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D53), MP_ROM_PTR(&pin_GPIO_EMC_25) }, { MP_OBJ_NEW_QSTR(MP_QSTR_QSPI_CLK), MP_ROM_PTR(&pin_GPIO_EMC_25) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D54), MP_ROM_PTR(&pin_GPIO_EMC_29) }, { MP_OBJ_NEW_QSTR(MP_QSTR_QSPI_IO3), MP_ROM_PTR(&pin_GPIO_EMC_29) }, - { 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) }, diff --git a/ports/nrf/boards/clue_nrf52840_express/pins.c b/ports/nrf/boards/clue_nrf52840_express/pins.c index 61d77cedc9..e54272b44b 100644 --- a/ports/nrf/boards/clue_nrf52840_express/pins.c +++ b/ports/nrf/boards/clue_nrf52840_express/pins.c @@ -73,6 +73,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P17), MP_ROM_PTR(&pin_P1_01) }, { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_P1_01) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_01) }, { MP_ROM_QSTR(MP_QSTR_P18), MP_ROM_PTR(&pin_P0_16) }, { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_P0_16) }, diff --git a/ports/nrf/boards/electronut_labs_blip/pins.c b/ports/nrf/boards/electronut_labs_blip/pins.c index a8f9af1cd7..9a660e989b 100644 --- a/ports/nrf/boards/electronut_labs_blip/pins.c +++ b/ports/nrf/boards/electronut_labs_blip/pins.c @@ -57,6 +57,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_15) }, { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_13) }, diff --git a/ports/nrf/boards/electronut_labs_papyr/pins.c b/ports/nrf/boards/electronut_labs_papyr/pins.c index ef0178e9b1..6912e8ca04 100644 --- a/ports/nrf/boards/electronut_labs_papyr/pins.c +++ b/ports/nrf/boards/electronut_labs_papyr/pins.c @@ -31,6 +31,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_15) }, diff --git a/ports/nrf/boards/feather_bluefruit_sense/pins.c b/ports/nrf/boards/feather_bluefruit_sense/pins.c index c4863e17fb..961bebc8e6 100644 --- a/ports/nrf/boards/feather_bluefruit_sense/pins.c +++ b/ports/nrf/boards/feather_bluefruit_sense/pins.c @@ -41,6 +41,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_09) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_09) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) }, diff --git a/ports/nrf/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c index ec2689ab45..036ec121e7 100644 --- a/ports/nrf/boards/feather_nrf52840_express/pins.c +++ b/ports/nrf/boards/feather_nrf52840_express/pins.c @@ -40,6 +40,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_15) }, diff --git a/ports/nrf/boards/hiibot_bluefi/pins.c b/ports/nrf/boards/hiibot_bluefi/pins.c index f871d5db86..a34991f801 100644 --- a/ports/nrf/boards/hiibot_bluefi/pins.c +++ b/ports/nrf/boards/hiibot_bluefi/pins.c @@ -70,6 +70,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P17), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_REDLED), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_P18), MP_ROM_PTR(&pin_P1_10) }, diff --git a/ports/nrf/boards/ikigaisense_vita/pins.c b/ports/nrf/boards/ikigaisense_vita/pins.c index 021f94f306..895fa71ec7 100644 --- a/ports/nrf/boards/ikigaisense_vita/pins.c +++ b/ports/nrf/boards/ikigaisense_vita/pins.c @@ -27,6 +27,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ADDON_SDA), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_27) }, { MP_ROM_QSTR(MP_QSTR_YELLOW_LED), MP_ROM_PTR(&pin_P0_27) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c b/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c index ad5fabc509..3afb25de64 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c @@ -38,6 +38,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_20) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/nrf/boards/metro_nrf52840_express/pins.c b/ports/nrf/boards/metro_nrf52840_express/pins.c index 452e31202b..ab8bf8b5cc 100644 --- a/ports/nrf/boards/metro_nrf52840_express/pins.c +++ b/ports/nrf/boards/metro_nrf52840_express/pins.c @@ -32,7 +32,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_08) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P1_09) }, - { MP_ROM_QSTR(MP_QSTR_D13),MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_15) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_16) }, @@ -44,6 +44,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_11) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_13) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_13) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_15) }, diff --git a/ports/nrf/boards/particle_argon/pins.c b/ports/nrf/boards/particle_argon/pins.c index 9fab9e6b6a..71a20639c0 100644 --- a/ports/nrf/boards/particle_argon/pins.c +++ b/ports/nrf/boards/particle_argon/pins.c @@ -23,8 +23,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_08) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_03) }, { MP_ROM_QSTR(MP_QSTR_RGB_LED_RED), MP_ROM_PTR(&pin_P0_13) }, diff --git a/ports/nrf/boards/particle_boron/pins.c b/ports/nrf/boards/particle_boron/pins.c index 4d6f3e7de2..8a2e12c139 100644 --- a/ports/nrf/boards/particle_boron/pins.c +++ b/ports/nrf/boards/particle_boron/pins.c @@ -22,8 +22,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_08) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_03) }, { MP_ROM_QSTR(MP_QSTR_RGB_LED_RED), MP_ROM_PTR(&pin_P0_13) }, diff --git a/ports/nrf/boards/particle_xenon/pins.c b/ports/nrf/boards/particle_xenon/pins.c index a50c8b6418..08e38530b5 100644 --- a/ports/nrf/boards/particle_xenon/pins.c +++ b/ports/nrf/boards/particle_xenon/pins.c @@ -23,8 +23,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_08) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_03) }, { MP_ROM_QSTR(MP_QSTR_RGB_LED_RED), MP_ROM_PTR(&pin_P0_13) }, diff --git a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c index ec2689ab45..60f1c5969d 100644 --- a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c +++ b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c @@ -41,6 +41,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) }, From 412eb87080878cffc91b90ddbec3606709a0744f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 21 Jul 2021 16:27:09 -0700 Subject: [PATCH 015/418] Switch to pin, frequency and duty_cycle PulseOut Passing in a PWMOut still works but is deprecated. It will be removed in CircuitPython 8.0.0 This also switches STM32 timer indices and channel indices to 0-based in our pin data rather than `- 1` everywhere. The latter is more bug prone. Most of the way for #3264 Tested on Metro M0, Metro M4, Feather S2, Feather nRF52840, Feather STM32F4 and Arduino RP2040. --- locale/circuitpython.pot | 15 -- .../atmel-samd/common-hal/pulseio/PulseOut.c | 15 +- .../atmel-samd/common-hal/pulseio/PulseOut.h | 2 + ports/atmel-samd/common-hal/pwmio/PWMOut.c | 4 + ports/cxd56/common-hal/pulseio/PulseOut.c | 14 +- ports/cxd56/common-hal/pulseio/PulseOut.h | 3 + ports/cxd56/common-hal/pwmio/PWMOut.c | 4 + ports/esp32s2/common-hal/pulseio/PulseOut.c | 4 - ports/esp32s2/common-hal/pwmio/PWMOut.c | 10 +- ports/esp32s2/common-hal/pwmio/PWMOut.h | 2 +- ports/mimxrt10xx/common-hal/pulseio/PulseIn.c | 246 ------------------ ports/mimxrt10xx/common-hal/pulseio/PulseIn.h | 55 ---- .../mimxrt10xx/common-hal/pulseio/PulseOut.c | 210 --------------- .../mimxrt10xx/common-hal/pulseio/PulseOut.h | 45 ---- .../mimxrt10xx/common-hal/pulseio/__init__.c | 1 - ports/mimxrt10xx/common-hal/pwmio/PWMOut.c | 85 +----- ports/mimxrt10xx/mpconfigport.mk | 3 +- ports/mimxrt10xx/supervisor/port.c | 5 - ports/nrf/common-hal/pulseio/PulseOut.c | 22 +- ports/nrf/common-hal/pulseio/PulseOut.h | 2 +- ports/nrf/common-hal/pwmio/PWMOut.c | 16 +- ports/nrf/common-hal/pwmio/PWMOut.h | 3 +- .../raspberrypi/common-hal/pulseio/PulseOut.c | 47 ++-- .../raspberrypi/common-hal/pulseio/PulseOut.h | 2 +- ports/raspberrypi/common-hal/pwmio/PWMOut.c | 4 + ports/stm/common-hal/pulseio/PulseOut.c | 30 +-- ports/stm/common-hal/pulseio/PulseOut.h | 2 +- ports/stm/common-hal/pwmio/PWMOut.c | 49 ++-- ports/stm/common-hal/pwmio/PWMOut.h | 1 + ports/stm/peripherals/periph.h | 4 +- ports/stm/peripherals/timers.c | 93 ++++--- shared-bindings/pulseio/PulseOut.c | 53 ++-- shared-bindings/pulseio/PulseOut.h | 1 - shared-bindings/pwmio/PWMOut.c | 63 ++--- shared-bindings/pwmio/PWMOut.h | 5 + 35 files changed, 272 insertions(+), 848 deletions(-) delete mode 100644 ports/mimxrt10xx/common-hal/pulseio/PulseIn.c delete mode 100644 ports/mimxrt10xx/common-hal/pulseio/PulseIn.h delete mode 100644 ports/mimxrt10xx/common-hal/pulseio/PulseOut.c delete mode 100644 ports/mimxrt10xx/common-hal/pulseio/PulseOut.h delete mode 100644 ports/mimxrt10xx/common-hal/pulseio/__init__.c diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 9afa77328d..81531c0cbd 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1877,21 +1877,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" diff --git a/ports/atmel-samd/common-hal/pulseio/PulseOut.c b/ports/atmel-samd/common-hal/pulseio/PulseOut.c index 56b5f036ed..b72e0d1f43 100644 --- a/ports/atmel-samd/common-hal/pulseio/PulseOut.c +++ b/ports/atmel-samd/common-hal/pulseio/PulseOut.c @@ -103,13 +103,15 @@ void pulseout_reset() { } void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, - const pwmio_pwmout_obj_t *carrier, const mcu_pin_obj_t *pin, uint32_t frequency, uint16_t duty_cycle) { - if (!carrier || pin || frequency) { - mp_raise_NotImplementedError(translate("Port does not accept pins or frequency. Construct and pass a PWMOut Carrier instead")); - } + + pwmout_result_t result = common_hal_pwmio_pwmout_construct( + &self->pwmout, pin, duty_cycle, frequency, false); + + // This will raise an exception and not return if needed. + common_hal_pwmio_pwmout_raise_error(result); if (refcount == 0) { // Find a spare timer. @@ -155,7 +157,7 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, } refcount++; - self->pin = carrier->pin->number; + self->pin = pin->number; PortGroup *const port_base = &PORT->Group[GPIO_PORT(self->pin)]; self->pincfg = &port_base->PINCFG[self->pin % 32]; @@ -173,7 +175,7 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, } bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) { - return self->pin == NO_PIN; + return common_hal_pwmio_pwmout_deinited(&self->pwmout); } void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { @@ -191,6 +193,7 @@ void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { pulseout_tc_index = 0xff; } self->pin = NO_PIN; + common_hal_pwmio_pwmout_deinit(&self->pwmout); #ifdef SAMD21 rtc_end_pulse(); #endif diff --git a/ports/atmel-samd/common-hal/pulseio/PulseOut.h b/ports/atmel-samd/common-hal/pulseio/PulseOut.h index 8f8e504fab..d4a767065e 100644 --- a/ports/atmel-samd/common-hal/pulseio/PulseOut.h +++ b/ports/atmel-samd/common-hal/pulseio/PulseOut.h @@ -30,10 +30,12 @@ #include "common-hal/microcontroller/Pin.h" #include "py/obj.h" +#include "shared-bindings/pwmio/PWMOut.h" typedef struct { mp_obj_base_t base; __IO PORT_PINCFG_Type *pincfg; + pwmio_pwmout_obj_t pwmout; uint8_t pin; } pulseio_pulseout_obj_t; diff --git a/ports/atmel-samd/common-hal/pwmio/PWMOut.c b/ports/atmel-samd/common-hal/pwmio/PWMOut.c index 815f1a7fe0..4f6661b55d 100644 --- a/ports/atmel-samd/common-hal/pwmio/PWMOut.c +++ b/ports/atmel-samd/common-hal/pwmio/PWMOut.c @@ -493,3 +493,7 @@ uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self) { bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self) { return self->variable_frequency; } + +const mcu_pin_obj_t *common_hal_pwmio_pwmout_get_pin(pwmio_pwmout_obj_t *self) { + return self->pin; +} diff --git a/ports/cxd56/common-hal/pulseio/PulseOut.c b/ports/cxd56/common-hal/pulseio/PulseOut.c index be0d51f575..5e296a1b1e 100644 --- a/ports/cxd56/common-hal/pulseio/PulseOut.c +++ b/ports/cxd56/common-hal/pulseio/PulseOut.c @@ -58,13 +58,15 @@ static bool pulseout_timer_handler(unsigned int *next_interval_us, void *arg) { } void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, - const pwmio_pwmout_obj_t *carrier, const mcu_pin_obj_t *pin, uint32_t frequency, uint16_t duty_cycle) { - if (!carrier || pin || frequency) { - mp_raise_NotImplementedError(translate("Port does not accept pins or frequency. Construct and pass a PWMOut Carrier instead")); - } + + pwmout_result_t result = common_hal_pwmio_pwmout_construct( + &self->pwmout, pin, duty_cycle, frequency, false); + + // This will raise an exception and not return if needed. + common_hal_pwmio_pwmout_raise_error(result); if (pulse_fd < 0) { pulse_fd = open("/dev/timer0", O_RDONLY); @@ -74,7 +76,7 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, mp_raise_RuntimeError(translate("All timers in use")); } - self->pwm_num = carrier->number; + self->pwm_num = self->pwmout.number; } void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { @@ -86,6 +88,8 @@ void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { close(pulse_fd); pulse_fd = -1; + common_hal_pwmio_pwmout_deinit(&self->pwmout); + pulse_buffer = NULL; } diff --git a/ports/cxd56/common-hal/pulseio/PulseOut.h b/ports/cxd56/common-hal/pulseio/PulseOut.h index 61bc175276..18106636c1 100644 --- a/ports/cxd56/common-hal/pulseio/PulseOut.h +++ b/ports/cxd56/common-hal/pulseio/PulseOut.h @@ -29,9 +29,12 @@ #include "py/obj.h" +#include "shared-bindings/pwmio/PWMOut.h" + typedef struct { mp_obj_base_t base; uint8_t pwm_num; + pwmio_pwmout_obj_t pwmout; } pulseio_pulseout_obj_t; void pulseout_reset(void); diff --git a/ports/cxd56/common-hal/pwmio/PWMOut.c b/ports/cxd56/common-hal/pwmio/PWMOut.c index 61806540b1..e9bffd21e9 100644 --- a/ports/cxd56/common-hal/pwmio/PWMOut.c +++ b/ports/cxd56/common-hal/pwmio/PWMOut.c @@ -157,3 +157,7 @@ void pwmout_start(uint8_t pwm_num) { void pwmout_stop(uint8_t pwm_num) { ioctl(pwmout_dev[pwm_num].fd, PWMIOC_STOP, 0); } + +const mcu_pin_obj_t *common_hal_pwmio_pwmout_get_pin(pwmio_pwmout_obj_t *self) { + return self->pin; +} diff --git a/ports/esp32s2/common-hal/pulseio/PulseOut.c b/ports/esp32s2/common-hal/pulseio/PulseOut.c index d3490d1810..b762cefb84 100644 --- a/ports/esp32s2/common-hal/pulseio/PulseOut.c +++ b/ports/esp32s2/common-hal/pulseio/PulseOut.c @@ -32,13 +32,9 @@ // Requires rmt.c void esp32s2_peripherals_reset_all(void) to reset void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, - const pwmio_pwmout_obj_t *carrier, const mcu_pin_obj_t *pin, uint32_t frequency, uint16_t duty_cycle) { - if (carrier || !pin || !frequency) { - mp_raise_NotImplementedError(translate("Port does not accept PWM carrier. Pass a pin, frequency and duty cycle instead")); - } rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt(); if (channel == RMT_CHANNEL_MAX) { diff --git a/ports/esp32s2/common-hal/pwmio/PWMOut.c b/ports/esp32s2/common-hal/pwmio/PWMOut.c index 7b3c005ff4..71cf5c19d0 100644 --- a/ports/esp32s2/common-hal/pwmio/PWMOut.c +++ b/ports/esp32s2/common-hal/pwmio/PWMOut.c @@ -152,7 +152,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, varfreq_timers[timer_index] = true; } self->variable_frequency = variable_frequency; - self->pin_number = pin->number; + self->pin = pin; self->deinited = false; self->duty_resolution = duty_bits; claim_pin(pin); @@ -167,7 +167,7 @@ void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self) { never_reset_tim[self->tim_handle.timer_num] = true; never_reset_chan[self->chan_handle.channel] = true; - never_reset_pin_number(self->pin_number); + never_reset_pin_number(self->pin->number); } void common_hal_pwmio_pwmout_reset_ok(pwmio_pwmout_obj_t *self) { @@ -202,7 +202,7 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) { // if timer isn't varfreq this will be off aleady varfreq_timers[self->tim_handle.timer_num] = false; } - reset_pin_number(self->pin_number); + common_hal_reset_pin(self->pin); self->deinited = true; } @@ -232,3 +232,7 @@ uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self) { bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self) { return self->variable_frequency; } + +const mcu_pin_obj_t *common_hal_pwmio_pwmout_get_pin(pwmio_pwmout_obj_t *self) { + return self->pin; +} diff --git a/ports/esp32s2/common-hal/pwmio/PWMOut.h b/ports/esp32s2/common-hal/pwmio/PWMOut.h index 9480b8885a..f94325248b 100644 --- a/ports/esp32s2/common-hal/pwmio/PWMOut.h +++ b/ports/esp32s2/common-hal/pwmio/PWMOut.h @@ -34,7 +34,7 @@ typedef struct { mp_obj_base_t base; ledc_timer_config_t tim_handle; ledc_channel_config_t chan_handle; - uint16_t pin_number; + const mcu_pin_obj_t *pin; uint8_t duty_resolution; bool variable_frequency : 1; bool deinited : 1; diff --git a/ports/mimxrt10xx/common-hal/pulseio/PulseIn.c b/ports/mimxrt10xx/common-hal/pulseio/PulseIn.c deleted file mode 100644 index c1f7ce20b6..0000000000 --- a/ports/mimxrt10xx/common-hal/pulseio/PulseIn.c +++ /dev/null @@ -1,246 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2017-2018 Scott Shawcroft for Adafruit Industries - * Copyright (c) 2019 Artur Pacholec - * - * 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 "common-hal/pulseio/PulseIn.h" - -#include - -#include "background.h" -#include "mpconfigport.h" -#include "py/gc.h" -#include "py/runtime.h" - -#include "shared-bindings/microcontroller/__init__.h" -#include "shared-bindings/pulseio/PulseIn.h" -#include "supervisor/shared/translate.h" - -// TODO -// static void pulsein_set_config(pulseio_pulsein_obj_t* self, bool first_edge) { -// uint32_t sense_setting; -// if (!first_edge) { -// sense_setting = EIC_CONFIG_SENSE0_BOTH_Val; -// configure_eic_channel(self->channel, sense_setting); -// return; -// } else if (self->idle_state) { -// sense_setting = EIC_CONFIG_SENSE0_FALL_Val; -// } else { -// sense_setting = EIC_CONFIG_SENSE0_RISE_Val; -// } -// set_eic_handler(self->channel, EIC_HANDLER_PULSEIN); -// turn_on_eic_channel(self->channel, sense_setting); -// } - -// void pulsein_interrupt_handler(uint8_t channel) { -// // Grab the current time first. -// uint32_t current_us; -// uint64_t current_ms; -// current_tick(¤t_ms, ¤t_us); -// -// // current_tick gives us the remaining us until the next tick but we want the number since the -// // last ms. -// current_us = 1000 - current_us; -// pulseio_pulsein_obj_t* self = get_eic_channel_data(channel); -// if (!supervisor_background_tasks_ok() || self->errored_too_fast) { -// self->errored_too_fast = true; -// common_hal_pulseio_pulsein_pause(self); -// return; -// } -// if (self->first_edge) { -// self->first_edge = false; -// pulsein_set_config(self, false); -// } else { -// uint32_t ms_diff = current_ms - self->last_ms; -// uint16_t us_diff = current_us - self->last_us; -// uint32_t total_diff = us_diff; -// if (self->last_us > current_us) { -// total_diff = 1000 + current_us - self->last_us; -// if (ms_diff > 1) { -// total_diff += (ms_diff - 1) * 1000; -// } -// } else { -// total_diff += ms_diff * 1000; -// } -// uint16_t duration = 0xffff; -// if (total_diff < duration) { -// duration = total_diff; -// } -// -// uint16_t i = (self->start + self->len) % self->maxlen; -// self->buffer[i] = duration; -// if (self->len < self->maxlen) { -// self->len++; -// } else { -// self->start++; -// } -// } -// self->last_ms = current_ms; -// self->last_us = current_us; -// } - -void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, - const mcu_pin_obj_t *pin, uint16_t maxlen, bool idle_state) { -// if (!pin->has_extint) { -// mp_raise_RuntimeError(translate("No hardware support on pin")); -// } -// if (eic_get_enable() && !eic_channel_free(pin->extint_channel)) { -// mp_raise_RuntimeError(translate("EXTINT channel already in use")); -// } -// -// self->buffer = (uint16_t *) m_malloc(maxlen * sizeof(uint16_t), false); -// if (self->buffer == NULL) { -// mp_raise_msg_varg(&mp_type_MemoryError, translate("Failed to allocate RX buffer of %d bytes"), maxlen * sizeof(uint16_t)); -// } -// self->channel = pin->extint_channel; -// self->pin = pin->number; -// self->maxlen = maxlen; -// self->idle_state = idle_state; -// self->start = 0; -// self->len = 0; -// self->first_edge = true; -// self->last_us = 0; -// self->last_ms = 0; -// self->errored_too_fast = false; -// -// set_eic_channel_data(pin->extint_channel, (void*) self); -// -// // Check to see if the EIC is enabled and start it up if its not.' -// if (eic_get_enable() == 0) { -// turn_on_external_interrupt_controller(); -// } -// -// gpio_set_pin_function(pin->number, GPIO_PIN_FUNCTION_A); -// -// turn_on_cpu_interrupt(self->channel); -// -// claim_pin(pin); -// -// // Set config will enable the EIC. -// pulsein_set_config(self, true); -} - -bool common_hal_pulseio_pulsein_deinited(pulseio_pulsein_obj_t *self) { -// return self->pin == NO_PIN; - return true; -} - -void common_hal_pulseio_pulsein_deinit(pulseio_pulsein_obj_t *self) { -// if (common_hal_pulseio_pulsein_deinited(self)) { -// return; -// } -// set_eic_handler(self->channel, EIC_HANDLER_NO_INTERRUPT); -// turn_off_eic_channel(self->channel); -// reset_pin_number(self->pin); -// self->pin = NO_PIN; -} - -void common_hal_pulseio_pulsein_pause(pulseio_pulsein_obj_t *self) { -// uint32_t mask = 1 << self->channel; -// EIC->INTENCLR.reg = mask << EIC_INTENSET_EXTINT_Pos; -} - -void common_hal_pulseio_pulsein_resume(pulseio_pulsein_obj_t *self, - uint16_t trigger_duration) { -// // Make sure we're paused. -// common_hal_pulseio_pulsein_pause(self); -// -// // Reset erroring -// self->errored_too_fast = false; -// -// // Send the trigger pulse. -// if (trigger_duration > 0) { -// gpio_set_pin_pull_mode(self->pin, GPIO_PULL_OFF); -// gpio_set_pin_direction(self->pin, GPIO_DIRECTION_OUT); -// gpio_set_pin_level(self->pin, !self->idle_state); -// common_hal_mcu_delay_us((uint32_t)trigger_duration); -// gpio_set_pin_level(self->pin, self->idle_state); -// } -// -// // Reconfigure the pin and make sure its set to detect the first edge. -// self->first_edge = true; -// self->last_ms = 0; -// self->last_us = 0; -// gpio_set_pin_function(self->pin, GPIO_PIN_FUNCTION_A); -// uint32_t mask = 1 << self->channel; -// // Clear previous interrupt state and re-enable it. -// EIC->INTFLAG.reg = mask << EIC_INTFLAG_EXTINT_Pos; -// EIC->INTENSET.reg = mask << EIC_INTENSET_EXTINT_Pos; -// -// pulsein_set_config(self, true); -} - -void common_hal_pulseio_pulsein_clear(pulseio_pulsein_obj_t *self) { -// common_hal_mcu_disable_interrupts(); -// self->start = 0; -// self->len = 0; -// common_hal_mcu_enable_interrupts(); -} - -uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t *self) { -// if (self->len == 0) { -// mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_PulseIn); -// } -// common_hal_mcu_disable_interrupts(); -// uint16_t value = self->buffer[self->start]; -// self->start = (self->start + 1) % self->maxlen; -// self->len--; -// common_hal_mcu_enable_interrupts(); -// -// return value; - return 0; -} - -uint16_t common_hal_pulseio_pulsein_get_maxlen(pulseio_pulsein_obj_t *self) { -// return self->maxlen; - return 0; -} - -uint16_t common_hal_pulseio_pulsein_get_len(pulseio_pulsein_obj_t *self) { -// return self->len; - return 0; -} - -bool common_hal_pulseio_pulsein_get_paused(pulseio_pulsein_obj_t *self) { -// uint32_t mask = 1 << self->channel; -// return (EIC->INTENSET.reg & (mask << EIC_INTENSET_EXTINT_Pos)) == 0; - return true; -} - -uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t *self, - int16_t index) { -// common_hal_mcu_disable_interrupts(); -// if (index < 0) { -// index += self->len; -// } -// if (index < 0 || index >= self->len) { -// common_hal_mcu_enable_interrupts(); -// mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_PulseIn); -// } -// uint16_t value = self->buffer[(self->start + index) % self->maxlen]; -// common_hal_mcu_enable_interrupts(); -// return value; - return 0; -} diff --git a/ports/mimxrt10xx/common-hal/pulseio/PulseIn.h b/ports/mimxrt10xx/common-hal/pulseio/PulseIn.h deleted file mode 100644 index cce4f58ca7..0000000000 --- a/ports/mimxrt10xx/common-hal/pulseio/PulseIn.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries - * Copyright (c) 2019 Artur Pacholec - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_PULSEIO_PULSEIN_H -#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_PULSEIO_PULSEIN_H - -#include "common-hal/microcontroller/Pin.h" - -#include "py/obj.h" - -// TODO -typedef struct { - mp_obj_base_t base; -// uint8_t channel; -// uint8_t pin; -// uint16_t* buffer; -// uint16_t maxlen; -// bool idle_state; -// volatile uint16_t start; -// volatile uint16_t len; -// volatile bool first_edge; -// volatile uint64_t last_ms; -// volatile uint16_t last_us; -// volatile bool errored_too_fast; -} pulseio_pulsein_obj_t; - -// void pulsein_reset(void); -// -// void pulsein_interrupt_handler(uint8_t channel); - -#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_PULSEIO_PULSEIN_H diff --git a/ports/mimxrt10xx/common-hal/pulseio/PulseOut.c b/ports/mimxrt10xx/common-hal/pulseio/PulseOut.c deleted file mode 100644 index b38f6f093f..0000000000 --- a/ports/mimxrt10xx/common-hal/pulseio/PulseOut.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George - * Copyright (c) 2019 Artur Pacholec - * - * 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 "common-hal/pulseio/PulseOut.h" - -#include - -#include "mpconfigport.h" -#include "py/gc.h" -#include "py/runtime.h" -#include "shared-bindings/pulseio/PulseOut.h" -#include "supervisor/shared/translate.h" - -// TODO - -// This timer is shared amongst all PulseOut objects under the assumption that -// the code is single threaded. -// static uint8_t refcount = 0; -// -// static uint8_t pulseout_tc_index = 0xff; -// -// static __IO PORT_PINCFG_Type *active_pincfg = NULL; -// static uint16_t *pulse_buffer = NULL; -// static volatile uint16_t pulse_index = 0; -// static uint16_t pulse_length; -// static volatile uint32_t current_compare = 0; -// -// static void turn_on(__IO PORT_PINCFG_Type * pincfg) { -// pincfg->reg = PORT_PINCFG_PMUXEN; -// } -// -// static void turn_off(__IO PORT_PINCFG_Type * pincfg) { -// pincfg->reg = PORT_PINCFG_RESETVALUE; -// } -// -// void pulse_finish(void) { -// pulse_index++; -// -// if (active_pincfg == NULL) { -// return; -// } -// // Always turn it off. -// turn_off(active_pincfg); -// if (pulse_index >= pulse_length) { -// return; -// } -// current_compare = (current_compare + pulse_buffer[pulse_index] * 3 / 4) & 0xffff; -// Tc* tc = tc_insts[pulseout_tc_index]; -// tc->COUNT16.CC[0].reg = current_compare; -// if (pulse_index % 2 == 0) { -// turn_on(active_pincfg); -// } -// } - -void pulseout_interrupt_handler(uint8_t index) { -// if (index != pulseout_tc_index) return; -// Tc* tc = tc_insts[index]; -// if (!tc->COUNT16.INTFLAG.bit.MC0) return; -// -// pulse_finish(); -// -// // Clear the interrupt bit. -// tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC0; -} - -void pulseout_reset() { -// refcount = 0; -// pulseout_tc_index = 0xff; -// active_pincfg = NULL; -} - -void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, - const pwmio_pwmout_obj_t *carrier, - const mcu_pin_obj_t *pin, - uint32_t frequency, - uint16_t duty_cycle) { -// if (refcount == 0) { -// // Find a spare timer. -// Tc *tc = NULL; -// int8_t index = TC_INST_NUM - 1; -// for (; index >= 0; index--) { -// if (tc_insts[index]->COUNT16.CTRLA.bit.ENABLE == 0) { -// tc = tc_insts[index]; -// break; -// } -// } -// if (tc == NULL) { -// mp_raise_RuntimeError(translate("All timers in use")); -// } -// -// pulseout_tc_index = index; -// -// set_timer_handler(true, index, TC_HANDLER_PULSEOUT); -// // We use GCLK0 for SAMD21 and GCLK1 for SAMD51 because they both run at 48mhz making our -// // math the same across the boards. -// #ifdef SAMD21 -// turn_on_clocks(true, index, 0); -// #endif -// #ifdef SAMD51 -// turn_on_clocks(true, index, 1); -// #endif -// -// -// #ifdef SAMD21 -// tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | -// TC_CTRLA_PRESCALER_DIV64 | -// TC_CTRLA_WAVEGEN_NFRQ; -// #endif -// #ifdef SAMD51 -// tc_reset(tc); -// tc_set_enable(tc, false); -// tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV64; -// tc->COUNT16.WAVE.reg = TC_WAVE_WAVEGEN_NFRQ; -// #endif -// -// tc_set_enable(tc, true); -// tc->COUNT16.CTRLBSET.reg = TC_CTRLBSET_CMD_STOP; -// } -// refcount++; -// -// self->pin = carrier->pin->number; -// -// PortGroup *const port_base = &PORT->Group[GPIO_PORT(self->pin)]; -// self->pincfg = &port_base->PINCFG[self->pin % 32]; -// -// // Set the port to output a zero. -// port_base->OUTCLR.reg = 1 << (self->pin % 32); -// port_base->DIRSET.reg = 1 << (self->pin % 32); -// -// // Turn off the pinmux which should connect the port output. -// turn_off(self->pincfg); -} - -bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) { -// return self->pin == NO_PIN; - return false; -} - -void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { -// if (common_hal_pulseio_pulseout_deinited(self)) { -// return; -// } -// PortGroup *const port_base = &PORT->Group[GPIO_PORT(self->pin)]; -// port_base->DIRCLR.reg = 1 << (self->pin % 32); -// -// turn_on(self->pincfg); -// -// refcount--; -// if (refcount == 0) { -// tc_reset(tc_insts[pulseout_tc_index]); -// pulseout_tc_index = 0xff; -// } -// self->pin = NO_PIN; -} - -void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pulses, uint16_t length) { -// if (active_pincfg != NULL) { -// mp_raise_RuntimeError(translate("Another send is already active")); -// } -// active_pincfg = self->pincfg; -// pulse_buffer = pulses; -// pulse_index = 0; -// pulse_length = length; -// -// current_compare = pulses[0] * 3 / 4; -// Tc* tc = tc_insts[pulseout_tc_index]; -// tc->COUNT16.CC[0].reg = current_compare; -// -// // Clear our interrupt in case it was set earlier -// tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC0; -// tc->COUNT16.INTENSET.reg = TC_INTENSET_MC0; -// tc_enable_interrupts(pulseout_tc_index); -// turn_on(active_pincfg); -// tc->COUNT16.CTRLBSET.reg = TC_CTRLBSET_CMD_RETRIGGER; -// -// while(pulse_index < length) { -// // Do other things while we wait. The interrupts will handle sending the -// // signal. -// RUN_BACKGROUND_TASKS; -// } -// -// tc->COUNT16.CTRLBSET.reg = TC_CTRLBSET_CMD_STOP; -// tc->COUNT16.INTENCLR.reg = TC_INTENCLR_MC0; -// tc_disable_interrupts(pulseout_tc_index); -// active_pincfg = NULL; -} diff --git a/ports/mimxrt10xx/common-hal/pulseio/PulseOut.h b/ports/mimxrt10xx/common-hal/pulseio/PulseOut.h deleted file mode 100644 index da022b738d..0000000000 --- a/ports/mimxrt10xx/common-hal/pulseio/PulseOut.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries - * Copyright (c) 2019 Artur Pacholec - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_PULSEIO_PULSEOUT_H -#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_PULSEIO_PULSEOUT_H - -#include "common-hal/microcontroller/Pin.h" - -#include "py/obj.h" - -// TODO -typedef struct { - mp_obj_base_t base; -// __IO PORT_PINCFG_Type *pincfg; -// uint8_t pin; -} pulseio_pulseout_obj_t; - -void pulseout_reset(void); -// void pulseout_interrupt_handler(uint8_t index); - -#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_PULSEIO_PULSEOUT_H diff --git a/ports/mimxrt10xx/common-hal/pulseio/__init__.c b/ports/mimxrt10xx/common-hal/pulseio/__init__.c deleted file mode 100644 index 2bee925bc7..0000000000 --- a/ports/mimxrt10xx/common-hal/pulseio/__init__.c +++ /dev/null @@ -1 +0,0 @@ -// No pulseio module functions. diff --git a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c index d48bda7cd1..8eb3251bf3 100644 --- a/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +++ b/ports/mimxrt10xx/common-hal/pwmio/PWMOut.c @@ -56,97 +56,16 @@ static void config_periph_pin(const mcu_pwm_obj_t *periph) { | IOMUXC_SW_PAD_CTL_PAD_DSE(6) | IOMUXC_SW_PAD_CTL_PAD_SRE(0)); } -// TODO -// #include "samd/pins.h" - -// #undef ENABLE -// -// # define _TCC_SIZE(unused, n) TCC ## n ## _SIZE, -// # define TCC_SIZES { REPEAT_MACRO(_TCC_SIZE, 0, TCC_INST_NUM) } -// -// static uint32_t tcc_periods[TCC_INST_NUM]; -// static uint32_t tc_periods[TC_INST_NUM]; -// -// uint32_t target_tcc_frequencies[TCC_INST_NUM]; -// uint8_t tcc_refcount[TCC_INST_NUM]; -// -//// This bitmask keeps track of which channels of a TCC are currently claimed. -// #ifdef SAMD21 -// uint8_t tcc_channels[3]; // Set by pwmout_reset() to {0xf0, 0xfc, 0xfc} initially. -// #endif -// #ifdef SAMD51 -// uint8_t tcc_channels[5]; // Set by pwmout_reset() to {0xc0, 0xf0, 0xf8, 0xfc, 0xfc} initially. -// #endif -// -// static uint8_t never_reset_tc_or_tcc[TC_INST_NUM + TCC_INST_NUM]; void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self) { -// if (self->timer->is_tc) { -// never_reset_tc_or_tcc[self->timer->index] += 1; -// } else { -// never_reset_tc_or_tcc[TC_INST_NUM + self->timer->index] += 1; -// } -// -// never_reset_pin_number(self->pin->number); } void common_hal_pwmio_pwmout_reset_ok(pwmio_pwmout_obj_t *self) { -// if (self->timer->is_tc) { -// never_reset_tc_or_tcc[self->timer->index] -= 1; -// } else { -// never_reset_tc_or_tcc[TC_INST_NUM + self->timer->index] -= 1; -// } } void pwmout_reset(void) { -// // Reset all timers -// for (int i = 0; i < TCC_INST_NUM; i++) { -// target_tcc_frequencies[i] = 0; -// tcc_refcount[i] = 0; -// } -// Tcc *tccs[TCC_INST_NUM] = TCC_INSTS; -// for (int i = 0; i < TCC_INST_NUM; i++) { -// if (never_reset_tc_or_tcc[TC_INST_NUM + i] > 0) { -// continue; -// } -// // Disable the module before resetting it. -// if (tccs[i]->CTRLA.bit.ENABLE == 1) { -// tccs[i]->CTRLA.bit.ENABLE = 0; -// while (tccs[i]->SYNCBUSY.bit.ENABLE == 1) { -// } -// } -// uint8_t mask = 0xff; -// for (uint8_t j = 0; j < tcc_cc_num[i]; j++) { -// mask <<= 1; -// } -// tcc_channels[i] = mask; -// tccs[i]->CTRLA.bit.SWRST = 1; -// while (tccs[i]->CTRLA.bit.SWRST == 1) { -// } -// } -// Tc *tcs[TC_INST_NUM] = TC_INSTS; -// for (int i = 0; i < TC_INST_NUM; i++) { -// if (never_reset_tc_or_tcc[i] > 0) { -// continue; -// } -// tcs[i]->COUNT16.CTRLA.bit.SWRST = 1; -// while (tcs[i]->COUNT16.CTRLA.bit.SWRST == 1) { -// } -// } } -// static uint8_t tcc_channel(const pin_timer_t* t) { -// // For the SAMD51 this hardcodes the use of OTMX == 0x0, the output matrix mapping, which uses -// // SAMD21-style modulo mapping. -// return t->wave_output % tcc_cc_num[t->index]; -// } - -// bool channel_ok(const pin_timer_t* t) { -// uint8_t channel_bit = 1 << tcc_channel(t); -// return (!t->is_tc && ((tcc_channels[t->index] & channel_bit) == 0)) || -// t->is_tc; -// } - #define PWM_SRC_CLK_FREQ CLOCK_GetFreq(kCLOCK_IpgClk) static int calculate_pulse_count(uint32_t frequency, uint8_t *prescaler) { @@ -325,3 +244,7 @@ uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self) { bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self) { return self->variable_frequency; } + +const mcu_pin_obj_t *common_hal_pwmio_pwmout_get_pin(pwmio_pwmout_obj_t *self) { + return self->pin; +} diff --git a/ports/mimxrt10xx/mpconfigport.mk b/ports/mimxrt10xx/mpconfigport.mk index ac5e7fc8ed..3f4d9d4b7f 100644 --- a/ports/mimxrt10xx/mpconfigport.mk +++ b/ports/mimxrt10xx/mpconfigport.mk @@ -24,10 +24,11 @@ INTERNAL_FLASH_FILESYSTEM = 1 CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BUSDEVICE = 1 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NVM = 0 +CIRCUITPY_PULSEIO = 0 CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_COUNTIO = 0 CIRCUITPY_USB_MIDI = 1 LONGINT_IMPL = MPZ diff --git a/ports/mimxrt10xx/supervisor/port.c b/ports/mimxrt10xx/supervisor/port.c index 2493252d78..08322873bd 100644 --- a/ports/mimxrt10xx/supervisor/port.c +++ b/ports/mimxrt10xx/supervisor/port.c @@ -37,8 +37,6 @@ #include "fsl_device_registers.h" #include "common-hal/microcontroller/Pin.h" -#include "common-hal/pulseio/PulseIn.h" -#include "common-hal/pulseio/PulseOut.h" #include "common-hal/pwmio/PWMOut.h" #include "common-hal/rtc/RTC.h" #include "common-hal/busio/SPI.h" @@ -289,9 +287,6 @@ void reset_port(void) { // eic_reset(); - #if CIRCUITPY_PULSEIO - pulseout_reset(); - #endif #if CIRCUITPY_PWMIO pwmout_reset(); #endif diff --git a/ports/nrf/common-hal/pulseio/PulseOut.c b/ports/nrf/common-hal/pulseio/PulseOut.c index 17f498ba8e..1c3c317a05 100644 --- a/ports/nrf/common-hal/pulseio/PulseOut.c +++ b/ports/nrf/common-hal/pulseio/PulseOut.c @@ -48,14 +48,14 @@ static volatile uint16_t pulse_array_index = 0; static uint16_t pulse_array_length; static void turn_on(pulseio_pulseout_obj_t *pulseout) { - pulseout->pwmout->pwm->PSEL.OUT[0] = pulseout->pwmout->pin_number; + pulseout->pwmout.pwm->PSEL.OUT[0] = pulseout->pwmout.pin->number; } static void turn_off(pulseio_pulseout_obj_t *pulseout) { // Disconnect pin from PWM. - pulseout->pwmout->pwm->PSEL.OUT[0] = 0xffffffff; + pulseout->pwmout.pwm->PSEL.OUT[0] = 0xffffffff; // Make sure pin is low. - nrf_gpio_pin_clear(pulseout->pwmout->pin_number); + nrf_gpio_pin_clear(pulseout->pwmout.pin->number); } static void start_timer(void) { @@ -100,13 +100,15 @@ void pulseout_reset() { } void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, - const pwmio_pwmout_obj_t *carrier, const mcu_pin_obj_t *pin, uint32_t frequency, uint16_t duty_cycle) { - if (!carrier || pin || frequency) { - mp_raise_NotImplementedError(translate("Port does not accept pins or frequency. Construct and pass a PWMOut Carrier instead")); - } + + pwmout_result_t result = common_hal_pwmio_pwmout_construct( + &self->pwmout, pin, duty_cycle, frequency, false); + + // This will raise an exception and not return if needed. + common_hal_pwmio_pwmout_raise_error(result); if (refcount == 0) { timer = nrf_peripherals_allocate_timer_or_throw(); @@ -122,14 +124,12 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, .p_context = self, }; - self->pwmout = carrier; - nrfx_timer_init(timer, &timer_config, &pulseout_event_handler); turn_off(self); } bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) { - return self->pwmout == NULL; + return common_hal_pwmio_pwmout_deinited(&self->pwmout); } void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { @@ -137,7 +137,7 @@ void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { return; } turn_on(self); - self->pwmout = NULL; + common_hal_pwmio_pwmout_deinit(&self->pwmout); refcount--; if (refcount == 0) { diff --git a/ports/nrf/common-hal/pulseio/PulseOut.h b/ports/nrf/common-hal/pulseio/PulseOut.h index 714f740b20..03560bceac 100644 --- a/ports/nrf/common-hal/pulseio/PulseOut.h +++ b/ports/nrf/common-hal/pulseio/PulseOut.h @@ -34,7 +34,7 @@ typedef struct { mp_obj_base_t base; - const pwmio_pwmout_obj_t *pwmout; + pwmio_pwmout_obj_t pwmout; } pulseio_pulseout_obj_t; void pulseout_reset(void); diff --git a/ports/nrf/common-hal/pwmio/PWMOut.c b/ports/nrf/common-hal/pwmio/PWMOut.c index e49214631b..6dd4a153b8 100644 --- a/ports/nrf/common-hal/pwmio/PWMOut.c +++ b/ports/nrf/common-hal/pwmio/PWMOut.c @@ -74,7 +74,7 @@ void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self) { } } - never_reset_pin_number(self->pin_number); + common_hal_never_reset_pin(self->pin); } void common_hal_pwmio_pwmout_reset_ok(pwmio_pwmout_obj_t *self) { @@ -232,14 +232,14 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, } self->channel = channel; - self->pin_number = pin->number; + self->pin = pin; claim_pin(pin); self->frequency = frequency; self->variable_frequency = variable_frequency; // Note this is standard, not strong drive. - nrf_gpio_cfg_output(self->pin_number); + nrf_gpio_cfg_output(self->pin->number); // disable before mapping pin channel nrf_pwm_disable(self->pwm); @@ -267,15 +267,15 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) { return; } - nrf_gpio_cfg_default(self->pin_number); + nrf_gpio_cfg_default(self->pin->number); NRF_PWM_Type *pwm = self->pwm; self->pwm = NULL; pwmout_free_channel(pwm, self->channel); - reset_pin_number(self->pin_number); - self->pin_number = NO_PIN; + common_hal_reset_pin(self->pin); + self->pin = NULL; } void common_hal_pwmio_pwmout_set_duty_cycle(pwmio_pwmout_obj_t *self, uint16_t duty_cycle) { @@ -313,3 +313,7 @@ uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self) { bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self) { return self->variable_frequency; } + +const mcu_pin_obj_t *common_hal_pwmio_pwmout_get_pin(pwmio_pwmout_obj_t *self) { + return self->pin; +} diff --git a/ports/nrf/common-hal/pwmio/PWMOut.h b/ports/nrf/common-hal/pwmio/PWMOut.h index f96c5e4f81..49e67c3b66 100644 --- a/ports/nrf/common-hal/pwmio/PWMOut.h +++ b/ports/nrf/common-hal/pwmio/PWMOut.h @@ -29,13 +29,14 @@ #include "nrfx_pwm.h" #include "py/obj.h" +#include "shared-bindings/microcontroller/Pin.h" typedef struct { mp_obj_base_t base; NRF_PWM_Type *pwm; - uint8_t pin_number; uint8_t channel : 7; bool variable_frequency : 1; + const mcu_pin_obj_t *pin; uint16_t duty_cycle; uint32_t frequency; } pwmio_pwmout_obj_t; diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.c b/ports/raspberrypi/common-hal/pulseio/PulseOut.c index 4e403fa020..38a4859c2b 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.c @@ -42,23 +42,28 @@ static uint8_t refcount = 0; volatile alarm_id_t cur_alarm = 0; void turn_off(uint8_t slice) { - pwm_hw->slice[slice].ctr = 0; - pwm_hw->slice[slice].cc = 0; - pwm_hw->slice[slice].top = 0; - pwm_hw->slice[slice].div = 1u << PWM_CH0_DIV_INT_LSB; + // Set the current counter value near the top so that the output is low. The + // - 2 gives us a little wiggle room for enabling and disabling the slice. + // The top + 1 ensure we don't end up lower than the cc (and therefore high.) + uint32_t top = MAX(pwm_hw->slice[slice].cc + 1, pwm_hw->slice[slice].top - 2); + // Disable interrupts so this happens as fast as possible. + common_hal_mcu_disable_interrupts(); + pwm_hw->slice[slice].ctr = top; + // Enable for at least one cycle so that the new counter value takes effect. pwm_hw->slice[slice].csr = PWM_CH0_CSR_EN_BITS; pwm_hw->slice[slice].csr = 0; + common_hal_mcu_enable_interrupts(); } void pulse_finish(pulseio_pulseout_obj_t *self) { self->pulse_index++; // Turn pwm pin off by setting duty cyle to 1. - common_hal_pwmio_pwmout_set_duty_cycle(self->carrier,1); + common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, 1); if (self->pulse_index >= self->pulse_length) { return; } if (self->pulse_index % 2 == 0) { - common_hal_pwmio_pwmout_set_duty_cycle(self->carrier,self->current_duty_cycle); + common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, self->current_duty_cycle); } uint64_t delay = self->pulse_buffer[self->pulse_index]; if (delay < self->min_pulse) { @@ -78,24 +83,26 @@ int64_t pulseout_interrupt_handler(alarm_id_t id, void *user_data) { } void pulseout_reset() { - refcount = 0; } void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, - const pwmio_pwmout_obj_t *carrier, const mcu_pin_obj_t *pin, uint32_t frequency, uint16_t duty_cycle) { - refcount++; - self->carrier = (pwmio_pwmout_obj_t *)carrier; - self->current_duty_cycle = common_hal_pwmio_pwmout_get_duty_cycle(self->carrier); - pwm_set_enabled(self->carrier->slice,false); - turn_off(self->carrier->slice); - common_hal_pwmio_pwmout_set_duty_cycle(self->carrier,1); - self->pin = self->carrier->pin->number; - self->slice = self->carrier->slice; - self->min_pulse = (1000000 / self->carrier->actual_frequency); + pwmout_result_t result = common_hal_pwmio_pwmout_construct( + &self->carrier, pin, duty_cycle, frequency, false); + + // This will raise an exception and not return if needed. + common_hal_pwmio_pwmout_raise_error(result); + + self->current_duty_cycle = duty_cycle; + pwm_set_enabled(self->carrier.slice, false); + turn_off(self->carrier.slice); + common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, 1); + self->pin = self->carrier.pin->number; + self->slice = self->carrier.slice; + self->min_pulse = (1000000 / self->carrier.actual_frequency); } bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) { @@ -106,7 +113,7 @@ void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { if (common_hal_pulseio_pulseout_deinited(self)) { return; } - refcount--; + common_hal_pwmio_pwmout_deinit(&self->carrier); self->pin = NO_PIN; } @@ -115,8 +122,8 @@ void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pu self->pulse_index = 0; self->pulse_length = length; - common_hal_pwmio_pwmout_set_duty_cycle(self->carrier,self->current_duty_cycle); - pwm_set_enabled(self->slice,true); + common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, self->current_duty_cycle); + pwm_set_enabled(self->slice, true); uint64_t delay = self->pulse_buffer[0]; if (delay < self->min_pulse) { delay = self->min_pulse; diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.h b/ports/raspberrypi/common-hal/pulseio/PulseOut.h index 49a14f3a51..cf4645cc1f 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.h +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.h @@ -39,7 +39,7 @@ typedef struct { mp_obj_base_t base; uint8_t pin; uint8_t slice; - pwmio_pwmout_obj_t *carrier; + pwmio_pwmout_obj_t carrier; uint16_t *pulse_buffer; uint16_t pulse_length; uint16_t current_duty_cycle; diff --git a/ports/raspberrypi/common-hal/pwmio/PWMOut.c b/ports/raspberrypi/common-hal/pwmio/PWMOut.c index 5215f2b8df..f5e93f517e 100644 --- a/ports/raspberrypi/common-hal/pwmio/PWMOut.c +++ b/ports/raspberrypi/common-hal/pwmio/PWMOut.c @@ -292,3 +292,7 @@ uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self) { bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self) { return self->variable_frequency; } + +const mcu_pin_obj_t *common_hal_pwmio_pwmout_get_pin(pwmio_pwmout_obj_t *self) { + return self->pin; +} diff --git a/ports/stm/common-hal/pulseio/PulseOut.c b/ports/stm/common-hal/pulseio/PulseOut.c index 9e28002a69..fe3caa08b2 100644 --- a/ports/stm/common-hal/pulseio/PulseOut.c +++ b/ports/stm/common-hal/pulseio/PulseOut.c @@ -52,15 +52,15 @@ STATIC pulseio_pulseout_obj_t *curr_pulseout = NULL; STATIC void turn_on(pulseio_pulseout_obj_t *pulseout) { // Turn on PWM - HAL_TIM_PWM_Start(&(pulseout->pwmout->handle), pulseout->pwmout->channel); + HAL_TIM_PWM_Start(&(pulseout->pwmout.handle), pulseout->pwmout.channel); } STATIC void turn_off(pulseio_pulseout_obj_t *pulseout) { // Turn off PWM - HAL_TIM_PWM_Stop(&(pulseout->pwmout->handle), pulseout->pwmout->channel); + HAL_TIM_PWM_Stop(&(pulseout->pwmout.handle), pulseout->pwmout.channel); // Make sure pin is low. - HAL_GPIO_WritePin(pin_port(pulseout->pwmout->tim->pin->port), - pin_mask(pulseout->pwmout->tim->pin->number), 0); + HAL_GPIO_WritePin(pin_port(pulseout->pwmout.tim->pin->port), + pin_mask(pulseout->pwmout.tim->pin->number), 0); } STATIC void start_timer(void) { @@ -80,7 +80,7 @@ STATIC void pulseout_event_handler(void) { if (__HAL_TIM_GET_FLAG(&tim_handle, TIM_FLAG_UPDATE) != RESET) { if (__HAL_TIM_GET_IT_SOURCE(&tim_handle, TIM_IT_UPDATE) != RESET) { __HAL_TIM_CLEAR_IT(&tim_handle, TIM_IT_UPDATE); - if (curr_pulseout->pwmout == NULL) { + if (common_hal_pulseio_pulseout_deinited(curr_pulseout)) { return; // invalid interrupt } @@ -111,13 +111,12 @@ void pulseout_reset() { } void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, - const pwmio_pwmout_obj_t *carrier, - const mcu_pin_obj_t *pin, - uint32_t frequency, - uint16_t duty_cycle) { - if (!carrier || pin || frequency) { - mp_raise_NotImplementedError(translate("Port does not accept pins or frequency. Construct and pass a PWMOut Carrier instead")); - } + const mcu_pin_obj_t *pin, uint32_t frequency, uint16_t duty_cycle) { + pwmout_result_t result = common_hal_pwmio_pwmout_construct( + &self->pwmout, pin, duty_cycle, frequency, false); + + // This will raise an exception and not return if needed. + common_hal_pwmio_pwmout_raise_error(result); // Add to active PulseOuts refcount++; @@ -139,13 +138,12 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, HAL_TIM_Base_Init(&tim_handle); tim_handle.Instance->SR = 0; - // The HAL can't work with const, recast required. - self->pwmout = (pwmio_pwmout_obj_t *)carrier; + turn_off(self); } bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) { - return self->pwmout == NULL; + return common_hal_pwmio_pwmout_deinited(&self->pwmout); } void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { @@ -153,7 +151,7 @@ void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { return; } turn_on(self); - self->pwmout = NULL; + common_hal_pwmio_pwmout_deinit(&self->pwmout); refcount--; if (refcount == 0) { diff --git a/ports/stm/common-hal/pulseio/PulseOut.h b/ports/stm/common-hal/pulseio/PulseOut.h index 29894f27d2..3a0c460ff7 100644 --- a/ports/stm/common-hal/pulseio/PulseOut.h +++ b/ports/stm/common-hal/pulseio/PulseOut.h @@ -34,7 +34,7 @@ typedef struct { mp_obj_base_t base; - pwmio_pwmout_obj_t *pwmout; + pwmio_pwmout_obj_t pwmout; } pulseio_pulseout_obj_t; void pulseout_reset(void); diff --git a/ports/stm/common-hal/pwmio/PWMOut.c b/ports/stm/common-hal/pwmio/PWMOut.c index 17ef82a060..e5dc18cd79 100644 --- a/ports/stm/common-hal/pwmio/PWMOut.c +++ b/ports/stm/common-hal/pwmio/PWMOut.c @@ -89,8 +89,8 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, for (uint i = 0; i < tim_num; i++) { const mcu_tim_pin_obj_t *l_tim = &mcu_tim_pin_list[i]; - uint8_t l_tim_index = l_tim->tim_index - 1; - uint8_t l_tim_channel = l_tim->channel_index - 1; + uint8_t l_tim_index = l_tim->tim_index; + uint8_t l_tim_channel = l_tim->channel_index; // if pin is same if (l_tim->pin == pin) { @@ -127,14 +127,14 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, // handle valid/invalid timer instance if (self->tim != NULL) { // create instance - TIMx = mcu_tim_banks[self->tim->tim_index - 1]; + TIMx = mcu_tim_banks[self->tim->tim_index]; // reserve timer/channel if (variable_frequency) { - reserved_tim[self->tim->tim_index - 1] = 0x0F; + reserved_tim[self->tim->tim_index] = 0x0F; } else { - reserved_tim[self->tim->tim_index - 1] |= 1 << (self->tim->channel_index - 1); + reserved_tim[self->tim->tim_index] |= 1 << self->tim->channel_index; } - tim_frequencies[self->tim->tim_index - 1] = frequency; + tim_frequencies[self->tim->tim_index] = frequency; stm_peripherals_timer_reserve(TIMx); } else { // no match found if (tim_chan_taken || tim_taken_internal) { @@ -148,6 +148,13 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, } } + uint32_t prescaler = 0; // prescaler is 15 bit + uint32_t period = 0; // period is 16 bit + uint32_t source_freq = stm_peripherals_timer_get_source_freq(TIMx); + if (!timer_get_optimal_divisors(&period, &prescaler, frequency, source_freq)) { + return PWMOUT_INVALID_FREQUENCY; + } + GPIO_InitTypeDef GPIO_InitStruct = {0}; GPIO_InitStruct.Pin = pin_mask(pin->number); GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; @@ -155,18 +162,12 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = self->tim->altfn_index; HAL_GPIO_Init(pin_port(pin->port), &GPIO_InitStruct); + self->pin = pin; - tim_clock_enable(1 << (self->tim->tim_index - 1)); + tim_clock_enable(1 << (self->tim->tim_index)); // translate channel into handle value - self->channel = 4 * (self->tim->channel_index - 1); - - uint32_t prescaler = 0; // prescaler is 15 bit - uint32_t period = 0; // period is 16 bit - uint32_t source_freq = stm_peripherals_timer_get_source_freq(TIMx); - if (!timer_get_optimal_divisors(&period, &prescaler, frequency, source_freq)) { - return PWMOUT_INVALID_FREQUENCY; - } + self->channel = 4 * self->tim->channel_index; // Timer init self->handle.Instance = TIMx; @@ -207,7 +208,7 @@ void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self) { for (size_t i = 0; i < TIM_BANK_ARRAY_LEN; i++) { if (mcu_tim_banks[i] == self->handle.Instance) { never_reset_tim[i] = true; - never_reset_pin_number(self->tim->pin->port, self->tim->pin->number); + common_hal_never_reset_pin(self->pin); break; } } @@ -232,16 +233,16 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) { } // var freq shuts down entire timer, others just their channel if (self->variable_frequency) { - reserved_tim[self->tim->tim_index - 1] = 0x00; + reserved_tim[self->tim->tim_index] = 0x00; } else { - reserved_tim[self->tim->tim_index - 1] &= ~(1 << self->tim->channel_index); + reserved_tim[self->tim->tim_index] &= ~(1 << self->tim->channel_index); HAL_TIM_PWM_Stop(&self->handle, self->channel); } - reset_pin_number(self->tim->pin->port,self->tim->pin->number); + common_hal_reset_pin(self->pin); // if reserved timer has no active channels, we can disable it - if (!reserved_tim[self->tim->tim_index - 1]) { - tim_frequencies[self->tim->tim_index - 1] = 0x00; + if (reserved_tim[self->tim->tim_index] == 0) { + tim_frequencies[self->tim->tim_index] = 0x00; stm_peripherals_timer_free(self->handle.Instance); } @@ -290,7 +291,7 @@ void common_hal_pwmio_pwmout_set_frequency(pwmio_pwmout_obj_t *self, uint32_t fr mp_raise_ValueError(translate("Could not restart PWM")); } - tim_frequencies[self->tim->tim_index - 1] = frequency; + tim_frequencies[self->tim->tim_index] = frequency; self->frequency = frequency; self->period = period; } @@ -302,3 +303,7 @@ uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self) { bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self) { return self->variable_frequency; } + +const mcu_pin_obj_t *common_hal_pwmio_pwmout_get_pin(pwmio_pwmout_obj_t *self) { + return self->pin; +} diff --git a/ports/stm/common-hal/pwmio/PWMOut.h b/ports/stm/common-hal/pwmio/PWMOut.h index 4cf2b1c670..de3a304721 100644 --- a/ports/stm/common-hal/pwmio/PWMOut.h +++ b/ports/stm/common-hal/pwmio/PWMOut.h @@ -44,6 +44,7 @@ typedef struct { uint16_t duty_cycle; uint32_t frequency; uint32_t period; + const mcu_pin_obj_t *pin; } pwmio_pwmout_obj_t; void pwmout_reset(void); diff --git a/ports/stm/peripherals/periph.h b/ports/stm/peripherals/periph.h index 488541d096..d9e65c2172 100644 --- a/ports/stm/peripherals/periph.h +++ b/ports/stm/peripherals/periph.h @@ -59,9 +59,9 @@ typedef struct { #define TIM(index, alt, channel, tim_pin) \ { \ - .tim_index = index, \ + .tim_index = index - 1, \ .altfn_index = alt, \ - .channel_index = channel, \ + .channel_index = channel - 1, \ .pin = tim_pin, \ } diff --git a/ports/stm/peripherals/timers.c b/ports/stm/peripherals/timers.c index 6121deab16..24060678e4 100644 --- a/ports/stm/peripherals/timers.c +++ b/ports/stm/peripherals/timers.c @@ -41,8 +41,12 @@ static bool stm_timer_reserved[MP_ARRAY_SIZE(mcu_tim_banks)]; static bool stm_timer_never_reset[MP_ARRAY_SIZE(mcu_tim_banks)]; -static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); - static size_t irq_map[] = { + +typedef void (*stm_timer_callback_t)(void); +// Array of function pointers. +static stm_timer_callback_t stm_timer_callback[MP_ARRAY_SIZE(mcu_tim_banks)]; + +static size_t irq_map[] = { #ifdef TIM1 TIM1_CC_IRQn, #else @@ -139,7 +143,7 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); // If the APB prescaler is 1, then the timer clock is equal to its respective // APB clock. Otherwise (APB prescaler > 1) the timer clock is twice its // respective APB clock. See DM00031020 Rev 4, page 115. - uint32_t stm_peripherals_timer_get_source_freq(TIM_TypeDef *timer) { +uint32_t stm_peripherals_timer_get_source_freq(TIM_TypeDef *timer) { size_t tim_id = stm_peripherals_timer_get_index(timer); uint32_t source, clk_div; if (tim_id == 1 || (8 <= tim_id && tim_id <= 11)) { @@ -158,12 +162,12 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); return source; } - size_t stm_peripherals_timer_get_irqnum(TIM_TypeDef *instance) { +size_t stm_peripherals_timer_get_irqnum(TIM_TypeDef *instance) { size_t tim_id = stm_peripherals_timer_get_index(instance); return irq_map[tim_id]; } - void timers_reset(void) { +void timers_reset(void) { uint16_t never_reset_mask = 0x00; for (size_t i = 0; i < MP_ARRAY_SIZE(mcu_tim_banks); i++) { if (!stm_timer_never_reset[i]) { @@ -175,14 +179,14 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); tim_clock_disable(ALL_CLOCKS & ~(never_reset_mask)); } - TIM_TypeDef *stm_peripherals_find_timer(void) { +TIM_TypeDef *stm_peripherals_find_timer(void) { // Check for timers on pins outside the package size for (size_t i = 0; i < MP_ARRAY_SIZE(mcu_tim_banks); i++) { bool timer_in_package = false; // Find each timer instance on the given bank for (size_t j = 0; j < MP_ARRAY_SIZE(mcu_tim_pin_list); j++) { // If a pin is claimed, we skip it - if ((mcu_tim_pin_list[j].tim_index == i + 1) + if ((mcu_tim_pin_list[j].tim_index == i) && (common_hal_mcu_pin_is_free(mcu_tim_pin_list[j].pin) == true)) { // Search whether any pins in the package array match it for (size_t k = 0; k < mcu_pin_globals.map.alloc; k++) { @@ -210,7 +214,7 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); return NULL; } - void stm_peripherals_timer_preinit(TIM_TypeDef *instance, uint8_t prio, void (*callback)(void)) { +void stm_peripherals_timer_preinit(TIM_TypeDef *instance, uint8_t prio, void (*callback)(void)) { size_t tim_idx = stm_peripherals_timer_get_index(instance); stm_timer_callback[tim_idx] = callback; tim_clock_enable(1 << tim_idx); @@ -218,16 +222,16 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); HAL_NVIC_EnableIRQ(irq_map[tim_idx]); } - void stm_peripherals_timer_reserve(TIM_TypeDef *instance) { +void stm_peripherals_timer_reserve(TIM_TypeDef *instance) { size_t tim_idx = stm_peripherals_timer_get_index(instance); stm_timer_reserved[tim_idx] = true; } - void stm_peripherals_timer_set_callback(void (*callback)(void), TIM_TypeDef *timer) { +void stm_peripherals_timer_set_callback(void (*callback)(void), TIM_TypeDef *timer) { stm_timer_callback[stm_peripherals_timer_get_index(timer)] = callback; } - void stm_peripherals_timer_free(TIM_TypeDef *instance) { +void stm_peripherals_timer_free(TIM_TypeDef *instance) { size_t tim_idx = stm_peripherals_timer_get_index(instance); HAL_NVIC_DisableIRQ(irq_map[tim_idx]); stm_timer_callback[tim_idx] = NULL; @@ -236,24 +240,27 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); stm_timer_never_reset[tim_idx] = false; } - void stm_peripherals_timer_never_reset(TIM_TypeDef *instance) { +void stm_peripherals_timer_never_reset(TIM_TypeDef *instance) { size_t tim_idx = stm_peripherals_timer_get_index(instance); stm_timer_never_reset[tim_idx] = true; } - void stm_peripherals_timer_reset_ok(TIM_TypeDef *instance) { + +void stm_peripherals_timer_reset_ok(TIM_TypeDef *instance) { size_t tim_idx = stm_peripherals_timer_get_index(instance); stm_timer_never_reset[tim_idx] = false; } - bool stm_peripherals_timer_is_never_reset(TIM_TypeDef *instance) { + +bool stm_peripherals_timer_is_never_reset(TIM_TypeDef *instance) { size_t tim_idx = stm_peripherals_timer_get_index(instance); return stm_timer_never_reset[tim_idx]; } - bool stm_peripherals_timer_is_reserved(TIM_TypeDef *instance) { + +bool stm_peripherals_timer_is_reserved(TIM_TypeDef *instance) { size_t tim_idx = stm_peripherals_timer_get_index(instance); return stm_timer_reserved[tim_idx]; } - size_t stm_peripherals_timer_get_index(TIM_TypeDef *instance) { +size_t stm_peripherals_timer_get_index(TIM_TypeDef *instance) { for (size_t i = 0; i < MP_ARRAY_SIZE(mcu_tim_banks); i++) { if (instance == mcu_tim_banks[i]) { return i; @@ -262,7 +269,7 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); return ~(size_t)0; } - void tim_clock_enable(uint16_t mask) { +void tim_clock_enable(uint16_t mask) { #ifdef TIM1 if (mask & (1 << 0)) { __HAL_RCC_TIM1_CLK_ENABLE(); @@ -326,7 +333,7 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); #endif } - void tim_clock_disable(uint16_t mask) { +void tim_clock_disable(uint16_t mask) { #ifdef TIM1 if (mask & (1 << 0)) { __HAL_RCC_TIM1_CLK_DISABLE(); @@ -390,65 +397,79 @@ static void (*stm_timer_callback[MP_ARRAY_SIZE (mcu_tim_banks)])(void); #endif } - STATIC void callback_router(size_t index) { +STATIC void callback_router(size_t index) { if (stm_timer_callback[index - 1]) { (*stm_timer_callback[index - 1])(); } } - void TIM1_CC_IRQHandler(void) { // Advanced timer +void TIM1_CC_IRQHandler(void) { // Advanced timer callback_router(1); } - void TIM2_IRQHandler(void) { + +void TIM2_IRQHandler(void) { callback_router(2); } - void TIM3_IRQHandler(void) { + +void TIM3_IRQHandler(void) { callback_router(3); } - void TIM4_IRQHandler(void) { + +void TIM4_IRQHandler(void) { callback_router(4); } - void TIM5_IRQHandler(void) { + +void TIM5_IRQHandler(void) { callback_router(5); } - void TIM6_DAC_IRQHandler(void) { // Basic timer (DAC) + +void TIM6_DAC_IRQHandler(void) { // Basic timer (DAC) callback_router(6); } - void TIM7_IRQHandler(void) { // Basic timer + +void TIM7_IRQHandler(void) { // Basic timer callback_router(7); } - void TIM8_CC_IRQHandler(void) { // Advanced timer + +void TIM8_CC_IRQHandler(void) { // Advanced timer callback_router(8); } // Advanced timer interrupts are currently unused. - void TIM1_BRK_TIM9_IRQHandler(void) { +void TIM1_BRK_TIM9_IRQHandler(void) { callback_router(9); } - void TIM1_UP_TIM10_IRQHandler(void) { + +void TIM1_UP_TIM10_IRQHandler(void) { callback_router(10); } - void TIM1_TRG_COM_TIM11_IRQHandler(void) { + +void TIM1_TRG_COM_TIM11_IRQHandler(void) { callback_router(11); } - void TIM8_BRK_TIM12_IRQHandler(void) { + +void TIM8_BRK_TIM12_IRQHandler(void) { callback_router(12); } - void TIM8_UP_TIM13_IRQHandler(void) { + +void TIM8_UP_TIM13_IRQHandler(void) { callback_router(13); } - void TIM8_TRG_COM_TIM14_IRQHandler(void) { + +void TIM8_TRG_COM_TIM14_IRQHandler(void) { callback_router(14); } #if (CPY_STM32H7) - void TIM15_IRQHandler(void) { +void TIM15_IRQHandler(void) { callback_router(15); } - void TIM16_IRQHandler(void) { + +void TIM16_IRQHandler(void) { callback_router(16); } - void TIM17_IRQHandler(void) { + +void TIM17_IRQHandler(void) { callback_router(17); } #endif diff --git a/shared-bindings/pulseio/PulseOut.c b/shared-bindings/pulseio/PulseOut.c index ccea353386..564320ae0d 100644 --- a/shared-bindings/pulseio/PulseOut.c +++ b/shared-bindings/pulseio/PulseOut.c @@ -41,10 +41,15 @@ //| pulsed signal consists of timed on and off periods. Unlike PWM, there is no set duration //| for on and off pairs.""" //| -//| def __init__(self, carrier: pwmio.PWMOut) -> None: +//| def __init__(self, pin: microcontroller.Pin, *, frequency: int = 38000, duty_cycle: int = 1 << 15) -> None: //| """Create a PulseOut object associated with the given PWMout object. //| -//| :param ~pwmio.PWMOut carrier: PWMOut that is set to output on the desired pin. +//| :param ~microcontroller.Pin pin: PWMOut that is set to output on the desired pin. +//| :param int frequency: Carrier signal frequency in Hertz +//| :param int duty_cycle: 16-bit duty cycle of carrier frequency (0 - 65536) +//| +//| For backwards compatibility, ``pin`` may be a PWMOut object used as the carrier. This +//| compatibility will be removed in CircuitPython 8.0.0. //| //| Send a short series of pulses:: //| @@ -54,8 +59,7 @@ //| import board //| //| # 50% duty cycle at 38kHz. -//| pwm = pwmio.PWMOut(board.D13, frequency=38000, duty_cycle=32768) -//| pulse = pulseio.PulseOut(pwm) +//| pwm = pulseio.PulseOut(board.D13, frequency=38000, duty_cycle=32768) //| # on off on off on //| pulses = array.array('H', [65000, 1000, 65000, 65000, 1000]) //| pulse.send(pulses) @@ -66,27 +70,30 @@ //| ... //| STATIC mp_obj_t pulseio_pulseout_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_pin, ARG_frequency, ARG_duty_cycle}; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_frequency, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 38000} }, + { MP_QSTR_duty_cycle, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1 << 15} }, + }; + 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); + + const mcu_pin_obj_t *pin = args[ARG_pin].u_obj; + mp_int_t frequency = args[ARG_frequency].u_int; + mp_int_t duty_cycle = args[ARG_duty_cycle].u_int; + if (mp_obj_is_type(args[ARG_pin].u_obj, &pwmio_pwmout_type)) { + pwmio_pwmout_obj_t *pwmout = args[ARG_pin].u_obj; + duty_cycle = common_hal_pwmio_pwmout_get_duty_cycle(pwmout); + frequency = common_hal_pwmio_pwmout_get_frequency(pwmout); + pin = common_hal_pwmio_pwmout_get_pin(pwmout); + // Deinit the pin so we can use it. + common_hal_pwmio_pwmout_deinit(pwmout); + } + validate_obj_is_free_pin(MP_OBJ_FROM_PTR(pin)); pulseio_pulseout_obj_t *self = m_new_obj(pulseio_pulseout_obj_t); self->base.type = &pulseio_pulseout_type; - - mp_obj_t carrier_obj = pos_args[0]; - if (mp_obj_is_type(carrier_obj, &pwmio_pwmout_type)) { - // Use a PWMOut Carrier - mp_arg_check_num(n_args, kw_args, 1, 1, false); - common_hal_pulseio_pulseout_construct(self, (pwmio_pwmout_obj_t *)MP_OBJ_TO_PTR(carrier_obj), NULL, 0, 0); - } else { - // Use a Pin, frequency, and duty cycle - enum { ARG_pin, ARG_frequency}; - static const mp_arg_t allowed_args[] = { - { MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, - { MP_QSTR_frequency, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 38000} }, - { MP_QSTR_duty_cycle, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1 << 15} }, - }; - 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); - const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj); - common_hal_pulseio_pulseout_construct(self, NULL, pin, args[ARG_frequency].u_int, args[ARG_frequency].u_int); - } + common_hal_pulseio_pulseout_construct(self, pin, frequency, duty_cycle); return MP_OBJ_FROM_PTR(self); } diff --git a/shared-bindings/pulseio/PulseOut.h b/shared-bindings/pulseio/PulseOut.h index dce58a63e0..0c64c1363a 100644 --- a/shared-bindings/pulseio/PulseOut.h +++ b/shared-bindings/pulseio/PulseOut.h @@ -34,7 +34,6 @@ extern const mp_obj_type_t pulseio_pulseout_type; extern void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, - const pwmio_pwmout_obj_t *carrier, const mcu_pin_obj_t *pin, uint32_t frequency, uint16_t duty_cycle); diff --git a/shared-bindings/pwmio/PWMOut.c b/shared-bindings/pwmio/PWMOut.c index 2a1bda2d38..e34b27ad4a 100644 --- a/shared-bindings/pwmio/PWMOut.c +++ b/shared-bindings/pwmio/PWMOut.c @@ -35,6 +35,39 @@ #include "shared-bindings/util.h" #include "supervisor/shared/translate.h" + +void common_hal_pwmio_pwmout_raise_error(pwmout_result_t result) { + switch (result) { + case PWMOUT_OK: + break; + case PWMOUT_INVALID_PIN: + mp_raise_ValueError(translate("Invalid pin")); + break; + case PWMOUT_INVALID_FREQUENCY: + mp_raise_ValueError(translate("Invalid PWM frequency")); + break; + case PWMOUT_INVALID_FREQUENCY_ON_PIN: + mp_raise_ValueError(translate("Frequency must match existing PWMOut using this timer")); + break; + case PWMOUT_VARIABLE_FREQUENCY_NOT_AVAILABLE: + mp_raise_ValueError(translate("Cannot vary frequency on a timer that is already in use")); + break; + case PWMOUT_ALL_TIMERS_ON_PIN_IN_USE: + mp_raise_ValueError(translate("All timers for this pin are in use")); + break; + case PWMOUT_ALL_TIMERS_IN_USE: + mp_raise_RuntimeError(translate("All timers in use")); + break; + case PWMOUT_ALL_CHANNELS_IN_USE: + mp_raise_RuntimeError(translate("All channels in use")); + break; + default: + case PWMOUT_INITIALIZATION_ERROR: + mp_raise_RuntimeError(translate("Could not start PWM")); + break; + } +} + //| class PWMOut: //| """Output a Pulse Width Modulated signal on a given pin.""" //| @@ -102,35 +135,7 @@ STATIC mp_obj_t pwmio_pwmout_make_new(const mp_obj_type_t *type, size_t n_args, pwmio_pwmout_obj_t *self = m_new_obj(pwmio_pwmout_obj_t); self->base.type = &pwmio_pwmout_type; pwmout_result_t result = common_hal_pwmio_pwmout_construct(self, pin, duty_cycle, frequency, variable_frequency); - switch (result) { - case PWMOUT_OK: - break; - case PWMOUT_INVALID_PIN: - mp_raise_ValueError(translate("Invalid pin")); - break; - case PWMOUT_INVALID_FREQUENCY: - mp_raise_ValueError(translate("Invalid PWM frequency")); - break; - case PWMOUT_INVALID_FREQUENCY_ON_PIN: - mp_raise_ValueError(translate("Frequency must match existing PWMOut using this timer")); - break; - case PWMOUT_VARIABLE_FREQUENCY_NOT_AVAILABLE: - mp_raise_ValueError(translate("Cannot vary frequency on a timer that is already in use")); - break; - case PWMOUT_ALL_TIMERS_ON_PIN_IN_USE: - mp_raise_ValueError(translate("All timers for this pin are in use")); - break; - case PWMOUT_ALL_TIMERS_IN_USE: - mp_raise_RuntimeError(translate("All timers in use")); - break; - case PWMOUT_ALL_CHANNELS_IN_USE: - mp_raise_RuntimeError(translate("All channels in use")); - break; - default: - case PWMOUT_INITIALIZATION_ERROR: - mp_raise_RuntimeError(translate("Could not start PWM")); - break; - } + common_hal_pwmio_pwmout_raise_error(result); return MP_OBJ_FROM_PTR(self); } diff --git a/shared-bindings/pwmio/PWMOut.h b/shared-bindings/pwmio/PWMOut.h index f4d205b215..e55205e756 100644 --- a/shared-bindings/pwmio/PWMOut.h +++ b/shared-bindings/pwmio/PWMOut.h @@ -55,8 +55,13 @@ extern void common_hal_pwmio_pwmout_set_frequency(pwmio_pwmout_obj_t *self, uint extern uint32_t common_hal_pwmio_pwmout_get_frequency(pwmio_pwmout_obj_t *self); extern bool common_hal_pwmio_pwmout_get_variable_frequency(pwmio_pwmout_obj_t *self); +// Don't use this! It is only used internally for backwards compatibility. +extern const mcu_pin_obj_t *common_hal_pwmio_pwmout_get_pin(pwmio_pwmout_obj_t *self); + // This is used by the supervisor to claim PWMOut devices indefinitely. extern void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self); extern void common_hal_pwmio_pwmout_reset_ok(pwmio_pwmout_obj_t *self); +extern void common_hal_pwmio_pwmout_raise_error(pwmout_result_t result); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_PWMIO_PWMOUT_H From 901a6c27c08cb44b5bbb70316496bddc6a2a5104 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 26 Jul 2021 22:15:09 -0400 Subject: [PATCH 016/418] remove gamepad; deprecate gamepadshift --- docs/porting.rst | 2 +- .../Adafruit_CircuitPython_CircuitPlayground | 2 +- frozen/Adafruit_CircuitPython_Requests | 2 +- .../boards/8086_commander/mpconfigboard.mk | 2 +- .../hallowing_m0_express/mpconfigboard.mk | 1 + .../boards/pewpew_m4/mpconfigboard.mk | 15 +- .../boards/pybadge/mpconfigboard.mk | 1 - .../boards/pycubed/mpconfigboard.mk | 2 +- .../boards/pygamer/mpconfigboard.mk | 1 - .../boards/ugame10/mpconfigboard.mk | 2 +- .../mpconfigboard.mk | 1 + .../boards/winterbloom_sol/mpconfigboard.mk | 1 + ports/atmel-samd/supervisor/port.c | 6 - ports/cxd56/mpconfigport.mk | 2 +- ports/mimxrt10xx/supervisor/port.c | 6 - .../electronut_labs_blip/mpconfigboard.mk | 1 - ports/nrf/supervisor/port.c | 5 - py/circuitpy_defns.mk | 6 +- py/circuitpy_mpconfig.h | 12 +- py/circuitpy_mpconfig.mk | 3 - shared-bindings/gamepad/GamePad.c | 166 ------------------ shared-bindings/gamepad/GamePad.h | 38 ---- shared-bindings/gamepad/__init__.h | 31 ---- shared-bindings/gamepadshift/__init__.c | 6 +- shared-module/gamepad/GamePad.c | 59 ------- shared-module/gamepad/GamePad.h | 42 ----- shared-module/gamepad/__init__.c | 67 ------- shared-module/gamepad/__init__.h | 33 ---- supervisor/shared/tick.c | 7 - 29 files changed, 25 insertions(+), 497 deletions(-) delete mode 100644 shared-bindings/gamepad/GamePad.c delete mode 100644 shared-bindings/gamepad/GamePad.h delete mode 100644 shared-bindings/gamepad/__init__.h delete mode 100644 shared-module/gamepad/GamePad.c delete mode 100644 shared-module/gamepad/GamePad.h delete mode 100644 shared-module/gamepad/__init__.c delete mode 100644 shared-module/gamepad/__init__.h diff --git a/docs/porting.rst b/docs/porting.rst index 8d0262455b..013c367291 100644 --- a/docs/porting.rst +++ b/docs/porting.rst @@ -80,7 +80,7 @@ as a natural "TODO" list. An example minimal build list is shown below: # Requires DigitalIO: CIRCUITPY_BITBANGIO = 0 # Requires DigitalIO - CIRCUITPY_GAMEPAD = 0 + CIRCUITPY_GAMEPADSHIFT = 0 # Requires neopixel_write or SPI (dotstar) CIRCUITPY_PIXELBUF = 0 # Requires OS diff --git a/frozen/Adafruit_CircuitPython_CircuitPlayground b/frozen/Adafruit_CircuitPython_CircuitPlayground index 68b7e580fe..e0fecb6c73 160000 --- a/frozen/Adafruit_CircuitPython_CircuitPlayground +++ b/frozen/Adafruit_CircuitPython_CircuitPlayground @@ -1 +1 @@ -Subproject commit 68b7e580fe7d162d686f92301ab3937907dcaafe +Subproject commit e0fecb6c73f11c31cfc2a9c0e9ce9805b8fb1cf1 diff --git a/frozen/Adafruit_CircuitPython_Requests b/frozen/Adafruit_CircuitPython_Requests index c55425e178..03f54421a0 160000 --- a/frozen/Adafruit_CircuitPython_Requests +++ b/frozen/Adafruit_CircuitPython_Requests @@ -1 +1 @@ -Subproject commit c55425e17842cce3ec0b34489133436c3e1a3898 +Subproject commit 03f54421a050bbfda71e1c98986ddecc3862431a diff --git a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk index 200eea0630..cac4b8e0bb 100644 --- a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk +++ b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk @@ -12,8 +12,8 @@ EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 -CIRCUITPY_GAMEPAD = 1 CIRCUITPY_BUSDEVICE = 1 +CIRCUITPY_KEYPAD = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index d7230df4bb..6017b551f1 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -12,6 +12,7 @@ LONGINT_IMPL = NONE # To keep the build small CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_KEYPAD = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH diff --git a/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk b/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk index 7990f91ccc..2a4d58f134 100644 --- a/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk @@ -10,37 +10,36 @@ INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 + +CIRCUIPTY_USB_CDC = 0 CIRCUITPY_AUDIOBUSIO = 0 -CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_AUDIOMP3 = 0 +CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_BITBANGIO = 0 CIRCUITPY_BITBANG_APA102 = 0 CIRCUITPY_FREQUENCYIO = 0 -CIRCUITPY_GAMEPADSHIFT = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_PIXELBUF = 0 CIRCUITPY_PS2IO = 0 CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 CIRCUITPY_SAMD = 0 CIRCUITPY_TOUCHIO = 0 -CIRCUIPTY_USB_CDC = 0 CIRCUITPY_USB_HID = 0 CIRCUITPY_USB_MIDI = 0 CIRCUITPY_VECTORIO = 0 -CIRCUITPY_GAMEPAD = 0 -CIRCUITPY_PWMIO = 0 CIRCUITPY_ANALOGIO = 1 -CIRCUITPY_AUDIOMIXER = 1 CIRCUITPY_AUDIOIO = 1 -CIRCUITPY_SYNTHIO = 1 +CIRCUITPY_AUDIOMIXER = 1 CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_KEYPAD = 1 CIRCUITPY_MATH = 1 CIRCUITPY_STAGE = 1 -CIRCUITPY_KEYPAD = 1 +CIRCUITPY_SYNTHIO = 1 FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pewpew_m4 CIRCUITPY_DISPLAY_FONT = $(TOP)/ports/atmel-samd/boards/ugame10/brutalist-6.bdf diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk index 54f00b7448..3043adc2ad 100644 --- a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk @@ -10,7 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ -CIRCUITPY_GAMEPAD = 1 CIRCUITPY_GAMEPADSHIFT = 1 CIRCUITPY_STAGE = 1 diff --git a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk index bbed46dbed..3eda028754 100644 --- a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk @@ -16,8 +16,8 @@ CIRCUITPY_DRIVE_LABEL = "PYCUBED" CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_DISPLAYIO = 0 -CIRCUITPY_KEYPAD = 0 CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_KEYPAD = 0 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_PS2IO = 0 diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk index 5cef7b44cf..df504f2e98 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk @@ -10,7 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ -CIRCUITPY_GAMEPAD = 1 CIRCUITPY_GAMEPADSHIFT = 1 CIRCUITPY_STAGE = 1 diff --git a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk index 2f1062e419..225b37fb20 100644 --- a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk @@ -14,8 +14,8 @@ CIRCUITPY_STAGE = 1 CIRCUITPY_MATH = 1 CIRCUITPY_AUDIOIO = 1 CIRCUITPY_ANALOGIO = 1 -CIRCUITPY_GAMEPAD = 1 CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_KEYPPAD = 1 CIRCUITPY_PULSEIO = 0 CIRCUITPY_AUDIOBUSIO = 0 diff --git a/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk index 7364de0cfe..5bf70a9668 100644 --- a/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk @@ -22,6 +22,7 @@ CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BLEIO = 0 CIRCUITPY_DISPLAYIO = 0 +CIRCUITPY_KEYPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_TOUCHIO = 0 CIRCUITPY_RGBMATRIX = 0 diff --git a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk index bc4fff5018..653d2e6ed5 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk @@ -21,6 +21,7 @@ CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_KEYPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_TOUCHIO = 0 CIRCUITPY_RGBMATRIX = 0 diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 0ba6019e07..c03b79ce4f 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -85,9 +85,6 @@ #include "tusb.h" -#if CIRCUITPY_GAMEPAD -#include "shared-module/gamepad/__init__.h" -#endif #if CIRCUITPY_GAMEPADSHIFT #include "shared-module/gamepadshift/__init__.h" #endif @@ -358,9 +355,6 @@ void reset_port(void) { reset_gclks(); - #if CIRCUITPY_GAMEPAD - gamepad_reset(); - #endif #if CIRCUITPY_GAMEPADSHIFT gamepadshift_reset(); #endif diff --git a/ports/cxd56/mpconfigport.mk b/ports/cxd56/mpconfigport.mk index edc8e6ddf5..865c170aaa 100644 --- a/ports/cxd56/mpconfigport.mk +++ b/ports/cxd56/mpconfigport.mk @@ -17,9 +17,9 @@ CIRCUITPY_CAMERA = 1 CIRCUITPY_COUNTIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 -CIRCUITPY_GAMEPAD = 0 CIRCUITPY_GNSS = 1 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_KEYPAD = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_NVM = 0 CIRCUITPY_ROTARYIO = 0 diff --git a/ports/mimxrt10xx/supervisor/port.c b/ports/mimxrt10xx/supervisor/port.c index 2493252d78..cb79974359 100644 --- a/ports/mimxrt10xx/supervisor/port.c +++ b/ports/mimxrt10xx/supervisor/port.c @@ -47,9 +47,6 @@ #include "tusb.h" -#if CIRCUITPY_GAMEPAD -#include "shared-module/gamepad/__init__.h" -#endif #if CIRCUITPY_GAMEPADSHIFT #include "shared-module/gamepadshift/__init__.h" #endif @@ -300,9 +297,6 @@ void reset_port(void) { rtc_reset(); #endif - #if CIRCUITPY_GAMEPAD - gamepad_reset(); - #endif #if CIRCUITPY_GAMEPADSHIFT gamepadshift_reset(); #endif diff --git a/ports/nrf/boards/electronut_labs_blip/mpconfigboard.mk b/ports/nrf/boards/electronut_labs_blip/mpconfigboard.mk index 30946057c9..2b46f4397a 100644 --- a/ports/nrf/boards/electronut_labs_blip/mpconfigboard.mk +++ b/ports/nrf/boards/electronut_labs_blip/mpconfigboard.mk @@ -8,5 +8,4 @@ MCU_CHIP = nrf52840 INTERNAL_FLASH_FILESYSTEM = 1 CIRCUITPY_AUDIOIO = 0 CIRCUITPY_DISPLAYIO = 1 -CIRCUITPY_GAMEPAD = 1 CIRCUITPY_STAGE = 1 diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index e984c3f326..66b4bc9181 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -39,7 +39,6 @@ #include "nrf/power.h" #include "nrf/timers.h" -#include "shared-module/gamepad/__init__.h" #include "common-hal/microcontroller/Pin.h" #include "common-hal/_bleio/__init__.h" #include "common-hal/analogio/AnalogIn.h" @@ -207,10 +206,6 @@ safe_mode_t port_init(void) { } void reset_port(void) { - #ifdef CIRCUITPY_GAMEPAD_TICKS - gamepad_reset(); - #endif - #if CIRCUITPY_BUSIO i2c_reset(); spi_reset(); diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 495f5fd10a..5bf46039a7 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -184,9 +184,7 @@ endif ifeq ($(CIRCUITPY_FREQUENCYIO),1) SRC_PATTERNS += frequencyio/% endif -ifeq ($(CIRCUITPY_GAMEPAD),1) -SRC_PATTERNS += gamepad/% -endif + ifeq ($(CIRCUITPY_GAMEPADSHIFT),1) SRC_PATTERNS += gamepadshift/% endif @@ -523,8 +521,6 @@ SRC_SHARED_MODULE_ALL = \ keypad/Keys.c \ sdcardio/SDCard.c \ sdcardio/__init__.c \ - gamepad/GamePad.c \ - gamepad/__init__.c \ gamepadshift/GamePadShift.c \ gamepadshift/__init__.c \ memorymonitor/__init__.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index fa55185d75..84243e259a 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -468,13 +468,6 @@ extern const struct _mp_obj_module_t frequencyio_module; #define FREQUENCYIO_MODULE #endif -#if CIRCUITPY_GAMEPAD -extern const struct _mp_obj_module_t gamepad_module; -#define GAMEPAD_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gamepad),(mp_obj_t)&gamepad_module }, -#else -#define GAMEPAD_MODULE -#endif - #if CIRCUITPY_GAMEPADSHIFT extern const struct _mp_obj_module_t gamepadshift_module; #define GAMEPADSHIFT_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gamepadshift),(mp_obj_t)&gamepadshift_module }, @@ -482,7 +475,7 @@ extern const struct _mp_obj_module_t gamepadshift_module; #define GAMEPADSHIFT_MODULE #endif -#if CIRCUITPY_GAMEPAD || CIRCUITPY_GAMEPADSHIFT +#if CIRCUITPY_GAMEPADSHIFT // Scan gamepad every 32ms #define CIRCUITPY_GAMEPAD_TICKS 0x1f #define GAMEPAD_ROOT_POINTERS mp_obj_t gamepad_singleton; @@ -539,7 +532,7 @@ extern const struct _mp_obj_module_t keypad_module; #define KEYPAD_ROOT_POINTERS #endif -#if CIRCUITPY_GAMEPAD || CIRCUITPY_GAMEPADSHIFT +#if CIRCUITPY_GAMEPADSHIFT // Scan gamepad every 32ms #define CIRCUITPY_GAMEPAD_TICKS 0x1f #define GAMEPAD_ROOT_POINTERS mp_obj_t gamepad_singleton; @@ -888,7 +881,6 @@ extern const struct _mp_obj_module_t msgpack_module; _EVE_MODULE \ FRAMEBUFFERIO_MODULE \ FREQUENCYIO_MODULE \ - GAMEPAD_MODULE \ GAMEPADSHIFT_MODULE \ GNSS_MODULE \ I2CPERIPHERAL_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 42ff9e391b..3d72be7491 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -181,9 +181,6 @@ CFLAGS += -DCIRCUITPY__EVE=$(CIRCUITPY__EVE) CIRCUITPY_FREQUENCYIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_FREQUENCYIO=$(CIRCUITPY_FREQUENCYIO) -CIRCUITPY_GAMEPAD ?= 0 -CFLAGS += -DCIRCUITPY_GAMEPAD=$(CIRCUITPY_GAMEPAD) - CIRCUITPY_GAMEPADSHIFT ?= 0 CFLAGS += -DCIRCUITPY_GAMEPADSHIFT=$(CIRCUITPY_GAMEPADSHIFT) diff --git a/shared-bindings/gamepad/GamePad.c b/shared-bindings/gamepad/GamePad.c deleted file mode 100644 index 0776839939..0000000000 --- a/shared-bindings/gamepad/GamePad.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Radomir Dopieralski 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 "shared-bindings/gamepad/GamePad.h" - -#include "py/obj.h" -#include "py/runtime.h" -#include "py/mphal.h" -#include "py/gc.h" -#include "py/mpstate.h" -#include "shared-bindings/gamepad/__init__.h" -#include "shared-bindings/digitalio/DigitalInOut.h" -#include "supervisor/shared/translate.h" -#include "supervisor/shared/tick.h" - -//| class GamePad: -//| """Scan buttons for presses -//| -//| Usage:: -//| -//| import board -//| import digitalio -//| import gamepad -//| import time -//| -//| B_UP = 1 << 0 -//| B_DOWN = 1 << 1 -//| -//| -//| pad = gamepad.GamePad( -//| digitalio.DigitalInOut(board.D10), -//| digitalio.DigitalInOut(board.D11), -//| ) -//| -//| y = 0 -//| while True: -//| buttons = pad.get_pressed() -//| if buttons & B_UP: -//| y -= 1 -//| print(y) -//| elif buttons & B_DOWN: -//| y += 1 -//| print(y) -//| time.sleep(0.1) -//| while buttons: -//| # Wait for all buttons to be released. -//| buttons = pad.get_pressed() -//| time.sleep(0.1)""" -//| -//| def __init__( -//| self, -//| b1: digitalio.DigitalInOut, -//| b2: digitalio.DigitalInOut, -//| b3: digitalio.DigitalInOut, -//| b4: digitalio.DigitalInOut, -//| b5: digitalio.DigitalInOut, -//| b6: digitalio.DigitalInOut, -//| b7: digitalio.DigitalInOut, -//| b8: digitalio.DigitalInOut, -//| ) -> None: -//| """Initializes button scanning routines. -//| -//| The ``b1``-``b8`` parameters are ``DigitalInOut`` objects, which -//| immediately get switched to input with a pull-up, (unless they already -//| were set to pull-down, in which case they remain so), and then scanned -//| regularly for button presses. The order is the same as the order of -//| bits returned by the ``get_pressed`` function. You can re-initialize -//| it with different keys, then the new object will replace the previous -//| one. -//| -//| The basic feature required here is the ability to poll the keys at -//| regular intervals (so that de-bouncing is consistent) and fast enough -//| (so that we don't miss short button presses) while at the same time -//| letting the user code run normally, call blocking functions and wait -//| on delays. -//| -//| They button presses are accumulated, until the ``get_pressed`` method -//| is called, at which point the button state is cleared, and the new -//| button presses start to be recorded.""" -//| ... -//| -STATIC mp_obj_t gamepad_make_new(const mp_obj_type_t *type, size_t n_args, - const mp_obj_t *args, mp_map_t *kw_args) { - if (n_args > 8 || n_args == 0) { - mp_raise_TypeError(translate("argument num/types mismatch")); - } - for (size_t i = 0; i < n_args; ++i) { - assert_digitalinout(args[i]); - } - gamepad_obj_t *gamepad_singleton = MP_STATE_VM(gamepad_singleton); - if (!gamepad_singleton || - !mp_obj_is_type(MP_OBJ_FROM_PTR(gamepad_singleton), &gamepad_type)) { - gamepad_singleton = m_new_ll_obj(gamepad_obj_t); - gamepad_singleton->base.type = &gamepad_type; - if (!MP_STATE_VM(gamepad_singleton)) { - supervisor_enable_tick(); - } - MP_STATE_VM(gamepad_singleton) = gamepad_singleton; - } - common_hal_gamepad_gamepad_init(gamepad_singleton, args, n_args); - return MP_OBJ_FROM_PTR(gamepad_singleton); -} - -//| def get_pressed(self) -> int: -//| """Get the status of buttons pressed since the last call and clear it. -//| -//| Returns an 8-bit number, with bits that correspond to buttons, -//| which have been pressed (or held down) since the last call to this -//| function set to 1, and the remaining bits set to 0. Then it clears -//| the button state, so that new button presses (or buttons that are -//| held down) can be recorded for the next call.""" -//| ... -//| -STATIC mp_obj_t gamepad_get_pressed(mp_obj_t self_in) { - gamepad_obj_t *gamepad_singleton = MP_STATE_VM(gamepad_singleton); - mp_obj_t pressed = MP_OBJ_NEW_SMALL_INT(gamepad_singleton->pressed); - gamepad_singleton->pressed = gamepad_singleton->last; - return pressed; -} -MP_DEFINE_CONST_FUN_OBJ_1(gamepad_get_pressed_obj, gamepad_get_pressed); - - -//| def deinit(self) -> None: -//| """Disable button scanning.""" -//| ... -//| -STATIC mp_obj_t gamepad_deinit(mp_obj_t self_in) { - common_hal_gamepad_gamepad_deinit(self_in); - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_1(gamepad_deinit_obj, gamepad_deinit); - - -STATIC const mp_rom_map_elem_t gamepad_locals_dict_table[] = { - { MP_OBJ_NEW_QSTR(MP_QSTR_get_pressed), MP_ROM_PTR(&gamepad_get_pressed_obj)}, - { MP_OBJ_NEW_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&gamepad_deinit_obj)}, -}; -STATIC MP_DEFINE_CONST_DICT(gamepad_locals_dict, gamepad_locals_dict_table); -const mp_obj_type_t gamepad_type = { - { &mp_type_type }, - .name = MP_QSTR_GamePad, - .make_new = gamepad_make_new, - .locals_dict = (mp_obj_dict_t *)&gamepad_locals_dict, -}; diff --git a/shared-bindings/gamepad/GamePad.h b/shared-bindings/gamepad/GamePad.h deleted file mode 100644 index 3bbad4c97b..0000000000 --- a/shared-bindings/gamepad/GamePad.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - - -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_GAMEPAD_GAMEPAD_H -#define MICROPY_INCLUDED_SHARED_BINDINGS_GAMEPAD_GAMEPAD_H - -#include "shared-module/gamepad/GamePad.h" - -extern const mp_obj_type_t gamepad_type; - -void common_hal_gamepad_gamepad_init(gamepad_obj_t *gamepad, const mp_obj_t pins[], size_t n_pins); -void common_hal_gamepad_gamepad_deinit(gamepad_obj_t *gamepad); - -#endif // MICROPY_INCLUDED_SHARED_BINDINGS_GAMEPAD_GAMEPAD_H diff --git a/shared-bindings/gamepad/__init__.h b/shared-bindings/gamepad/__init__.h deleted file mode 100644 index 2ae5efb3a0..0000000000 --- a/shared-bindings/gamepad/__init__.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - - -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_GAMEPAD___INIT___H -#define MICROPY_INCLUDED_SHARED_BINDINGS_GAMEPAD___INIT___H - -#endif // MICROPY_INCLUDED_SHARED_BINDINGS_GAMEPAD___INIT___H diff --git a/shared-bindings/gamepadshift/__init__.c b/shared-bindings/gamepadshift/__init__.c index 1b25d342a7..3c9c4ce8b2 100644 --- a/shared-bindings/gamepadshift/__init__.c +++ b/shared-bindings/gamepadshift/__init__.c @@ -30,7 +30,11 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/util.h" -//| """Tracks button presses read through a shift register""" +//| """Tracks button presses read through a shift register. +//| +//| .. note:: `gamepadshift` is deprecated in CircuitPython 7.0.0 and will be removed in 8.0.0. +//| Use `keypad` instead. +//| """ //| STATIC const mp_rom_map_elem_t gamepadshift_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_gamepadshift) }, diff --git a/shared-module/gamepad/GamePad.c b/shared-module/gamepad/GamePad.c deleted file mode 100644 index 55b447f1eb..0000000000 --- a/shared-module/gamepad/GamePad.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "py/mpstate.h" -#include "shared-bindings/digitalio/DigitalInOut.h" -#include "shared-bindings/gamepad/GamePad.h" -#include "supervisor/shared/tick.h" - -void common_hal_gamepad_gamepad_init(gamepad_obj_t *gamepad, - const mp_obj_t pins[], size_t n_pins) { - for (size_t i = 0; i < 8; ++i) { - gamepad->pins[i] = NULL; - } - gamepad->pulls = 0; - for (size_t i = 0; i < n_pins; ++i) { - digitalio_digitalinout_obj_t *pin = MP_OBJ_TO_PTR(pins[i]); - if (common_hal_digitalio_digitalinout_get_direction(pin) != - DIRECTION_INPUT) { - common_hal_digitalio_digitalinout_switch_to_input(pin, PULL_UP); - } - digitalio_pull_t pull = common_hal_digitalio_digitalinout_get_pull(pin); - if (pull == PULL_NONE) { - common_hal_digitalio_digitalinout_set_pull(pin, PULL_UP); - } - if (pull != PULL_DOWN) { - gamepad->pulls |= 1 << i; - } - gamepad->pins[i] = pin; - } - gamepad->last = 0; -} - -void common_hal_gamepad_gamepad_deinit(gamepad_obj_t *self) { - MP_STATE_VM(gamepad_singleton) = NULL; - supervisor_disable_tick(); -} diff --git a/shared-module/gamepad/GamePad.h b/shared-module/gamepad/GamePad.h deleted file mode 100644 index 7c28e2285b..0000000000 --- a/shared-module/gamepad/GamePad.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_GAMEPAD_GAMEPAD_H -#define MICROPY_INCLUDED_GAMEPAD_GAMEPAD_H - -#include - -#include "shared-bindings/digitalio/DigitalInOut.h" - -typedef struct { - mp_obj_base_t base; - digitalio_digitalinout_obj_t *pins[8]; - volatile uint8_t last; - volatile uint8_t pressed; - uint8_t pulls; -} gamepad_obj_t; - -#endif // MICROPY_INCLUDED_GAMEPAD_GAMEPAD_H diff --git a/shared-module/gamepad/__init__.c b/shared-module/gamepad/__init__.c deleted file mode 100644 index 50e3edd9cf..0000000000 --- a/shared-module/gamepad/__init__.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Radomir Dopieralski 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 - -#include "py/mpstate.h" -#include "shared-bindings/gamepad/__init__.h" -#include "shared-bindings/gamepad/GamePad.h" -#include "supervisor/shared/tick.h" - -#include "shared-bindings/digitalio/DigitalInOut.h" - - -void gamepad_tick(void) { - uint8_t current = 0; - uint8_t bit = 1; - - void *singleton = MP_STATE_VM(gamepad_singleton); - if (singleton == NULL || !mp_obj_is_type(MP_OBJ_FROM_PTR(singleton), &gamepad_type)) { - return; - } - - gamepad_obj_t *self = MP_OBJ_TO_PTR(singleton); - for (int i = 0; i < 8; ++i) { - digitalio_digitalinout_obj_t *pin = self->pins[i]; - if (!pin) { - break; - } - if (common_hal_digitalio_digitalinout_get_value(pin)) { - current |= bit; - } - bit <<= 1; - } - current ^= self->pulls; - self->pressed |= self->last & current; - self->last = current; -} - -void gamepad_reset(void) { - if (MP_STATE_VM(gamepad_singleton)) { - supervisor_disable_tick(); - } - MP_STATE_VM(gamepad_singleton) = NULL; -} diff --git a/shared-module/gamepad/__init__.h b/shared-module/gamepad/__init__.h deleted file mode 100644 index 1fae570f98..0000000000 --- a/shared-module/gamepad/__init__.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 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. - */ - -#ifndef MICROPY_INCLUDED_GAMEPAD_H -#define MICROPY_INCLUDED_GAMEPAD_H - -void gamepad_tick(void); -void gamepad_reset(void); - -#endif // MICROPY_INCLUDED_GAMEPAD_H diff --git a/supervisor/shared/tick.c b/supervisor/shared/tick.c index f755df2596..eac98215a1 100644 --- a/supervisor/shared/tick.c +++ b/supervisor/shared/tick.c @@ -40,10 +40,6 @@ #include "shared-module/displayio/__init__.h" #endif -#if CIRCUITPY_GAMEPAD -#include "shared-module/gamepad/__init__.h" -#endif - #if CIRCUITPY_GAMEPADSHIFT #include "shared-module/gamepadshift/__init__.h" #endif @@ -102,9 +98,6 @@ void supervisor_tick(void) { #ifdef CIRCUITPY_GAMEPAD_TICKS if (!(port_get_raw_ticks(NULL) & CIRCUITPY_GAMEPAD_TICKS)) { - #if CIRCUITPY_GAMEPAD - gamepad_tick(); - #endif #if CIRCUITPY_GAMEPADSHIFT gamepadshift_tick(); #endif From 080e5233b445d084084905cc149de7756e07a6c0 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 26 Jul 2021 19:21:45 -0700 Subject: [PATCH 017/418] Use sphinx-autoapi 1.8.1 until it's fixed Related to https://github.com/readthedocs/sphinx-autoapi/issues/299 --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6db56d8940..1fb88552fe 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,7 +16,7 @@ cpp-coveralls Sphinx<4 sphinx-rtd-theme myst-parser -sphinx-autoapi +sphinx-autoapi<=1.8.1 sphinxcontrib-svg2pdfconverter readthedocs-sphinx-search From 7392bf7cb4c5ea51812229abcd3f886d021b231c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 26 Jul 2021 22:35:25 -0400 Subject: [PATCH 018/418] Use sphinx-autoapi 1.8.1 until it's fixed Thanks @tannewt for this: https://github.com/tannewt/circuitpython/commit/080e5233b445d084084905cc149de7756e07a6c0 --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6db56d8940..1fb88552fe 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,7 +16,7 @@ cpp-coveralls Sphinx<4 sphinx-rtd-theme myst-parser -sphinx-autoapi +sphinx-autoapi<=1.8.1 sphinxcontrib-svg2pdfconverter readthedocs-sphinx-search From b0fb709d837c887a174d5c30bc230836caf7e797 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 26 Jul 2021 23:34:25 -0400 Subject: [PATCH 019/418] more gamepad removal --- ports/nrf/boards/pca10056/examples/buttons.py | 26 ----------- py/circuitpy_mpconfig.h | 2 +- shared-bindings/gamepad/__init__.c | 44 ------------------- shared-bindings/gamepadshift/GamePadShift.c | 3 +- 4 files changed, 2 insertions(+), 73 deletions(-) delete mode 100644 ports/nrf/boards/pca10056/examples/buttons.py delete mode 100644 shared-bindings/gamepad/__init__.c diff --git a/ports/nrf/boards/pca10056/examples/buttons.py b/ports/nrf/boards/pca10056/examples/buttons.py deleted file mode 100644 index 4db3576970..0000000000 --- a/ports/nrf/boards/pca10056/examples/buttons.py +++ /dev/null @@ -1,26 +0,0 @@ -import board -import digitalio -import gamepad -import time - -pad = gamepad.GamePad( - digitalio.DigitalInOut(board.P0_11), - digitalio.DigitalInOut(board.P0_12), - digitalio.DigitalInOut(board.P0_24), - digitalio.DigitalInOut(board.P0_25), -) - -prev_buttons = 0 - -while True: - buttons = pad.get_pressed() - - if buttons != prev_buttons: - for i in range(0, 4): - bit = 1 << i - if (buttons & bit) != (prev_buttons & bit): - print("Button %d %s" % (i + 1, "pressed" if buttons & bit else "released")) - - prev_buttons = buttons - - time.sleep(0.1) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 84243e259a..8e31f0411b 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -533,7 +533,7 @@ extern const struct _mp_obj_module_t keypad_module; #endif #if CIRCUITPY_GAMEPADSHIFT -// Scan gamepad every 32ms +// Scan gamepadshift every 32ms #define CIRCUITPY_GAMEPAD_TICKS 0x1f #define GAMEPAD_ROOT_POINTERS mp_obj_t gamepad_singleton; #else diff --git a/shared-bindings/gamepad/__init__.c b/shared-bindings/gamepad/__init__.c deleted file mode 100644 index 273f109bf5..0000000000 --- a/shared-bindings/gamepad/__init__.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Radomir Dopieralski for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#include "py/obj.h" -#include "py/runtime.h" -#include "py/mphal.h" -#include "shared-bindings/gamepad/GamePad.h" -#include "shared-bindings/util.h" - -//| """Button handling in the background""" -//| -STATIC const mp_rom_map_elem_t gamepad_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_gamepad) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_GamePad), MP_ROM_PTR(&gamepad_type)}, -}; -STATIC MP_DEFINE_CONST_DICT(gamepad_module_globals, - gamepad_module_globals_table); - -const mp_obj_module_t gamepad_module = { - .base = { &mp_type_module }, - .globals = (mp_obj_dict_t *)&gamepad_module_globals, -}; diff --git a/shared-bindings/gamepadshift/GamePadShift.c b/shared-bindings/gamepadshift/GamePadShift.c index aba699b23f..a232683c96 100644 --- a/shared-bindings/gamepadshift/GamePadShift.c +++ b/shared-bindings/gamepadshift/GamePadShift.c @@ -46,8 +46,7 @@ //| is called, at which point the button state is cleared, and the new //| button presses start to be recorded. //| -//| Only one gamepad (`gamepad.GamePad` or `gamepadshift.GamePadShift`) -//| may be used at a time.""" +//| Only one `gamepadshift.GamePadShift` may be used at a time.""" //| ... //| STATIC mp_obj_t gamepadshift_make_new(const mp_obj_type_t *type, size_t n_args, From ff65863719e9f7e3f722452974e10f90044f2f8d Mon Sep 17 00:00:00 2001 From: Kamil Tomaszewski Date: Tue, 27 Jul 2021 11:25:51 +0200 Subject: [PATCH 020/418] spresense: update SDK to 2.2.0 --- ports/cxd56/spresense-exported-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/cxd56/spresense-exported-sdk b/ports/cxd56/spresense-exported-sdk index 2ec2a15383..b575f1c48a 160000 --- a/ports/cxd56/spresense-exported-sdk +++ b/ports/cxd56/spresense-exported-sdk @@ -1 +1 @@ -Subproject commit 2ec2a1538362696118dc3fdf56f33dacaf8f4067 +Subproject commit b575f1c48afb5acca27a1281a9036287cf3d2868 From 0eab2eb162808193602148d993e7bb4cd8de8e27 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 27 Jul 2021 08:45:30 -0400 Subject: [PATCH 021/418] Use sphinx-autoapi 1.8.1 until it's fixed --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6db56d8940..1fb88552fe 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,7 +16,7 @@ cpp-coveralls Sphinx<4 sphinx-rtd-theme myst-parser -sphinx-autoapi +sphinx-autoapi<=1.8.1 sphinxcontrib-svg2pdfconverter readthedocs-sphinx-search From a974a2d3c1b1f8ea2ee848c375c9b8d9a535c8b3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 27 Jul 2021 08:57:13 -0400 Subject: [PATCH 022/418] allow micropython as top-level dir name in duplicate pid/vid check --- tools/ci_check_duplicate_usb_vid_pid.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index 72f7858898..3994e9fe36 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -70,10 +70,12 @@ def configboard_files(): """A pathlib glob search for all ports/*/boards/*/mpconfigboard.mk file paths. - :returns: A ``pathlib.Path.glob()`` genarator object + :returns: A ``pathlib.Path.glob()`` generator object """ working_dir = pathlib.Path().resolve() - if not working_dir.name.startswith("circuitpython"): + if not working_dir.name.startswith("circuitpython") and not working_dir.name.startswith( + "micropython" + ): raise RuntimeError( "Please run USB VID/PID duplicate verification at the " "top-level directory." ) From 6713a254cbccfe68fc1fdd7a46632ddd676a2939 Mon Sep 17 00:00:00 2001 From: Noel Gaetan Date: Mon, 26 Jul 2021 14:31:36 +0000 Subject: [PATCH 023/418] Translated using Weblate (French) Currently translated at 94.3% (955 of 1012 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index e6a3eb2ea8..bf97797f5f 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-05-21 17:47+0000\n" -"Last-Translator: Hugo Dahl \n" +"PO-Revision-Date: 2021-07-27 14:33+0000\n" +"Last-Translator: Noel Gaetan \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.7-dev\n" +"X-Generator: Weblate 4.7.2-dev\n" #: main.c msgid "" @@ -58,7 +58,7 @@ msgstr " est de type %q\n" #: main.c msgid " not found.\n" -msgstr "" +msgstr " pas trouvé\n" #: main.c msgid " output:\n" @@ -100,7 +100,7 @@ msgstr "les indices %q doivent être des entiers, pas %s" #: py/argcheck.c msgid "%q length must be %q" -msgstr "" +msgstr "La longueur de %q doit être de %q" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -116,7 +116,7 @@ msgstr "" #: shared-bindings/usb_hid/Device.c msgid "%q must be 0-255" -msgstr "" +msgstr "%q doit être compris entre 0 et 255" #: shared-bindings/usb_hid/Device.c msgid "%q must be 1-255" @@ -144,7 +144,7 @@ msgstr "" #: py/argcheck.c msgid "%q must be a string" -msgstr "" +msgstr "%q doit être une chaîne de caractères" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" @@ -156,11 +156,11 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" -msgstr "" +msgstr "%q doit être une puissance de 2" #: py/argcheck.c msgid "%q must of type %q" -msgstr "" +msgstr "%q doit être de type %q" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: shared-bindings/canio/Match.c @@ -262,7 +262,7 @@ msgstr "l'objet %s ne supporte pas l'assignation d'éléments" #: py/obj.c #, c-format msgid "'%s' object doesn't support item deletion" -msgstr "" +msgstr "L’objet '%s' ne prend pas en charge la suppression d’éléments" #: py/runtime.c msgid "'%s' object has no attribute '%q'" @@ -672,7 +672,7 @@ msgstr "Impossible de définir CCCD sur une caractéristique locale" #: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c #: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c msgid "Cannot change USB devices now" -msgstr "" +msgstr "Impossible de changer de périphérique USB maintenant" #: shared-bindings/_bleio/Adapter.c msgid "Cannot create a new Adapter; use _bleio.adapter;" From 94a4090542b47d2bfabeb6f2155dc4a4d4b40f44 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 27 Jul 2021 12:01:18 -0500 Subject: [PATCH 024/418] Make summary more helpful; use a html list --- conf.py | 2 +- docs/autoapi/templates/python/module.rst | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conf.py b/conf.py index d36a920156..866e761748 100644 --- a/conf.py +++ b/conf.py @@ -52,7 +52,7 @@ modules_support_matrix_reverse = defaultdict(list) for board, modules in modules_support_matrix.items(): for module in modules: modules_support_matrix_reverse[module].append(board) -modules_support_matrix_reverse = dict((module, ", ".join(boards)) for module, boards in modules_support_matrix_reverse.items()) +modules_support_matrix_reverse = dict((module, sorted(boards)) for module, boards in modules_support_matrix_reverse.items()) html_context = { 'support_matrix': modules_support_matrix, diff --git a/docs/autoapi/templates/python/module.rst b/docs/autoapi/templates/python/module.rst index 7db1c73d37..f1fee865f7 100644 --- a/docs/autoapi/templates/python/module.rst +++ b/docs/autoapi/templates/python/module.rst @@ -19,8 +19,12 @@

- Module Availability - Available on: {{ support_matrix_reverse[obj.name] }} + Available on these boards +
    + {% for board in support_matrix_reverse[obj.name] %} +
  • {{ board }} + {% endfor %} +

From e87e1d81752605e4ef79e2a89d440c5b2b93ef58 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 27 Jul 2021 12:37:35 -0700 Subject: [PATCH 025/418] Block when setting duty_cycle until the new value is taken --- .../raspberrypi/common-hal/pulseio/PulseOut.c | 28 ++----------------- ports/raspberrypi/common-hal/pwmio/PWMOut.c | 9 ++++++ 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.c b/ports/raspberrypi/common-hal/pulseio/PulseOut.c index 38a4859c2b..3c8da99e3e 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.c @@ -38,27 +38,12 @@ #include "src/rp2_common/hardware_pwm/include/hardware/pwm.h" #include "src/common/pico_time/include/pico/time.h" -static uint8_t refcount = 0; volatile alarm_id_t cur_alarm = 0; -void turn_off(uint8_t slice) { - // Set the current counter value near the top so that the output is low. The - // - 2 gives us a little wiggle room for enabling and disabling the slice. - // The top + 1 ensure we don't end up lower than the cc (and therefore high.) - uint32_t top = MAX(pwm_hw->slice[slice].cc + 1, pwm_hw->slice[slice].top - 2); - // Disable interrupts so this happens as fast as possible. - common_hal_mcu_disable_interrupts(); - pwm_hw->slice[slice].ctr = top; - // Enable for at least one cycle so that the new counter value takes effect. - pwm_hw->slice[slice].csr = PWM_CH0_CSR_EN_BITS; - pwm_hw->slice[slice].csr = 0; - common_hal_mcu_enable_interrupts(); -} - void pulse_finish(pulseio_pulseout_obj_t *self) { self->pulse_index++; - // Turn pwm pin off by setting duty cyle to 1. - common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, 1); + // Turn pwm pin off by setting duty cyle to 0. + common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, 0); if (self->pulse_index >= self->pulse_length) { return; } @@ -91,15 +76,12 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, uint16_t duty_cycle) { pwmout_result_t result = common_hal_pwmio_pwmout_construct( - &self->carrier, pin, duty_cycle, frequency, false); + &self->carrier, pin, 0, frequency, false); // This will raise an exception and not return if needed. common_hal_pwmio_pwmout_raise_error(result); self->current_duty_cycle = duty_cycle; - pwm_set_enabled(self->carrier.slice, false); - turn_off(self->carrier.slice); - common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, 1); self->pin = self->carrier.pin->number; self->slice = self->carrier.slice; self->min_pulse = (1000000 / self->carrier.actual_frequency); @@ -123,7 +105,6 @@ void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pu self->pulse_length = length; common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, self->current_duty_cycle); - pwm_set_enabled(self->slice, true); uint64_t delay = self->pulse_buffer[0]; if (delay < self->min_pulse) { delay = self->min_pulse; @@ -140,7 +121,4 @@ void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pu // signal. RUN_BACKGROUND_TASKS; } - // Ensure pin is left low - turn_off(self->slice); - pwm_set_enabled(self->slice,false); } diff --git a/ports/raspberrypi/common-hal/pwmio/PWMOut.c b/ports/raspberrypi/common-hal/pwmio/PWMOut.c index f5e93f517e..25590a1332 100644 --- a/ports/raspberrypi/common-hal/pwmio/PWMOut.c +++ b/ports/raspberrypi/common-hal/pwmio/PWMOut.c @@ -26,6 +26,7 @@ #include +#include "lib/utils/interrupt_char.h" #include "py/runtime.h" #include "common-hal/pwmio/PWMOut.h" #include "shared-bindings/pwmio/PWMOut.h" @@ -235,6 +236,14 @@ extern void common_hal_pwmio_pwmout_set_duty_cycle(pwmio_pwmout_obj_t *self, uin } // compare_count is the CC register value, which should be TOP+1 for 100% duty cycle. pwm_set_chan_level(self->slice, self->channel, compare_count); + // Wait for wrap so that we know our new cc value has been applied. Clear + // the internal interrupt and then wait for it to be set. Worst case, we + // wait a full cycle. + pwm_hw->intr = 1 << self->channel; + while ((pwm_hw->en & (1 << self->channel)) != 0 && + (pwm_hw->intr & (1 << self->channel)) == 0 && + !mp_hal_is_interrupted()) { + } } uint16_t common_hal_pwmio_pwmout_get_duty_cycle(pwmio_pwmout_obj_t *self) { From 4be904fd4a07db5891b81beee46e7d4d728b9188 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 27 Jul 2021 12:38:18 -0700 Subject: [PATCH 026/418] Switch to gpio mux to disable/enable pwm signal --- .../raspberrypi/common-hal/pulseio/PulseOut.c | 21 ++++++++++++------- .../raspberrypi/common-hal/pulseio/PulseOut.h | 1 - 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.c b/ports/raspberrypi/common-hal/pulseio/PulseOut.c index 3c8da99e3e..576c5410f7 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.c @@ -35,6 +35,7 @@ #include "common-hal/pwmio/PWMOut.h" #include "supervisor/shared/translate.h" #include "src/rp2040/hardware_structs/include/hardware/structs/pwm.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" #include "src/rp2_common/hardware_pwm/include/hardware/pwm.h" #include "src/common/pico_time/include/pico/time.h" @@ -42,13 +43,16 @@ volatile alarm_id_t cur_alarm = 0; void pulse_finish(pulseio_pulseout_obj_t *self) { self->pulse_index++; - // Turn pwm pin off by setting duty cyle to 0. - common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, 0); + // Turn pwm pin off by switching the GPIO mux to SIO (the cpu manual + // control). if (self->pulse_index >= self->pulse_length) { + gpio_set_function(self->pin, GPIO_FUNC_SIO); return; } if (self->pulse_index % 2 == 0) { - common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, self->current_duty_cycle); + gpio_set_function(self->pin, GPIO_FUNC_PWM); + } else { + gpio_set_function(self->pin, GPIO_FUNC_SIO); } uint64_t delay = self->pulse_buffer[self->pulse_index]; if (delay < self->min_pulse) { @@ -77,12 +81,14 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, pwmout_result_t result = common_hal_pwmio_pwmout_construct( &self->carrier, pin, 0, frequency, false); - // This will raise an exception and not return if needed. common_hal_pwmio_pwmout_raise_error(result); - self->current_duty_cycle = duty_cycle; - self->pin = self->carrier.pin->number; + // Disable gpio output before we set the duty cycle. + gpio_set_function(pin->number, GPIO_FUNC_SIO); + common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, duty_cycle); + + self->pin = pin->number; self->slice = self->carrier.slice; self->min_pulse = (1000000 / self->carrier.actual_frequency); } @@ -104,7 +110,8 @@ void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pu self->pulse_index = 0; self->pulse_length = length; - common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, self->current_duty_cycle); + // Turn on the signal by connecting the PWM to the outside pin. + gpio_set_function(self->pin, GPIO_FUNC_PWM); uint64_t delay = self->pulse_buffer[0]; if (delay < self->min_pulse) { delay = self->min_pulse; diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.h b/ports/raspberrypi/common-hal/pulseio/PulseOut.h index cf4645cc1f..3366946210 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.h +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.h @@ -42,7 +42,6 @@ typedef struct { pwmio_pwmout_obj_t carrier; uint16_t *pulse_buffer; uint16_t pulse_length; - uint16_t current_duty_cycle; uint32_t min_pulse; volatile uint16_t pulse_index; } pulseio_pulseout_obj_t; From 5e07b7959f882b5e2da694d8d8fbff38a10e09aa Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 27 Jul 2021 08:39:21 -0500 Subject: [PATCH 027/418] check vid/pid: find topdir relative to this script @dhalbert noticed that if a fork was called `micropython`, the existing check could fail during CI because it will be cloned into a directory also called `micropython`. Instead of hardcoding a range of strings that are OK as top directories, find the location of the top directory relative to the script. This will be conflicty after #5069 is merged, but it should be easy to fix. --- tools/ci_check_duplicate_usb_vid_pid.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index 3994e9fe36..9703553415 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -72,13 +72,7 @@ def configboard_files(): :returns: A ``pathlib.Path.glob()`` generator object """ - working_dir = pathlib.Path().resolve() - if not working_dir.name.startswith("circuitpython") and not working_dir.name.startswith( - "micropython" - ): - raise RuntimeError( - "Please run USB VID/PID duplicate verification at the " "top-level directory." - ) + working_dir = pathlib.Path(__file__).resolve().parent.parent return working_dir.glob("ports/**/boards/**/mpconfigboard.mk") From f371c0a60906026a032be6466448c00fc31b85d3 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 28 Jul 2021 00:00:01 +0530 Subject: [PATCH 028/418] add traceback module --- locale/circuitpython.pot | 40 ++-- .../mpconfigboard.mk | 1 + py/circuitpy_defns.mk | 4 + py/circuitpy_mpconfig.h | 8 + py/circuitpy_mpconfig.mk | 3 + py/modsys.c | 19 -- shared-bindings/traceback/__init__.c | 171 ++++++++++++++++++ shared-module/traceback/__init__.c | 1 + 8 files changed, 214 insertions(+), 33 deletions(-) create mode 100644 shared-bindings/traceback/__init__.c create mode 100644 shared-module/traceback/__init__.c diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 9afa77328d..0ab2dede22 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -35,11 +35,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr "" @@ -322,7 +322,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr "" @@ -1185,11 +1185,6 @@ msgstr "" msgid "Input/output error" msgstr "" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1506,6 +1501,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2227,7 +2227,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -2525,7 +2525,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3089,6 +3089,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "" @@ -3376,6 +3380,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3457,6 +3465,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3609,10 +3621,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "" @@ -4085,6 +4093,10 @@ msgstr "" msgid "source palette too large" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "stack is not ok" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index a617947f9c..cf9afb3d21 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -19,6 +19,7 @@ CIRCUITPY_PWMIO = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 CIRCUITPY_USB_MIDI = 0 +CIRCUITPY_TRACEBACK = 0 CIRCUITPY_PIXELBUF = 1 CIRCUITPY_BUSDEVICE = 1 diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 5bf46039a7..2acd0cb8db 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -293,6 +293,9 @@ endif ifeq ($(CIRCUITPY_TOUCHIO),1) SRC_PATTERNS += touchio/% endif +ifeq ($(CIRCUITPY_TRACEBACK),1) +SRC_PATTERNS += traceback/% +endif ifeq ($(CIRCUITPY_UHEAP),1) SRC_PATTERNS += uheap/% endif @@ -544,6 +547,7 @@ SRC_SHARED_MODULE_ALL = \ terminalio/Terminal.c \ terminalio/__init__.c \ time/__init__.c \ + traceback/__init__.c \ uheap/__init__.c \ ustack/__init__.c \ vectorio/Circle.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 8e31f0411b..ea57f17218 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -763,6 +763,13 @@ extern const struct _mp_obj_module_t touchio_module; #define TOUCHIO_MODULE #endif +#if CIRCUITPY_TRACEBACK +extern const struct _mp_obj_module_t traceback_module; +#define TRACEBACK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_traceback), (mp_obj_t)&traceback_module }, +#else +#define TRACEBACK_MODULE +#endif + #if CIRCUITPY_UHEAP extern const struct _mp_obj_module_t uheap_module; #define UHEAP_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module }, @@ -917,6 +924,7 @@ extern const struct _mp_obj_module_t msgpack_module; SUPERVISOR_MODULE \ SYNTHIO_MODULE \ TOUCHIO_MODULE \ + TRACEBACK_MODULE \ UHEAP_MODULE \ USB_CDC_MODULE \ USB_HID_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 3d72be7491..20056d7377 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -324,6 +324,9 @@ CFLAGS += -DCIRCUITPY_TOUCHIO_USE_NATIVE=$(CIRCUITPY_TOUCHIO_USE_NATIVE) CIRCUITPY_TOUCHIO ?= 1 CFLAGS += -DCIRCUITPY_TOUCHIO=$(CIRCUITPY_TOUCHIO) +CIRCUITPY_TRACEBACK ?= 1 +CFLAGS += -DCIRCUITPY_TRACEBACK=$(CIRCUITPY_TRACEBACK) + # For debugging. CIRCUITPY_UHEAP ?= 0 CFLAGS += -DCIRCUITPY_UHEAP=$(CIRCUITPY_UHEAP) diff --git a/py/modsys.c b/py/modsys.c index cbd1712920..484e29f411 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -120,25 +120,6 @@ STATIC mp_obj_t mp_sys_exit(size_t n_args, const mp_obj_t *args) { } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_sys_exit_obj, 0, 1, mp_sys_exit); -STATIC mp_obj_t mp_sys_print_exception(size_t n_args, const mp_obj_t *args) { - #if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES - void *stream_obj = &mp_sys_stdout_obj; - if (n_args > 1) { - mp_get_stream_raise(args[1], MP_STREAM_OP_WRITE); - stream_obj = MP_OBJ_TO_PTR(args[1]); - } - - mp_print_t print = {stream_obj, mp_stream_write_adaptor}; - mp_obj_print_exception(&print, args[0]); - #else - (void)n_args; - mp_obj_print_exception(&mp_plat_print, args[0]); - #endif - - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_sys_print_exception_obj, 1, 2, mp_sys_print_exception); - #if MICROPY_PY_SYS_EXC_INFO STATIC mp_obj_t mp_sys_exc_info(void) { mp_obj_t cur_exc = MP_OBJ_FROM_PTR(MP_STATE_VM(cur_exception)); diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c new file mode 100644 index 0000000000..3d3914bfd1 --- /dev/null +++ b/shared-bindings/traceback/__init__.c @@ -0,0 +1,171 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/stream.h" +#include "py/runtime.h" + +#include "supervisor/shared/stack.h" + +//| """Traceback Module +//| +//| This module provides a standard interface to print stack traces of programs. +//| This is useful when you want to print stack traces under program control. +//| +//| """ +//| ... +//| + +//| def print_exception(etype: Type[BaseException], value: BaseException, tb: TracebackType, +//| limit: Optional[int] = None, file: Optional[io.FileIO] = None, chain: Optional[bool] = True) -> None: +//| +//| """Prints exception information and stack trace entries. +//| +//| .. note: Setting `chain` will have no effect as chained exceptions are not yet implemented. +//| +//| :param Type[BaseException] etype: This is ignored and inferred from the type of ``value``. +//| :param BaseException value: The exception. Must be an instance of `BaseException`. +//| :param TracebackType tb: The traceback object. If `None`, the traceback will not be printed. +//| :param int limit: Print up to limit stack trace entries (starting from the caller’s frame) if limit is positive. +//| Otherwise, print the last ``abs(limit)`` entries. If limit is omitted or None, all entries are printed. +//| :param io.FileIO file: If file is omitted or `None`, the output goes to `sys.stderr`; otherwise it should be an open +//| file or file-like object to receive the output. +//| :param bool chain: If `True` then chained exceptions will be printed. +//| +//| """ +//| ... +//| +STATIC mp_obj_t traceback_print_exception(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_etype, ARG_value, ARG_tb, ARG_limit, ARG_file, ARG_chain }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_etype, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_value, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_tb, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_limit, MP_ARG_OBJ, {.u_obj = mp_const_none} }, + { MP_QSTR_file, MP_ARG_OBJ, {.u_obj = mp_const_none} }, + { MP_QSTR_chain, MP_ARG_BOOL, {.u_bool = true} }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_obj_t exc = args[ARG_value].u_obj; + if (!mp_obj_is_exception_instance(exc)) { + mp_raise_TypeError(translate("invalid exception")); + } + + mp_print_t print = mp_plat_print; + if (args[ARG_file].u_obj != mp_const_none) { + #if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES + mp_get_stream_raise(args[ARG_file].u_obj, MP_STREAM_OP_WRITE); + print.data = MP_OBJ_TO_PTR(args[ARG_file].u_obj); + print.print_strn = mp_stream_write_adaptor; + #else + mp_raise_NotImplementedError(translate("file write is not available")); + #endif + } + + mp_int_t limit = 0; + bool print_tb = true; + if (args[ARG_limit].u_obj != mp_const_none) { + if (!mp_obj_get_int_maybe(args[ARG_limit].u_obj, &limit)) { + mp_raise_TypeError(translate("limit should be an int")); + } + print_tb = !(limit == 0); + } + + if (args[ARG_tb].u_obj != mp_const_none && print_tb) { + if (!stack_ok()) { + mp_raise_RuntimeError(translate("stack is not ok")); + } + size_t n, *values; + mp_obj_exception_get_traceback(exc, &n, &values); + if (n > 0) { + assert(n % 3 == 0); + // Decompress the format strings + const compressed_string_t *traceback = MP_ERROR_TEXT("Traceback (most recent call last):\n"); + char decompressed[decompress_length(traceback)]; + decompress(traceback, decompressed); + #if MICROPY_ENABLE_SOURCE_LINE + const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\", line %d"); + #else + const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\""); + #endif + char decompressed_frame[decompress_length(frame)]; + decompress(frame, decompressed_frame); + const compressed_string_t *block_fmt = MP_ERROR_TEXT(", in %q\n"); + char decompressed_block[decompress_length(block_fmt)]; + decompress(block_fmt, decompressed_block); + + // Set traceback formatting + // Default: Print full traceback + int i = n - 3, j; + if (limit > 0) { + // Print upto limit traceback + // from caller's frame + limit = n - (limit * 3); + } else if (limit < 0) { + // Print upto limit traceback + // from last + i = 0, limit = 3 + (limit * 3); + } + + // Print the traceback + mp_print_str(&print, decompressed); + for (; i >= limit; i -= 3) { + j = (i < 0) ? -i : i; + #if MICROPY_ENABLE_SOURCE_LINE + mp_printf(&print, decompressed_frame, values[j], (int)values[j + 1]); + #else + mp_printf(&print, decompressed_frame, values[j]); + #endif + // The block name can be NULL if it's unknown + qstr block = values[j + 2]; + if (block == MP_QSTRnull) { + mp_print_str(&print, "\n"); + } else { + mp_printf(&print, decompressed_block, block); + } + } + } + } + mp_obj_print_helper(&print, exc, PRINT_EXC); + mp_print_str(&print, "\n"); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(traceback_print_exception_obj, 3, traceback_print_exception); + +STATIC const mp_rom_map_elem_t traceback_module_globals_table[] = { + // module name + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_traceback) }, + // module functions + { MP_ROM_QSTR(MP_QSTR_print_exception), MP_ROM_PTR(&traceback_print_exception_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(traceback_module_globals, traceback_module_globals_table); + +const mp_obj_module_t traceback_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)&traceback_module_globals, +}; diff --git a/shared-module/traceback/__init__.c b/shared-module/traceback/__init__.c new file mode 100644 index 0000000000..4bd8276f34 --- /dev/null +++ b/shared-module/traceback/__init__.c @@ -0,0 +1 @@ +// empty file From 9e54606ba15b0323140ea24e4632582c5f31607d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 28 Jul 2021 09:00:36 -0700 Subject: [PATCH 029/418] Set output low in SIO --- ports/raspberrypi/common-hal/pulseio/PulseOut.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.c b/ports/raspberrypi/common-hal/pulseio/PulseOut.c index 576c5410f7..2b4ab7185c 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.c @@ -85,6 +85,8 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, common_hal_pwmio_pwmout_raise_error(result); // Disable gpio output before we set the duty cycle. + gpio_put(pin->number, false); + gpio_set_dir(pin->number, GPIO_OUT); gpio_set_function(pin->number, GPIO_FUNC_SIO); common_hal_pwmio_pwmout_set_duty_cycle(&self->carrier, duty_cycle); @@ -101,6 +103,7 @@ void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { if (common_hal_pulseio_pulseout_deinited(self)) { return; } + gpio_set_dir(self->pin, GPIO_IN); common_hal_pwmio_pwmout_deinit(&self->carrier); self->pin = NO_PIN; } From cd14b7682ad3d3e636fcc301642c378c4c19f860 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 28 Jul 2021 20:58:21 +0200 Subject: [PATCH 030/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 15 --------------- locale/cs.po | 15 --------------- locale/de_DE.po | 15 --------------- locale/el.po | 15 --------------- locale/en_GB.po | 33 ++++++++++++++------------------- locale/es.po | 33 ++++++++++++++------------------- locale/fil.po | 15 --------------- locale/fr.po | 33 ++++++++++++++------------------- locale/hi.po | 15 --------------- locale/it_IT.po | 15 --------------- locale/ja.po | 15 --------------- locale/ko.po | 15 --------------- locale/nl.po | 33 ++++++++++++++------------------- locale/pl.po | 15 --------------- locale/pt_BR.po | 33 ++++++++++++++------------------- locale/sv.po | 33 ++++++++++++++------------------- locale/zh_Latn_pinyin.po | 28 ++++++++++++---------------- 17 files changed, 96 insertions(+), 280 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 32e1bd823f..f50cee00ed 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1907,21 +1907,6 @@ msgstr "Tambahkan module apapun pada filesystem\n" msgid "Polygon needs at least 3 points" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Buffer awalan harus ada di heap" diff --git a/locale/cs.po b/locale/cs.po index b8ea4b16d5..4256b25202 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1880,21 +1880,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 7ab3e244a2..6de4c6db85 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1907,21 +1907,6 @@ msgstr "und alle Module im Dateisystem \n" msgid "Polygon needs at least 3 points" msgstr "Polygone brauchen mindestens 3 Punkte" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Der Präfixbuffer muss sich auf dem Heap befinden" diff --git a/locale/el.po b/locale/el.po index ecc4baef85..68119f7714 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1877,21 +1877,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 0ca8c4518a..6d0dd25051 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -1901,25 +1901,6 @@ msgstr "Plus any modules on the filesystem\n" msgid "Polygon needs at least 3 points" msgstr "Polygon needs at least 3 points" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefix buffer must be on the heap" @@ -4476,6 +4457,20 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "" +#~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +#~ "instead" +#~ msgstr "" +#~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +#~ "instead" + +#~ msgid "" +#~ "Port does not accept pins or frequency. Construct and pass a PWMOut " +#~ "Carrier instead" +#~ msgstr "" +#~ "Port does not accept pins or frequency. Construct and pass a PWMOut " +#~ "Carrier instead" + #~ msgid "Instruction %d jumps on pin" #~ msgstr "Instruction %d jumps on pin" diff --git a/locale/es.po b/locale/es.po index 8305b1dff5..2d5a57f92f 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1925,25 +1925,6 @@ msgstr "Además de cualquier módulo en el sistema de archivos\n" msgid "Polygon needs at least 3 points" msgstr "El polígono necesita al menos 3 puntos" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" -"Port no acepta un carrier de PWM. Pase en cambio un pin, una frecuencia o un " -"ciclo de actividad" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" -"Port no acepta los pines o la frecuencia. Construya y pase en su lugar un " -"Carrier de PWMOut" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "El prefijo del buffer debe estar en el heap" @@ -4531,6 +4512,20 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "" +#~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +#~ "instead" +#~ msgstr "" +#~ "Port no acepta un carrier de PWM. Pase en cambio un pin, una frecuencia o " +#~ "un ciclo de actividad" + +#~ msgid "" +#~ "Port does not accept pins or frequency. Construct and pass a PWMOut " +#~ "Carrier instead" +#~ msgstr "" +#~ "Port no acepta los pines o la frecuencia. Construya y pase en su lugar un " +#~ "Carrier de PWMOut" + #~ msgid "Instruction %d jumps on pin" #~ msgstr "La instruction %d salta en pin" diff --git a/locale/fil.po b/locale/fil.po index e5057ab83e..45a827b0e5 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1896,21 +1896,6 @@ msgstr "Kasama ang kung ano pang modules na sa filesystem\n" msgid "Polygon needs at least 3 points" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index bf97797f5f..7ca4dcf764 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1935,25 +1935,6 @@ msgstr "Ainsi que tout autres modules présents sur le système de fichiers\n" msgid "Polygon needs at least 3 points" msgstr "Polygon a besoin d’au moins 3 points" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" -"Ce port n'accepte pas de PWM carrier. Précisez plutôt les valeurs pin, " -"frequency et duty_cycle" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" -"Ce port n'accepte pas de broches ou de fréquence. Construisez plutôt en " -"passant un PWMOut Carrier" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Le tampon de préfixe doit être sur la pile" @@ -4542,6 +4523,20 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "" +#~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +#~ "instead" +#~ msgstr "" +#~ "Ce port n'accepte pas de PWM carrier. Précisez plutôt les valeurs pin, " +#~ "frequency et duty_cycle" + +#~ msgid "" +#~ "Port does not accept pins or frequency. Construct and pass a PWMOut " +#~ "Carrier instead" +#~ msgstr "" +#~ "Ce port n'accepte pas de broches ou de fréquence. Construisez plutôt en " +#~ "passant un PWMOut Carrier" + #~ msgid "Instruction %d jumps on pin" #~ msgstr "Instruction %d saute sur la broche" diff --git a/locale/hi.po b/locale/hi.po index 99fd695dda..65ac583202 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1877,21 +1877,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 412d3e03fe..53ce2e8fc0 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1915,21 +1915,6 @@ msgstr "Imposssibile rimontare il filesystem" msgid "Polygon needs at least 3 points" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index a1c850be2f..f96c6c5c61 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1891,21 +1891,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "ポリゴンには少なくとも3つの点が必要" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefixバッファはヒープ上になければなりません" diff --git a/locale/ko.po b/locale/ko.po index 556574d372..da03abf101 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1880,21 +1880,6 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 73d6276635..99e166fed7 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1901,25 +1901,6 @@ msgstr "En iedere module in het bestandssysteem\n" msgid "Polygon needs at least 3 points" msgstr "Polygon heeft op zijn minst 3 punten nodig" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" -"Poort ondersteund geen PWM drager. Geef een pin, frequentie en inschakeltijd " -"op" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" -"Poort accepteert geen pin of frequentie. Stel een PWMOut Carrier samen en " -"geef die op" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefix buffer moet op de heap zijn" @@ -4487,6 +4468,20 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "" +#~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +#~ "instead" +#~ msgstr "" +#~ "Poort ondersteund geen PWM drager. Geef een pin, frequentie en " +#~ "inschakeltijd op" + +#~ msgid "" +#~ "Port does not accept pins or frequency. Construct and pass a PWMOut " +#~ "Carrier instead" +#~ msgstr "" +#~ "Poort accepteert geen pin of frequentie. Stel een PWMOut Carrier samen en " +#~ "geef die op" + #~ msgid "Buffer too large and unable to allocate" #~ msgstr "Buffer is te groot en niet in staat te alloceren" diff --git a/locale/pl.po b/locale/pl.po index 262f8c5a89..903ce103ef 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1888,21 +1888,6 @@ msgstr "Oraz moduły w systemie plików\n" msgid "Polygon needs at least 3 points" msgstr "Wielokąt musi mieć co najmniej 3 punkty" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index dd2ccb5833..6eada6d856 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -1925,25 +1925,6 @@ msgstr "Além de quaisquer módulos no sistema de arquivos\n" msgid "Polygon needs at least 3 points" msgstr "O Polígono precisa de pelo menos 3 pontos" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" -"A porta não aceita portadora PWM. Em vez disso informe um pino, frequência e " -"o ciclo de trabalho" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" -"A porta não aceita pinos ou frequência. Em vez disso, construa e passe um " -"PWMOut Carrier" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -4541,6 +4522,20 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "" +#~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +#~ "instead" +#~ msgstr "" +#~ "A porta não aceita portadora PWM. Em vez disso informe um pino, " +#~ "frequência e o ciclo de trabalho" + +#~ msgid "" +#~ "Port does not accept pins or frequency. Construct and pass a PWMOut " +#~ "Carrier instead" +#~ msgstr "" +#~ "A porta não aceita pinos ou frequência. Em vez disso, construa e passe um " +#~ "PWMOut Carrier" + #~ msgid "Instruction %d jumps on pin" #~ msgstr "A instrução %d salta no pino" diff --git a/locale/sv.po b/locale/sv.po index a8603151d6..9a86c50c37 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -1907,25 +1907,6 @@ msgstr "Plus eventuella moduler i filsystemet\n" msgid "Polygon needs at least 3 points" msgstr "Polygonen behöver minst 3 punkter" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "" -"Port accepterar inte PWM carrier. Ange pinne frekvens och arbetscykel " -"istället" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" -"Porten accepterar inte pinne eller frekvens. Skapa och skicka en PWMOut " -"Carrier istället" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefixbufferten måste finnas på heap" @@ -4500,6 +4481,20 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "" +#~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +#~ "instead" +#~ msgstr "" +#~ "Port accepterar inte PWM carrier. Ange pinne frekvens och arbetscykel " +#~ "istället" + +#~ msgid "" +#~ "Port does not accept pins or frequency. Construct and pass a PWMOut " +#~ "Carrier instead" +#~ msgstr "" +#~ "Porten accepterar inte pinne eller frekvens. Skapa och skicka en PWMOut " +#~ "Carrier istället" + #~ msgid "Instruction %d jumps on pin" #~ msgstr "Instruktion %d hoppar på pinne" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 8f5e42127b..cf07059d1a 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -1909,22 +1909,6 @@ msgstr "Zài wénjiàn xìtǒng shàng tiānjiā rènhé mókuài\n" msgid "Polygon needs at least 3 points" msgstr "Duōbiānxíng zhìshǎo xūyào 3 diǎn" -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " -"instead" -msgstr "Duānkǒu bù jiēshòu PWM zàibō. Tōngguò yǐn jiǎo, pínlǜ hé zhàn kōng bǐ" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/pulseio/PulseOut.c -#: ports/stm/common-hal/pulseio/PulseOut.c -msgid "" -"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " -"instead" -msgstr "" -"Duānkǒu bù jiēshòu yǐn jiǎo huò pínlǜ. Gòuzào bìng chuándì PWMOut zàibō" - #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Qiánzhuì huǎnchōng qū bìxū zài duī shàng" @@ -4497,6 +4481,18 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "" +#~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " +#~ "instead" +#~ msgstr "" +#~ "Duānkǒu bù jiēshòu PWM zàibō. Tōngguò yǐn jiǎo, pínlǜ hé zhàn kōng bǐ" + +#~ msgid "" +#~ "Port does not accept pins or frequency. Construct and pass a PWMOut " +#~ "Carrier instead" +#~ msgstr "" +#~ "Duānkǒu bù jiēshòu yǐn jiǎo huò pínlǜ. Gòuzào bìng chuándì PWMOut zàibō" + #~ msgid "Instruction %d jumps on pin" #~ msgstr "zhǐ lìng %d zài yǐn jiǎo shàng tiào zhuǎn" From cdf978f3af607aa62bb4631fdbeabe7df345db84 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 28 Jul 2021 08:50:11 -0700 Subject: [PATCH 031/418] Fix a couple fake sleep bugs on nrf and esp On ESP ctrl-c during fake sleep will now stop the sleep. A crash on real deep sleep is now fixed as well. (Exception string saving was crashing on reading the deep sleep exception.) Fixes #4010 This also fixes nRF fake sleep after the first time. The internal variable wasn't being reset early enough. Fixes #4869 --- lib/utils/pyexec.c | 5 +++ ports/esp32s2/common-hal/alarm/__init__.c | 11 ++++- ports/esp32s2/supervisor/usb.c | 8 ++-- ports/nrf/common-hal/_bleio/Adapter.c | 7 ++- ports/nrf/common-hal/alarm/__init__.c | 47 +-------------------- ports/nrf/common-hal/alarm/time/TimeAlarm.c | 4 -- 6 files changed, 27 insertions(+), 55 deletions(-) diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index 2651189915..292c7f8595 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -165,7 +165,12 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input } if (result != NULL) { result->return_code = ret; + #if CIRCUITPY_ALARM + // Don't set the exception object if we exited for deep sleep. + if (ret != 0 && ret != PYEXEC_DEEP_SLEEP) { + #else if (ret != 0) { + #endif mp_obj_t return_value = (mp_obj_t)nlr.ret_val; result->exception = return_value; result->exception_line = -1; diff --git a/ports/esp32s2/common-hal/alarm/__init__.c b/ports/esp32s2/common-hal/alarm/__init__.c index 7a977b093c..77dc2ff3f2 100644 --- a/ports/esp32s2/common-hal/alarm/__init__.c +++ b/ports/esp32s2/common-hal/alarm/__init__.c @@ -62,6 +62,11 @@ void alarm_reset(void) { esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_ALL); } +// This will be reset to false by full resets when bss is cleared. Otherwise, the +// reload is due to CircuitPython and the ESP wakeup cause will be stale. This +// can happen if USB is connected after a deep sleep. +STATIC bool soft_wakeup = false; + STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) { // First check if the modules remember what last woke up if (alarm_pin_pinalarm_woke_this_cycle()) { @@ -75,7 +80,11 @@ STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) { } // If waking from true deep sleep, modules will have lost their state, // so check the deep wakeup cause manually - return esp_sleep_get_wakeup_cause(); + if (!soft_wakeup) { + soft_wakeup = true; + return esp_sleep_get_wakeup_cause(); + } + return ESP_SLEEP_WAKEUP_UNDEFINED; } bool common_hal_alarm_woken_from_sleep(void) { diff --git a/ports/esp32s2/supervisor/usb.c b/ports/esp32s2/supervisor/usb.c index 05e0746b00..0aa379b166 100644 --- a/ports/esp32s2/supervisor/usb.c +++ b/ports/esp32s2/supervisor/usb.c @@ -28,6 +28,7 @@ #include "py/runtime.h" #include "supervisor/usb.h" #include "supervisor/esp_port.h" +#include "supervisor/port.h" #include "lib/utils/interrupt_char.h" #include "lib/mp-readline/readline.h" @@ -109,6 +110,7 @@ void init_usb_hardware(void) { usb_device_stack, &usb_device_taskdef); } + /** * Callback invoked when received an "wanted" char. * @param itf Interface index (for multiple cdc interfaces) @@ -116,13 +118,13 @@ void init_usb_hardware(void) { */ void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char) { (void)itf; // not used + // CircuitPython's VM is run in a separate FreeRTOS task from TinyUSB. + // So, we must notify the other task when a CTRL-C is received. + port_wake_main_task(); // Workaround for using lib/utils/interrupt_char.c // Compare mp_interrupt_char with wanted_char and ignore if not matched if (mp_interrupt_char == wanted_char) { tud_cdc_read_flush(); // flush read fifo mp_sched_keyboard_interrupt(); - // CircuitPython's VM is run in a separate FreeRTOS task from TinyUSB. - // So, we must notify the other task when a CTRL-C is received. - xTaskNotifyGive(circuitpython_task); } } diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index 9f5f46f656..f4302b839d 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -952,8 +952,11 @@ bool common_hal_bleio_adapter_is_bonded_to_central(bleio_adapter_obj_t *self) { } void bleio_adapter_gc_collect(bleio_adapter_obj_t *adapter) { - gc_collect_root((void **)adapter, sizeof(bleio_adapter_obj_t) / sizeof(size_t)); - gc_collect_root((void **)bleio_connections, sizeof(bleio_connections) / sizeof(size_t)); + // We divide by size_t so that we can scan each 32-bit aligned value to see + // if it is a pointer. This allows us to change the structs without worrying + // about collecting new pointers. + gc_collect_root((void **)adapter, sizeof(bleio_adapter_obj_t) / (sizeof(size_t))); + gc_collect_root((void **)bleio_connections, sizeof(bleio_connections) / (sizeof(size_t))); } void bleio_adapter_reset(bleio_adapter_obj_t *adapter) { diff --git a/ports/nrf/common-hal/alarm/__init__.c b/ports/nrf/common-hal/alarm/__init__.c index 8accc88764..117fa1168f 100644 --- a/ports/nrf/common-hal/alarm/__init__.c +++ b/ports/nrf/common-hal/alarm/__init__.c @@ -137,6 +137,8 @@ mp_obj_t common_hal_alarm_create_wake_alarm(void) { // Set up light sleep or deep sleep alarms. STATIC void _setup_sleep_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms) { + sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_NONE; + sleepmem_wakeup_pin = WAKEUP_PIN_UNDEF; alarm_pin_pinalarm_set_alarms(deep_sleep, n_alarms, alarms); alarm_time_timealarm_set_alarms(deep_sleep, n_alarms, alarms); alarm_touch_touchalarm_set_alarm(deep_sleep, n_alarms, alarms); @@ -156,10 +158,6 @@ void system_on_idle_until_alarm(int64_t timediff_ms, uint32_t prescaler) { if (timediff_ms != -1) { have_timeout = true; - #if 0 - int64_t now = common_hal_time_monotonic_ms(); - dbg_printf("now_ms=%ld timediff_ms=%ld\r\n", (long)now, (long)timediff_ms); - #endif if (timediff_ms < 0) { timediff_ms = 0; } @@ -175,34 +173,17 @@ void system_on_idle_until_alarm(int64_t timediff_ms, uint32_t prescaler) { start_tick = port_get_raw_ticks(NULL); end_tick = start_tick + tickdiff; } - #if 0 - dbg_printf("start_tick=%ld end_tick=%ld have_timeout=%c\r\n", (long)start_tick, (long)end_tick, have_timeout ? 'T' : 'F'); - #endif int64_t remaining; - sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_NONE; - sleepmem_wakeup_pin = WAKEUP_PIN_UNDEF; - - #ifdef NRF_DEBUG_PRINT - int ct = 40; - char reason = '?'; -#define WAKEUP_REASON(x) reason = (x) - #else -#define WAKEUP_REASON(x) - #endif - while (1) { if (mp_hal_is_interrupted()) { - WAKEUP_REASON('I'); break; } if (serial_connected() && serial_bytes_available()) { - WAKEUP_REASON('S'); break; } RUN_BACKGROUND_TASKS; if (common_hal_alarm_woken_from_sleep()) { - WAKEUP_REASON('W'); break; } if (have_timeout) { @@ -210,51 +191,28 @@ void system_on_idle_until_alarm(int64_t timediff_ms, uint32_t prescaler) { // We break a bit early so we don't risk setting the alarm before the time when we call // sleep. if (remaining < 1) { - WAKEUP_REASON('t'); break; } port_interrupt_after_ticks(remaining); } // Idle until an interrupt happens. port_idle_until_interrupt(); - #ifdef NRF_DEBUG_PRINT - if (ct > 0) { - mp_printf(&mp_plat_print, "_"); - --ct; - } - #endif if (have_timeout) { remaining = end_tick - port_get_raw_ticks(NULL); if (remaining <= 0) { sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_TIMER; - WAKEUP_REASON('T'); break; } } } - #ifdef NRF_DEBUG_PRINT - mp_printf(&mp_plat_print, "%c\r\n", reason); - #endif #if defined(MICROPY_QSPI_CS) qspi_flash_exit_sleep(); #endif - - #ifdef NRF_DEBUG_PRINT - tickdiff = port_get_raw_ticks(NULL) - start_tick; - double sec; - if (prescaler == 0) { - sec = (double)tickdiff / 1024; - } else { - sec = (double)(tickdiff * prescaler) / 1024; - } - mp_printf(&mp_plat_print, "lapse %6.1f sec\r\n", sec); - #endif } mp_obj_t common_hal_alarm_light_sleep_until_alarms(size_t n_alarms, const mp_obj_t *alarms) { mp_obj_t wake_alarm = mp_const_none; - alarm_time_timealarm_clear_wakeup_time(); _setup_sleep_alarms(false, n_alarms, alarms); #ifdef NRF_DEBUG_PRINT @@ -290,7 +248,6 @@ mp_obj_t common_hal_alarm_light_sleep_until_alarms(size_t n_alarms, const mp_obj } void common_hal_alarm_set_deep_sleep_alarms(size_t n_alarms, const mp_obj_t *alarms) { - alarm_time_timealarm_clear_wakeup_time(); _setup_sleep_alarms(true, n_alarms, alarms); } diff --git a/ports/nrf/common-hal/alarm/time/TimeAlarm.c b/ports/nrf/common-hal/alarm/time/TimeAlarm.c index 54d9a8921f..c5f3bfd705 100644 --- a/ports/nrf/common-hal/alarm/time/TimeAlarm.c +++ b/ports/nrf/common-hal/alarm/time/TimeAlarm.c @@ -70,10 +70,6 @@ int64_t alarm_time_timealarm_get_wakeup_timediff_ms(void) { return wakeup_time_saved - common_hal_time_monotonic_ms(); } -void alarm_time_timealarm_clear_wakeup_time(void) { - wakeup_time_saved = 0; -} - void alarm_time_timealarm_reset(void) { port_disable_interrupt_after_ticks_ch(1); wakeup_time_saved = 0; From bc0f8ac55d6275aebe97c9cd92123ae86f052dfd Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 28 Jul 2021 14:17:31 -0700 Subject: [PATCH 032/418] Use all four LEDs for status on MagTag Fixes #5051 --- .../esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h index d0d1864993..343bb525f1 100644 --- a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h @@ -32,6 +32,7 @@ #define MICROPY_HW_NEOPIXEL (&pin_GPIO1) #define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO21) #define CIRCUITPY_STATUS_LED_POWER_INVERTED (1) +#define MICROPY_HW_NEOPIXEL_COUNT (4) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) From d5cdceb9b9fa06ba96fe69f7de1e67181a9682c6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 28 Jul 2021 14:25:21 -0700 Subject: [PATCH 033/418] Use all 4 status pixels on neotrinkey too --- ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.h index 7a923ead11..1eb6fbf3e6 100644 --- a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.h @@ -2,6 +2,7 @@ #define MICROPY_HW_MCU_NAME "samd21e18" #define MICROPY_HW_NEOPIXEL (&pin_PA05) +#define MICROPY_HW_NEOPIXEL_COUNT (4) #define IGNORE_PIN_PA00 1 #define IGNORE_PIN_PA01 1 From a3998d0626d90bb5d84e61eefd4b3be2b15a6739 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Fri, 30 Jul 2021 08:36:24 +0530 Subject: [PATCH 034/418] add atexit module --- lib/utils/pyexec.c | 8 ++ locale/circuitpython.pot | 18 ++-- main.c | 9 ++ .../mpconfigboard.mk | 1 + py/circuitpy_defns.mk | 4 + py/circuitpy_mpconfig.h | 8 ++ py/circuitpy_mpconfig.mk | 3 + shared-bindings/atexit/__init__.c | 89 +++++++++++++++++++ shared-module/atexit/__init__.c | 87 ++++++++++++++++++ shared-module/atexit/__init__.h | 39 ++++++++ 10 files changed, 255 insertions(+), 11 deletions(-) create mode 100644 shared-bindings/atexit/__init__.c create mode 100644 shared-module/atexit/__init__.c create mode 100644 shared-module/atexit/__init__.h diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index 2651189915..0362729b09 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -44,6 +44,10 @@ #include "lib/utils/pyexec.h" #include "genhdr/mpversion.h" +#if CIRCUITPY_ATEXIT +#include "shared-module/atexit/__init__.h" +#endif + pyexec_mode_kind_t pyexec_mode_kind = PYEXEC_MODE_FRIENDLY_REPL; int pyexec_system_exit = 0; @@ -127,6 +131,10 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input start = mp_hal_ticks_ms(); #endif mp_call_function_0(module_fun); + // execute exit handlers (if any). + #if CIRCUITPY_ATEXIT + shared_module_atexit_execute(); + #endif mp_hal_set_interrupt_char(-1); // disable interrupt mp_handle_pending(true); // handle any pending exceptions (and any callbacks) nlr_pop(); diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 81531c0cbd..e29bfd1ae6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -185,7 +185,7 @@ msgstr "" msgid "'%q' object is not an iterator" msgstr "" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "" @@ -1185,11 +1185,6 @@ msgstr "" msgid "Input/output error" msgstr "" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1506,6 +1501,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2510,7 +2510,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3594,10 +3594,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "" diff --git a/main.c b/main.c index 13caf4beb7..887b1c1d16 100755 --- a/main.c +++ b/main.c @@ -70,6 +70,10 @@ #include "shared-bindings/alarm/__init__.h" #endif +#if CIRCUITPY_ATEXIT +#include "shared-module/atexit/__init__.h" +#endif + #if CIRCUITPY_BLEIO #include "shared-bindings/_bleio/__init__.h" #include "supervisor/shared/bluetooth/bluetooth.h" @@ -253,6 +257,11 @@ STATIC void cleanup_after_vm(supervisor_allocation* heap, mp_obj_t exception) { // Reset port-independent devices, like CIRCUITPY_BLEIO_HCI. reset_devices(); + + #if CIRCUITPY_ATEXIT + atexit_reset(); + #endif + // Turn off the display and flush the filesystem before the heap disappears. #if CIRCUITPY_DISPLAYIO reset_displays(); diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index a617947f9c..a0bef7ada0 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -20,6 +20,7 @@ CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 CIRCUITPY_USB_MIDI = 0 +CIRCUITPY_ATEXIT = 0 CIRCUITPY_PIXELBUF = 1 CIRCUITPY_BUSDEVICE = 1 diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 5bf46039a7..938dcbd8b4 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -114,6 +114,9 @@ endif ifeq ($(CIRCUITPY_ANALOGIO),1) SRC_PATTERNS += analogio/% endif +ifeq ($(CIRCUITPY_ATEXIT),1) +SRC_PATTERNS += atexit/% +endif ifeq ($(CIRCUITPY_AUDIOBUSIO),1) SRC_PATTERNS += audiobusio/% endif @@ -471,6 +474,7 @@ SRC_SHARED_MODULE_ALL = \ _stage/__init__.c \ aesio/__init__.c \ aesio/aes.c \ + atexit/__init__.c \ audiocore/RawSample.c \ audiocore/WaveFile.c \ audiocore/__init__.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 8e31f0411b..7dfdf7f311 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -255,6 +255,13 @@ extern const struct _mp_obj_module_t analogio_module; #define ANALOGIO_MODULE #endif +#if CIRCUITPY_ATEXIT +extern const struct _mp_obj_module_t atexit_module; +#define ATEXIT_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_atexit), (mp_obj_t)&atexit_module }, +#else +#define ATEXIT_MODULE +#endif + #if CIRCUITPY_AUDIOBUSIO #define AUDIOBUSIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiobusio), (mp_obj_t)&audiobusio_module }, extern const struct _mp_obj_module_t audiobusio_module; @@ -853,6 +860,7 @@ extern const struct _mp_obj_module_t msgpack_module; AESIO_MODULE \ ALARM_MODULE \ ANALOGIO_MODULE \ + ATEXIT_MODULE \ AUDIOBUSIO_MODULE \ AUDIOCORE_MODULE \ AUDIOIO_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 3d72be7491..904ad0ed11 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -48,6 +48,9 @@ CFLAGS += -DCIRCUITPY_ALARM=$(CIRCUITPY_ALARM) CIRCUITPY_ANALOGIO ?= 1 CFLAGS += -DCIRCUITPY_ANALOGIO=$(CIRCUITPY_ANALOGIO) +CIRCUITPY_ATEXIT ?= 1 +CFLAGS += -DCIRCUITPY_ATEXIT=$(CIRCUITPY_ATEXIT) + CIRCUITPY_AUDIOBUSIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_AUDIOBUSIO=$(CIRCUITPY_AUDIOBUSIO) diff --git a/shared-bindings/atexit/__init__.c b/shared-bindings/atexit/__init__.c new file mode 100644 index 0000000000..0f4ea26ee9 --- /dev/null +++ b/shared-bindings/atexit/__init__.c @@ -0,0 +1,89 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * 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 "shared-module/atexit/__init__.h" + +//| """Atexit Module +//| +//| This module defines functions to register and unregister cleanup functions. +//| Functions thus registered are automatically executed upon normal vm termination. +//| +//| """ +//| ... +//| + +//| def register(func: Callable[..., Any], *args: Optional[Any], **kwargs: Optional[Any]) -> Callable[..., Any]: +//| +//| """Register func as a function to be executed at termination. +//| +//| Any optional arguments that are to be passed to func must be passed as arguments to register(). +//| It is possible to register the same function and arguments more than once. +//| +//| At normal program termination (for instance, if `sys.exit()` is called or the vm execution completes), +//| all functions registered are called in order of there registration. +//| +//| If an exception is raised during execution of the exit handlers, a traceback is printed and the execution stops. +//| +//| This function returns func, which makes it possible to use it as a decorator. +//| +//| """ +//| ... +//| +STATIC mp_obj_t atexit_register(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + shared_module_atexit_register(pos_args[0], (n_args - 1), ((n_args > 1) ? &pos_args[1] : NULL), kw_args); + return pos_args[0]; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(atexit_register_obj, 1, atexit_register); + +//| def unregister(func: Callable[..., Any]) -> None: +//| +//| """Remove func from the list of functions to be run at termination. +//| +//| `unregister()` silently does nothing if func was not previously registered. If func has been registered more than once, +//| every occurrence of that function in the atexit call stack will be removed. +//| +//| """ +//| ... +//| +STATIC mp_obj_t atexit_unregister(const mp_obj_t self_in) { + shared_module_atexit_unregister(&self_in); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(atexit_unregister_obj, atexit_unregister); + +STATIC const mp_rom_map_elem_t atexit_module_globals_table[] = { + // module name + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_atexit) }, + // module functions + { MP_ROM_QSTR(MP_QSTR_register), MP_ROM_PTR(&atexit_register_obj) }, + { MP_ROM_QSTR(MP_QSTR_unregister), MP_ROM_PTR(&atexit_unregister_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(atexit_module_globals, atexit_module_globals_table); + +const mp_obj_module_t atexit_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)&atexit_module_globals, +}; diff --git a/shared-module/atexit/__init__.c b/shared-module/atexit/__init__.c new file mode 100644 index 0000000000..7c55b13f67 --- /dev/null +++ b/shared-module/atexit/__init__.c @@ -0,0 +1,87 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/runtime.h" +#include "shared-module/atexit/__init__.h" + +typedef struct _atexit_callback_t { + size_t n_pos, n_kw; + mp_obj_t func, *args; +} atexit_callback_t; + +size_t callback_len = 0; +atexit_callback_t *callback = NULL; + +void atexit_reset(void) { + callback_len = 0; + m_free(callback); + callback = NULL; +} + +void shared_module_atexit_register(mp_obj_t *func, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + if (!mp_obj_is_callable(func)) { + mp_raise_TypeError_varg(translate("'%q' object is not callable"), mp_obj_get_type_qstr(func)); + } + size_t n_kw_args = (kw_args) ? kw_args->used : 0; + atexit_callback_t cb = { + .n_pos = 0, + .n_kw = 0, + .func = func, + .args = ((n_args + n_kw_args) == 0) ? NULL : m_malloc((n_args + (2 * n_kw_args)) * sizeof(mp_obj_t), false) + }; + for (; cb.n_pos < n_args; cb.n_pos++) { + cb.args[cb.n_pos] = pos_args[cb.n_pos]; + } + for (size_t i = cb.n_pos; cb.n_kw < n_kw_args; i++, cb.n_kw++) { + cb.args[i] = kw_args[cb.n_kw].table->key; + cb.args[i += 1] = kw_args[cb.n_kw].table->value; + } + if (!callback) { + callback = (atexit_callback_t *)m_realloc(callback, sizeof(cb)); + } + callback[callback_len++] = cb; +} + +void shared_module_atexit_unregister(const mp_obj_t *func) { + for (size_t i = 0; i < callback_len; i++) { + if (callback[i].func == func) { + callback[i].n_pos = 0; + callback[i].n_kw = 0; + callback[i].func = mp_const_none; + callback[i].args = NULL; + } + } +} + +void shared_module_atexit_execute(void) { + if (callback) { + for (size_t i = 0; i < callback_len; i++) { + if (callback[i].func != mp_const_none) { + mp_call_function_n_kw(callback[i].func, callback[i].n_pos, callback[i].n_kw, callback[i].args); + } + } + } +} diff --git a/shared-module/atexit/__init__.h b/shared-module/atexit/__init__.h new file mode 100644 index 0000000000..48cf0744db --- /dev/null +++ b/shared-module/atexit/__init__.h @@ -0,0 +1,39 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_MODULE_ATEXIT___INIT___H +#define MICROPY_INCLUDED_SHARED_MODULE_ATEXIT___INIT___H + +#include "py/obj.h" + +extern void atexit_reset(void); + +extern void shared_module_atexit_register(mp_obj_t *func, + size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args); +extern void shared_module_atexit_unregister(const mp_obj_t *func); +extern void shared_module_atexit_execute(void); + +#endif // MICROPY_INCLUDED_SHARED_MODULE_ATEXIT___INIT___H From 49388511227f006cfa30d921d5e0e095c0141a8a Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Fri, 30 Jul 2021 10:00:00 +0530 Subject: [PATCH 035/418] remove legacy sys.atexit() implementation --- ports/unix/main.c | 7 ------- ports/unix/mpconfigport.h | 1 - py/modsys.c | 18 ------------------ py/mpconfig.h | 5 ----- py/mpstate.h | 5 ----- py/runtime.c | 4 ---- tests/misc/sys_atexit.py | 21 --------------------- tests/misc/sys_atexit.py.exp | 2 -- tests/unix/extra_coverage.py.exp | 8 ++++---- 9 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 tests/misc/sys_atexit.py delete mode 100644 tests/misc/sys_atexit.py.exp diff --git a/ports/unix/main.c b/ports/unix/main.c index 55bdc22082..b69df90354 100644 --- a/ports/unix/main.c +++ b/ports/unix/main.c @@ -690,13 +690,6 @@ MP_NOINLINE int main_(int argc, char **argv) { MP_STATE_THREAD(prof_trace_callback) = MP_OBJ_NULL; #endif - #if MICROPY_PY_SYS_ATEXIT - // Beware, the sys.settrace callback should be disabled before running sys.atexit. - if (mp_obj_is_callable(MP_STATE_VM(sys_exitfunc))) { - mp_call_function_0(MP_STATE_VM(sys_exitfunc)); - } - #endif - #if MICROPY_PY_MICROPYTHON_MEM_INFO if (mp_verbose_flag) { mp_micropython_mem_info(0, NULL); diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h index 99da47f31b..194f46b2da 100644 --- a/ports/unix/mpconfigport.h +++ b/ports/unix/mpconfigport.h @@ -106,7 +106,6 @@ #define MICROPY_PY_BUILTINS_SLICE_ATTRS (1) #define MICROPY_PY_BUILTINS_SLICE_INDICES (1) #define MICROPY_PY_SYS_EXIT (1) -#define MICROPY_PY_SYS_ATEXIT (1) #if MICROPY_PY_SYS_SETTRACE #define MICROPY_PERSISTENT_CODE_SAVE (1) #define MICROPY_COMP_CONST (0) diff --git a/py/modsys.c b/py/modsys.c index cbd1712920..1e31a04d27 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -166,16 +166,6 @@ STATIC mp_obj_t mp_sys_getsizeof(mp_obj_t obj) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_sys_getsizeof_obj, mp_sys_getsizeof); #endif -#if MICROPY_PY_SYS_ATEXIT -// atexit(callback): Callback is called when sys.exit is called. -STATIC mp_obj_t mp_sys_atexit(mp_obj_t obj) { - mp_obj_t old = MP_STATE_VM(sys_exitfunc); - MP_STATE_VM(sys_exitfunc) = obj; - return old; -} -STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_sys_atexit_obj, mp_sys_atexit); -#endif - #if MICROPY_PY_SYS_SETTRACE // settrace(tracefunc): Set the system’s trace function. STATIC mp_obj_t mp_sys_settrace(mp_obj_t obj) { @@ -237,14 +227,6 @@ STATIC const mp_rom_map_elem_t mp_module_sys_globals_table[] = { #if MICROPY_PY_SYS_GETSIZEOF { MP_ROM_QSTR(MP_QSTR_getsizeof), MP_ROM_PTR(&mp_sys_getsizeof_obj) }, #endif - - /* - * Extensions to CPython - */ - - #if MICROPY_PY_SYS_ATEXIT - { MP_ROM_QSTR(MP_QSTR_atexit), MP_ROM_PTR(&mp_sys_atexit_obj) }, - #endif }; STATIC MP_DEFINE_CONST_DICT(mp_module_sys_globals, mp_module_sys_globals_table); diff --git a/py/mpconfig.h b/py/mpconfig.h index 2cd2a0d356..8419a50d5e 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1311,11 +1311,6 @@ typedef double mp_float_t; #define MICROPY_PY_SYS_EXIT (1) #endif -// Whether to provide "sys.atexit" function (MicroPython extension) -#ifndef MICROPY_PY_SYS_ATEXIT -#define MICROPY_PY_SYS_ATEXIT (0) -#endif - // Whether to provide "sys.settrace" function #ifndef MICROPY_PY_SYS_SETTRACE #define MICROPY_PY_SYS_SETTRACE (0) diff --git a/py/mpstate.h b/py/mpstate.h index 423463109d..e868a773bf 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -157,11 +157,6 @@ typedef struct _mp_state_vm_t { mp_obj_base_t *cur_exception; #endif - #if MICROPY_PY_SYS_ATEXIT - // exposed through sys.atexit function - mp_obj_t sys_exitfunc; - #endif - // dictionary for the __main__ module mp_obj_dict_t dict_main; diff --git a/py/runtime.c b/py/runtime.c index ceb5e83b14..ba0d59dffa 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -130,10 +130,6 @@ void mp_init(void) { sizeof(MP_STATE_VM(fs_user_mount)) - MICROPY_FATFS_NUM_PERSISTENT); #endif - #if MICROPY_PY_SYS_ATEXIT - MP_STATE_VM(sys_exitfunc) = mp_const_none; - #endif - #if MICROPY_PY_SYS_SETTRACE MP_STATE_THREAD(prof_trace_callback) = MP_OBJ_NULL; MP_STATE_THREAD(prof_callback_is_executing) = false; diff --git a/tests/misc/sys_atexit.py b/tests/misc/sys_atexit.py deleted file mode 100644 index e9c5693f97..0000000000 --- a/tests/misc/sys_atexit.py +++ /dev/null @@ -1,21 +0,0 @@ -# test sys.atexit() function - -import sys - -try: - sys.atexit -except AttributeError: - print("SKIP") - raise SystemExit - -some_var = None - - -def do_at_exit(): - print("done at exit:", some_var) - - -sys.atexit(do_at_exit) - -some_var = "ok" -print("done before exit") diff --git a/tests/misc/sys_atexit.py.exp b/tests/misc/sys_atexit.py.exp deleted file mode 100644 index 3cbdae9a5a..0000000000 --- a/tests/misc/sys_atexit.py.exp +++ /dev/null @@ -1,2 +0,0 @@ -done before exit -done at exit: ok diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index 9a451ebd65..7d87c4f92a 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -41,10 +41,10 @@ ime utime utimeq -argv atexit byteorder exc_info -exit getsizeof implementation maxsize -modules path platform stderr -stdin stdout version version_info +argv byteorder exc_info exit +getsizeof implementation maxsize modules +path platform stderr stdin +stdout version version_info ementation # attrtuple (start=1, stop=2, step=3) From c54b86dd0c7b1772cf3f83f78d54b5a26a56cfe6 Mon Sep 17 00:00:00 2001 From: "Ryan A. Pavlik" Date: Fri, 30 Jul 2021 10:41:38 -0500 Subject: [PATCH 036/418] Update ter-u12n.bdf Remove duplicate ENDCHAR that made it invalid --- tools/fonts/ter-u12n.bdf | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/fonts/ter-u12n.bdf b/tools/fonts/ter-u12n.bdf index 390d0a1e87..815f47a792 100644 --- a/tools/fonts/ter-u12n.bdf +++ b/tools/fonts/ter-u12n.bdf @@ -6447,7 +6447,6 @@ BITMAP 00 00 ENDCHAR -ENDCHAR STARTCHAR uni01DC ENCODING 476 SWIDTH 1000 0 From a358e5f58aaf7b0e8a690d138d1c9564ae157083 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 30 Jul 2021 18:45:50 -0400 Subject: [PATCH 037/418] Add board-specific pico-sdk settings; set xosc multipler for Adafruit boards --- .../boards/adafruit_feather_rp2040/pico-sdk-configboard.h | 4 ++++ .../boards/adafruit_itsybitsy_rp2040/pico-sdk-configboard.h | 4 ++++ .../boards/adafruit_macropad_rp2040/pico-sdk-configboard.h | 4 ++++ .../boards/adafruit_qt2040_trinkey/pico-sdk-configboard.h | 4 ++++ .../boards/adafruit_qtpy_rp2040/pico-sdk-configboard.h | 4 ++++ .../boards/arduino_nano_rp2040_connect/pico-sdk-configboard.h | 1 + .../boards/cytron_maker_pi_rp2040/pico-sdk-configboard.h | 1 + .../boards/pimoroni_keybow2040/pico-sdk-configboard.h | 1 + .../boards/pimoroni_pga2040/pico-sdk-configboard.h | 1 + .../boards/pimoroni_picolipo_16mb/pico-sdk-configboard.h | 1 + .../boards/pimoroni_picolipo_4mb/pico-sdk-configboard.h | 1 + .../boards/pimoroni_picosystem/pico-sdk-configboard.h | 1 + .../boards/pimoroni_tiny2040/pico-sdk-configboard.h | 1 + .../boards/raspberry_pi_pico/pico-sdk-configboard.h | 1 + .../boards/sparkfun_micromod_rp2040/pico-sdk-configboard.h | 1 + .../boards/sparkfun_pro_micro_rp2040/pico-sdk-configboard.h | 1 + .../boards/sparkfun_thing_plus_rp2040/pico-sdk-configboard.h | 1 + ports/raspberrypi/sdk_config/pico/config_autogen.h | 2 ++ 18 files changed, 34 insertions(+) create mode 100644 ports/raspberrypi/boards/adafruit_feather_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/adafruit_macropad_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/adafruit_qt2040_trinkey/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/adafruit_qtpy_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/arduino_nano_rp2040_connect/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/cytron_maker_pi_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_keybow2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_pga2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_picolipo_16mb/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_picolipo_4mb/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_picosystem/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_tiny2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/raspberry_pi_pico/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/sparkfun_micromod_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pico-sdk-configboard.h diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/adafruit_feather_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pico-sdk-configboard.h b/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pico-sdk-configboard.h b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_keybow2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_keybow2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_keybow2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_pga2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_pga2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_pga2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_picosystem/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_picosystem/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/pico-sdk-configboard.h b/ports/raspberrypi/boards/raspberry_pi_pico/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/raspberry_pi_pico/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/sdk_config/pico/config_autogen.h b/ports/raspberrypi/sdk_config/pico/config_autogen.h index a8ff324e1c..a29ccb458a 100644 --- a/ports/raspberrypi/sdk_config/pico/config_autogen.h +++ b/ports/raspberrypi/sdk_config/pico/config_autogen.h @@ -1,5 +1,7 @@ #pragma once +#include "pico-sdk-configboard.h" + // alphabetized #define LIB_PICO_BINARY_INFO (0) #define LIB_PICO_PRINTF_NONE (0) From f7727405d39f7a742505155515b554f55c1ab848 Mon Sep 17 00:00:00 2001 From: Tyler Crumpton Date: Sat, 31 Jul 2021 17:01:48 -0500 Subject: [PATCH 038/418] Add CrumpSpace CrumpS2 board definition --- .github/workflows/build.yml | 1 + .../esp32s2/boards/crumpspace_crumps2/board.c | 52 ++++++++++++++++++ .../boards/crumpspace_crumps2/mpconfigboard.h | 35 ++++++++++++ .../crumpspace_crumps2/mpconfigboard.mk | 22 ++++++++ .../esp32s2/boards/crumpspace_crumps2/pins.c | 53 +++++++++++++++++++ .../boards/crumpspace_crumps2/sdkconfig | 39 ++++++++++++++ 6 files changed, 202 insertions(+) create mode 100644 ports/esp32s2/boards/crumpspace_crumps2/board.c create mode 100644 ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h create mode 100644 ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/crumpspace_crumps2/pins.c create mode 100644 ports/esp32s2/boards/crumpspace_crumps2/sdkconfig diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3cd9f6650e..d370fbffb7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -497,6 +497,7 @@ jobs: - "adafruit_metro_esp32s2" - "artisense_rd00" - "atmegazero_esp32s2" + - "crumpspace_crumps2" - "electroniccats_bastwifi" - "espressif_kaluga_1" - "espressif_kaluga_1.3" diff --git a/ports/esp32s2/boards/crumpspace_crumps2/board.c b/ports/esp32s2/boards/crumpspace_crumps2/board.c new file mode 100644 index 0000000000..e40b6335bc --- /dev/null +++ b/ports/esp32s2/boards/crumpspace_crumps2/board.c @@ -0,0 +1,52 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h b/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h new file mode 100644 index 0000000000..cda4e0e534 --- /dev/null +++ b/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h @@ -0,0 +1,35 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "CrumpS2" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk b/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk new file mode 100644 index 0000000000..cc8f48c611 --- /dev/null +++ b/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk @@ -0,0 +1,22 @@ +USB_VID = 0x239A +USB_PID = 0x80AC +USB_PRODUCT = "CrumpS2" +USB_MANUFACTURER = "CrumpSpace" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_BITBANG_APA102 = 1 + +CIRCUITPY_MODULE=wrover + +# Include these Python libraries in firmware. +# FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar diff --git a/ports/esp32s2/boards/crumpspace_crumps2/pins.c b/ports/esp32s2/boards/crumpspace_crumps2/pins.c new file mode 100644 index 0000000000..278f1ab7bd --- /dev/null +++ b/ports/esp32s2/boards/crumpspace_crumps2/pins.c @@ -0,0 +1,53 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // APA102 + + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, // APA102 + + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/crumpspace_crumps2/sdkconfig b/ports/esp32s2/boards/crumpspace_crumps2/sdkconfig new file mode 100644 index 0000000000..04b487625d --- /dev/null +++ b/ports/esp32s2/boards/crumpspace_crumps2/sdkconfig @@ -0,0 +1,39 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="CrumpS2" +# end of LWIP From 5f2cd41bf2fb5b0cc5b309b4396521b47b0a386c Mon Sep 17 00:00:00 2001 From: Tyler Crumpton Date: Sat, 31 Jul 2021 18:05:43 -0500 Subject: [PATCH 039/418] Update PID/VID to real values --- ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk b/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk index cc8f48c611..8eea211d6a 100644 --- a/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk +++ b/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x239A -USB_PID = 0x80AC +USB_VID = 0x1209 +USB_PID = 0x3141 USB_PRODUCT = "CrumpS2" USB_MANUFACTURER = "CrumpSpace" From 0afd863224c743914beaee948d4449fa896325dd Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sat, 31 Jul 2021 16:22:21 -0700 Subject: [PATCH 040/418] vectorio: palettes don't color dirty rectangles This is a breaking change with previous palette semantic with respect to python code that uses vectorio. Displayio has breaking changes in cpy 7 for Group's removal of max_size parameter so this is as good a time as any to break everything. Currently: To color vectorio shapes correctly you have to pass in a palette with length 2. Palette[0] must be set transparent and palette[1] must be the color you want. New: To color vectorio shapes correctly you pass in a palette with length >= 1. Palette[0] will be the color of the shape. Also improves pixels per second when skipping areas that aren't covered by the shape. --- shared-bindings/vectorio/VectorShape.c | 2 +- shared-module/vectorio/VectorShape.c | 30 ++++++++++++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index ae8532eb95..be24a056c9 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -21,7 +21,7 @@ //| class VectorShape: //| def __init__(self, shape: Union[Polygon, Rectangle, Circle], pixel_shader: Union[displayio.ColorConverter, displayio.Palette], x: int=0, y: int=0) -> None: -//| """Binds a vector shape to a location and pixel color +//| """Binds a vector shape to a location and pixel shader. The shader can be a displayio.Palette(1); it will be asked to color pixel value 0. //| //| :param shape: The shape to draw. //| :param pixel_shader: The pixel shader that produces colors from values diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index f0b6a725c1..87dc78d0c8 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -214,18 +214,30 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ #endif VECTORIO_SHAPE_PIXEL_DEBUG(" -> %d", input_pixel.pixel); - output_pixel.opaque = true; - if (self->pixel_shader == mp_const_none) { - output_pixel.pixel = input_pixel.pixel; - } else if (mp_obj_is_type(self->pixel_shader, &displayio_palette_type)) { - output_pixel.opaque = displayio_palette_get_color(self->pixel_shader, colorspace, input_pixel.pixel, &output_pixel.pixel); - } else if (mp_obj_is_type(self->pixel_shader, &displayio_colorconverter_type)) { - displayio_colorconverter_convert(self->pixel_shader, colorspace, &input_pixel, &output_pixel); - } - if (!output_pixel.opaque) { + // vectorio shapes use 0 to mean "area is not covered." + // We can skip all the rest of the work for this pixel if it's not currently covered by the shape. + if (input_pixel.pixel == 0) { VECTORIO_SHAPE_PIXEL_DEBUG(" (encountered transparent pixel; input area is not fully covered)\n"); full_coverage = false; } else { + // Pixel is not transparent. Let's pull the pixel value index down to 0-base for more error-resistant palettes. + input_pixel.pixel -= 1; + output_pixel.opaque = true; + + if (self->pixel_shader == mp_const_none) { + output_pixel.pixel = input_pixel.pixel; + } else if (mp_obj_is_type(self->pixel_shader, &displayio_palette_type)) { + output_pixel.opaque = displayio_palette_get_color(self->pixel_shader, colorspace, input_pixel.pixel, &output_pixel.pixel); + } else if (mp_obj_is_type(self->pixel_shader, &displayio_colorconverter_type)) { + displayio_colorconverter_convert(self->pixel_shader, colorspace, &input_pixel, &output_pixel); + } + + // We double-check this to fast-path the case when a pixel is not covered by the shape & not call the color converter unnecessarily. + if (output_pixel.opaque) { + VECTORIO_SHAPE_PIXEL_DEBUG(" (encountered transparent pixel from colorconverter; input area is not fully covered)\n"); + full_coverage = false; + } + *mask_doubleword |= 1u << mask_bit; if (colorspace->depth == 16) { VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %04x 16\n", output_pixel.pixel); From 1b67b91eddfc4222d2db3882fb889338b161d87b Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sat, 31 Jul 2021 16:59:44 -0700 Subject: [PATCH 041/418] fix inverted logic --- shared-module/vectorio/VectorShape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 87dc78d0c8..fb8ce963f1 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -233,7 +233,7 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ } // We double-check this to fast-path the case when a pixel is not covered by the shape & not call the color converter unnecessarily. - if (output_pixel.opaque) { + if (!output_pixel.opaque) { VECTORIO_SHAPE_PIXEL_DEBUG(" (encountered transparent pixel from colorconverter; input area is not fully covered)\n"); full_coverage = false; } From 09e6846135caff201c2d32509ceb7ffeb31cceea Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Mon, 2 Aug 2021 23:38:23 +0200 Subject: [PATCH 042/418] Fix empty boot_out.txt A pointer to the FIL structure was kept after it went out of scope. Apparently this happened to work until cf97793 added the `result` variable that clobbered it. Fixes #5062 --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 13caf4beb7..3904268ba4 100755 --- a/main.c +++ b/main.c @@ -633,11 +633,13 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { static const char * const boot_py_filenames[] = STRING_LIST("boot.py", "boot.txt"); bool skip_boot_output = false; + #ifdef CIRCUITPY_BOOT_OUTPUT_FILE + FIL file_pointer; + #endif if (ok_to_run) { #ifdef CIRCUITPY_BOOT_OUTPUT_FILE - FIL file_pointer; boot_output_file = &file_pointer; // Get the base filesystem. From 1e225610ccbbfe4de53735d2ef86ecedc7fd3b36 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 2 Aug 2021 18:37:19 -0700 Subject: [PATCH 043/418] Add ability to disable BLE workflow Call `supervisor.disable_ble_workflow()` and the BLE workflow will be disabled until the chip is reset. This also includes a couple fixes: 1. Terminals can now be deinit by setting the tilegrid to NULL. This prevents using the tilegrid before display is init. 2. Fix BLE serial send amount when sending more than a single packet. Fixes #5049 --- main.c | 1 + ports/nrf/Makefile | 2 +- shared-bindings/supervisor/__init__.c | 13 ++ shared-module/terminalio/Terminal.c | 6 +- supervisor/shared/bluetooth/bluetooth.c | 55 ++++++- supervisor/shared/bluetooth/bluetooth.h | 4 + supervisor/shared/bluetooth/serial.c | 2 +- supervisor/shared/display.c | 1 + tools/gen_display_resources.py | 2 +- tools/safe_mode_finder.py | 181 ++++++++++++++++++++++++ 10 files changed, 259 insertions(+), 8 deletions(-) create mode 100644 tools/safe_mode_finder.py diff --git a/main.c b/main.c index 13caf4beb7..1e6ecedf55 100755 --- a/main.c +++ b/main.c @@ -830,6 +830,7 @@ int __attribute__((used)) main(void) { serial_init(); #if CIRCUITPY_BLEIO + supervisor_bluetooth_enable_workflow(); supervisor_start_bluetooth(); #endif diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index ce74f5d203..30c257cc50 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -120,7 +120,7 @@ CFLAGS += \ # TODO: check this CFLAGS += -D__START=main -LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs +LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-z,max-page-size=0x1000 -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs LIBS := -lgcc -lc LDFLAGS += -mthumb -mcpu=cortex-m4 diff --git a/shared-bindings/supervisor/__init__.c b/shared-bindings/supervisor/__init__.c index 055b3a9084..0d73c2eb86 100644 --- a/shared-bindings/supervisor/__init__.c +++ b/shared-bindings/supervisor/__init__.c @@ -32,6 +32,7 @@ #include "lib/utils/interrupt_char.h" #include "supervisor/shared/autoreload.h" +#include "supervisor/shared/bluetooth/bluetooth.h" #include "supervisor/shared/status_leds.h" #include "supervisor/shared/stack.h" #include "supervisor/shared/traceback.h" @@ -283,6 +284,17 @@ STATIC mp_obj_t supervisor_get_previous_traceback(void) { } MP_DEFINE_CONST_FUN_OBJ_0(supervisor_get_previous_traceback_obj, supervisor_get_previous_traceback); +//| def disable_ble_workflow() -> None: +//| """Disable ble workflow until a reset. This prevents BLE advertising outside of the VM and +//| the services used for it.""" +//| ... +//| +STATIC mp_obj_t supervisor_disable_ble_workflow(void) { + supervisor_bluetooth_disable_workflow(); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_0(supervisor_disable_ble_workflow_obj, supervisor_disable_ble_workflow); + STATIC const mp_rom_map_elem_t supervisor_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_supervisor) }, { MP_ROM_QSTR(MP_QSTR_enable_autoreload), MP_ROM_PTR(&supervisor_enable_autoreload_obj) }, @@ -295,6 +307,7 @@ STATIC const mp_rom_map_elem_t supervisor_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_set_next_code_file), MP_ROM_PTR(&supervisor_set_next_code_file_obj) }, { MP_ROM_QSTR(MP_QSTR_ticks_ms), MP_ROM_PTR(&supervisor_ticks_ms_obj) }, { MP_ROM_QSTR(MP_QSTR_get_previous_traceback), MP_ROM_PTR(&supervisor_get_previous_traceback_obj) }, + { MP_ROM_QSTR(MP_QSTR_disable_ble_workflow), MP_ROM_PTR(&supervisor_disable_ble_workflow_obj) }, }; STATIC MP_DEFINE_CONST_DICT(supervisor_module_globals, supervisor_module_globals_table); diff --git a/shared-module/terminalio/Terminal.c b/shared-module/terminalio/Terminal.c index 8e4979ecad..48010aa650 100644 --- a/shared-module/terminalio/Terminal.c +++ b/shared-module/terminalio/Terminal.c @@ -46,6 +46,10 @@ void common_hal_terminalio_terminal_construct(terminalio_terminal_obj_t *self, d } size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, const byte *data, size_t len, int *errcode) { + // Make sure the terminal is initialized before we do anything with it. + if (self->tilegrid == NULL) { + return len; + } const byte *i = data; uint16_t start_y = self->cursor_y; while (i < data + len) { @@ -169,5 +173,5 @@ size_t common_hal_terminalio_terminal_write(terminalio_terminal_obj_t *self, con } bool common_hal_terminalio_terminal_ready_to_tx(terminalio_terminal_obj_t *self) { - return true; + return self->tilegrid != NULL; } diff --git a/supervisor/shared/bluetooth/bluetooth.c b/supervisor/shared/bluetooth/bluetooth.c index ade20a9f07..1db027bf7d 100644 --- a/supervisor/shared/bluetooth/bluetooth.c +++ b/supervisor/shared/bluetooth/bluetooth.c @@ -83,13 +83,27 @@ uint8_t circuitpython_scan_response_data[] = { #endif }; -bool boot_in_discovery_mode = false; -bool advertising = false; + +#if CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE +STATIC bool boot_in_discovery_mode = false; +STATIC bool advertising = false; +STATIC bool ble_started = false; + +#define WORKFLOW_UNSET 0 +#define WORKFLOW_ENABLED 1 +#define WORKFLOW_DISABLED 2 + +STATIC uint8_t workflow_state = WORKFLOW_UNSET; +STATIC bool was_connected = false; +#endif STATIC void supervisor_bluetooth_start_advertising(void) { #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE return; #else + if (workflow_state != WORKFLOW_ENABLED) { + return; + } bool is_connected = common_hal_bleio_adapter_get_connected(&common_hal_bleio_adapter_obj); if (is_connected) { return; @@ -211,8 +225,10 @@ void supervisor_bluetooth_init(void) { port_set_saved_word(reset_state); } -STATIC bool was_connected; void supervisor_bluetooth_background(void) { + if (!ble_started) { + return; + } bool is_connected = common_hal_bleio_adapter_get_connected(&common_hal_bleio_adapter_obj); if (was_connected && !is_connected) { #if CIRCUITPY_BLE_FILE_SERVICE @@ -235,6 +251,10 @@ void supervisor_start_bluetooth(void) { return; #endif + if (workflow_state != WORKFLOW_ENABLED) { + return; + } + common_hal_bleio_adapter_set_enabled(&common_hal_bleio_adapter_obj, true); #if CIRCUITPY_BLE_FILE_SERVICE @@ -245,7 +265,10 @@ void supervisor_start_bluetooth(void) { supervisor_start_bluetooth_serial(); #endif - // Kick off advertisments + // Mark as started so that the background call does something. + ble_started = true; + + // Kick off advertisements supervisor_bluetooth_background(); } @@ -254,7 +277,31 @@ void supervisor_stop_bluetooth(void) { return; #endif + if (!ble_started && workflow_state != WORKFLOW_ENABLED) { + return; + } + #if CIRCUITPY_SERIAL_BLE supervisor_stop_bluetooth_serial(); #endif } + +void supervisor_bluetooth_enable_workflow(void) { + #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE + return; + #endif + + if (workflow_state == WORKFLOW_DISABLED) { + return; + } + + workflow_state = WORKFLOW_ENABLED; +} + +void supervisor_bluetooth_disable_workflow(void) { + #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE + mp_raise_NotImplementedError(); + #endif + + workflow_state = WORKFLOW_DISABLED; +} diff --git a/supervisor/shared/bluetooth/bluetooth.h b/supervisor/shared/bluetooth/bluetooth.h index 577c0c76a1..9de82719a5 100644 --- a/supervisor/shared/bluetooth/bluetooth.h +++ b/supervisor/shared/bluetooth/bluetooth.h @@ -34,4 +34,8 @@ void supervisor_bluetooth_init(void); void supervisor_start_bluetooth(void); void supervisor_stop_bluetooth(void); +// Enable only works if it hasn't been set yet. +void supervisor_bluetooth_enable_workflow(void); +void supervisor_bluetooth_disable_workflow(void); + #endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_BLUETOOTH_H diff --git a/supervisor/shared/bluetooth/serial.c b/supervisor/shared/bluetooth/serial.c index d852a86d74..059f322649 100644 --- a/supervisor/shared/bluetooth/serial.c +++ b/supervisor/shared/bluetooth/serial.c @@ -166,7 +166,7 @@ void ble_serial_write(const char *text, size_t len) { } size_t sent = 0; while (sent < len) { - uint16_t packet_size = MIN(len, (size_t)common_hal_bleio_packet_buffer_get_outgoing_packet_length(&_tx_packet_buffer)); + uint16_t packet_size = MIN(len - sent, (size_t)common_hal_bleio_packet_buffer_get_outgoing_packet_length(&_tx_packet_buffer)); mp_int_t written = common_hal_bleio_packet_buffer_write(&_tx_packet_buffer, (const uint8_t *)text + sent, packet_size, NULL, 0); // Error, so we drop characters to transmit. if (written < 0) { diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index 6ee6c7386a..9cd4f18960 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -123,6 +123,7 @@ void supervisor_stop_terminal(void) { free_memory(tilegrid_tiles); tilegrid_tiles = NULL; supervisor_terminal_text_grid.tiles = NULL; + supervisor_terminal.tilegrid = NULL; } #endif } diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index 04ebc86579..b51c8a40e0 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -228,7 +228,7 @@ terminalio_terminal_obj_t supervisor_terminal = { .font = &supervisor_terminal_font, .cursor_x = 0, .cursor_y = 0, - .tilegrid = &supervisor_terminal_text_grid + .tilegrid = NULL }; """ ) diff --git a/tools/safe_mode_finder.py b/tools/safe_mode_finder.py new file mode 100644 index 0000000000..fece853127 --- /dev/null +++ b/tools/safe_mode_finder.py @@ -0,0 +1,181 @@ +# This uses pyocd to control a Cortex M core, set a breakpoint and dump the stack. +# It is expected that you modify it for your particular case. + +from pyocd.core.helpers import ConnectHelper +from pyocd.core.target import Target +from pyocd.debug.elf.symbols import ELFSymbolProvider +from pyocd.flash.file_programmer import FileProgrammer + +import logging + +# logging.basicConfig(level=logging.DEBUG) + +import sys +import time + +board = sys.argv[1] + +# Connect to the target. +with ConnectHelper.session_with_chosen_probe(target_override="nrf52840") as session: + target = session.target + + # Set ELF file on target. + filename = f"build-{board}/firmware.elf" + target.elf = filename + + e = target.elf._elf + + # Look up address of reset_into_safe_mode(). + provider = ELFSymbolProvider(target.elf) + addr = provider.get_symbol_value("reset_into_safe_mode") + print("reset_into_safe_mode() address: 0x%X" % addr) + + for section in target.elf.sections: + print(section) + print() + + print("loading", filename) + # FileProgrammer(session).program(filename, file_format="elf") + print("load done") + + # Set breakpoint. + target.set_breakpoint(addr) + # target.set_watchpoint(0x20010558, 4, Target.WatchpointType.WRITE) + + # Reset and run. + target.reset_and_halt() + for i in range(1): + target.resume() + + print("resuming") + start = time.monotonic() + # Wait 10s until breakpoint is hit. + while target.get_state() != Target.State.HALTED and time.monotonic() - start < 10: + pass + + # value = target.read_memory(0x20010558) + # print(f"{value:08x}") + + # time.sleep(2) + + target.halt() + + # print("_sidata", hex(provider.get_symbol_value("_sidata"))) + + # flash_start = 0x000affe8 + # ram_start = 0x20010000 + # for i in range(0, 0x55c, 4): + # flash_value = target.read_memory(flash_start + i) + # value = target.read_memory(ram_start + i) + # diff = "" + # if flash_value != value: + # diff = "*" + # print(f"{ram_start + i:08x} {flash_value:08x} {value:08x} {diff}") + + # Print PC. + pc = target.read_core_register("pc") + print("pc: 0x%X" % pc) + print(target.elf.symbol_decoder.get_symbol_for_address(pc)) + sp = target.read_core_register("sp") + print("sp: 0x%X" % sp) + msp = target.read_core_register("msp") + print("msp: 0x%X" % msp) + psp = target.read_core_register("psp") + print("psp: 0x%X" % psp) + + print(e.has_dwarf_info()) + d = e.get_dwarf_info() + # print(dir(d)) + aranges = d.get_aranges() + cu_offset = aranges.cu_offset_at_addr(pc) + if not cu_offset: + cu_offset = 0 + main_cu = d.get_CU_at(cu_offset) + lines = d.line_program_for_CU(main_cu).get_entries() + + lines_by_address = {} + for line in lines: + if not line.state: + # print(line) + continue + lines_by_address[line.state.address] = line.state + call_frames = None + # if d.has_CFI(): + # print("CFI") + # call_frames = d.CFI_entries() + # if d.has_EH_CFI(): + # print("EH CFI") + # call_frames = d.EH_CFI_entries() + all_frames = {} + # for frame in call_frames: + # decoded = frame.get_decoded() + # for entry in decoded.table: + # entry_pc = entry["pc"] + # all_frames[entry_pc] = decoded + # for r in d.range_lists().iter_range_lists(): + # print(r) + if pc in all_frames: + print(all_frames[pc]) + ad = target.elf.address_decoder + function = ad.get_function_for_address(pc) + if function: + print(" ", function) + line = ad.get_line_for_address(pc) + if line: + print(" ", line) + + mm = target.get_memory_map() + + ram = mm.get_region_for_address(sp) + if not ram: + sp_guess = 0x20013BCC + print("stack pointer bad using 0x{%08x}") + ram = mm.get_region_for_address(sp_guess) + stack_address = sp + offset = 0 + while ram and sp + offset <= ram.end: + stack_address = sp + offset + value = target.read_memory(stack_address) + symbol = target.elf.symbol_decoder.get_symbol_for_address(value) + print(f"{stack_address:08x} {offset:04x} {value:08x} {symbol}") + function = ad.get_function_for_address(value) + if function: + print(" ", function) + line = ad.get_line_for_address(value) + if line: + print(" ", line) + # value -= 0x27000 + # if value in all_frames: + # print(all_frames[value]) + # if value in lines_by_address: + # print(lines_by_address[value]) + offset += 4 + + top_symbol = target.elf.symbol_decoder.get_symbol_for_address(target.read_memory(sp)) + if True or (top_symbol and top_symbol.name == "HardFault_Handler"): + lr = target.read_core_register("lr") + print("lr: 0x%08X" % lr) + cfsr = target.read_memory(0xE000ED28) + print("cfsr: 0x%08X" % cfsr) + hfsr = target.read_memory(0xE000ED2C) + print("hfsr: 0x%08X" % hfsr) + if hfsr & 0x4000_0000: + print("hard fault forced") + bfsr = (cfsr >> 8) & 0xFF + if bfsr & 0x80 != 0: + bad_address = target.read_memory(0xE000ED38) + print(f"bus fault with address 0x{bad_address:08x}") + bits = ["IBUSERR", "PRECISERR", "IMPRECISERR", "UNSTKERR", "STKERR", "LSPERR"] + for i, bit in enumerate(bits): + if bfsr & (1 << i): + print(bit) + + for i in range(13): + reg = f"r{i}" + value = target.read_core_register(reg) + print(f"{reg} 0x{value:08x}") + + # print(hex(target.read_memory(provider.get_symbol_value("prescaler")))) + + # Remove breakpoint. + target.remove_breakpoint(addr) From 8607cdd7830220f5ad30fc62e367b0fc01596855 Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sun, 1 Aug 2021 13:01:57 -0700 Subject: [PATCH 044/418] vectorio: add draw protocol * Removes VectorShape from user python interactions * Re-integrates vectorio with displayio behind draw protocol implementations * Implements draw protocol with VectorShape * Composes VectorShape behaviors into Rectangle, Circle and Polygon * Fixes terrible pixel garbage being left behind * Improves redraw performance (heuristically) by tracking dirty area separately from current area. Known Issues: It does not work with transposed views. --- shared-bindings/vectorio/Circle.c | 36 ++++- shared-bindings/vectorio/Circle.h | 2 + shared-bindings/vectorio/Polygon.c | 36 ++++- shared-bindings/vectorio/Polygon.h | 2 + shared-bindings/vectorio/Rectangle.c | 36 ++++- shared-bindings/vectorio/Rectangle.h | 2 + shared-bindings/vectorio/VectorShape.c | 84 ++++++------ shared-bindings/vectorio/VectorShape.h | 14 +- shared-bindings/vectorio/__init__.c | 2 +- shared-bindings/vectorio/__init__.h | 41 ++++++ shared-module/displayio/Group.c | 51 ++++--- shared-module/vectorio/Circle.c | 5 + shared-module/vectorio/Circle.h | 1 + shared-module/vectorio/Polygon.c | 22 +-- shared-module/vectorio/Polygon.h | 1 + shared-module/vectorio/Rectangle.c | 11 +- shared-module/vectorio/Rectangle.h | 1 + shared-module/vectorio/VectorShape.c | 180 ++++++++++++++++--------- shared-module/vectorio/VectorShape.h | 3 +- 19 files changed, 374 insertions(+), 156 deletions(-) create mode 100644 shared-bindings/vectorio/__init__.h diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index 673a976687..d6edba7063 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -1,5 +1,6 @@ - +#include "shared-bindings/vectorio/__init__.h" #include "shared-bindings/vectorio/Circle.h" +#include "shared-bindings/vectorio/VectorShape.h" #include @@ -11,15 +12,21 @@ //| class Circle: //| -//| def __init__(self, radius: int) -> None: +//| def __init__(self, pixel_shader: Union[ColorConverter, Palette] radius: int, x: int, y: int) -> None: //| """Circle is positioned on screen by its center point. //| -//| :param radius: The radius of the circle in pixels""" +//| :param pixel_shader: The pixel shader that produces colors from values +//| :param radius: The radius of the circle in pixels +//| :param x: Initial x position of the axis. +//| :param y: Initial y position of the axis.""" //| static mp_obj_t vectorio_circle_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_radius }; + enum { ARG_pixel_shader, ARG_radius, ARG_x, ARG_y }; static const mp_arg_t allowed_args[] = { + { MP_QSTR_pixel_shader, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_radius, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_x, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, + { MP_QSTR_y, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -33,9 +40,22 @@ static mp_obj_t vectorio_circle_make_new(const mp_obj_type_t *type, size_t n_arg self->base.type = &vectorio_circle_type; common_hal_vectorio_circle_construct(self, radius); + // VectorShape parts + mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj; + int16_t x = args[ARG_x].u_int; + int16_t y = args[ARG_y].u_int; + mp_obj_t vector_shape = vectorio_vector_shape_make_new(self, pixel_shader, x, y); + self->draw_protocol_instance = vector_shape; + return MP_OBJ_FROM_PTR(self); } +STATIC const vectorio_draw_protocol_t circle_draw_protocol = { + MP_PROTO_IMPLEMENT(MP_QSTR_protocol_draw) + .draw_get_protocol_self = (draw_get_protocol_self_fun)common_hal_vectorio_circle_get_draw_protocol, + .draw_protocol_impl = &vectorio_vector_shape_draw_protocol_impl +}; + //| radius : int //| """The radius of the circle in pixels.""" @@ -62,13 +82,21 @@ const mp_obj_property_t vectorio_circle_radius_obj = { STATIC const mp_rom_map_elem_t vectorio_circle_locals_dict_table[] = { + // Properties { MP_ROM_QSTR(MP_QSTR_radius), MP_ROM_PTR(&vectorio_circle_radius_obj) }, + { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, + { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_circle_locals_dict, vectorio_circle_locals_dict_table); const mp_obj_type_t vectorio_circle_type = { { &mp_type_type }, .name = MP_QSTR_Circle, + .flags = MP_TYPE_FLAG_EXTENDED, .make_new = vectorio_circle_make_new, .locals_dict = (mp_obj_dict_t *)&vectorio_circle_locals_dict, + MP_TYPE_EXTENDED_FIELDS( + .protocol = &circle_draw_protocol, + ), }; diff --git a/shared-bindings/vectorio/Circle.h b/shared-bindings/vectorio/Circle.h index e8fc048eb8..37bbe9e65b 100644 --- a/shared-bindings/vectorio/Circle.h +++ b/shared-bindings/vectorio/Circle.h @@ -19,4 +19,6 @@ void common_hal_vectorio_circle_get_area(void *circle, displayio_area_t *out_are int16_t common_hal_vectorio_circle_get_radius(void *circle); void common_hal_vectorio_circle_set_radius(void *circle, int16_t radius); +mp_obj_t common_hal_vectorio_circle_get_draw_protocol(void *circle); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_CIRCLE_H diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index 23c7961ec7..261e7ae55e 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -1,6 +1,7 @@ - +#include "shared-bindings/vectorio/__init__.h" #include "shared-module/vectorio/__init__.h" #include "shared-bindings/vectorio/Polygon.h" +#include "shared-bindings/vectorio/VectorShape.h" #include @@ -16,15 +17,21 @@ //| class Polygon: -//| def __init__(self, points: List[Tuple[int, int]]) -> None: +//| def __init__(self, pixel_shader: Union[ColorConverter, Palette], points: List[Tuple[int, int]], x: int, y: int) -> None: //| """Represents a closed shape by ordered vertices //| -//| :param points: Vertices for the polygon""" +//| :param pixel_shader: The pixel shader that produces colors from values +//| :param points: Vertices for the polygon +//| :param x: Initial screen x position of the 0,0 origin in the points list. +//| :param y: Initial screen y position of the 0,0 origin in the points list.""" //| static mp_obj_t vectorio_polygon_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_points_list }; + enum { ARG_pixel_shader, ARG_points_list, ARG_x, ARG_y }; static const mp_arg_t allowed_args[] = { + { MP_QSTR_pixel_shader, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_points, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_x, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, + { MP_QSTR_y, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -38,9 +45,22 @@ static mp_obj_t vectorio_polygon_make_new(const mp_obj_type_t *type, size_t n_ar common_hal_vectorio_polygon_construct(self, args[ARG_points_list].u_obj); + // VectorShape parts + mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj; + int16_t x = args[ARG_x].u_int; + int16_t y = args[ARG_y].u_int; + mp_obj_t vector_shape = vectorio_vector_shape_make_new(self, pixel_shader, x, y); + self->draw_protocol_instance = vector_shape; + return MP_OBJ_FROM_PTR(self); } +STATIC const vectorio_draw_protocol_t polygon_draw_protocol = { + MP_PROTO_IMPLEMENT(MP_QSTR_protocol_draw) + .draw_get_protocol_self = (draw_get_protocol_self_fun)common_hal_vectorio_polygon_get_draw_protocol, + .draw_protocol_impl = &vectorio_vector_shape_draw_protocol_impl +}; + //| points: List[Tuple[int, int]] //| """Set a new look and shape for this polygon""" @@ -67,13 +87,21 @@ const mp_obj_property_t vectorio_polygon_points_obj = { }; STATIC const mp_rom_map_elem_t vectorio_polygon_locals_dict_table[] = { + // Properties { MP_ROM_QSTR(MP_QSTR_points), MP_ROM_PTR(&vectorio_polygon_points_obj) }, + { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, + { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_polygon_locals_dict, vectorio_polygon_locals_dict_table); const mp_obj_type_t vectorio_polygon_type = { { &mp_type_type }, .name = MP_QSTR_Polygon, + .flags = MP_TYPE_FLAG_EXTENDED, .make_new = vectorio_polygon_make_new, .locals_dict = (mp_obj_dict_t *)&vectorio_polygon_locals_dict, + MP_TYPE_EXTENDED_FIELDS( + .protocol = &polygon_draw_protocol, + ), }; diff --git a/shared-bindings/vectorio/Polygon.h b/shared-bindings/vectorio/Polygon.h index 5594fbec4a..68136be6bd 100644 --- a/shared-bindings/vectorio/Polygon.h +++ b/shared-bindings/vectorio/Polygon.h @@ -20,5 +20,7 @@ void common_hal_vectorio_polygon_get_area(void *polygon, displayio_area_t *out_a mp_obj_t common_hal_vectorio_polygon_get_points(vectorio_polygon_t *self); void common_hal_vectorio_polygon_set_points(vectorio_polygon_t *self, mp_obj_t points_list); +mp_obj_t common_hal_vectorio_polygon_get_draw_protocol(void *polygon); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_POLYGON_H diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index a50a8a14b3..98e38f0c6b 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -1,5 +1,7 @@ - +#include "shared-bindings/vectorio/__init__.h" #include "shared-bindings/vectorio/Rectangle.h" +#include "shared-module/vectorio/VectorShape.h" +#include "shared-bindings/vectorio/VectorShape.h" #include @@ -8,17 +10,23 @@ #include "supervisor/shared/translate.h" //| class Rectangle: -//| def __init__(self, width: int, height: int) -> None: +//| def __init__(self, pixel_shader: Union[ColorConverter, Palette], width: int, height: int, x: int, y: int) -> None: //| """Represents a rectangle by defining its bounds //| +//| :param pixel_shader: The pixel shader that produces colors from values //| :param width: The number of pixels wide -//| :param height: The number of pixels high""" +//| :param height: The number of pixels high +//| :param x: Initial x position of the top left corner. +//| :param y: Initial y position of the top left corner.""" //| static mp_obj_t vectorio_rectangle_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_width, ARG_height }; + enum { ARG_pixel_shader, ARG_width, ARG_height, ARG_x, ARG_y }; static const mp_arg_t allowed_args[] = { + { MP_QSTR_pixel_shader, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, { MP_QSTR_width, MP_ARG_REQUIRED | MP_ARG_INT }, { MP_QSTR_height, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_x, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, + { MP_QSTR_y, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -36,17 +44,37 @@ static mp_obj_t vectorio_rectangle_make_new(const mp_obj_type_t *type, size_t n_ self->base.type = &vectorio_rectangle_type; common_hal_vectorio_rectangle_construct(self, width, height); + // VectorShape parts + mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj; + int16_t x = args[ARG_x].u_int; + int16_t y = args[ARG_y].u_int; + mp_obj_t vector_shape = vectorio_vector_shape_make_new(self, pixel_shader, x, y); + self->draw_protocol_instance = vector_shape; + return MP_OBJ_FROM_PTR(self); } +STATIC const vectorio_draw_protocol_t rectangle_draw_protocol = { + MP_PROTO_IMPLEMENT(MP_QSTR_protocol_draw) + .draw_get_protocol_self = (draw_get_protocol_self_fun)common_hal_vectorio_rectangle_get_draw_protocol, + .draw_protocol_impl = &vectorio_vector_shape_draw_protocol_impl +}; STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = { + // Properties + { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, + { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_rectangle_locals_dict, vectorio_rectangle_locals_dict_table); const mp_obj_type_t vectorio_rectangle_type = { { &mp_type_type }, .name = MP_QSTR_Rectangle, + .flags = MP_TYPE_FLAG_EXTENDED, .make_new = vectorio_rectangle_make_new, .locals_dict = (mp_obj_dict_t *)&vectorio_rectangle_locals_dict, + MP_TYPE_EXTENDED_FIELDS( + .protocol = &rectangle_draw_protocol, + ), }; diff --git a/shared-bindings/vectorio/Rectangle.h b/shared-bindings/vectorio/Rectangle.h index bb461ed9d5..24b103c26e 100644 --- a/shared-bindings/vectorio/Rectangle.h +++ b/shared-bindings/vectorio/Rectangle.h @@ -12,4 +12,6 @@ uint32_t common_hal_vectorio_rectangle_get_pixel(void *rectangle, int16_t x, int void common_hal_vectorio_rectangle_get_area(void *rectangle, displayio_area_t *out_area); +mp_obj_t common_hal_vectorio_rectangle_get_draw_protocol(void *rectangle); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index be24a056c9..fc46eceec7 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -19,37 +19,16 @@ #include "supervisor/shared/translate.h" -//| class VectorShape: -//| def __init__(self, shape: Union[Polygon, Rectangle, Circle], pixel_shader: Union[displayio.ColorConverter, displayio.Palette], x: int=0, y: int=0) -> None: -//| """Binds a vector shape to a location and pixel shader. The shader can be a displayio.Palette(1); it will be asked to color pixel value 0. -//| -//| :param shape: The shape to draw. -//| :param pixel_shader: The pixel shader that produces colors from values -//| :param x: Initial x position of the center axis of the shape within the parent. -//| :param y: Initial y position of the center axis of the shape within the parent.""" -//| ... -//| -STATIC mp_obj_t vectorio_vector_shape_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_shape, ARG_pixel_shader, ARG_x, ARG_y }; - static const mp_arg_t allowed_args[] = { - { MP_QSTR_shape, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, - { MP_QSTR_pixel_shader, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, - { MP_QSTR_x, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, - { MP_QSTR_y, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, - }; - mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; - mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - - mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj; +// shape: The shape implementation to draw. +// pixel_shader: The pixel shader that produces colors from values. The shader can be a displayio.Palette(1); it will be asked to color pixel value 0. +// x: Initial x position of the center axis of the shape within the parent. +// y: Initial y position of the center axis of the shape within the parent.""" +mp_obj_t vectorio_vector_shape_make_new(const mp_obj_t shape, const mp_obj_t pixel_shader, int16_t x, int16_t y) { if (!mp_obj_is_type(pixel_shader, &displayio_colorconverter_type) && !mp_obj_is_type(pixel_shader, &displayio_palette_type)) { mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_pixel_shader); } - int16_t x = args[ARG_x].u_int; - int16_t y = args[ARG_y].u_int; - - mp_obj_t shape = args[ARG_shape].u_obj; vectorio_ishape_t ishape; // Wire up shape functions if (mp_obj_is_type(shape, &vectorio_polygon_type)) { @@ -92,18 +71,31 @@ STATIC mp_obj_t vectorio_vector_shape_make_new(const mp_obj_type_t *type, size_t return MP_OBJ_FROM_PTR(self); } +vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl = { + .draw_fill_area = (draw_fill_area_fun)vectorio_vector_shape_fill_area, + .draw_get_dirty_area = (draw_get_dirty_area_fun)vectorio_vector_shape_get_dirty_area, + .draw_update_transform = (draw_update_transform_fun)vectorio_vector_shape_update_transform, + .draw_finish_refresh = (draw_finish_refresh_fun)vectorio_vector_shape_finish_refresh, + .draw_get_refresh_areas = (draw_get_refresh_areas_fun)vectorio_vector_shape_get_refresh_areas, +}; + //| x: int //| """X position of the center point of the shape in the parent.""" //| -STATIC mp_obj_t vectorio_vector_shape_obj_get_x(mp_obj_t self_in) { - vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t vectorio_vector_shape_obj_get_x(mp_obj_t wrapper_shape) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + return MP_OBJ_NEW_SMALL_INT(common_hal_vectorio_vector_shape_get_x(self)); } MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_x_obj, vectorio_vector_shape_obj_get_x); -STATIC mp_obj_t vectorio_vector_shape_obj_set_x(mp_obj_t self_in, mp_obj_t x_obj) { - vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t vectorio_vector_shape_obj_set_x(mp_obj_t wrapper_shape, mp_obj_t x_obj) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); mp_int_t x = mp_obj_get_int(x_obj); common_hal_vectorio_vector_shape_set_x(self, x); @@ -122,14 +114,19 @@ const mp_obj_property_t vectorio_vector_shape_x_obj = { //| y: int //| """Y position of the center point of the shape in the parent.""" //| -STATIC mp_obj_t vectorio_vector_shape_obj_get_y(mp_obj_t self_in) { - vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t vectorio_vector_shape_obj_get_y(mp_obj_t wrapper_shape) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + return MP_OBJ_NEW_SMALL_INT(common_hal_vectorio_vector_shape_get_y(self)); } MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_y_obj, vectorio_vector_shape_obj_get_y); -STATIC mp_obj_t vectorio_vector_shape_obj_set_y(mp_obj_t self_in, mp_obj_t y_obj) { - vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t vectorio_vector_shape_obj_set_y(mp_obj_t wrapper_shape, mp_obj_t y_obj) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); mp_int_t y = mp_obj_get_int(y_obj); common_hal_vectorio_vector_shape_set_y(self, y); @@ -148,14 +145,20 @@ const mp_obj_property_t vectorio_vector_shape_y_obj = { //| pixel_shader: Union[displayio.ColorConverter, displayio.Palette] //| """The pixel shader of the shape.""" //| -STATIC mp_obj_t vectorio_vector_shape_obj_get_pixel_shader(mp_obj_t self_in) { - vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t vectorio_vector_shape_obj_get_pixel_shader(mp_obj_t wrapper_shape) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + return common_hal_vectorio_vector_shape_get_pixel_shader(self); } MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_pixel_shader_obj, vectorio_vector_shape_obj_get_pixel_shader); -STATIC mp_obj_t vectorio_vector_shape_obj_set_pixel_shader(mp_obj_t self_in, mp_obj_t pixel_shader) { - vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t vectorio_vector_shape_obj_set_pixel_shader(mp_obj_t wrapper_shape, mp_obj_t pixel_shader) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + if (!mp_obj_is_type(pixel_shader, &displayio_palette_type) && !mp_obj_is_type(pixel_shader, &displayio_colorconverter_type)) { mp_raise_TypeError(translate("pixel_shader must be displayio.Palette or displayio.ColorConverter")); } @@ -175,16 +178,11 @@ const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj = { STATIC const mp_rom_map_elem_t vectorio_vector_shape_locals_dict_table[] = { - // Properties - { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, - { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, - { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_vector_shape_locals_dict, vectorio_vector_shape_locals_dict_table); const mp_obj_type_t vectorio_vector_shape_type = { { &mp_type_type }, .name = MP_QSTR_VectorShape, - .make_new = vectorio_vector_shape_make_new, .locals_dict = (mp_obj_dict_t *)&vectorio_vector_shape_locals_dict, }; diff --git a/shared-bindings/vectorio/VectorShape.h b/shared-bindings/vectorio/VectorShape.h index fa11f73ffd..4cf2ae373b 100644 --- a/shared-bindings/vectorio/VectorShape.h +++ b/shared-bindings/vectorio/VectorShape.h @@ -1,11 +1,18 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H #define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H +#include "py/objproperty.h" + +#include "shared-bindings/vectorio/__init__.h" #include "shared-module/vectorio/VectorShape.h" #include "shared-module/displayio/area.h" extern const mp_obj_type_t vectorio_vector_shape_type; +// Python shared bindings constructor +mp_obj_t vectorio_vector_shape_make_new(const mp_obj_t shape, const mp_obj_t pixel_shader, int16_t x, int16_t y); + +// C data constructor void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, vectorio_ishape_t ishape, mp_obj_t pixel_shader, uint16_t x, uint16_t y); @@ -21,7 +28,12 @@ void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_in mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_pixel_shader(vectorio_vector_shape_t *self, mp_obj_t pixel_shader); - void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displayio_buffer_transform_t *group_transform); +// Composable property definition for shapes that use VectorShape +extern vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl; +extern const mp_obj_property_t vectorio_vector_shape_x_obj; +extern const mp_obj_property_t vectorio_vector_shape_y_obj; +extern const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj; + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H diff --git a/shared-bindings/vectorio/__init__.c b/shared-bindings/vectorio/__init__.c index 12fb4d72b1..556bfe59ec 100644 --- a/shared-bindings/vectorio/__init__.c +++ b/shared-bindings/vectorio/__init__.c @@ -16,7 +16,7 @@ STATIC const mp_rom_map_elem_t vectorio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_Circle), MP_ROM_PTR(&vectorio_circle_type) }, { MP_ROM_QSTR(MP_QSTR_Polygon), MP_ROM_PTR(&vectorio_polygon_type) }, { MP_ROM_QSTR(MP_QSTR_Rectangle), MP_ROM_PTR(&vectorio_rectangle_type) }, - { MP_ROM_QSTR(MP_QSTR_VectorShape), MP_ROM_PTR(&vectorio_vector_shape_type) }, +// { MP_ROM_QSTR(MP_QSTR_VectorShape), MP_ROM_PTR(&vectorio_vector_shape_type) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_module_globals, vectorio_module_globals_table); diff --git a/shared-bindings/vectorio/__init__.h b/shared-bindings/vectorio/__init__.h new file mode 100644 index 0000000000..a221224058 --- /dev/null +++ b/shared-bindings/vectorio/__init__.h @@ -0,0 +1,41 @@ +#ifndef SHARED_MODULE_VECTORIO__INIT__H +#define SHARED_MODULE_VECTORIO__INIT__H + +#include +#include + +#include "py/obj.h" +#include "py/proto.h" + +#include "shared-module/displayio/area.h" +#include "shared-module/displayio/Palette.h" + +// Returns the object on which the rest of the draw protocol methods are invoked. +typedef mp_obj_t (*draw_get_protocol_self_fun)(mp_obj_t protocol_container); + +typedef bool (*draw_fill_area_fun)(mp_obj_t draw_protocol_self, const _displayio_colorspace_t *colorspace, const displayio_area_t *area, uint32_t *mask, uint32_t *buffer); +typedef bool (*draw_get_dirty_area_fun)(mp_obj_t draw_protocol_self, displayio_area_t *current_dirty_area); +typedef void (*draw_update_transform_fun)(mp_obj_t draw_protocol_self, displayio_buffer_transform_t *group_transform); +typedef void (*draw_finish_refresh_fun)(mp_obj_t draw_protocol_self); +typedef displayio_area_t *(*draw_get_refresh_areas_fun)(mp_obj_t draw_protocol_self, displayio_area_t *tail); + +typedef struct _vectorio_draw_protocol_impl_t { + draw_fill_area_fun draw_fill_area; + draw_get_dirty_area_fun draw_get_dirty_area; + draw_update_transform_fun draw_update_transform; + draw_finish_refresh_fun draw_finish_refresh; + draw_get_refresh_areas_fun draw_get_refresh_areas; +} vectorio_draw_protocol_impl_t; + +// Draw protocol +typedef struct _vectorio_draw_protocol_t { + MP_PROTOCOL_HEAD // MP_QSTR_protocol_draw + + // Instance of the draw protocol + draw_get_protocol_self_fun draw_get_protocol_self; + + // Implementation functions for the draw protocol + vectorio_draw_protocol_impl_t *draw_protocol_impl; +} vectorio_draw_protocol_t; + +#endif diff --git a/shared-module/displayio/Group.c b/shared-module/displayio/Group.c index ec8ad7ba5a..b9179f0a00 100644 --- a/shared-module/displayio/Group.c +++ b/shared-module/displayio/Group.c @@ -144,10 +144,10 @@ static void _update_child_transforms(displayio_group_t *self) { for (size_t i = 0; i < self->members->len; i++) { mp_obj_t layer; #if CIRCUITPY_VECTORIO - layer = mp_obj_cast_to_native_base( - self->members->items[i], &vectorio_vector_shape_type); - if (layer != MP_OBJ_NULL) { - vectorio_vector_shape_update_transform(layer, &self->absolute_transform); + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]); + if (draw_protocol != NULL) { + layer = draw_protocol->draw_get_protocol_self(self->members->items[i]); + draw_protocol->draw_protocol_impl->draw_update_transform(layer, &self->absolute_transform); continue; } #endif @@ -241,15 +241,14 @@ void common_hal_displayio_group_set_y(displayio_group_t *self, mp_int_t y) { } static void _add_layer(displayio_group_t *self, mp_obj_t layer) { - mp_obj_t native_layer; #if CIRCUITPY_VECTORIO - native_layer = mp_obj_cast_to_native_base(layer, &vectorio_vector_shape_type); - if (native_layer != MP_OBJ_NULL) { - vectorio_vector_shape_update_transform(native_layer, &self->absolute_transform); + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, layer); + if (draw_protocol != NULL) { + draw_protocol->draw_protocol_impl->draw_update_transform(draw_protocol->draw_get_protocol_self(layer), &self->absolute_transform); return; } #endif - native_layer = mp_obj_cast_to_native_base(layer, &displayio_tilegrid_type); + mp_obj_t native_layer = mp_obj_cast_to_native_base(layer, &displayio_tilegrid_type); if (native_layer != MP_OBJ_NULL) { displayio_tilegrid_t *tilegrid = native_layer; if (tilegrid->in_group) { @@ -283,12 +282,12 @@ static void _remove_layer(displayio_group_t *self, size_t index) { displayio_area_t layer_area; bool rendered_last_frame = false; #if CIRCUITPY_VECTORIO - layer = mp_obj_cast_to_native_base( - self->members->items[index], &vectorio_vector_shape_type); - if (layer != MP_OBJ_NULL) { - bool has_dirty_area = vectorio_vector_shape_get_dirty_area(layer, &layer_area); + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[index]); + if (draw_protocol != NULL) { + layer = draw_protocol->draw_get_protocol_self(self->members->items[index]); + bool has_dirty_area = draw_protocol->draw_protocol_impl->draw_get_dirty_area(layer, &layer_area); rendered_last_frame = has_dirty_area; - vectorio_vector_shape_update_transform(layer, NULL); + draw_protocol->draw_protocol_impl->draw_update_transform(layer, NULL); } #endif layer = mp_obj_cast_to_native_base( @@ -362,10 +361,10 @@ bool displayio_group_fill_area(displayio_group_t *self, const _displayio_colorsp for (int32_t i = self->members->len - 1; i >= 0; i--) { mp_obj_t layer; #if CIRCUITPY_VECTORIO - layer = mp_obj_cast_to_native_base( - self->members->items[i], &vectorio_vector_shape_type); - if (layer != MP_OBJ_NULL) { - if (vectorio_vector_shape_fill_area(layer, colorspace, area, mask, buffer)) { + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]); + if (draw_protocol != NULL) { + layer = draw_protocol->draw_get_protocol_self(self->members->items[i]); + if (draw_protocol->draw_protocol_impl->draw_fill_area(layer, colorspace, area, mask, buffer)) { return true; } continue; @@ -396,10 +395,10 @@ void displayio_group_finish_refresh(displayio_group_t *self) { for (int32_t i = self->members->len - 1; i >= 0; i--) { mp_obj_t layer; #if CIRCUITPY_VECTORIO - layer = mp_obj_cast_to_native_base( - self->members->items[i], &vectorio_vector_shape_type); - if (layer != MP_OBJ_NULL) { - vectorio_vector_shape_finish_refresh(layer); + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]); + if (draw_protocol != NULL) { + layer = draw_protocol->draw_get_protocol_self(self->members->items[i]); + draw_protocol->draw_protocol_impl->draw_finish_refresh(layer); continue; } #endif @@ -427,10 +426,10 @@ displayio_area_t *displayio_group_get_refresh_areas(displayio_group_t *self, dis for (int32_t i = self->members->len - 1; i >= 0; i--) { mp_obj_t layer; #if CIRCUITPY_VECTORIO - layer = mp_obj_cast_to_native_base( - self->members->items[i], &vectorio_vector_shape_type); - if (layer != MP_OBJ_NULL) { - tail = vectorio_vector_shape_get_refresh_areas(layer, tail); + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]); + if (draw_protocol != NULL) { + layer = draw_protocol->draw_get_protocol_self(self->members->items[i]); + tail = draw_protocol->draw_protocol_impl->draw_get_refresh_areas(layer, tail); continue; } #endif diff --git a/shared-module/vectorio/Circle.c b/shared-module/vectorio/Circle.c index 9c74580650..6b4c441620 100644 --- a/shared-module/vectorio/Circle.c +++ b/shared-module/vectorio/Circle.c @@ -59,3 +59,8 @@ void common_hal_vectorio_circle_set_radius(void *obj, int16_t radius) { self->on_dirty.event(self->on_dirty.obj); } } + +mp_obj_t common_hal_vectorio_circle_get_draw_protocol(void *circle) { + vectorio_circle_t *self = circle; + return self->draw_protocol_instance; +} diff --git a/shared-module/vectorio/Circle.h b/shared-module/vectorio/Circle.h index d6a77b1667..106bca6a71 100644 --- a/shared-module/vectorio/Circle.h +++ b/shared-module/vectorio/Circle.h @@ -11,6 +11,7 @@ typedef struct { mp_obj_base_t base; uint16_t radius; vectorio_event_t on_dirty; + mp_obj_t draw_protocol_instance; } vectorio_circle_t; #endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_CIRCLE_H diff --git a/shared-module/vectorio/Polygon.c b/shared-module/vectorio/Polygon.c index 00af1e0d7e..db3deced2a 100644 --- a/shared-module/vectorio/Polygon.c +++ b/shared-module/vectorio/Polygon.c @@ -1,4 +1,3 @@ - #include "shared-module/vectorio/__init__.h" #include "shared-bindings/vectorio/Polygon.h" #include "shared-module/displayio/area.h" @@ -108,17 +107,17 @@ void common_hal_vectorio_polygon_get_area(void *polygon, displayio_area_t *area) int x = self->points_list[i]; ++i; int y = self->points_list[i]; - if (x <= area->x1) { - area->x1 = x - 1; + if (x < area->x1) { + area->x1 = x; } - if (y <= area->y1) { - area->y1 = y - 1; + if (y < area->y1) { + area->y1 = y; } - if (x >= area->x2) { - area->x2 = x + 1; + if (x > area->x2) { + area->x2 = x; } - if (y >= area->y2) { - area->y2 = y + 1; + if (y > area->y2) { + area->y2 = y; } } } @@ -167,3 +166,8 @@ uint32_t common_hal_vectorio_polygon_get_pixel(void *obj, int16_t x, int16_t y) } return winding_number == 0 ? 0 : 1; } + +mp_obj_t common_hal_vectorio_polygon_get_draw_protocol(void *polygon) { + vectorio_polygon_t *self = polygon; + return self->draw_protocol_instance; +} diff --git a/shared-module/vectorio/Polygon.h b/shared-module/vectorio/Polygon.h index 70de9036d7..21d32d3581 100644 --- a/shared-module/vectorio/Polygon.h +++ b/shared-module/vectorio/Polygon.h @@ -12,6 +12,7 @@ typedef struct { int *points_list; size_t len; vectorio_event_t on_dirty; + mp_obj_t draw_protocol_instance; } vectorio_polygon_t; #endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_POLYGON_H diff --git a/shared-module/vectorio/Rectangle.c b/shared-module/vectorio/Rectangle.c index 56be5ebb5e..17185ec7ab 100644 --- a/shared-module/vectorio/Rectangle.c +++ b/shared-module/vectorio/Rectangle.c @@ -12,10 +12,10 @@ void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_ uint32_t common_hal_vectorio_rectangle_get_pixel(void *obj, int16_t x, int16_t y) { vectorio_rectangle_t *self = obj; - if (x < 0 || x >= self->width || y >= self->height || y < 0) { - return 0; + if (x >= 0 && y >= 0 && x < self->width && y < self->height ) { + return 1; } - return 1; + return 0; } @@ -32,3 +32,8 @@ uint32_t common_hal_vectorio_rectangle_get_height(void *rectangle) { vectorio_rectangle_t *self = rectangle; return self->height; } + +mp_obj_t common_hal_vectorio_rectangle_get_draw_protocol(void *rectangle) { + vectorio_rectangle_t *self = rectangle; + return self->draw_protocol_instance; +} diff --git a/shared-module/vectorio/Rectangle.h b/shared-module/vectorio/Rectangle.h index 56342a6d76..e3cfbb2676 100644 --- a/shared-module/vectorio/Rectangle.h +++ b/shared-module/vectorio/Rectangle.h @@ -9,6 +9,7 @@ typedef struct { mp_obj_base_t base; uint16_t width; uint16_t height; + mp_obj_t draw_protocol_instance; } vectorio_rectangle_t; #endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_RECTANGLE_H diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index fb8ce963f1..929be46c0f 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -15,16 +15,16 @@ // Lifecycle actions. #define VECTORIO_SHAPE_DEBUG(...) (void)0 -// #define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__) +// #define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) // Used in both logging and ifdefs, for extra variables -// #define VECTORIO_PERF(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__) +// #define VECTORIO_PERF(...) mp_printf(&mp_plat_print, __VA_ARGS__) // Really verbose. #define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 -// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__) +// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) inline __attribute__((always_inline)) @@ -32,6 +32,11 @@ static int32_t max(int32_t a, int32_t b) { return a > b ? a : b; } +inline __attribute__((always_inline)) +static int32_t min(int32_t a, int32_t b) { + return a < b ? a : b; +} + inline __attribute__((always_inline)) static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *out_area) { @@ -39,48 +44,67 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou self->absolute_transform->x, self->absolute_transform->y, self->absolute_transform->dx, self->absolute_transform->dy, self->absolute_transform->scale, self->absolute_transform->width, self->absolute_transform->height, self->absolute_transform->mirror_x, self->absolute_transform->mirror_y, self->absolute_transform->transpose_xy ); - self->ishape.get_area(self->ishape.shape, out_area); - VECTORIO_SHAPE_DEBUG(" in:{(%5d,%5d), (%5d,%5d)}", out_area->x1, out_area->y1, out_area->x2, out_area->y2); - if (self->absolute_transform->transpose_xy) { - int16_t swap = out_area->x1; - out_area->x1 = (out_area->y1 + self->y) * self->absolute_transform->dx + self->absolute_transform->x; - out_area->y1 = (swap + self->x) * self->absolute_transform->dy + self->absolute_transform->y; - swap = out_area->x2; - out_area->x2 = (out_area->y2 + self->y) * self->absolute_transform->dx + self->absolute_transform->x; - out_area->y2 = (swap + self->x) * self->absolute_transform->dy + self->absolute_transform->y; - } else { - out_area->x1 = (out_area->x1 + self->x) * self->absolute_transform->dx + self->absolute_transform->x; - out_area->y1 = (out_area->y1 + self->y) * self->absolute_transform->dy + self->absolute_transform->y; - out_area->x2 = (out_area->x2 + self->x) * self->absolute_transform->dx + self->absolute_transform->x; - out_area->y2 = (out_area->y2 + self->y) * self->absolute_transform->dy + self->absolute_transform->y; - } - // We might have mirrored due to dx - displayio_area_canon(out_area); + displayio_area_t shape_area; + self->ishape.get_area(self->ishape.shape, &shape_area); + VECTORIO_SHAPE_DEBUG(" in:{(%5d,%5d), (%5d,%5d)}", shape_area.x1, shape_area.y1, shape_area.x2, shape_area.y2); + + displayio_area_shift( + &shape_area, + self->x * self->absolute_transform->dx + min(0, self->absolute_transform->dx * displayio_area_width(&shape_area)), + self->y * self->absolute_transform->dy + min(0, self->absolute_transform->dy * displayio_area_height(&shape_area)) + ); + + displayio_area_transform_within( + false, + false, + self->absolute_transform->transpose_xy, + &shape_area, &shape_area, out_area + ); + + displayio_area_shift( + out_area, + self->absolute_transform->x, + self->absolute_transform->y + ); + VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2); } // For use by Group to know where it needs to redraw on layer removal. bool vectorio_vector_shape_get_dirty_area(vectorio_vector_shape_t *self, displayio_area_t *out_area) { - displayio_area_copy(&self->ephemeral_dirty_area, out_area); + out_area->x1 = out_area->x2; + displayio_area_union( + &self->ephemeral_dirty_area, + &self->current_area, + out_area + ); return true; // For now just always redraw. } -// This must be invoked each time a shape changes its position or its shape in any way. +// This must be invoked after each time a shape changes its position, shape or appearance in any way. void common_hal_vectorio_vector_shape_set_dirty(void *vector_shape) { vectorio_vector_shape_t *self = vector_shape; // In screen space. Need to offset the shape space. displayio_area_t current_area; _get_screen_area(self, ¤t_area); - VECTORIO_SHAPE_DEBUG("%p shape_dirty current:{(%3d,%3d), (%3d,%3d)} dirty:{(%3d,%3d), (%3d,%3d)}", + VECTORIO_SHAPE_DEBUG("%p shape_dirty new:{(%3d,%3d), (%3d,%3d)} dirty:{(%3d,%3d), (%3d,%3d)}", self, current_area.x1, current_area.y1, current_area.x2, current_area.y2, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); - self->dirty = true; - // Dirty area tracks the shape's footprint between draws. It's reset on refresh finish, - displayio_area_union(&self->ephemeral_dirty_area, ¤t_area, &self->ephemeral_dirty_area); - VECTORIO_SHAPE_DEBUG(" -> expanded:{(%3d,%3d), (%3d,%3d)}\n", self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); + + bool moved = !displayio_area_equal(¤t_area, &self->current_area); + if (moved) { + displayio_area_union(&self->current_area, &self->ephemeral_dirty_area, &self->ephemeral_dirty_area); + VECTORIO_SHAPE_DEBUG(" stale:{(%3d,%3d), (%3d,%3d)} -> expanded:{(%3d,%3d), (%3d,%3d)}\n", + self->current_area.x1, self->current_area.y1, self->current_area.x2, self->current_area.y2, + self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); + + // Dirty area tracks the shape's footprint between draws. It's reset on refresh finish. + displayio_area_copy(¤t_area, &self->current_area); + } + self->current_area_dirty = true; } @@ -92,10 +116,11 @@ void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, self->y = y; self->pixel_shader = pixel_shader; self->ishape = ishape; - self->dirty = true; self->absolute_transform = &null_transform; // Critical to have a valid transform before getting screen area. - _get_screen_area(self, &self->ephemeral_dirty_area); + self->ephemeral_dirty_area.x1 = self->ephemeral_dirty_area.x2; // Cheat to set area to 0 self->ephemeral_dirty_area.next = NULL; + self->current_area_dirty = true; + _get_screen_area(self, &self->current_area); } @@ -153,13 +178,12 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ uint64_t start = common_hal_time_monotonic_ns(); uint64_t pixel_time = 0; #endif - displayio_area_t overlap; - VECTORIO_SHAPE_DEBUG("%p fill_area dirty:%d fill: {(%5d,%5d), (%5d,%5d)} dirty: {(%5d,%5d), (%5d,%5d)}", - self, self->dirty, - area->x1, area->y1, area->x2, area->y2, - self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2 + VECTORIO_SHAPE_DEBUG("%p fill_area: fill: {(%5d,%5d), (%5d,%5d)}", + self, + area->x1, area->y1, area->x2, area->y2 ); - if (!displayio_area_compute_overlap(area, &self->ephemeral_dirty_area, &overlap)) { + displayio_area_t overlap; + if (!displayio_area_compute_overlap(area, &self->current_area, &overlap)) { VECTORIO_SHAPE_DEBUG(" no overlap\n"); return false; } @@ -168,6 +192,11 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ bool full_coverage = displayio_area_equal(area, &overlap); uint8_t pixels_per_byte = 8 / colorspace->depth; + VECTORIO_SHAPE_DEBUG(" xy:(%3d %3d) tform:{x:%d y:%d dx:%d dy:%d scl:%d w:%d h:%d mx:%d my:%d tr:%d}", + self->x, self->y, + self->absolute_transform->x, self->absolute_transform->y, self->absolute_transform->dx, self->absolute_transform->dy, self->absolute_transform->scale, + self->absolute_transform->width, self->absolute_transform->height, self->absolute_transform->mirror_x, self->absolute_transform->mirror_y, self->absolute_transform->transpose_xy + ); uint32_t linestride_px = displayio_area_width(area); uint32_t line_dirty_offset_px = (overlap.y1 - area->y1) * linestride_px; @@ -178,6 +207,25 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ displayio_input_pixel_t input_pixel; displayio_output_pixel_t output_pixel; + int16_t math_transform_offset_x; + int16_t math_transform_offset_y; + int16_t math_shape_offset_x; + int16_t math_shape_offset_y; + if (self->absolute_transform->transpose_xy) { + math_transform_offset_x = self->absolute_transform->dy * self->y; + math_transform_offset_y = self->absolute_transform->dx * self->x; + math_shape_offset_x = min(0, self->absolute_transform->dy * displayio_area_width(&self->current_area)); + math_shape_offset_y = min(0, self->absolute_transform->dx * displayio_area_height(&self->current_area)); + } else { + math_transform_offset_x = self->absolute_transform->dx * self->x; + math_transform_offset_y = self->absolute_transform->dy * self->y; + math_shape_offset_x = min(0, self->absolute_transform->dx * displayio_area_width(&self->current_area)); + math_shape_offset_y = min(0, self->absolute_transform->dy * displayio_area_height(&self->current_area)); + } + + VECTORIO_SHAPE_DEBUG(", transform_offset: (%3d,%3d), shape_offset: (%3d,%3d)", math_transform_offset_x, math_transform_offset_y, math_shape_offset_x, math_shape_offset_y); + + uint32_t mask_start_px = line_dirty_offset_px; for (input_pixel.y = overlap.y1; input_pixel.y < overlap.y2; ++input_pixel.y) { mask_start_px += column_dirty_offset_px; @@ -186,9 +234,9 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ uint32_t pixel_index = mask_start_px + (input_pixel.x - overlap.x1); uint32_t *mask_doubleword = &(mask[pixel_index / 32]); uint8_t mask_bit = pixel_index % 32; - VECTORIO_SHAPE_PIXEL_DEBUG("%p pixel_index: %5u mask_bit: %2u", self, pixel_index, mask_bit); + VECTORIO_SHAPE_PIXEL_DEBUG("\n%p pixel_index: %5u mask_bit: %2u", self, pixel_index, mask_bit); if ((*mask_doubleword & (1u << mask_bit)) != 0) { - VECTORIO_SHAPE_PIXEL_DEBUG(" masked\n"); + VECTORIO_SHAPE_PIXEL_DEBUG(" masked"); continue; } output_pixel.pixel = 0; @@ -197,11 +245,11 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ int16_t pixel_to_get_x; int16_t pixel_to_get_y; if (self->absolute_transform->transpose_xy) { - pixel_to_get_x = (input_pixel.y - self->absolute_transform->dy * self->x - self->absolute_transform->y) / self->absolute_transform->dy; - pixel_to_get_y = (input_pixel.x - self->absolute_transform->dx * self->y - self->absolute_transform->x) / self->absolute_transform->dx; + pixel_to_get_x = (input_pixel.y - math_transform_offset_y - self->absolute_transform->y) - math_shape_offset_y; + pixel_to_get_y = (input_pixel.x - math_transform_offset_x - self->absolute_transform->x) - math_shape_offset_x; } else { - pixel_to_get_x = (input_pixel.x - self->absolute_transform->dx * self->x - self->absolute_transform->x) / self->absolute_transform->dx; - pixel_to_get_y = (input_pixel.y - self->absolute_transform->dy * self->y - self->absolute_transform->y) / self->absolute_transform->dy; + pixel_to_get_x = (input_pixel.x - math_transform_offset_x - self->absolute_transform->x) - math_shape_offset_x; + pixel_to_get_y = (input_pixel.y - math_transform_offset_y - self->absolute_transform->y) - math_shape_offset_y; } VECTORIO_SHAPE_PIXEL_DEBUG(" get_pixel %p (%3d, %3d) -> ( %3d, %3d )", self->ishape.shape, input_pixel.x, input_pixel.y, pixel_to_get_x, pixel_to_get_y); #ifdef VECTORIO_PERF @@ -217,7 +265,7 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ // vectorio shapes use 0 to mean "area is not covered." // We can skip all the rest of the work for this pixel if it's not currently covered by the shape. if (input_pixel.pixel == 0) { - VECTORIO_SHAPE_PIXEL_DEBUG(" (encountered transparent pixel; input area is not fully covered)\n"); + VECTORIO_SHAPE_PIXEL_DEBUG(" (encountered transparent pixel; input area is not fully covered)"); full_coverage = false; } else { // Pixel is not transparent. Let's pull the pixel value index down to 0-base for more error-resistant palettes. @@ -234,16 +282,16 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ // We double-check this to fast-path the case when a pixel is not covered by the shape & not call the color converter unnecessarily. if (!output_pixel.opaque) { - VECTORIO_SHAPE_PIXEL_DEBUG(" (encountered transparent pixel from colorconverter; input area is not fully covered)\n"); + VECTORIO_SHAPE_PIXEL_DEBUG(" (encountered transparent pixel from colorconverter; input area is not fully covered)"); full_coverage = false; } *mask_doubleword |= 1u << mask_bit; if (colorspace->depth == 16) { - VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %04x 16\n", output_pixel.pixel); + VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %04x 16", output_pixel.pixel); *(((uint16_t *)buffer) + pixel_index) = output_pixel.pixel; } else if (colorspace->depth == 8) { - VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %02x 8\n", output_pixel.pixel); + VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %02x 8", output_pixel.pixel); *(((uint8_t *)buffer) + pixel_index) = output_pixel.pixel; } else if (colorspace->depth < 8) { // Reorder the offsets to pack multiple rows into a byte (meaning they share a column). @@ -258,7 +306,7 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ // Reverse the shift by subtracting it from the leftmost shift. shift = (pixels_per_byte - 1) * colorspace->depth - shift; } - VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %2d %d\n", output_pixel.pixel, colorspace->depth); + VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %2d %d", output_pixel.pixel, colorspace->depth); ((uint8_t *)buffer)[pixel_index / pixels_per_byte] |= output_pixel.pixel << shift; } } @@ -277,20 +325,23 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ (double)(pixel_time / 1000.0 / pixels) ); #endif - VECTORIO_SHAPE_DEBUG(" -> pixels:%4d\n"); + VECTORIO_SHAPE_DEBUG(" -> pixels:%4d\n", (overlap.x2 - overlap.x1) * (overlap.y2 - overlap.y1)); return full_coverage; } void vectorio_vector_shape_finish_refresh(vectorio_vector_shape_t *self) { - if (!self->dirty) { + if (displayio_area_empty(&self->ephemeral_dirty_area)) { return; } VECTORIO_SHAPE_DEBUG("%p finish_refresh was:{(%3d,%3d), (%3d,%3d)}\n", self, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); - self->dirty = false; - // Reset dirty area tracking to current footprint - _get_screen_area(self, &self->ephemeral_dirty_area); + // Reset dirty area to nothing + self->ephemeral_dirty_area.x1 = self->ephemeral_dirty_area.x2; // Cheat to set area to empty self->ephemeral_dirty_area.next = NULL; + + self->current_area_dirty = false; // We don't clear current area so we can remember what to clean up if we move + self->current_area.next = NULL; + VECTORIO_SHAPE_DEBUG("%p finish_refresh now:{(%3d,%3d), (%3d,%3d)}\n", self, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); if (mp_obj_is_type(self->pixel_shader, &displayio_palette_type)) { @@ -303,21 +354,30 @@ void vectorio_vector_shape_finish_refresh(vectorio_vector_shape_t *self) { // Assembles a singly linked list of dirty areas from all components on the display. displayio_area_t *vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_t *self, displayio_area_t *tail) { - if (self->dirty + displayio_area_t *new_tail = tail; + if (!displayio_area_empty(&self->ephemeral_dirty_area)) { + // vector.add_to_head + self->ephemeral_dirty_area.next = tail; + new_tail = &self->ephemeral_dirty_area; + VECTORIO_SHAPE_DEBUG("%p get_refresh_area dirty: {(%3d,%3d), (%3d,%3d)}", self, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); + } + if (self->current_area_dirty || (mp_obj_is_type(self->pixel_shader, &displayio_palette_type) && displayio_palette_needs_refresh(self->pixel_shader)) || (mp_obj_is_type(self->pixel_shader, &displayio_colorconverter_type) && displayio_colorconverter_needs_refresh(self->pixel_shader)) ) { - VECTORIO_SHAPE_DEBUG("%p get_refresh_area dirty:%d {(%3d,%3d), (%3d,%3d)}", self, self->dirty, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); - common_hal_vectorio_vector_shape_set_dirty(self); - // vector.add_to_head - self->ephemeral_dirty_area.next = tail; - VECTORIO_SHAPE_DEBUG(" this_area: %p next: %p after: %p\n", &self->ephemeral_dirty_area, tail, tail == NULL ? NULL : tail->next); - return &self->ephemeral_dirty_area; + self->current_area.next = new_tail; + new_tail = &self->current_area; + VECTORIO_SHAPE_DEBUG(" redrawing current: {(%3d,%3d), (%3d,%3d)}", self->current_area.x1, self->current_area.y1, self->current_area.x2, self->current_area.y2); } - return tail; +#ifdef VECTORIO_SHAPE_DEBUG + if (new_tail != tail) { + VECTORIO_SHAPE_DEBUG("\n"); + } +#endif + return new_tail; } void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displayio_buffer_transform_t *group_transform) { - self->absolute_transform = group_transform == NULL ? &null_transform : group_transform; common_hal_vectorio_vector_shape_set_dirty(self); + self->absolute_transform = group_transform == NULL ? &null_transform : group_transform; } diff --git a/shared-module/vectorio/VectorShape.h b/shared-module/vectorio/VectorShape.h index 1896c72d6e..fdbae964a8 100644 --- a/shared-module/vectorio/VectorShape.h +++ b/shared-module/vectorio/VectorShape.h @@ -31,11 +31,12 @@ typedef struct { int16_t x; int16_t y; displayio_buffer_transform_t *absolute_transform; - bool dirty; // True if we need to draw // Tracks current shape footprint and expands outward as the shape dirties and changes. // This is suboptimal if you move your shape far. Could add more state to only redraw // exactly what we left behind. displayio_area_t ephemeral_dirty_area; + displayio_area_t current_area; + bool current_area_dirty; } vectorio_vector_shape_t; displayio_area_t *vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_t *self, displayio_area_t *tail); From 8c22993e284d234afe60376d752cfe5f239377fd Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Mon, 2 Aug 2021 20:38:37 -0700 Subject: [PATCH 045/418] fix linter --- shared-module/vectorio/Rectangle.c | 2 +- shared-module/vectorio/VectorShape.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shared-module/vectorio/Rectangle.c b/shared-module/vectorio/Rectangle.c index 17185ec7ab..2471daa608 100644 --- a/shared-module/vectorio/Rectangle.c +++ b/shared-module/vectorio/Rectangle.c @@ -12,7 +12,7 @@ void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_ uint32_t common_hal_vectorio_rectangle_get_pixel(void *obj, int16_t x, int16_t y) { vectorio_rectangle_t *self = obj; - if (x >= 0 && y >= 0 && x < self->width && y < self->height ) { + if (x >= 0 && y >= 0 && x < self->width && y < self->height) { return 1; } return 0; diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 929be46c0f..4406f20120 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -60,7 +60,7 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou self->absolute_transform->transpose_xy, &shape_area, &shape_area, out_area ); - + displayio_area_shift( out_area, self->absolute_transform->x, @@ -100,7 +100,7 @@ void common_hal_vectorio_vector_shape_set_dirty(void *vector_shape) { VECTORIO_SHAPE_DEBUG(" stale:{(%3d,%3d), (%3d,%3d)} -> expanded:{(%3d,%3d), (%3d,%3d)}\n", self->current_area.x1, self->current_area.y1, self->current_area.x2, self->current_area.y2, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); - + // Dirty area tracks the shape's footprint between draws. It's reset on refresh finish. displayio_area_copy(¤t_area, &self->current_area); } @@ -369,11 +369,11 @@ displayio_area_t *vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_ new_tail = &self->current_area; VECTORIO_SHAPE_DEBUG(" redrawing current: {(%3d,%3d), (%3d,%3d)}", self->current_area.x1, self->current_area.y1, self->current_area.x2, self->current_area.y2); } -#ifdef VECTORIO_SHAPE_DEBUG + #ifdef VECTORIO_SHAPE_DEBUG if (new_tail != tail) { VECTORIO_SHAPE_DEBUG("\n"); } -#endif + #endif return new_tail; } From 6663dacedb042c2f7aedc17ad2fd83fc7ca06906 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Tue, 3 Aug 2021 14:01:56 +0100 Subject: [PATCH 046/418] Added board configurations for Plasma and Interstate --- .github/workflows/build.yml | 2 + .../boards/pimoroni_interstate75/board.c | 40 +++++++++++++++ .../pimoroni_interstate75/mpconfigboard.h | 15 ++++++ .../pimoroni_interstate75/mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 1 + .../boards/pimoroni_interstate75/pins.c | 50 +++++++++++++++++++ .../boards/pimoroni_plasma2040/board.c | 40 +++++++++++++++ .../pimoroni_plasma2040/mpconfigboard.h | 26 ++++++++++ .../pimoroni_plasma2040/mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 1 + .../boards/pimoroni_plasma2040/pins.c | 37 ++++++++++++++ 11 files changed, 234 insertions(+) create mode 100644 ports/raspberrypi/boards/pimoroni_interstate75/board.c create mode 100644 ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/pimoroni_interstate75/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_interstate75/pins.c create mode 100644 ports/raspberrypi/boards/pimoroni_plasma2040/board.c create mode 100644 ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/pimoroni_plasma2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_plasma2040/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3cd9f6650e..473c81acd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -321,11 +321,13 @@ jobs: - "pewpew10" - "pewpew_m4" - "picoplanet" + - "pimoroni_interstate75" - "pimoroni_keybow2040" - "pimoroni_pga2040" - "pimoroni_picolipo_16mb" - "pimoroni_picolipo_4mb" - "pimoroni_picosystem" + - "pimoroni_plasma2040" - "pimoroni_tiny2040" - "pitaya_go" - "pyb_nano_v2" diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/board.c b/ports/raspberrypi/boards/pimoroni_interstate75/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_interstate75/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h new file mode 100644 index 0000000000..968f69ad7e --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h @@ -0,0 +1,15 @@ +#define MICROPY_HW_BOARD_NAME "Pimoroni Interstate 75" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define CIRCUITPY_RGB_STATUS_INVERTED_PWM +#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO16) +#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO17) +#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO18) + +#define MICROPY_HW_USER_SW (&pin_GPIO23) + +// These pins are unconnected +#define IGNORE_PIN_GPIO15 1 +#define IGNORE_PIN_GPIO22 1 +#define IGNORE_PIN_GPIO24 1 +#define IGNORE_PIN_GPIO25 1 diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk new file mode 100644 index 0000000000..a513a1df11 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x16D0 +USB_PID = 0x08C7 +USB_PRODUCT = "Interstate 75" +USB_MANUFACTURER = "Pimoroni" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_interstate75/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_interstate75/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c new file mode 100644 index 0000000000..db20e6ea52 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c @@ -0,0 +1,50 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_R0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_B0), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_R1), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_B1), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_ROW_A), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_ROW_B), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_ROW_C), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_ROW_D), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_ROW_E), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_LED_CLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_LED_STB), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_LED_OE), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_INT), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/board.c b/ports/raspberrypi/boards/pimoroni_plasma2040/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h new file mode 100644 index 0000000000..967267a8b4 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h @@ -0,0 +1,26 @@ +#define MICROPY_HW_BOARD_NAME "Pimoroni Plasma 2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define CIRCUITPY_RGB_STATUS_INVERTED_PWM +#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO16) +#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO17) +#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO18) + +#define MICROPY_HW_USER_SW (&pin_GPIO23) + +// These pins are unconnected +#define IGNORE_PIN_GPIO0 1 +#define IGNORE_PIN_GPIO1 1 +#define IGNORE_PIN_GPIO2 1 +#define IGNORE_PIN_GPIO3 1 +#define IGNORE_PIN_GPIO4 1 +#define IGNORE_PIN_GPIO5 1 +#define IGNORE_PIN_GPIO6 1 +#define IGNORE_PIN_GPIO7 1 +#define IGNORE_PIN_GPIO8 1 +#define IGNORE_PIN_GPIO9 1 +#define IGNORE_PIN_GPIO10 1 +#define IGNORE_PIN_GPIO11 1 +#define IGNORE_PIN_GPIO22 1 +#define IGNORE_PIN_GPIO24 1 +#define IGNORE_PIN_GPIO25 1 diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk new file mode 100644 index 0000000000..3b2ef47fe8 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x16D0 +USB_PID = 0x08C7 +USB_PRODUCT = "Plasma 2040" +USB_MANUFACTURER = "Pimoroni" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_plasma2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c new file mode 100644 index 0000000000..799683378c --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c @@ -0,0 +1,37 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_SW_B), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_DATA), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_INT), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 464281b881d6a1ff09919be23c16f1a5ae2f66de Mon Sep 17 00:00:00 2001 From: Kenny Date: Tue, 3 Aug 2021 08:08:11 -0700 Subject: [PATCH 047/418] Stub comma --- shared-bindings/vectorio/Circle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index d6edba7063..cf4e643662 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -12,7 +12,7 @@ //| class Circle: //| -//| def __init__(self, pixel_shader: Union[ColorConverter, Palette] radius: int, x: int, y: int) -> None: +//| def __init__(self, pixel_shader: Union[ColorConverter, Palette], radius: int, x: int, y: int) -> None: //| """Circle is positioned on screen by its center point. //| //| :param pixel_shader: The pixel shader that produces colors from values From ac4b10bcd9a4700f3aa90732bdb90d00a322018e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Aug 2021 09:59:04 -0500 Subject: [PATCH 048/418] It's "shared-module", not "shared-modules" --- docs/common_hal.md | 2 +- ports/atmel-samd/Makefile | 2 +- ports/nrf/Makefile | 2 +- ports/raspberrypi/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/common_hal.md b/docs/common_hal.md index 024c1582c2..b5ce834343 100644 --- a/docs/common_hal.md +++ b/docs/common_hal.md @@ -7,7 +7,7 @@ These instructions also apply to `analogio`, `busio`, `pulseio` and `touchio`. M Common HAL related files are found in these locations: * `shared-bindings` Shared home for the Python <-> C bindings which includes inline RST documentation for the created interfaces. The common hal functions are defined in the .h files of the corresponding C files. -* `shared-modules` Shared home for C code built on the Common HAL and used by all ports. This code only uses `common_hal` methods defined in `shared-bindings`. +* `shared-module` Shared home for C code built on the Common HAL and used by all ports. This code only uses `common_hal` methods defined in `shared-bindings`. * `/common-hal` Port-specific implementation of the Common HAL. Each folder has the substructure of / and they should match 1:1. `__init__.c` is used for module globals that are not classes (similar to `__init__.py`). diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 291b515e80..14fc9d43b9 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -340,7 +340,7 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) # There may be duplicates between SRC_COMMON_HAL_EXPANDED and SRC_SHARED_MODULE_EXPANDED, -# because a few modules have files both in common-hal/ and shared-modules/. +# because a few modules have files both in common-hal/ and shared-module/. # Doing a $(sort ...) removes duplicates as part of sorting. SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index ce74f5d203..ac954707eb 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -191,7 +191,7 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) # There may be duplicates between SRC_COMMON_HAL_EXPANDED and SRC_SHARED_MODULE_EXPANDED, -# because a few modules have files both in common-hal/ and shared-modules/. +# because a few modules have files both in common-hal/ and shared-module/. # Doing a $(sort ...) removes duplicates as part of sorting. SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 840b723398..926c8de9fd 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -213,7 +213,7 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) # There may be duplicates between SRC_COMMON_HAL_EXPANDED and SRC_SHARED_MODULE_EXPANDED, -# because a few modules have files both in common-hal/ and shared-modules/. +# because a few modules have files both in common-hal/ and shared-module/. # Doing a $(sort ...) removes duplicates as part of sorting. SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) From 739ef92fc95f48d98b77a4746b83022b8382685e Mon Sep 17 00:00:00 2001 From: Kenny Date: Tue, 3 Aug 2021 09:20:02 -0700 Subject: [PATCH 049/418] Update __init__.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit More random spaces. Why isn’t this in a pre-commit check --- shared-bindings/vectorio/__init__.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/vectorio/__init__.h b/shared-bindings/vectorio/__init__.h index a221224058..a34195de26 100644 --- a/shared-bindings/vectorio/__init__.h +++ b/shared-bindings/vectorio/__init__.h @@ -30,7 +30,7 @@ typedef struct _vectorio_draw_protocol_impl_t { // Draw protocol typedef struct _vectorio_draw_protocol_t { MP_PROTOCOL_HEAD // MP_QSTR_protocol_draw - + // Instance of the draw protocol draw_get_protocol_self_fun draw_get_protocol_self; From 48ea81e2f1660e6bdf05252ee059a79c84097881 Mon Sep 17 00:00:00 2001 From: Kenny Date: Tue, 3 Aug 2021 11:25:31 -0700 Subject: [PATCH 051/418] Vexing pedantry Spaces deleted from phone Eternal chore, lint --- shared-bindings/vectorio/VectorShape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index fc46eceec7..979651bd4a 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -87,7 +87,7 @@ STATIC mp_obj_t vectorio_vector_shape_obj_get_x(mp_obj_t wrapper_shape) { // Relies on the fact that only vector_shape impl gets matched with a VectorShape. const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); - + return MP_OBJ_NEW_SMALL_INT(common_hal_vectorio_vector_shape_get_x(self)); } MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_x_obj, vectorio_vector_shape_obj_get_x); From dfc992b7be03685e060cd30941566638ec59b3e4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Aug 2021 13:39:57 -0500 Subject: [PATCH 052/418] Make it easier to disable wifi --- ports/esp32s2/mpconfigport.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index 9f48e62568..85b3b81910 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -31,7 +31,7 @@ CIRCUITPY_ROTARYIO = 1 CIRCUITPY_NVM = 1 CIRCUITPY_PS2IO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 -CIRCUITPY_WIFI = 1 +CIRCUITPY_WIFI ?= 1 CIRCUITPY_WATCHDOG ?= 1 CIRCUITPY_ESPIDF = 1 From 38f392f3187d03560edd793af91f6bee3d3ea78c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Aug 2021 12:41:03 -0500 Subject: [PATCH 053/418] esp32s2: Increase C stack size The QR decoder has a single item that is 8908 bytes big and placed on the stack. (struct datastream) Without enlarging the stack, this will reliably crash. --- ports/esp32s2/esp-idf-config/sdkconfig.defaults | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/esp-idf-config/sdkconfig.defaults b/ports/esp32s2/esp-idf-config/sdkconfig.defaults index cc59e2a7ed..35e0846a7f 100644 --- a/ports/esp32s2/esp-idf-config/sdkconfig.defaults +++ b/ports/esp32s2/esp-idf-config/sdkconfig.defaults @@ -275,7 +275,7 @@ CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y CONFIG_ESP_ERR_TO_NAME_LOOKUP=y CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 CONFIG_ESP_CONSOLE_UART_DEFAULT=y @@ -806,7 +806,7 @@ CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y CONFIG_ADC2_DISABLE_DAC=y CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_MAIN_TASK_STACK_SIZE=8192 +CONFIG_MAIN_TASK_STACK_SIZE=16384 CONFIG_IPC_TASK_STACK_SIZE=1024 CONFIG_CONSOLE_UART_DEFAULT=y # CONFIG_CONSOLE_UART_CUSTOM is not set From 713c8e7b3fd7dfd0af25a611dab4fa4f276767a4 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 3 Aug 2021 14:36:41 -0700 Subject: [PATCH 054/418] Fix builds without the ble workflow --- shared-bindings/supervisor/__init__.c | 4 +++ supervisor/shared/bluetooth/bluetooth.c | 38 +++++++++++-------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/shared-bindings/supervisor/__init__.c b/shared-bindings/supervisor/__init__.c index 0d73c2eb86..05d3827489 100644 --- a/shared-bindings/supervisor/__init__.c +++ b/shared-bindings/supervisor/__init__.c @@ -290,7 +290,11 @@ MP_DEFINE_CONST_FUN_OBJ_0(supervisor_get_previous_traceback_obj, supervisor_get_ //| ... //| STATIC mp_obj_t supervisor_disable_ble_workflow(void) { + #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE + mp_raise_NotImplementedError(NULL); + #else supervisor_bluetooth_disable_workflow(); + #endif return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_0(supervisor_disable_ble_workflow_obj, supervisor_disable_ble_workflow); diff --git a/supervisor/shared/bluetooth/bluetooth.c b/supervisor/shared/bluetooth/bluetooth.c index 1db027bf7d..7762a5655d 100644 --- a/supervisor/shared/bluetooth/bluetooth.c +++ b/supervisor/shared/bluetooth/bluetooth.c @@ -95,12 +95,8 @@ STATIC bool ble_started = false; STATIC uint8_t workflow_state = WORKFLOW_UNSET; STATIC bool was_connected = false; -#endif STATIC void supervisor_bluetooth_start_advertising(void) { - #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE - return; - #else if (workflow_state != WORKFLOW_ENABLED) { return; } @@ -144,16 +140,15 @@ STATIC void supervisor_bluetooth_start_advertising(void) { NULL); // This may fail if we are already advertising. advertising = status == NRF_SUCCESS; - #endif } +#endif // CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE + #define BLE_DISCOVERY_DATA_GUARD 0xbb0000bb #define BLE_DISCOVERY_DATA_GUARD_MASK 0xff0000ff void supervisor_bluetooth_init(void) { - #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE - return; - #endif + #if CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE uint32_t reset_state = port_get_saved_word(); uint32_t ble_mode = 0; if ((reset_state & BLE_DISCOVERY_DATA_GUARD_MASK) == BLE_DISCOVERY_DATA_GUARD) { @@ -223,9 +218,11 @@ void supervisor_bluetooth_init(void) { status_led_deinit(); #endif port_set_saved_word(reset_state); + #endif } void supervisor_bluetooth_background(void) { + #if CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE if (!ble_started) { return; } @@ -244,12 +241,11 @@ void supervisor_bluetooth_background(void) { #if CIRCUITPY_BLE_FILE_SERVICE supervisor_bluetooth_file_transfer_background(); #endif + #endif } void supervisor_start_bluetooth(void) { - #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE - return; - #endif + #if CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE if (workflow_state != WORKFLOW_ENABLED) { return; @@ -270,12 +266,12 @@ void supervisor_start_bluetooth(void) { // Kick off advertisements supervisor_bluetooth_background(); + + #endif } void supervisor_stop_bluetooth(void) { - #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE - return; - #endif + #if CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE if (!ble_started && workflow_state != WORKFLOW_ENABLED) { return; @@ -284,24 +280,22 @@ void supervisor_stop_bluetooth(void) { #if CIRCUITPY_SERIAL_BLE supervisor_stop_bluetooth_serial(); #endif + + #endif } void supervisor_bluetooth_enable_workflow(void) { - #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE - return; - #endif - + #if CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE if (workflow_state == WORKFLOW_DISABLED) { return; } workflow_state = WORKFLOW_ENABLED; + #endif } void supervisor_bluetooth_disable_workflow(void) { - #if !CIRCUITPY_BLE_FILE_SERVICE && !CIRCUITPY_SERIAL_BLE - mp_raise_NotImplementedError(); - #endif - + #if CIRCUITPY_BLE_FILE_SERVICE || CIRCUITPY_SERIAL_BLE workflow_state = WORKFLOW_DISABLED; + #endif } From d35af506a50d97f26ff3115e8ed35696ec2b9eef Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:16:26 +0530 Subject: [PATCH 055/418] ci: add `print failure info` --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3cd9f6650e..8b27ef12bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,6 +79,10 @@ jobs: - name: Test all run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 working-directory: tests + - name: Print failure info + run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --print-failures + if: failure() + working-directory: tests - name: Native Tests run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --emit native working-directory: tests From 193a8d2e67a93b5ce62523d021713fe3a8c08988 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:00:48 +0530 Subject: [PATCH 056/418] add traceback object --- lib/utils/pyexec.c | 2 +- py/mpstate.h | 5 +++ py/obj.h | 2 + py/objexcept.c | 69 +++++++++++++++++------------ py/objexcept.h | 5 +-- py/objgenerator.c | 2 +- py/objtraceback.c | 42 ++++++++++++++++++ py/objtraceback.h | 39 ++++++++++++++++ py/py.cmake | 1 + py/py.mk | 1 + py/runtime.c | 9 ++-- py/scheduler.c | 2 +- shared-bindings/watchdog/__init__.c | 4 +- 13 files changed, 139 insertions(+), 44 deletions(-) create mode 100644 py/objtraceback.c create mode 100644 py/objtraceback.h diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index 2651189915..b3c1ac34bb 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -242,7 +242,7 @@ STATIC mp_uint_t mp_reader_stdin_readbyte(void *data) { mp_hal_stdout_tx_strn("\x04", 1); // indicate end to host if (c == CHAR_CTRL_C) { #if MICROPY_KBD_EXCEPTION - MP_STATE_VM(mp_kbd_exception).traceback_data = NULL; + MP_STATE_VM(mp_kbd_exception).traceback->data = NULL; nlr_raise(MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception))); #else mp_raise_type(&mp_type_KeyboardInterrupt); diff --git a/py/mpstate.h b/py/mpstate.h index 423463109d..9f7d72a686 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -120,6 +120,9 @@ typedef struct _mp_state_vm_t { qstr_pool_t *last_pool; + // non-heap memory for creating a traceback if we can't allocate RAM + mp_obj_traceback_t mp_emergency_traceback_obj; + // non-heap memory for creating an exception if we can't allocate RAM mp_obj_exception_t mp_emergency_exception_obj; @@ -137,6 +140,8 @@ typedef struct _mp_state_vm_t { #if MICROPY_KBD_EXCEPTION // exception object of type KeyboardInterrupt mp_obj_exception_t mp_kbd_exception; + // traceback object to store traceback + mp_obj_traceback_t mp_kbd_traceback; #endif // exception object of type ReloadException diff --git a/py/obj.h b/py/obj.h index b259128a2a..b91932b11e 100644 --- a/py/obj.h +++ b/py/obj.h @@ -692,6 +692,7 @@ extern const mp_obj_type_t mp_type_bytearray; extern const mp_obj_type_t mp_type_memoryview; extern const mp_obj_type_t mp_type_float; extern const mp_obj_type_t mp_type_complex; +extern const mp_obj_type_t mp_type_traceback; extern const mp_obj_type_t mp_type_tuple; extern const mp_obj_type_t mp_type_list; extern const mp_obj_type_t mp_type_map; // map (the python builtin, not the dict implementation detail) @@ -791,6 +792,7 @@ extern const struct _mp_obj_bool_t mp_const_true_obj; extern const struct _mp_obj_str_t mp_const_empty_bytes_obj; extern const struct _mp_obj_tuple_t mp_const_empty_tuple_obj; extern const struct _mp_obj_dict_t mp_const_empty_dict_obj; +extern const struct _mp_obj_traceback_t mp_const_empty_traceback_obj; extern const struct _mp_obj_singleton_t mp_const_ellipsis_obj; extern const struct _mp_obj_singleton_t mp_const_notimplemented_obj; extern const struct _mp_obj_exception_t mp_const_GeneratorExit_obj; diff --git a/py/objexcept.c b/py/objexcept.c index d5a858a442..6488413115 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -156,7 +156,15 @@ mp_obj_t mp_obj_exception_make_new(const mp_obj_type_t *type, size_t n_args, con // Populate the exception object o_exc->base.type = type; - o_exc->traceback_data = NULL; + + // Try to allocate memory for the traceback, with fallback to emergency traceback object + o_exc->traceback = m_new_obj_maybe(mp_obj_traceback_t); + if (o_exc->traceback == NULL) { + o_exc->traceback = &MP_STATE_VM(mp_emergency_traceback_obj); + } + + // Populate the traceback object + *o_exc->traceback = mp_const_empty_traceback_obj; mp_obj_tuple_t *o_tuple; if (n_args == 0) { @@ -208,22 +216,25 @@ void mp_obj_exception_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_obj_exception_t *self = MP_OBJ_TO_PTR(self_in); if (dest[0] != MP_OBJ_NULL) { // store/delete attribute - if (attr == MP_QSTR___traceback__ && dest[1] == mp_const_none) { - // We allow 'exc.__traceback__ = None' assignment as low-level - // optimization of pre-allocating exception instance and raising - // it repeatedly - this avoids memory allocation during raise. - // However, uPy will keep adding traceback entries to such - // exception instance, so before throwing it, traceback should - // be cleared like above. - self->traceback_len = 0; + if (attr == MP_QSTR___traceback__) { + if (dest[1] == mp_const_none) { + self->traceback->data = NULL; + } else { + if (!mp_obj_is_type(dest[1], &mp_type_traceback)) { + mp_raise_TypeError(MP_ERROR_TEXT("invalid traceback")); + } + self->traceback = MP_OBJ_TO_PTR(dest[1]); + } dest[0] = MP_OBJ_NULL; // indicate success } return; } if (attr == MP_QSTR_args) { dest[0] = MP_OBJ_FROM_PTR(self->args); - } else if (self->base.type == &mp_type_StopIteration && attr == MP_QSTR_value) { + } else if (attr == MP_QSTR_value && self->base.type == &mp_type_StopIteration) { dest[0] = mp_obj_exception_get_value(self_in); + } else if (attr == MP_QSTR___traceback__) { + dest[0] = (self->traceback->data) ? MP_OBJ_FROM_PTR(self->traceback) : mp_const_none; #if MICROPY_CPYTHON_COMPAT } else if (mp_obj_is_subclass_fast(MP_OBJ_FROM_PTR(self->base.type), MP_OBJ_FROM_PTR(&mp_type_OSError))) { if (attr == MP_QSTR_errno) { @@ -552,7 +563,7 @@ void mp_obj_exception_clear_traceback(mp_obj_t self_in) { GET_NATIVE_EXCEPTION(self, self_in); // just set the traceback to the null object // we don't want to call any memory management functions here - self->traceback_data = NULL; + self->traceback->data = NULL; } void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, size_t line, qstr block) { @@ -561,16 +572,16 @@ void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, size_t line, qs // append this traceback info to traceback data // if memory allocation fails (eg because gc is locked), just return - if (self->traceback_data == NULL) { - self->traceback_data = m_new_maybe(size_t, TRACEBACK_ENTRY_LEN); - if (self->traceback_data == NULL) { + if (self->traceback->data == NULL) { + self->traceback->data = m_new_maybe(size_t, TRACEBACK_ENTRY_LEN); + if (self->traceback->data == NULL) { #if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF if (mp_emergency_exception_buf_size >= (mp_int_t)(EMG_BUF_TRACEBACK_OFFSET + EMG_BUF_TRACEBACK_SIZE)) { // There is room in the emergency buffer for traceback data size_t *tb = (size_t *)((uint8_t *)MP_STATE_VM(mp_emergency_exception_buf) + EMG_BUF_TRACEBACK_OFFSET); - self->traceback_data = tb; - self->traceback_alloc = EMG_BUF_TRACEBACK_SIZE / sizeof(size_t); + self->traceback->data = tb; + self->traceback->alloc = EMG_BUF_TRACEBACK_SIZE / sizeof(size_t); } else { // Can't allocate and no room in emergency buffer return; @@ -581,28 +592,28 @@ void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, size_t line, qs #endif } else { // Allocated the traceback data on the heap - self->traceback_alloc = TRACEBACK_ENTRY_LEN; + self->traceback->alloc = TRACEBACK_ENTRY_LEN; } - self->traceback_len = 0; - } else if (self->traceback_len + TRACEBACK_ENTRY_LEN > self->traceback_alloc) { + self->traceback->len = 0; + } else if (self->traceback->len + TRACEBACK_ENTRY_LEN > self->traceback->alloc) { #if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF - if (self->traceback_data == (size_t *)MP_STATE_VM(mp_emergency_exception_buf)) { + if (self->traceback->data == (size_t *)MP_STATE_VM(mp_emergency_exception_buf)) { // Can't resize the emergency buffer return; } #endif // be conservative with growing traceback data - size_t *tb_data = m_renew_maybe(size_t, self->traceback_data, self->traceback_alloc, - self->traceback_alloc + TRACEBACK_ENTRY_LEN, true); + size_t *tb_data = m_renew_maybe(size_t, self->traceback->data, self->traceback->alloc, + self->traceback->alloc + TRACEBACK_ENTRY_LEN, true); if (tb_data == NULL) { return; } - self->traceback_data = tb_data; - self->traceback_alloc += TRACEBACK_ENTRY_LEN; + self->traceback->data = tb_data; + self->traceback->alloc += TRACEBACK_ENTRY_LEN; } - size_t *tb_data = &self->traceback_data[self->traceback_len]; - self->traceback_len += TRACEBACK_ENTRY_LEN; + size_t *tb_data = &self->traceback->data[self->traceback->len]; + self->traceback->len += TRACEBACK_ENTRY_LEN; tb_data[0] = file; tb_data[1] = line; tb_data[2] = block; @@ -611,12 +622,12 @@ void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, size_t line, qs void mp_obj_exception_get_traceback(mp_obj_t self_in, size_t *n, size_t **values) { GET_NATIVE_EXCEPTION(self, self_in); - if (self->traceback_data == NULL) { + if (self->traceback->data == NULL) { *n = 0; *values = NULL; } else { - *n = self->traceback_len; - *values = self->traceback_data; + *n = self->traceback->len; + *values = self->traceback->data; } } diff --git a/py/objexcept.h b/py/objexcept.h index d7b39add87..261885e54d 100644 --- a/py/objexcept.h +++ b/py/objexcept.h @@ -28,13 +28,12 @@ #include "py/obj.h" #include "py/objtuple.h" +#include "py/objtraceback.h" typedef struct _mp_obj_exception_t { mp_obj_base_t base; - size_t traceback_alloc : (8 * sizeof(size_t) / 2); - size_t traceback_len : (8 * sizeof(size_t) / 2); - size_t *traceback_data; mp_obj_tuple_t *args; + mp_obj_traceback_t *traceback; } mp_obj_exception_t; void mp_obj_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind); diff --git a/py/objgenerator.c b/py/objgenerator.c index 2139e4478a..7bafd9ce98 100644 --- a/py/objgenerator.c +++ b/py/objgenerator.c @@ -38,7 +38,7 @@ #include "supervisor/shared/translate.h" // Instance of GeneratorExit exception - needed by generator.close() -const mp_obj_exception_t mp_const_GeneratorExit_obj = {{&mp_type_GeneratorExit}, 0, 0, NULL, (mp_obj_tuple_t *)&mp_const_empty_tuple_obj}; +const mp_obj_exception_t mp_const_GeneratorExit_obj = {{&mp_type_GeneratorExit}, (mp_obj_tuple_t *)&mp_const_empty_tuple_obj, (mp_obj_traceback_t *)&mp_const_empty_traceback_obj}; /******************************************************************************/ /* generator wrapper */ diff --git a/py/objtraceback.c b/py/objtraceback.c new file mode 100644 index 0000000000..f1f74142d6 --- /dev/null +++ b/py/objtraceback.c @@ -0,0 +1,42 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/runtime.h" +#include "py/objtraceback.h" + +const mp_obj_traceback_t mp_const_empty_traceback_obj = {{&mp_type_traceback}, 0, 0, NULL}; + +STATIC void mp_obj_traceback_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) { + (void)kind; + mp_obj_traceback_t *o = MP_OBJ_TO_PTR(o_in); + mp_printf(print, "", o); +} + +const mp_obj_type_t mp_type_traceback = { + { &mp_type_type }, + .name = MP_QSTR_traceback, + .print = mp_obj_traceback_print, +}; diff --git a/py/objtraceback.h b/py/objtraceback.h new file mode 100644 index 0000000000..992fe89b01 --- /dev/null +++ b/py/objtraceback.h @@ -0,0 +1,39 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_PY_OBJTRACEBACK_H +#define MICROPY_INCLUDED_PY_OBJTRACEBACK_H + +#include "py/obj.h" + +typedef struct _mp_obj_traceback_t { + mp_obj_base_t base; + size_t alloc : (8 * sizeof(size_t) / 2); + size_t len : (8 * sizeof(size_t) / 2); + size_t *data; +} mp_obj_traceback_t; + +#endif // MICROPY_INCLUDED_PY_OBJTRACEBACK_H diff --git a/py/py.cmake b/py/py.cmake index 2b5d437b57..6f0514e0e3 100644 --- a/py/py.cmake +++ b/py/py.cmake @@ -95,6 +95,7 @@ set(MICROPY_SOURCE_PY ${MICROPY_PY_DIR}/objstr.c ${MICROPY_PY_DIR}/objstringio.c ${MICROPY_PY_DIR}/objstrunicode.c + ${MICROPY_PY_DIR}/objtraceback.c ${MICROPY_PY_DIR}/objtuple.c ${MICROPY_PY_DIR}/objtype.c ${MICROPY_PY_DIR}/objzip.c diff --git a/py/py.mk b/py/py.mk index 94ac82f6f0..7c3eaf4f46 100644 --- a/py/py.mk +++ b/py/py.mk @@ -153,6 +153,7 @@ PY_CORE_O_BASENAME = $(addprefix py/,\ objstr.o \ objstrunicode.o \ objstringio.o \ + objtraceback.o \ objtuple.o \ objtype.o \ objzip.o \ diff --git a/py/runtime.c b/py/runtime.c index ceb5e83b14..4d4fc3592b 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -79,17 +79,14 @@ void mp_init(void) { #if MICROPY_KBD_EXCEPTION // initialise the exception object for raising KeyboardInterrupt MP_STATE_VM(mp_kbd_exception).base.type = &mp_type_KeyboardInterrupt; - MP_STATE_VM(mp_kbd_exception).traceback_alloc = 0; - MP_STATE_VM(mp_kbd_exception).traceback_len = 0; - MP_STATE_VM(mp_kbd_exception).traceback_data = NULL; MP_STATE_VM(mp_kbd_exception).args = (mp_obj_tuple_t *)&mp_const_empty_tuple_obj; + MP_STATE_VM(mp_kbd_exception).traceback = &MP_STATE_VM(mp_kbd_traceback); + *MP_STATE_VM(mp_kbd_exception).traceback = mp_const_empty_traceback_obj; #endif MP_STATE_VM(mp_reload_exception).base.type = &mp_type_ReloadException; - MP_STATE_VM(mp_reload_exception).traceback_alloc = 0; - MP_STATE_VM(mp_reload_exception).traceback_len = 0; - MP_STATE_VM(mp_reload_exception).traceback_data = NULL; MP_STATE_VM(mp_reload_exception).args = (mp_obj_tuple_t *)&mp_const_empty_tuple_obj; + MP_STATE_VM(mp_reload_exception).traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; // call port specific initialization if any #ifdef MICROPY_PORT_INIT_FUNC diff --git a/py/scheduler.c b/py/scheduler.c index f11317dc1d..733722e46a 100644 --- a/py/scheduler.c +++ b/py/scheduler.c @@ -40,7 +40,7 @@ void MICROPY_WRAP_MP_SCHED_EXCEPTION(mp_sched_exception)(mp_obj_t exc) { #if MICROPY_KBD_EXCEPTION // This function may be called asynchronously at any time so only do the bare minimum. void MICROPY_WRAP_MP_SCHED_KEYBOARD_INTERRUPT(mp_sched_keyboard_interrupt)(void) { - MP_STATE_VM(mp_kbd_exception).traceback_data = NULL; + MP_STATE_VM(mp_kbd_exception).traceback->data = NULL; mp_sched_exception(MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception))); } #endif diff --git a/shared-bindings/watchdog/__init__.c b/shared-bindings/watchdog/__init__.c index 0911aca282..dbe06d1323 100644 --- a/shared-bindings/watchdog/__init__.c +++ b/shared-bindings/watchdog/__init__.c @@ -61,10 +61,8 @@ const mp_obj_type_t mp_type_WatchDogTimeout = { mp_obj_exception_t mp_watchdog_timeout_exception = { .base.type = &mp_type_WatchDogTimeout, - .traceback_alloc = 0, - .traceback_len = 0, - .traceback_data = NULL, .args = (mp_obj_tuple_t *)&mp_const_empty_tuple_obj, + .traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj, }; STATIC const mp_rom_map_elem_t watchdog_module_globals_table[] = { From fb0f2583db3674255da1da4fa7352e385ab4a244 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 4 Aug 2021 12:22:21 +0530 Subject: [PATCH 057/418] update traceback module --- locale/circuitpython.pot | 8 ++++---- shared-bindings/traceback/__init__.c | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 0ab2dede22..d9d4bca80c 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -3421,6 +3421,10 @@ msgstr "" msgid "invalid syntax for number" msgstr "" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "" @@ -4093,10 +4097,6 @@ msgstr "" msgid "source palette too large" msgstr "" -#: shared-bindings/traceback/__init__.c -msgid "stack is not ok" -msgstr "" - #: py/objstr.c msgid "start/end indices" msgstr "" diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index 3d3914bfd1..c3c7521044 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -27,8 +27,6 @@ #include "py/stream.h" #include "py/runtime.h" -#include "supervisor/shared/stack.h" - //| """Traceback Module //| //| This module provides a standard interface to print stack traces of programs. @@ -97,11 +95,12 @@ STATIC mp_obj_t traceback_print_exception(size_t n_args, const mp_obj_t *pos_arg } if (args[ARG_tb].u_obj != mp_const_none && print_tb) { - if (!stack_ok()) { - mp_raise_RuntimeError(translate("stack is not ok")); + if (!mp_obj_is_type(args[ARG_tb].u_obj, &mp_type_traceback)) { + mp_raise_TypeError(translate("invalid traceback")); } - size_t n, *values; - mp_obj_exception_get_traceback(exc, &n, &values); + mp_obj_traceback_t *tb = MP_OBJ_TO_PTR(args[ARG_tb].u_obj); + size_t n = (tb->data) ? tb->len : 0; + size_t *values = (tb->data) ? tb->data : NULL; if (n > 0) { assert(n % 3 == 0); // Decompress the format strings From bd903f2f035245fefdbcf54882df5f3e1cd3451b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Aug 2021 08:42:53 -0500 Subject: [PATCH 058/418] Add qrio: Decode QR codes with quirc lib --- .gitmodules | 3 + lib/quirc | 1 + locale/circuitpython.pot | 17 ++-- py/circuitpy_defns.mk | 11 +++ py/circuitpy_mpconfig.h | 8 ++ py/circuitpy_mpconfig.mk | 3 + shared-bindings/qrio/QRDecoder.c | 151 +++++++++++++++++++++++++++++++ shared-bindings/qrio/QRDecoder.h | 37 ++++++++ shared-bindings/qrio/__init__.c | 111 +++++++++++++++++++++++ shared-bindings/qrio/__init__.h | 38 ++++++++ shared-module/qrio/QRDecoder.c | 136 ++++++++++++++++++++++++++++ shared-module/qrio/QRDecoder.h | 44 +++++++++ shared-module/qrio/__init__.c | 0 shared-module/qrio/quirc_alloc.h | 12 +++ 14 files changed, 561 insertions(+), 11 deletions(-) create mode 160000 lib/quirc create mode 100644 shared-bindings/qrio/QRDecoder.c create mode 100644 shared-bindings/qrio/QRDecoder.h create mode 100644 shared-bindings/qrio/__init__.c create mode 100644 shared-bindings/qrio/__init__.h create mode 100644 shared-module/qrio/QRDecoder.c create mode 100644 shared-module/qrio/QRDecoder.h create mode 100644 shared-module/qrio/__init__.c create mode 100644 shared-module/qrio/quirc_alloc.h diff --git a/.gitmodules b/.gitmodules index 28e429129c..4712d87a8a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -188,3 +188,6 @@ [submodule "frozen/Adafruit_CircuitPython_SimpleIO"] path = frozen/Adafruit_CircuitPython_SimpleIO url = https://github.com/adafruit/adafruit_circuitpython_simpleio +[submodule "lib/quirc"] + path = lib/quirc + url = https://github.com/adafruit/quirc.git diff --git a/lib/quirc b/lib/quirc new file mode 160000 index 0000000000..7f4001e719 --- /dev/null +++ b/lib/quirc @@ -0,0 +1 @@ +Subproject commit 7f4001e71921e9e17405119e369775f5b4289a8b diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 81531c0cbd..f30cf6cb15 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1185,11 +1185,6 @@ msgstr "" msgid "Input/output error" msgstr "" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1506,6 +1501,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2063,7 +2063,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" @@ -2510,7 +2509,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3594,10 +3593,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "" diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 5bf46039a7..a70f01d25e 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -224,6 +224,9 @@ endif ifeq ($(CIRCUITPY_PIXELBUF),1) SRC_PATTERNS += adafruit_pixelbuf/% endif +ifeq ($(CIRCUITPY_QRIO),1) +SRC_PATTERNS += qrio/% +endif ifeq ($(CIRCUITPY_RAINBOWIO),1) SRC_PATTERNS += rainbowio/% endif @@ -529,6 +532,8 @@ SRC_SHARED_MODULE_ALL = \ network/__init__.c \ msgpack/__init__.c \ os/__init__.c \ + qrio/__init__.c \ + qrio/QRDecoder.c \ rainbowio/__init__.c \ random/__init__.c \ rgbmatrix/RGBMatrix.c \ @@ -664,6 +669,12 @@ SRC_CIRCUITPY_COMMON = \ lib/utils/stdout_helpers.c \ lib/utils/sys_stdio_mphal.c +ifeq ($(CIRCUITPY_QRIO),1) +SRC_CIRCUITPY_COMMON += lib/quirc/lib/decode.c lib/quirc/lib/identify.c lib/quirc/lib/quirc.c lib/quirc/lib/version_db.c +$(BUILD)/lib/quirc/lib/%.o: CFLAGS += -Wno-shadow -Wno-sign-compare -include shared-module/qrio/quirc_alloc.h + +endif + ifdef LD_TEMPLATE_FILE # Generate a linker script (.ld file) from a template, for those builds that use it. GENERATED_LD_FILE = $(BUILD)/$(notdir $(patsubst %.template.ld,%.ld,$(LD_TEMPLATE_FILE))) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 8e31f0411b..b9f996a469 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -621,6 +621,13 @@ extern const struct _mp_obj_module_t pwmio_module; #define PWMIO_MODULE #endif +#if CIRCUITPY_QRIO +extern const struct _mp_obj_module_t qrio_module; +#define QRIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_qrio), (mp_obj_t)&qrio_module }, +#else +#define QRIO_MODULE +#endif + #if CIRCUITPY_RAINBOWIO extern const struct _mp_obj_module_t rainbowio_module; #define RAINBOWIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rainbowio), (mp_obj_t)&rainbowio_module }, @@ -898,6 +905,7 @@ extern const struct _mp_obj_module_t msgpack_module; PS2IO_MODULE \ PULSEIO_MODULE \ PWMIO_MODULE \ + QRIO_MODULE \ RAINBOWIO_MODULE \ RANDOM_MODULE \ RE_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 3d72be7491..49cec5f71b 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -239,6 +239,9 @@ CFLAGS += -DCIRCUITPY_PULSEIO=$(CIRCUITPY_PULSEIO) CIRCUITPY_PWMIO ?= 1 CFLAGS += -DCIRCUITPY_PWMIO=$(CIRCUITPY_PWMIO) +CIRCUITPY_QRIO ?= $(CIRCUITPY_IMAGECAPTURE) +CFLAGS += -DCIRCUITPY_QRIO=$(CIRCUITPY_QRIO) + CIRCUITPY_RAINBOWIO ?= 1 CFLAGS += -DCIRCUITPY_RAINBOWIO=$(CIRCUITPY_RAINBOWIO) diff --git a/shared-bindings/qrio/QRDecoder.c b/shared-bindings/qrio/QRDecoder.c new file mode 100644 index 0000000000..0e9f45b455 --- /dev/null +++ b/shared-bindings/qrio/QRDecoder.c @@ -0,0 +1,151 @@ +/* + * This file is part of the CircuitPython project, https://github.com/adafruit/circuitpython + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler + * + * 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 "shared-bindings/qrio/__init__.h" +#include "shared-bindings/qrio/QRDecoder.h" +#include "shared-module/qrio/QRDecoder.h" + +#include "py/obj.h" +#include "py/objproperty.h" +#include "py/enum.h" + +//| class QRDecoder: +//| +//| def __init__(self, width: int, height: int) -> None: +//| """Construct a QRDecoder object""" +//| + +STATIC mp_obj_t qrio_qrdecoder_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_width, ARG_height }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_width, MP_ARG_INT | MP_ARG_REQUIRED, {.u_int = 0} }, + { MP_QSTR_height, MP_ARG_INT | MP_ARG_REQUIRED, {.u_int = 0} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + qrio_qrdecoder_obj_t *self = m_new_obj(qrio_qrdecoder_obj_t); + self->base.type = &qrio_qrdecoder_type_obj; + shared_module_qrio_qrdecoder_construct(self, args[ARG_width].u_int, args[ARG_height].u_int); + + return self; +} + +//| def decode(self, buffer: ReadableBuffer) -> List[qrinfo]: +//| """Decode zero or more QR codes from the given image in L8 format""" +//| +STATIC mp_obj_t qrio_qrdecoder_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); + + enum { ARG_buffer, ARG_pixel_policy }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_int = 0} }, + { MP_QSTR_pixel_policy, MP_ARG_OBJ, {.u_int = 0} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ); + + int width = shared_module_qrio_qrdecoder_get_width(self); + int height = shared_module_qrio_qrdecoder_get_height(self); + + // verify that the buffer is big enough + int sz = width * height; + qrio_pixel_policy_t policy = cp_enum_value(&qrio_pixel_policy_type, args[ARG_pixel_policy].u_obj); + if (policy != QRIO_EVERY_BYTE) { + sz *= 2; + } + mp_get_index(mp_obj_get_type(args[ARG_buffer].u_obj), bufinfo.len, MP_OBJ_NEW_SMALL_INT(sz - 1), false); + + return shared_module_qrio_qrdecoder_decode(self, &bufinfo, policy); +} +MP_DEFINE_CONST_FUN_OBJ_KW(qrio_qrdecoder_decode_obj, 2, qrio_qrdecoder_decode); + +//| width: int +//| """The width of image the decoder expects""" +//| +STATIC mp_obj_t qrio_qrdecoder_get_width(mp_obj_t self_in) { + qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(self_in); + return mp_obj_new_int(shared_module_qrio_qrdecoder_get_width(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(qrio_qrdecoder_get_width_obj, qrio_qrdecoder_get_width); + +STATIC mp_obj_t qrio_qrdecoder_set_width(mp_obj_t self_in, mp_obj_t width_in) { + qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(self_in); + int width = mp_obj_get_int(width_in); + shared_module_qrio_qrdecoder_set_width(self, width); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(qrio_qrdecoder_set_width_obj, qrio_qrdecoder_set_width); + +const mp_obj_property_t qrio_qrdecoder_width_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&qrio_qrdecoder_get_width_obj, + (mp_obj_t)&qrio_qrdecoder_set_width_obj, + MP_ROM_NONE}, +}; + +//| height: int +//| """The height of image the decoder expects""" +//| +STATIC mp_obj_t qrio_qrdecoder_get_height(mp_obj_t self_in) { + qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(self_in); + return mp_obj_new_int(shared_module_qrio_qrdecoder_get_height(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(qrio_qrdecoder_get_height_obj, qrio_qrdecoder_get_height); + +STATIC mp_obj_t qrio_qrdecoder_set_height(mp_obj_t self_in, mp_obj_t height_in) { + qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(self_in); + int height = mp_obj_get_int(height_in); + shared_module_qrio_qrdecoder_set_height(self, height); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(qrio_qrdecoder_set_height_obj, qrio_qrdecoder_set_height); + +const mp_obj_property_t qrio_qrdecoder_height_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&qrio_qrdecoder_get_height_obj, + (mp_obj_t)&qrio_qrdecoder_set_height_obj, + MP_ROM_NONE}, +}; + +STATIC const mp_rom_map_elem_t qrio_qrdecoder_locals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_QRDecoder) }, + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&qrio_qrdecoder_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&qrio_qrdecoder_height_obj) }, + { MP_ROM_QSTR(MP_QSTR_decode), MP_ROM_PTR(&qrio_qrdecoder_decode_obj) }, +}; + +STATIC MP_DEFINE_CONST_DICT(qrio_qrdecoder_locals, qrio_qrdecoder_locals_table); + +const mp_obj_type_t qrio_qrdecoder_type_obj = { + { &mp_type_type }, + .name = MP_QSTR_QRDecoder, + .make_new = qrio_qrdecoder_make_new, + .locals_dict = (mp_obj_dict_t *)&qrio_qrdecoder_locals, +}; diff --git a/shared-bindings/qrio/QRDecoder.h b/shared-bindings/qrio/QRDecoder.h new file mode 100644 index 0000000000..90a1a4cd61 --- /dev/null +++ b/shared-bindings/qrio/QRDecoder.h @@ -0,0 +1,37 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/obj.h" + +typedef struct qrio_qrdecoder_obj qrio_qrdecoder_obj_t; + +extern const mp_obj_type_t qrio_qrdecoder_type_obj; + +void common_hal_qrio_qrdecoder_construct(qrio_qrdecoder_obj_t *self); + +mp_obj_t common_hal_qrio_qrdecoder_recognize(qrio_qrdecoder_obj_t *self, int width, int height, mp_buffer_info_t *buf); diff --git a/shared-bindings/qrio/__init__.c b/shared-bindings/qrio/__init__.c new file mode 100644 index 0000000000..30b2aaedae --- /dev/null +++ b/shared-bindings/qrio/__init__.c @@ -0,0 +1,111 @@ +/* + * This file is part of the CircuitPython project, https://github.com/adafruit/circuitpython + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler + * + * 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 "shared-bindings/qrio/__init__.h" +#include "shared-bindings/qrio/QRDecoder.h" +#include "py/obj.h" +#include "py/enum.h" + +//| """`qrio` module. +//| +//| Provides the `QRDecoder` object.""" +//| + +//| class PixelPolicy: +//| EVERY_BYTE: object +//| """The input buffer to `QRDecoder.decode` consists of greyscale values in every byte""" +//| +//| EVEN_BYTES: object +//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 0, 2, ..., and ignored bytes in positions 1, 3, ...""" + +//| ODD_BYTES: object +//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 1, 3, ..., and ignored bytes in positions 0, 2, ...""" +//| + +MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, EVERY_BYTE, QRIO_EVERY_BYTE); +MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, EVEN_BYTES, QRIO_EVEN_BYTES); +MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, ODD_BYTES, QRIO_EVEN_BYTES); + +MAKE_ENUM_MAP(qrio_pixel_policy) { + MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, EVERY_BYTE), + MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, EVEN_BYTES), + MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, ODD_BYTES), +}; +STATIC MP_DEFINE_CONST_DICT(qrio_pixel_policy_locals_dict, qrio_pixel_policy_locals_table); + +MAKE_PRINTER(qrio, qrio_pixel_policy); + +MAKE_ENUM_TYPE(qrio, PixelPolicy, qrio_pixel_policy); + +//| class qrinfo: +//| """Information about a decoded QR code""" +//| +//| payload: bytes +//| """The content of the QR code""" +//| +//| data_type: Union[str, int] +//| """The encoding of the payload as a string (if a standard encoding) or int (if not standard)""" + +const mp_obj_namedtuple_type_t qrio_qrinfo_type_obj = { + .base = { + .base = { + .type = &mp_type_type + }, + .flags = MP_TYPE_FLAG_EXTENDED, + .name = MP_QSTR_qrinfo, + .print = namedtuple_print, + .parent = &mp_type_tuple, + .make_new = namedtuple_make_new, + .attr = namedtuple_attr, + MP_TYPE_EXTENDED_FIELDS( + .unary_op = mp_obj_tuple_unary_op, + .binary_op = mp_obj_tuple_binary_op, + .subscr = mp_obj_tuple_subscr, + .getiter = mp_obj_tuple_getiter, + ), + }, + .n_fields = 2, + .fields = { + MP_QSTR_payload, + MP_QSTR_data_type, + }, +}; + +STATIC const mp_rom_map_elem_t qrio_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_qrio) }, + { MP_ROM_QSTR(MP_QSTR_qrinfo), MP_ROM_PTR(&qrio_qrinfo_type_obj) }, + { MP_ROM_QSTR(MP_QSTR_QRDecoder), MP_ROM_PTR(&qrio_qrdecoder_type_obj) }, + { MP_ROM_QSTR(MP_QSTR_PixelPolicy), MP_ROM_PTR(&qrio_pixel_policy_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(qrio_module_globals, qrio_module_globals_table); + +const mp_obj_module_t qrio_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)&qrio_module_globals, +}; + +MP_REGISTER_MODULE(MP_QSTR_qrio, qrio_module, CIRCUITPY_QRIO); diff --git a/shared-bindings/qrio/__init__.h b/shared-bindings/qrio/__init__.h new file mode 100644 index 0000000000..dbb5220b49 --- /dev/null +++ b/shared-bindings/qrio/__init__.h @@ -0,0 +1,38 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/obj.h" +#include "py/objnamedtuple.h" + +extern const mp_obj_namedtuple_type_t qrio_qrinfo_type_obj; + +extern const mp_obj_type_t qrio_pixel_policy_type; + +typedef enum { + QRIO_EVERY_BYTE, QRIO_EVEN_BYTES, QRIO_ODD_BYTES +} qrio_pixel_policy_t; diff --git a/shared-module/qrio/QRDecoder.c b/shared-module/qrio/QRDecoder.c new file mode 100644 index 0000000000..1b59961631 --- /dev/null +++ b/shared-module/qrio/QRDecoder.c @@ -0,0 +1,136 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include "py/gc.h" +#include "py/objnamedtuple.h" +#include "shared-bindings/qrio/__init__.h" +#include "shared-module/qrio/QRDecoder.h" + +void shared_module_qrio_qrdecoder_construct(qrdecoder_qrdecoder_obj_t *self, int width, int height) { + self->quirc = quirc_new(); + quirc_resize(self->quirc, width, height); +} + +int shared_module_qrio_qrdecoder_get_height(qrdecoder_qrdecoder_obj_t *self) { + int height; + quirc_begin(self->quirc, NULL, &height); + return height; +} + +int shared_module_qrio_qrdecoder_get_width(qrdecoder_qrdecoder_obj_t *self) { + int width; + quirc_begin(self->quirc, &width, NULL); + return width; +} +void shared_module_qrio_qrdecoder_set_height(qrdecoder_qrdecoder_obj_t *self, int height) { + if (height != shared_module_qrio_qrdecoder_get_height(self)) { + int width = shared_module_qrio_qrdecoder_get_width(self); + quirc_resize(self->quirc, width, height); + } +} + +void shared_module_qrio_qrdecoder_set_width(qrdecoder_qrdecoder_obj_t *self, int width) { + if (width != shared_module_qrio_qrdecoder_get_width(self)) { + int height = shared_module_qrio_qrdecoder_get_height(self); + quirc_resize(self->quirc, width, height); + } +} + +STATIC mp_obj_t data_type(int type) { + switch (type) { + case QUIRC_ECI_ISO_8859_1: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_1); + case QUIRC_ECI_IBM437: + return MP_OBJ_NEW_QSTR(MP_QSTR_cp437); + case QUIRC_ECI_ISO_8859_2: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_2); + case QUIRC_ECI_ISO_8859_3: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_3); + case QUIRC_ECI_ISO_8859_4: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_4); + case QUIRC_ECI_ISO_8859_5: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_5); + case QUIRC_ECI_ISO_8859_6: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_6); + case QUIRC_ECI_ISO_8859_7: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_7); + case QUIRC_ECI_ISO_8859_8: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_8); + case QUIRC_ECI_ISO_8859_9: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_9); + case QUIRC_ECI_WINDOWS_874: + return MP_OBJ_NEW_QSTR(MP_QSTR_cp874); + case QUIRC_ECI_ISO_8859_13: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_13); + case QUIRC_ECI_ISO_8859_15: + return MP_OBJ_NEW_QSTR(MP_QSTR_iso_8859_hyphen_15); + case QUIRC_ECI_SHIFT_JIS: + return MP_OBJ_NEW_QSTR(MP_QSTR_shift_underscore_jis); + case QUIRC_ECI_UTF_8: + return MP_OBJ_NEW_QSTR(MP_QSTR_utf_hyphen_8); + } + return mp_obj_new_int(type); +} + +mp_obj_t shared_module_qrio_qrdecoder_decode(qrdecoder_qrdecoder_obj_t *self, const mp_buffer_info_t *bufinfo, qrio_pixel_policy_t policy) { + int width, height; + uint8_t *framebuffer = quirc_begin(self->quirc, &width, &height); + uint8_t *src = bufinfo->buf; + + switch (policy) { + case QRIO_EVERY_BYTE: + memcpy(framebuffer, src, width * height); + break; + + case QRIO_ODD_BYTES: + src++; + MP_FALLTHROUGH; + + case QRIO_EVEN_BYTES: + for (int i = 0; i < width * height; i++) { + framebuffer[i] = src[2 * i]; + } + } + quirc_end(self->quirc); + + int count = quirc_count(self->quirc); + mp_obj_t result = mp_obj_new_list(0, NULL); + for (int i = 0; i < count; i++) { + quirc_extract(self->quirc, i, &self->code); + if (quirc_decode(&self->code, &self->data) != QUIRC_SUCCESS) { + continue; + } + mp_obj_t elems[2] = { + mp_obj_new_bytes(self->data.payload, self->data.payload_len), + data_type(self->data.data_type), + }; + mp_obj_t code_obj = namedtuple_make_new((const mp_obj_type_t *)&qrio_qrinfo_type_obj, 2, elems, NULL); + mp_obj_list_append(result, code_obj); + } + return result; +} diff --git a/shared-module/qrio/QRDecoder.h b/shared-module/qrio/QRDecoder.h new file mode 100644 index 0000000000..af4eac5e46 --- /dev/null +++ b/shared-module/qrio/QRDecoder.h @@ -0,0 +1,44 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/obj.h" +#include "lib/quirc/lib/quirc.h" + +typedef struct qrio_qrdecoder_obj { + mp_obj_base_t base; + struct quirc *quirc; + struct quirc_code code; + struct quirc_data data; +} qrdecoder_qrdecoder_obj_t; + +void shared_module_qrio_qrdecoder_construct(qrdecoder_qrdecoder_obj_t *, int width, int height); +int shared_module_qrio_qrdecoder_get_height(qrdecoder_qrdecoder_obj_t *); +int shared_module_qrio_qrdecoder_get_width(qrdecoder_qrdecoder_obj_t *); +void shared_module_qrio_qrdecoder_set_height(qrdecoder_qrdecoder_obj_t *, int height); +void shared_module_qrio_qrdecoder_set_width(qrdecoder_qrdecoder_obj_t *, int width); +mp_obj_t shared_module_qrio_qrdecoder_decode(qrdecoder_qrdecoder_obj_t *, const mp_buffer_info_t *bufinfo, qrio_pixel_policy_t policy); diff --git a/shared-module/qrio/__init__.c b/shared-module/qrio/__init__.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/shared-module/qrio/quirc_alloc.h b/shared-module/qrio/quirc_alloc.h new file mode 100644 index 0000000000..a015aee7f9 --- /dev/null +++ b/shared-module/qrio/quirc_alloc.h @@ -0,0 +1,12 @@ +#pragma once + +#include "py/gc.h" + +#if !MICROPY_GC_CONSERVATIVE_CLEAR +// so that we can implement calloc as m_malloc +#error Requires MICROPY_GC_CONSERVATIVE_CLEAR +#endif + +#define QUIRC_MALLOC(x) gc_alloc((x), 0, false) +#define QUIRC_CALLOC(x,y) gc_alloc((x) * (y), 0, false) +#define QUIRC_FREE(x) gc_free((x)) From 937ef7ea7a3dd1e58489469862de08f4a230ba27 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 4 Aug 2021 14:30:03 -0500 Subject: [PATCH 059/418] Unpin sphinx-autoapi as the bug is resolved --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 1fb88552fe..6db56d8940 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,7 +16,7 @@ cpp-coveralls Sphinx<4 sphinx-rtd-theme myst-parser -sphinx-autoapi<=1.8.1 +sphinx-autoapi sphinxcontrib-svg2pdfconverter readthedocs-sphinx-search From 81833035fc3f24a0261ceef6d14c9e43805e1967 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 4 Aug 2021 13:17:31 -0400 Subject: [PATCH 060/418] raytac_mdbt50q-rx --- .github/workflows/build.yml | 1 + .../raytac_mdbt50q-db-40/mpconfigboard.h | 1 + ports/nrf/boards/raytac_mdbt50q-db-40/pins.c | 1 + ports/nrf/boards/raytac_mdbt50q-rx/board.c | 38 +++++++++++++++++++ .../boards/raytac_mdbt50q-rx/mpconfigboard.h | 31 +++++++++++++++ .../boards/raytac_mdbt50q-rx/mpconfigboard.mk | 8 ++++ ports/nrf/boards/raytac_mdbt50q-rx/pins.c | 11 ++++++ supervisor/shared/status_leds.c | 11 +++++- 8 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 ports/nrf/boards/raytac_mdbt50q-rx/board.c create mode 100644 ports/nrf/boards/raytac_mdbt50q-rx/mpconfigboard.h create mode 100644 ports/nrf/boards/raytac_mdbt50q-rx/mpconfigboard.mk create mode 100644 ports/nrf/boards/raytac_mdbt50q-rx/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3cd9f6650e..17a6b609f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -341,6 +341,7 @@ jobs: - "qtpy_m0_haxpress" - "raspberry_pi_pico" - "raytac_mdbt50q-db-40" + - "raytac_mdbt50q-rx" - "robohatmm1_m4" - "sam32" - "same54_xplained" diff --git a/ports/nrf/boards/raytac_mdbt50q-db-40/mpconfigboard.h b/ports/nrf/boards/raytac_mdbt50q-db-40/mpconfigboard.h index 93fdce3a0e..28bfbd1703 100644 --- a/ports/nrf/boards/raytac_mdbt50q-db-40/mpconfigboard.h +++ b/ports/nrf/boards/raytac_mdbt50q-db-40/mpconfigboard.h @@ -28,3 +28,4 @@ #define MICROPY_HW_MCU_NAME "nRF52840" #define MICROPY_HW_LED_STATUS (&pin_P0_13) +#define MICROPY_HW_LED_STATUS_INVERTED (1) diff --git a/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c b/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c index 426498cc20..10f42f9027 100644 --- a/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c +++ b/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c @@ -66,6 +66,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_CTS), MP_ROM_PTR(&pin_P0_07) }, { MP_ROM_QSTR(MP_QSTR_RTS), MP_ROM_PTR(&pin_P0_05) }, + // Note that these are inverted; you must pull them low to turn on the LEDs. { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_P0_13) }, { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_P0_15) }, diff --git a/ports/nrf/boards/raytac_mdbt50q-rx/board.c b/ports/nrf/boards/raytac_mdbt50q-rx/board.c new file mode 100644 index 0000000000..688cfb4ded --- /dev/null +++ b/ports/nrf/boards/raytac_mdbt50q-rx/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/raytac_mdbt50q-rx/mpconfigboard.h b/ports/nrf/boards/raytac_mdbt50q-rx/mpconfigboard.h new file mode 100644 index 0000000000..92629a9e47 --- /dev/null +++ b/ports/nrf/boards/raytac_mdbt50q-rx/mpconfigboard.h @@ -0,0 +1,31 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#define MICROPY_HW_BOARD_NAME "MDBT50Q-RX Dongle" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define MICROPY_HW_LED_STATUS (&pin_P1_13) +#define MICROPY_HW_LED_STATUS_INVERTED (1) diff --git a/ports/nrf/boards/raytac_mdbt50q-rx/mpconfigboard.mk b/ports/nrf/boards/raytac_mdbt50q-rx/mpconfigboard.mk new file mode 100644 index 0000000000..08c7266d36 --- /dev/null +++ b/ports/nrf/boards/raytac_mdbt50q-rx/mpconfigboard.mk @@ -0,0 +1,8 @@ +USB_VID = 0x239A +USB_PID = 0x810C +USB_PRODUCT = "MDBT50Q-RX Dongle" +USB_MANUFACTURER = "Raytac Corporation" + +MCU_CHIP = nrf52840 + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/raytac_mdbt50q-rx/pins.c b/ports/nrf/boards/raytac_mdbt50q-rx/pins.c new file mode 100644 index 0000000000..db5e7f769d --- /dev/null +++ b/ports/nrf/boards/raytac_mdbt50q-rx/pins.c @@ -0,0 +1,11 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_P0_15) }, + + { MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_INVERTED_LED), MP_ROM_PTR(&pin_P1_13) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/supervisor/shared/status_leds.c b/supervisor/shared/status_leds.c index 6c89026223..056833a8d3 100644 --- a/supervisor/shared/status_leds.c +++ b/supervisor/shared/status_leds.c @@ -101,6 +101,11 @@ uint16_t status_rgb_color[3] = { digitalio_digitalinout_obj_t single_color_led; uint8_t rgb_status_brightness = 0xff; + +#ifndef MICROPY_HW_LED_STATUS_INVERTED +#define MICROPY_HW_LED_STATUS_INVERTED (0) +#endif + #endif #if CIRCUITPY_DIGITALIO && (defined(MICROPY_HW_LED_RX) || defined(MICROPY_HW_LED_TX)) @@ -189,7 +194,8 @@ void status_led_init() { #elif defined(MICROPY_HW_LED_STATUS) common_hal_digitalio_digitalinout_construct(&single_color_led, MICROPY_HW_LED_STATUS); - common_hal_digitalio_digitalinout_switch_to_output(&single_color_led, true, DRIVE_MODE_PUSH_PULL); + common_hal_digitalio_digitalinout_switch_to_output( + &single_color_led, MICROPY_HW_LED_STATUS_INVERTED == 0, DRIVE_MODE_PUSH_PULL); #endif #if CIRCUITPY_DIGITALIO && CIRCUITPY_STATUS_LED @@ -282,7 +288,8 @@ void new_status_color(uint32_t rgb) { common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_g, status_rgb_color[1]); common_hal_pwmio_pwmout_set_duty_cycle(&rgb_status_b, status_rgb_color[2]); #elif CIRCUITPY_DIGITALIO && defined(MICROPY_HW_LED_STATUS) - common_hal_digitalio_digitalinout_set_value(&single_color_led, rgb_adjusted > 0); + common_hal_digitalio_digitalinout_set_value( + &single_color_led, (rgb_adjusted > 0) ^ MICROPY_HW_LED_STATUS_INVERTED); #endif } From 131dbf1e87db51779494c2fa475e8c81bfdb4c9e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 4 Aug 2021 18:17:03 -0500 Subject: [PATCH 061/418] Remove hard-coded disable of USB_HID for kaluga devkits --- ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.mk | 6 ------ ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk | 6 ------ 2 files changed, 12 deletions(-) diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.mk b/ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.mk index 52c63cb9c7..2dce038819 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.mk @@ -14,10 +14,4 @@ CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB -# We only have enough endpoints available in hardware to -# enable ONE of these at a time. -CIRCUITPY_USB_MIDI = 1 -CIRCUITPY_USB_HID = 0 -CIRCUITPY_USB_VENDOR = 0 - CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk b/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk index 52c63cb9c7..2dce038819 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk @@ -14,10 +14,4 @@ CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB -# We only have enough endpoints available in hardware to -# enable ONE of these at a time. -CIRCUITPY_USB_MIDI = 1 -CIRCUITPY_USB_HID = 0 -CIRCUITPY_USB_VENDOR = 0 - CIRCUITPY_MODULE=wrover From 10f74618cf5770cfcf8d8b5e31d3b09d1d52a46f Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Wed, 4 Aug 2021 19:09:43 -0500 Subject: [PATCH 062/418] Cucumber M, MS, R, and RS boards --- .../boards/gravitech_cucumber_m/board.c | 51 ++++++++++++++++++ .../gravitech_cucumber_m/mpconfigboard.h | 41 +++++++++++++++ .../gravitech_cucumber_m/mpconfigboard.mk | 17 ++++++ .../boards/gravitech_cucumber_m/pins.c | 49 +++++++++++++++++ .../boards/gravitech_cucumber_m/sdkconfig | 5 ++ .../boards/gravitech_cucumber_ms/board.c | 51 ++++++++++++++++++ .../gravitech_cucumber_ms/mpconfigboard.h | 44 ++++++++++++++++ .../gravitech_cucumber_ms/mpconfigboard.mk | 17 ++++++ .../boards/gravitech_cucumber_ms/pins.c | 52 +++++++++++++++++++ .../boards/gravitech_cucumber_ms/sdkconfig | 5 ++ .../boards/gravitech_cucumber_r/board.c | 51 ++++++++++++++++++ .../gravitech_cucumber_r/mpconfigboard.h | 41 +++++++++++++++ .../gravitech_cucumber_r/mpconfigboard.mk | 17 ++++++ .../boards/gravitech_cucumber_r/pins.c | 49 +++++++++++++++++ .../boards/gravitech_cucumber_r/sdkconfig | 39 ++++++++++++++ .../boards/gravitech_cucumber_rs/board.c | 51 ++++++++++++++++++ .../gravitech_cucumber_rs/mpconfigboard.h | 44 ++++++++++++++++ .../gravitech_cucumber_rs/mpconfigboard.mk | 17 ++++++ .../boards/gravitech_cucumber_rs/pins.c | 52 +++++++++++++++++++ .../boards/gravitech_cucumber_rs/sdkconfig | 39 ++++++++++++++ 20 files changed, 732 insertions(+) create mode 100644 ports/esp32s2/boards/gravitech_cucumber_m/board.c create mode 100644 ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h create mode 100644 ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/gravitech_cucumber_m/pins.c create mode 100644 ports/esp32s2/boards/gravitech_cucumber_m/sdkconfig create mode 100644 ports/esp32s2/boards/gravitech_cucumber_ms/board.c create mode 100644 ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h create mode 100644 ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/gravitech_cucumber_ms/pins.c create mode 100644 ports/esp32s2/boards/gravitech_cucumber_ms/sdkconfig create mode 100644 ports/esp32s2/boards/gravitech_cucumber_r/board.c create mode 100644 ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h create mode 100644 ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/gravitech_cucumber_r/pins.c create mode 100644 ports/esp32s2/boards/gravitech_cucumber_r/sdkconfig create mode 100644 ports/esp32s2/boards/gravitech_cucumber_rs/board.c create mode 100644 ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h create mode 100644 ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/gravitech_cucumber_rs/pins.c create mode 100644 ports/esp32s2/boards/gravitech_cucumber_rs/sdkconfig diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/board.c b/ports/esp32s2/boards/gravitech_cucumber_m/board.c new file mode 100644 index 0000000000..ec84d3209c --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_m/board.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h b/ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h new file mode 100644 index 0000000000..5406f88f01 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h @@ -0,0 +1,41 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Gravitech Cucumber M" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.mk b/ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.mk new file mode 100644 index 0000000000..3e1fa2526a --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x80A4 +USB_PRODUCT = "Cucumber M" +USB_MANUFACTURER = "Gravitech" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wroom diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/pins.c b/ports/esp32s2/boards/gravitech_cucumber_m/pins.c new file mode 100644 index 0000000000..0d8bde1919 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_m/pins.c @@ -0,0 +1,49 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { 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/esp32s2/boards/gravitech_cucumber_m/sdkconfig b/ports/esp32s2/boards/gravitech_cucumber_m/sdkconfig new file mode 100644 index 0000000000..af73f6d885 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_m/sdkconfig @@ -0,0 +1,5 @@ +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_m" +# end of LWIP diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/board.c b/ports/esp32s2/boards/gravitech_cucumber_ms/board.c new file mode 100644 index 0000000000..ec84d3209c --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_ms/board.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h b/ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h new file mode 100644 index 0000000000..c0b6fee029 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h @@ -0,0 +1,44 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Gravitech Cucumber MS" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO40) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO41) + +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.mk b/ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.mk new file mode 100644 index 0000000000..7a0d84a311 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x80A7 +USB_PRODUCT = "Cucumber MS" +USB_MANUFACTURER = "Gravitech" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wroom diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c b/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c new file mode 100644 index 0000000000..980e153995 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c @@ -0,0 +1,52 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_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/esp32s2/boards/gravitech_cucumber_ms/sdkconfig b/ports/esp32s2/boards/gravitech_cucumber_ms/sdkconfig new file mode 100644 index 0000000000..cbdd787aa7 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_ms/sdkconfig @@ -0,0 +1,5 @@ +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_ms" +# end of LWIP diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/board.c b/ports/esp32s2/boards/gravitech_cucumber_r/board.c new file mode 100644 index 0000000000..ec84d3209c --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_r/board.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h b/ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h new file mode 100644 index 0000000000..5d51ff002f --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h @@ -0,0 +1,41 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Gravitech Cucumber R" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.mk b/ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.mk new file mode 100644 index 0000000000..018742b469 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x80A1 +USB_PRODUCT = "Cucumber R" +USB_MANUFACTURER = "Gravitech" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/pins.c b/ports/esp32s2/boards/gravitech_cucumber_r/pins.c new file mode 100644 index 0000000000..0d8bde1919 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_r/pins.c @@ -0,0 +1,49 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { 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/esp32s2/boards/gravitech_cucumber_r/sdkconfig b/ports/esp32s2/boards/gravitech_cucumber_r/sdkconfig new file mode 100644 index 0000000000..3862b27003 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_r/sdkconfig @@ -0,0 +1,39 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_r" +# end of LWIP diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/board.c b/ports/esp32s2/boards/gravitech_cucumber_rs/board.c new file mode 100644 index 0000000000..ec84d3209c --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_rs/board.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h b/ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h new file mode 100644 index 0000000000..14bc06f0e3 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h @@ -0,0 +1,44 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Gravitech Cucumber RS" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO40) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO41) + +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.mk b/ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.mk new file mode 100644 index 0000000000..807dcaabbf --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x800D +USB_PRODUCT = "Cucumber RS" +USB_MANUFACTURER = "Gravitech" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c b/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c new file mode 100644 index 0000000000..980e153995 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c @@ -0,0 +1,52 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_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/esp32s2/boards/gravitech_cucumber_rs/sdkconfig b/ports/esp32s2/boards/gravitech_cucumber_rs/sdkconfig new file mode 100644 index 0000000000..bc8328d1f1 --- /dev/null +++ b/ports/esp32s2/boards/gravitech_cucumber_rs/sdkconfig @@ -0,0 +1,39 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_rs" +# end of LWIP From f8fd3c24d0ae7fec10216261f06832fa69b9b1b8 Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Wed, 4 Aug 2021 19:42:04 -0500 Subject: [PATCH 063/418] add boards to build.yml --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b27ef12bd..cbf97acb81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -277,6 +277,10 @@ jobs: - "fluff_m0" - "gemma_m0" - "grandcentral_m4_express" + - "gravitech_cucumber_m" + - "gravitech_cucumber_ms" + - "gravitech_cucumber_r" + - "gravitech_cucumber_rs" - "hallowing_m0_express" - "hallowing_m4_express" - "hiibot_bluefi" From dba04278088b9dedceaf6b29b9acc986c13d4508 Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Wed, 4 Aug 2021 19:50:40 -0500 Subject: [PATCH 064/418] fix whitespace --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbf97acb81..0d1f5d40a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -280,7 +280,7 @@ jobs: - "gravitech_cucumber_m" - "gravitech_cucumber_ms" - "gravitech_cucumber_r" - - "gravitech_cucumber_rs" + - "gravitech_cucumber_rs" - "hallowing_m0_express" - "hallowing_m4_express" - "hiibot_bluefi" From c2d093b6f47af26cae40754313bd701b2b3b919b Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Wed, 4 Aug 2021 20:54:08 -0500 Subject: [PATCH 065/418] fix board family in build.yml --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d1f5d40a5..1f0424b493 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -277,10 +277,6 @@ jobs: - "fluff_m0" - "gemma_m0" - "grandcentral_m4_express" - - "gravitech_cucumber_m" - - "gravitech_cucumber_ms" - - "gravitech_cucumber_r" - - "gravitech_cucumber_rs" - "hallowing_m0_express" - "hallowing_m4_express" - "hiibot_bluefi" @@ -512,6 +508,10 @@ jobs: - "espressif_saola_1_wrover" - "franzininho_wifi_wroom" - "franzininho_wifi_wrover" + - "gravitech_cucumber_m" + - "gravitech_cucumber_ms" + - "gravitech_cucumber_r" + - "gravitech_cucumber_rs" - "lilygo_ttgo_t8_s2_st7789" - "microdev_micro_s2" - "muselab_nanoesp32_s2_wroom" From 85bf3d074f4355d70c2477e0d3987c653f401c81 Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Wed, 4 Aug 2021 23:55:03 -0700 Subject: [PATCH 066/418] stub checker does not approve of shared vectorshape properties --- shared-bindings/vectorio/VectorShape.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index 979651bd4a..8d6c2b71db 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -80,9 +80,10 @@ vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl = { }; -//| x: int -//| """X position of the center point of the shape in the parent.""" -//| +// Stub checker does not approve of these shared properties. +// x: int +// """X position of the center point of the shape in the parent.""" +// STATIC mp_obj_t vectorio_vector_shape_obj_get_x(mp_obj_t wrapper_shape) { // Relies on the fact that only vector_shape impl gets matched with a VectorShape. const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); @@ -111,9 +112,9 @@ const mp_obj_property_t vectorio_vector_shape_x_obj = { }; -//| y: int -//| """Y position of the center point of the shape in the parent.""" -//| +// y: int +// """Y position of the center point of the shape in the parent.""" +// STATIC mp_obj_t vectorio_vector_shape_obj_get_y(mp_obj_t wrapper_shape) { // Relies on the fact that only vector_shape impl gets matched with a VectorShape. const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); @@ -142,9 +143,9 @@ const mp_obj_property_t vectorio_vector_shape_y_obj = { }; -//| pixel_shader: Union[displayio.ColorConverter, displayio.Palette] -//| """The pixel shader of the shape.""" -//| +// pixel_shader: Union[displayio.ColorConverter, displayio.Palette] +// """The pixel shader of the shape.""" +// STATIC mp_obj_t vectorio_vector_shape_obj_get_pixel_shader(mp_obj_t wrapper_shape) { // Relies on the fact that only vector_shape impl gets matched with a VectorShape. const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); From 6be952d3bae45b1ff81203f464616bc986dd280a Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Thu, 5 Aug 2021 00:13:10 -0700 Subject: [PATCH 067/418] found more documentation dependencies that needed updating --- docs/redirects.txt | 1 - shared-bindings/displayio/Group.c | 14 +++++++------- shared-bindings/vectorio/Circle.c | 2 +- shared-bindings/vectorio/Polygon.c | 2 +- shared-bindings/vectorio/Rectangle.c | 2 +- shared-bindings/vectorio/VectorShape.c | 2 +- shared-bindings/vectorio/__init__.c | 2 -- 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/docs/redirects.txt b/docs/redirects.txt index 6eb7ddc4d8..d8fc46b358 100644 --- a/docs/redirects.txt +++ b/docs/redirects.txt @@ -152,7 +152,6 @@ shared-bindings/ustack/__init__.rst shared-bindings/ustack/ shared-bindings/vectorio/Circle.rst shared-bindings/vectorio/#vectorio.Circle shared-bindings/vectorio/Polygon.rst shared-bindings/vectorio/#vectorio.Polygon shared-bindings/vectorio/Rectangle.rst shared-bindings/vectorio/#vectorio.Rectangle -shared-bindings/vectorio/VectorShape.rst shared-bindings/vectorio/#vectorio.VectorShape shared-bindings/vectorio/__init__.rst shared-bindings/vectorio/ shared-bindings/watchdog/WatchDogMode.rst shared-bindings/watchdog/#watchdog.WatchDogMode shared-bindings/watchdog/WatchDogTimer.rst shared-bindings/watchdog/#watchdog.WatchDogTimer diff --git a/shared-bindings/displayio/Group.c b/shared-bindings/displayio/Group.c index d636ee335b..4783c97453 100644 --- a/shared-bindings/displayio/Group.c +++ b/shared-bindings/displayio/Group.c @@ -183,7 +183,7 @@ const mp_obj_property_t displayio_group_y_obj = { MP_ROM_NONE}, }; -//| def append(self, layer: Union[vectorio.VectorShape, Group, TileGrid]) -> None: +//| def append(self, layer: Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]) -> None: //| """Append a layer to the group. It will be drawn above other layers.""" //| ... //| @@ -194,7 +194,7 @@ STATIC mp_obj_t displayio_group_obj_append(mp_obj_t self_in, mp_obj_t layer) { } MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_append_obj, displayio_group_obj_append); -//| def insert(self, index: int, layer: Union[vectorio.VectorShape, Group, TileGrid]) -> None: +//| def insert(self, index: int, layer: Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]) -> None: //| """Insert a layer into the group.""" //| ... //| @@ -210,7 +210,7 @@ STATIC mp_obj_t displayio_group_obj_insert(mp_obj_t self_in, mp_obj_t index_obj, MP_DEFINE_CONST_FUN_OBJ_3(displayio_group_insert_obj, displayio_group_obj_insert); -//| def index(self, layer: Union[vectorio.VectorShape, Group, TileGrid]) -> int: +//| def index(self, layer: Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]) -> int: //| """Returns the index of the first copy of layer. Raises ValueError if not found.""" //| ... //| @@ -224,7 +224,7 @@ STATIC mp_obj_t displayio_group_obj_index(mp_obj_t self_in, mp_obj_t layer) { } MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_index_obj, displayio_group_obj_index); -//| def pop(self, i: int = -1) -> Union[vectorio.VectorShape, Group, TileGrid]: +//| def pop(self, i: int = -1) -> Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]: //| """Remove the ith item and return it.""" //| ... //| @@ -247,7 +247,7 @@ STATIC mp_obj_t displayio_group_obj_pop(size_t n_args, const mp_obj_t *pos_args, MP_DEFINE_CONST_FUN_OBJ_KW(displayio_group_pop_obj, 1, displayio_group_obj_pop); -//| def remove(self, layer: Union[vectorio.VectorShape, Group, TileGrid]) -> None: +//| def remove(self, layer: Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]) -> None: //| """Remove the first copy of layer. Raises ValueError if it is not present.""" //| ... //| @@ -280,7 +280,7 @@ STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) { } } -//| def __getitem__(self, index: int) -> Union[vectorio.VectorShape, Group, TileGrid]: +//| def __getitem__(self, index: int) -> Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]: //| """Returns the value at the given index. //| //| This allows you to:: @@ -288,7 +288,7 @@ STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) { //| print(group[0])""" //| ... //| -//| def __setitem__(self, index: int, value: Union[vectorio.VectorShape, Group, TileGrid]) -> None: +//| def __setitem__(self, index: int, value: Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]) -> None: //| """Sets the value at the given index. //| //| This allows you to:: diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index cf4e643662..37780b5562 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -12,7 +12,7 @@ //| class Circle: //| -//| def __init__(self, pixel_shader: Union[ColorConverter, Palette], radius: int, x: int, y: int) -> None: +//| def __init__(self, pixel_shader: Union[displayio.ColorConverter, displayio.Palette], radius: int, x: int, y: int) -> None: //| """Circle is positioned on screen by its center point. //| //| :param pixel_shader: The pixel shader that produces colors from values diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index 261e7ae55e..551954f98d 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -17,7 +17,7 @@ //| class Polygon: -//| def __init__(self, pixel_shader: Union[ColorConverter, Palette], points: List[Tuple[int, int]], x: int, y: int) -> None: +//| def __init__(self, pixel_shader: Union[displayio.ColorConverter, displayio.Palette], points: List[Tuple[int, int]], x: int, y: int) -> None: //| """Represents a closed shape by ordered vertices //| //| :param pixel_shader: The pixel shader that produces colors from values diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index 98e38f0c6b..1e885064ff 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -10,7 +10,7 @@ #include "supervisor/shared/translate.h" //| class Rectangle: -//| def __init__(self, pixel_shader: Union[ColorConverter, Palette], width: int, height: int, x: int, y: int) -> None: +//| def __init__(self, pixel_shader: Union[displayio.ColorConverter, displayio.Palette], width: int, height: int, x: int, y: int) -> None: //| """Represents a rectangle by defining its bounds //| //| :param pixel_shader: The pixel shader that produces colors from values diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index 8d6c2b71db..f59ff26213 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -143,7 +143,7 @@ const mp_obj_property_t vectorio_vector_shape_y_obj = { }; -// pixel_shader: Union[displayio.ColorConverter, displayio.Palette] +// pixel_shader: Union[ColorConverter, Palette] // """The pixel shader of the shape.""" // STATIC mp_obj_t vectorio_vector_shape_obj_get_pixel_shader(mp_obj_t wrapper_shape) { diff --git a/shared-bindings/vectorio/__init__.c b/shared-bindings/vectorio/__init__.c index 556bfe59ec..5a3729573e 100644 --- a/shared-bindings/vectorio/__init__.c +++ b/shared-bindings/vectorio/__init__.c @@ -6,7 +6,6 @@ #include "shared-bindings/vectorio/Circle.h" #include "shared-bindings/vectorio/Polygon.h" #include "shared-bindings/vectorio/Rectangle.h" -#include "shared-bindings/vectorio/VectorShape.h" //| """Lightweight 2d shapes for displays""" //| @@ -16,7 +15,6 @@ STATIC const mp_rom_map_elem_t vectorio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_Circle), MP_ROM_PTR(&vectorio_circle_type) }, { MP_ROM_QSTR(MP_QSTR_Polygon), MP_ROM_PTR(&vectorio_polygon_type) }, { MP_ROM_QSTR(MP_QSTR_Rectangle), MP_ROM_PTR(&vectorio_rectangle_type) }, -// { MP_ROM_QSTR(MP_QSTR_VectorShape), MP_ROM_PTR(&vectorio_vector_shape_type) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_module_globals, vectorio_module_globals_table); From 11ed759cf94074ac387655fd647e6ffdfb70ecbe Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Thu, 5 Aug 2021 13:01:50 +0100 Subject: [PATCH 068/418] Tweaks to Plasma2040 pinout --- .../boards/pimoroni_plasma2040/mpconfigboard.h | 13 +++++++++++++ ports/raspberrypi/boards/pimoroni_plasma2040/pins.c | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h index 967267a8b4..6d1e137906 100644 --- a/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h @@ -1,13 +1,26 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni Plasma 2040" #define MICROPY_HW_MCU_NAME "rp2040" +#define MICROPY_HW_SW_A (&pin_GPIO12) +#define MICROPY_HW_SW_B (&pin_GPIO13) + +#define MICROPY_HW_CLK (&pin_GPIO14) +#define MICROPY_HW_DATA (&pin_GPIO15) + #define CIRCUITPY_RGB_STATUS_INVERTED_PWM #define CIRCUITPY_RGB_STATUS_R (&pin_GPIO16) #define CIRCUITPY_RGB_STATUS_G (&pin_GPIO17) #define CIRCUITPY_RGB_STATUS_B (&pin_GPIO18) +#define MICROPY_HW_I2C_INT (&pin_GPIO19) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO21) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO20) + #define MICROPY_HW_USER_SW (&pin_GPIO23) +#define MICROPY_HW_CURRENT_SENSE (&pin_GPIO29) + // These pins are unconnected #define IGNORE_PIN_GPIO0 1 #define IGNORE_PIN_GPIO1 1 diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c index 799683378c..e4e686da9d 100644 --- a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c @@ -5,15 +5,20 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SW_B), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_DATA), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_INT), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO23) }, @@ -29,7 +34,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From 821f3d55325b59722e62cf67ea23f99213dd558a Mon Sep 17 00:00:00 2001 From: Brian Dean Date: Thu, 5 Aug 2021 09:14:51 -0400 Subject: [PATCH 069/418] board bdmicro_vina_d51: Add support for MX25L12833F flash chip. Add QSPI activity indicator LED. Add D15-D19 as aliases for the I2S peripheral pins. --- .../boards/bdmicro_vina_d51/mpconfigboard.h | 2 +- .../boards/bdmicro_vina_d51/mpconfigboard.mk | 4 ++-- .../atmel-samd/boards/bdmicro_vina_d51/pins.c | 18 ++++++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h index 6b1c9113be..41b88632d8 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h @@ -1,5 +1,5 @@ // More than one revision of this board is available. -// This board specifies PCB Revision 10 +// This board specifies the most up to date PCB Revision #define MICROPY_HW_BOARD_NAME "BDMICRO VINA-D51" #define MICROPY_HW_MCU_NAME "samd51n20" diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk index 13487413f4..9152cb6052 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.mk @@ -1,5 +1,5 @@ # More than one revision of this board is available. -# This board specifies PCB Revision 10 +# This board specifies the most up to date PCB Revision USB_VID = 0x31e2 USB_PID = 0x2021 @@ -10,5 +10,5 @@ CHIP_VARIANT = SAMD51N20A CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICES = "MX25L51245G","GD25S512MD" +EXTERNAL_FLASH_DEVICES = "MX25L12833F","MX25L51245G","GD25S512MD" LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index e7595d9789..8a97842e20 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -1,5 +1,5 @@ // More than one revision of this board is available. -// This board specifies PCB Revision 10 +// This board specifies the most up to date PCB Revision #include "shared-bindings/board/__init__.h" @@ -59,6 +59,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB13) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA21) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_PA21) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_I2S_FS_0), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PB16) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_PB17) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PC17) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PC18) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC19) }, @@ -73,14 +83,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA13) }, - { MP_ROM_QSTR(MP_QSTR_I2S_FS_0), MP_ROM_PTR(&pin_PA20) }, - { MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_PA22) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_PA21) }, { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB15) }, + { MP_ROM_QSTR(MP_QSTR_LED_QSPI), MP_ROM_PTR(&pin_PC07) }, { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB14) }, { MP_ROM_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC05) }, { MP_ROM_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC06) }, From f707fa107ade84102536f3feb4300b0fa8a6f9e0 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Thu, 5 Aug 2021 15:00:47 +0100 Subject: [PATCH 070/418] Tweaks to Interstate75 pinout --- .../pimoroni_interstate75/mpconfigboard.h | 26 +++++++++++++++++++ .../boards/pimoroni_interstate75/pins.c | 12 +++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h index 968f69ad7e..1ce8e1e7e1 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h @@ -1,13 +1,39 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni Interstate 75" #define MICROPY_HW_MCU_NAME "rp2040" +#define MICROPY_HW_R0 (&pin_GPIO0) +#define MICROPY_HW_G0 (&pin_GPIO1) +#define MICROPY_HW_B0 (&pin_GPIO2) +#define MICROPY_HW_R1 (&pin_GPIO3) +#define MICROPY_HW_G1 (&pin_GPIO4) +#define MICROPY_HW_B1 (&pin_GPIO5) + +#define MICROPY_HW_ROW_A (&pin_GPIO6) +#define MICROPY_HW_ROW_B (&pin_GPIO7) +#define MICROPY_HW_ROW_C (&pin_GPIO8) +#define MICROPY_HW_ROW_D (&pin_GPIO9) +#define MICROPY_HW_ROW_E (&pin_GPIO10) + +#define MICROPY_HW_CLK (&pin_GPIO11) +#define MICROPY_HW_LAT (&pin_GPIO12) +#define MICROPY_HW_OE (&pin_GPIO13) + +#define MICROPY_HW_SW_A (&pin_GPIO14) + #define CIRCUITPY_RGB_STATUS_INVERTED_PWM #define CIRCUITPY_RGB_STATUS_R (&pin_GPIO16) #define CIRCUITPY_RGB_STATUS_G (&pin_GPIO17) #define CIRCUITPY_RGB_STATUS_B (&pin_GPIO18) +#define MICROPY_HW_I2C_INT (&pin_GPIO19) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO21) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO20) + #define MICROPY_HW_USER_SW (&pin_GPIO23) +#define MICROPY_HW_CURRENT_SENSE (&pin_GPIO29) + // These pins are unconnected #define IGNORE_PIN_GPIO15 1 #define IGNORE_PIN_GPIO22 1 diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c index db20e6ea52..6e3e1a57b7 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c +++ b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c @@ -14,19 +14,22 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_ROW_D), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_ROW_E), MP_ROM_PTR(&pin_GPIO10) }, - { MP_ROM_QSTR(MP_QSTR_LED_CLK), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_LED_STB), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_LED_OE), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_LAT), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_OE), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO18) }, - + { MP_ROM_QSTR(MP_QSTR_INT), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO23) }, @@ -42,7 +45,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From 870f26bfc44f020bdc6770b336bf6e5c88ffdb0f Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 5 Aug 2021 19:19:19 +0530 Subject: [PATCH 071/418] traceback module refinements --- shared-bindings/traceback/__init__.c | 68 ++++---------------- shared-module/traceback/__init__.c | 94 +++++++++++++++++++++++++++- shared-module/traceback/__init__.h | 36 +++++++++++ 3 files changed, 140 insertions(+), 58 deletions(-) create mode 100644 shared-module/traceback/__init__.h diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index c3c7521044..d5290559ca 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -27,6 +27,8 @@ #include "py/stream.h" #include "py/runtime.h" +#include "shared-module/traceback/__init__.h" + //| """Traceback Module //| //| This module provides a standard interface to print stack traces of programs. @@ -50,7 +52,7 @@ //| Otherwise, print the last ``abs(limit)`` entries. If limit is omitted or None, all entries are printed. //| :param io.FileIO file: If file is omitted or `None`, the output goes to `sys.stderr`; otherwise it should be an open //| file or file-like object to receive the output. -//| :param bool chain: If `True` then chained exceptions will be printed. +//| :param bool chain: If `True` then chained exceptions will be printed (note: not yet implemented). //| //| """ //| ... @@ -69,10 +71,10 @@ STATIC mp_obj_t traceback_print_exception(size_t n_args, const mp_obj_t *pos_arg mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - mp_obj_t exc = args[ARG_value].u_obj; - if (!mp_obj_is_exception_instance(exc)) { + if (!mp_obj_is_exception_instance(args[ARG_value].u_obj)) { mp_raise_TypeError(translate("invalid exception")); } + mp_obj_exception_t exc = *(mp_obj_exception_t *)MP_OBJ_TO_PTR(args[ARG_value].u_obj); mp_print_t print = mp_plat_print; if (args[ARG_file].u_obj != mp_const_none) { @@ -91,67 +93,19 @@ STATIC mp_obj_t traceback_print_exception(size_t n_args, const mp_obj_t *pos_arg if (!mp_obj_get_int_maybe(args[ARG_limit].u_obj, &limit)) { mp_raise_TypeError(translate("limit should be an int")); } - print_tb = !(limit == 0); + print_tb = (limit != 0); } if (args[ARG_tb].u_obj != mp_const_none && print_tb) { if (!mp_obj_is_type(args[ARG_tb].u_obj, &mp_type_traceback)) { mp_raise_TypeError(translate("invalid traceback")); } - mp_obj_traceback_t *tb = MP_OBJ_TO_PTR(args[ARG_tb].u_obj); - size_t n = (tb->data) ? tb->len : 0; - size_t *values = (tb->data) ? tb->data : NULL; - if (n > 0) { - assert(n % 3 == 0); - // Decompress the format strings - const compressed_string_t *traceback = MP_ERROR_TEXT("Traceback (most recent call last):\n"); - char decompressed[decompress_length(traceback)]; - decompress(traceback, decompressed); - #if MICROPY_ENABLE_SOURCE_LINE - const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\", line %d"); - #else - const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\""); - #endif - char decompressed_frame[decompress_length(frame)]; - decompress(frame, decompressed_frame); - const compressed_string_t *block_fmt = MP_ERROR_TEXT(", in %q\n"); - char decompressed_block[decompress_length(block_fmt)]; - decompress(block_fmt, decompressed_block); - - // Set traceback formatting - // Default: Print full traceback - int i = n - 3, j; - if (limit > 0) { - // Print upto limit traceback - // from caller's frame - limit = n - (limit * 3); - } else if (limit < 0) { - // Print upto limit traceback - // from last - i = 0, limit = 3 + (limit * 3); - } - - // Print the traceback - mp_print_str(&print, decompressed); - for (; i >= limit; i -= 3) { - j = (i < 0) ? -i : i; - #if MICROPY_ENABLE_SOURCE_LINE - mp_printf(&print, decompressed_frame, values[j], (int)values[j + 1]); - #else - mp_printf(&print, decompressed_frame, values[j]); - #endif - // The block name can be NULL if it's unknown - qstr block = values[j + 2]; - if (block == MP_QSTRnull) { - mp_print_str(&print, "\n"); - } else { - mp_printf(&print, decompressed_block, block); - } - } - } + exc.traceback = MP_OBJ_TO_PTR(args[ARG_tb].u_obj); + } else { + exc.traceback = NULL; } - mp_obj_print_helper(&print, exc, PRINT_EXC); - mp_print_str(&print, "\n"); + + shared_module_traceback_print_exception(&exc, &print, limit); return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(traceback_print_exception_obj, 3, traceback_print_exception); diff --git a/shared-module/traceback/__init__.c b/shared-module/traceback/__init__.c index 4bd8276f34..388b1c18de 100644 --- a/shared-module/traceback/__init__.c +++ b/shared-module/traceback/__init__.c @@ -1 +1,93 @@ -// empty file +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * 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 "shared-module/traceback/__init__.h" + +void shared_module_traceback_print_exception(mp_obj_exception_t *exc, mp_print_t *print, mp_int_t limit) { + // Print traceback + if (exc->traceback != NULL) { + size_t n = exc->traceback->len; + size_t *values = exc->traceback->data; + if (n > 0) { + assert(n % 3 == 0); + // Decompress the format strings + const compressed_string_t *traceback = MP_ERROR_TEXT("Traceback (most recent call last):\n"); + char decompressed[decompress_length(traceback)]; + decompress(traceback, decompressed); + #if MICROPY_ENABLE_SOURCE_LINE + const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\", line %d"); + #else + const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\""); + #endif + char decompressed_frame[decompress_length(frame)]; + decompress(frame, decompressed_frame); + const compressed_string_t *block_fmt = MP_ERROR_TEXT(", in %q\n"); + char decompressed_block[decompress_length(block_fmt)]; + decompress(block_fmt, decompressed_block); + + // Set traceback formatting + // Default: Print full traceback + limit = limit * 3; + mp_int_t i = n - 3, j; + if (limit > 0) { + // Print upto limit traceback + // entries from caller's frame + if ((unsigned)limit > n) { + limit = n; + } + limit = n - limit; + } else if (limit < 0) { + // Print upto limit traceback + // entries from last + if ((unsigned)-limit > n) { + limit = -n; + } + i = 0, limit = limit + 3; + } + + // Print the traceback + mp_print_str(print, decompressed); + for (; i >= limit; i -= 3) { + j = (i < 0) ? -i : i; + #if MICROPY_ENABLE_SOURCE_LINE + mp_printf(print, decompressed_frame, values[j], (int)values[j + 1]); + #else + mp_printf(print, decompressed_frame, values[j]); + #endif + // The block name can be NULL if it's unknown + qstr block = values[j + 2]; + if (block == MP_QSTRnull) { + mp_print_str(print, "\n"); + } else { + mp_printf(print, decompressed_block, block); + } + } + } + } + // Print exception + mp_obj_print_helper(print, exc, PRINT_EXC); + mp_print_str(print, "\n"); +} diff --git a/shared-module/traceback/__init__.h b/shared-module/traceback/__init__.h new file mode 100644 index 0000000000..73edd07504 --- /dev/null +++ b/shared-module/traceback/__init__.h @@ -0,0 +1,36 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_MODULE_TRACEBACK___INIT___H +#define MICROPY_INCLUDED_SHARED_MODULE_TRACEBACK___INIT___H + +#include "py/objexcept.h" +#include "py/objtraceback.h" + +extern void shared_module_traceback_print_exception(mp_obj_exception_t *exc, + mp_print_t *print, mp_int_t limit); + +#endif // MICROPY_INCLUDED_SHARED_MODULE_TRACEBACK___INIT___H From f9393c9e51ecdf84b7209dddf8c050fd4151c6f5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 5 Aug 2021 11:12:07 -0500 Subject: [PATCH 072/418] enable qrio in unix coverage build, and add a test --- ports/unix/variants/coverage/mpconfigvariant.mk | 7 +++++++ tests/extmod/data/qr.pgm | 5 +++++ tests/extmod/qrio.py | 13 +++++++++++++ tests/extmod/qrio.py.exp | 1 + tests/unix/extra_coverage.py.exp | 10 +++++----- 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 tests/extmod/data/qr.pgm create mode 100644 tests/extmod/qrio.py create mode 100644 tests/extmod/qrio.py.exp diff --git a/ports/unix/variants/coverage/mpconfigvariant.mk b/ports/unix/variants/coverage/mpconfigvariant.mk index aa554200bb..e9674a3ec2 100644 --- a/ports/unix/variants/coverage/mpconfigvariant.mk +++ b/ports/unix/variants/coverage/mpconfigvariant.mk @@ -21,5 +21,12 @@ MICROPY_VFS_LFS2 = 1 FROZEN_DIR=variants/coverage/frzstr FROZEN_MPY_DIR=variants/coverage/frzmpy +SRC_QRIO := $(patsubst ../../%,%,$(wildcard ../../shared-bindings/qrio/*.c ../../shared-module/qrio/*.c ../../lib/quirc/lib/*.c)) +$(info SRC_QRIO = $(SRC_QRIO)) +SRC_C += $(SRC_QRIO) + +CFLAGS += -DCIRCUITPY_QRIO=1 +$(BUILD)/lib/quirc/lib/%.o: CFLAGS += -Wno-shadow -Wno-sign-compare -include shared-module/qrio/quirc_alloc.h + SRC_C += coverage.c SRC_CXX += coveragecpp.cpp diff --git a/tests/extmod/data/qr.pgm b/tests/extmod/data/qr.pgm new file mode 100644 index 0000000000..c8e5745367 --- /dev/null +++ b/tests/extmod/data/qr.pgm @@ -0,0 +1,5 @@ +P5 +# Created by GIMP version 2.10.22 PNM plug-in +320 240 +255 + \ No newline at end of file diff --git a/tests/extmod/qrio.py b/tests/extmod/qrio.py new file mode 100644 index 0000000000..5e9ed4c12a --- /dev/null +++ b/tests/extmod/qrio.py @@ -0,0 +1,13 @@ +try: + import qrio +except: + print("SKIP") + raise SystemExit + +loc = __file__.rsplit("/", 1)[0] +with open(f"{loc}/data/qr.pgm") as f: + content = f.read()[-320 * 240 :] + +decoder = qrio.QRDecoder(320, 240) +for r in decoder.decode(content): + print(r) diff --git a/tests/extmod/qrio.py.exp b/tests/extmod/qrio.py.exp new file mode 100644 index 0000000000..12d1e24833 --- /dev/null +++ b/tests/extmod/qrio.py.exp @@ -0,0 +1 @@ +QRInfo(payload=b'https://adafru.it', data_type='iso_8859-2') diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index 9a451ebd65..bcb58164e3 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -32,11 +32,11 @@ mport builtins micropython _thread array btree cexample cmath collections cppexample ffi framebuf gc -hashlib math sys termios -ubinascii uctypes uerrno uheapq -uio ujson ulab uos -urandom ure uselect ustruct -utime utimeq uzlib +hashlib math qrio sys +termios ubinascii uctypes uerrno +uheapq uio ujson ulab +uos urandom ure uselect +ustruct utime utimeq uzlib ime utime utimeq From 14f1d95d2d16e8a00e754692d238fe23fdafcd29 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 5 Aug 2021 12:15:05 -0500 Subject: [PATCH 073/418] qrio: Fix handling of 1-arg decode() --- shared-bindings/qrio/QRDecoder.c | 2 +- shared-bindings/qrio/__init__.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/shared-bindings/qrio/QRDecoder.c b/shared-bindings/qrio/QRDecoder.c index 0e9f45b455..ab38f4f407 100644 --- a/shared-bindings/qrio/QRDecoder.c +++ b/shared-bindings/qrio/QRDecoder.c @@ -63,7 +63,7 @@ STATIC mp_obj_t qrio_qrdecoder_decode(size_t n_args, const mp_obj_t *pos_args, m enum { ARG_buffer, ARG_pixel_policy }; static const mp_arg_t allowed_args[] = { { MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_int = 0} }, - { MP_QSTR_pixel_policy, MP_ARG_OBJ, {.u_int = 0} }, + { MP_QSTR_pixel_policy, MP_ARG_OBJ, {.u_obj = MP_ROM_PTR((mp_obj_t *)&qrio_pixel_policy_EVERY_BYTE_obj)} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); diff --git a/shared-bindings/qrio/__init__.h b/shared-bindings/qrio/__init__.h index dbb5220b49..0b731c4ca3 100644 --- a/shared-bindings/qrio/__init__.h +++ b/shared-bindings/qrio/__init__.h @@ -26,6 +26,7 @@ #pragma once +#include "py/enum.h" #include "py/obj.h" #include "py/objnamedtuple.h" @@ -36,3 +37,5 @@ extern const mp_obj_type_t qrio_pixel_policy_type; typedef enum { QRIO_EVERY_BYTE, QRIO_EVEN_BYTES, QRIO_ODD_BYTES } qrio_pixel_policy_t; + +extern const cp_enum_obj_t qrio_pixel_policy_EVERY_BYTE_obj; From 46ac717538c5cee0b0cc91787fca069219ad4151 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 5 Aug 2021 12:20:09 -0500 Subject: [PATCH 074/418] Rename qrinfo -> QRInfo --- shared-bindings/qrio/QRDecoder.c | 2 +- shared-bindings/qrio/__init__.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared-bindings/qrio/QRDecoder.c b/shared-bindings/qrio/QRDecoder.c index ab38f4f407..5634481e9d 100644 --- a/shared-bindings/qrio/QRDecoder.c +++ b/shared-bindings/qrio/QRDecoder.c @@ -54,7 +54,7 @@ STATIC mp_obj_t qrio_qrdecoder_make_new(const mp_obj_type_t *type, size_t n_args return self; } -//| def decode(self, buffer: ReadableBuffer) -> List[qrinfo]: +//| def decode(self, buffer: ReadableBuffer) -> List[QRInfo]: //| """Decode zero or more QR codes from the given image in L8 format""" //| STATIC mp_obj_t qrio_qrdecoder_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/shared-bindings/qrio/__init__.c b/shared-bindings/qrio/__init__.c index 30b2aaedae..6dbbd926cf 100644 --- a/shared-bindings/qrio/__init__.c +++ b/shared-bindings/qrio/__init__.c @@ -60,7 +60,7 @@ MAKE_PRINTER(qrio, qrio_pixel_policy); MAKE_ENUM_TYPE(qrio, PixelPolicy, qrio_pixel_policy); -//| class qrinfo: +//| class QRInfo: //| """Information about a decoded QR code""" //| //| payload: bytes @@ -75,7 +75,7 @@ const mp_obj_namedtuple_type_t qrio_qrinfo_type_obj = { .type = &mp_type_type }, .flags = MP_TYPE_FLAG_EXTENDED, - .name = MP_QSTR_qrinfo, + .name = MP_QSTR_QRInfo, .print = namedtuple_print, .parent = &mp_type_tuple, .make_new = namedtuple_make_new, @@ -96,7 +96,7 @@ const mp_obj_namedtuple_type_t qrio_qrinfo_type_obj = { STATIC const mp_rom_map_elem_t qrio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_qrio) }, - { MP_ROM_QSTR(MP_QSTR_qrinfo), MP_ROM_PTR(&qrio_qrinfo_type_obj) }, + { MP_ROM_QSTR(MP_QSTR_QRInfo), MP_ROM_PTR(&qrio_qrinfo_type_obj) }, { MP_ROM_QSTR(MP_QSTR_QRDecoder), MP_ROM_PTR(&qrio_qrdecoder_type_obj) }, { MP_ROM_QSTR(MP_QSTR_PixelPolicy), MP_ROM_PTR(&qrio_pixel_policy_type) }, }; From e5a57d2399f10a77932818c85b343b144d534668 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 5 Aug 2021 12:20:33 -0500 Subject: [PATCH 075/418] Fix function name in prototype --- shared-bindings/qrio/QRDecoder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/qrio/QRDecoder.h b/shared-bindings/qrio/QRDecoder.h index 90a1a4cd61..0b01aeb44e 100644 --- a/shared-bindings/qrio/QRDecoder.h +++ b/shared-bindings/qrio/QRDecoder.h @@ -34,4 +34,4 @@ extern const mp_obj_type_t qrio_qrdecoder_type_obj; void common_hal_qrio_qrdecoder_construct(qrio_qrdecoder_obj_t *self); -mp_obj_t common_hal_qrio_qrdecoder_recognize(qrio_qrdecoder_obj_t *self, int width, int height, mp_buffer_info_t *buf); +mp_obj_t common_hal_qrio_qrdecoder_decode(qrio_qrdecoder_obj_t *self, int width, int height, mp_buffer_info_t *buf); From 0fbe56c915c614679664dcfcb360707b26f1b423 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 5 Aug 2021 12:23:28 -0500 Subject: [PATCH 076/418] Better Document PixelPolicy and the pixel_policy argument --- shared-bindings/qrio/QRDecoder.c | 4 ++-- shared-bindings/qrio/__init__.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/shared-bindings/qrio/QRDecoder.c b/shared-bindings/qrio/QRDecoder.c index 5634481e9d..67fca8c3fb 100644 --- a/shared-bindings/qrio/QRDecoder.c +++ b/shared-bindings/qrio/QRDecoder.c @@ -54,8 +54,8 @@ STATIC mp_obj_t qrio_qrdecoder_make_new(const mp_obj_type_t *type, size_t n_args return self; } -//| def decode(self, buffer: ReadableBuffer) -> List[QRInfo]: -//| """Decode zero or more QR codes from the given image in L8 format""" +//| def decode(self, buffer: ReadableBuffer, pixel_policy: PixelPolicy = PixelPolicy.EVERY_BYTE) -> List[QRInfo]: +//| """Decode zero or more QR codes from the given image""" //| STATIC mp_obj_t qrio_qrdecoder_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); diff --git a/shared-bindings/qrio/__init__.c b/shared-bindings/qrio/__init__.c index 6dbbd926cf..719c73eb13 100644 --- a/shared-bindings/qrio/__init__.c +++ b/shared-bindings/qrio/__init__.c @@ -35,14 +35,14 @@ //| //| class PixelPolicy: -//| EVERY_BYTE: object +//| EVERY_BYTE: PixelPolicy //| """The input buffer to `QRDecoder.decode` consists of greyscale values in every byte""" //| -//| EVEN_BYTES: object -//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 0, 2, ..., and ignored bytes in positions 1, 3, ...""" - -//| ODD_BYTES: object -//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 1, 3, ..., and ignored bytes in positions 0, 2, ...""" +//| EVEN_BYTES: PixelPolicy +//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 0, 2, …, and ignored bytes in positions 1, 3, …. This can decode directly from YUV images where the even bytes hold the Y (luminance) data.""" +//| +//| ODD_BYTES: PixelPolicy +//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 1, 3, …, and ignored bytes in positions 0, 2, …. This can decode directly from YUV images where the odd bytes hold the Y (luminance) data""" //| MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, EVERY_BYTE, QRIO_EVERY_BYTE); From 2e8eb43dcca626065fc3396019f34ef1a0053978 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 5 Aug 2021 12:45:27 -0500 Subject: [PATCH 077/418] Use new quirc define for small stacks .. and revert stack enlargement of esp32-s2 --- lib/quirc | 2 +- ports/esp32s2/esp-idf-config/sdkconfig.defaults | 4 ++-- shared-module/qrio/quirc_alloc.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/quirc b/lib/quirc index 7f4001e719..8c6ffa228a 160000 --- a/lib/quirc +++ b/lib/quirc @@ -1 +1 @@ -Subproject commit 7f4001e71921e9e17405119e369775f5b4289a8b +Subproject commit 8c6ffa228a4c7643daed7039d3c51d38a43991b8 diff --git a/ports/esp32s2/esp-idf-config/sdkconfig.defaults b/ports/esp32s2/esp-idf-config/sdkconfig.defaults index 35e0846a7f..cc59e2a7ed 100644 --- a/ports/esp32s2/esp-idf-config/sdkconfig.defaults +++ b/ports/esp32s2/esp-idf-config/sdkconfig.defaults @@ -275,7 +275,7 @@ CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y CONFIG_ESP_ERR_TO_NAME_LOOKUP=y CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 CONFIG_ESP_CONSOLE_UART_DEFAULT=y @@ -806,7 +806,7 @@ CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y CONFIG_ADC2_DISABLE_DAC=y CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_MAIN_TASK_STACK_SIZE=16384 +CONFIG_MAIN_TASK_STACK_SIZE=8192 CONFIG_IPC_TASK_STACK_SIZE=1024 CONFIG_CONSOLE_UART_DEFAULT=y # CONFIG_CONSOLE_UART_CUSTOM is not set diff --git a/shared-module/qrio/quirc_alloc.h b/shared-module/qrio/quirc_alloc.h index a015aee7f9..b01fac5bfb 100644 --- a/shared-module/qrio/quirc_alloc.h +++ b/shared-module/qrio/quirc_alloc.h @@ -10,3 +10,5 @@ #define QUIRC_MALLOC(x) gc_alloc((x), 0, false) #define QUIRC_CALLOC(x,y) gc_alloc((x) * (y), 0, false) #define QUIRC_FREE(x) gc_free((x)) + +#define QUIRC_SMALL_STACK (1) From 8e201d519e7f4db5d9200bcc7adf9cd2e5776ed3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 5 Aug 2021 15:04:28 -0500 Subject: [PATCH 078/418] better document constructor arguments --- shared-bindings/qrio/QRDecoder.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shared-bindings/qrio/QRDecoder.c b/shared-bindings/qrio/QRDecoder.c index 67fca8c3fb..73a5d64694 100644 --- a/shared-bindings/qrio/QRDecoder.c +++ b/shared-bindings/qrio/QRDecoder.c @@ -35,8 +35,12 @@ //| class QRDecoder: //| //| def __init__(self, width: int, height: int) -> None: -//| """Construct a QRDecoder object""" +//| """Construct a QRDecoder object //| +//| :param int width: The pixel width of the image to decode +//| :param int height: The pixel height of the image to decode +//| """ +//| ... STATIC mp_obj_t qrio_qrdecoder_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_width, ARG_height }; @@ -55,7 +59,7 @@ STATIC mp_obj_t qrio_qrdecoder_make_new(const mp_obj_type_t *type, size_t n_args } //| def decode(self, buffer: ReadableBuffer, pixel_policy: PixelPolicy = PixelPolicy.EVERY_BYTE) -> List[QRInfo]: -//| """Decode zero or more QR codes from the given image""" +//| """Decode zero or more QR codes from the given image. The size of the buffer must be at least ``length``×``width`` bytes for `EVERY_BYTE`, and 2×``length``×``width`` bytes for `EVEN_BYTES` or `ODD_BYTES`.""" //| STATIC mp_obj_t qrio_qrdecoder_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); From 4d14bcf2a2283e4d090eb774ac0b9b67e567532a Mon Sep 17 00:00:00 2001 From: evildave666 Date: Fri, 6 Aug 2021 16:06:16 +0900 Subject: [PATCH 079/418] Add WeAct manufacturer for black pill boards --- ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk | 2 +- .../boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk index dc1dfad0d6..db83a5ce6b 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x239A USB_PID = 0x806A USB_PRODUCT = "stm32f411ce blackpill" -USB_MANUFACTURER = "Unknown" +USB_MANUFACTURER = "WeAct" # SPI_FLASH_FILESYSTEM = 1 # EXTERNAL_FLASH_DEVICES = xxxxxx #See supervisor/shared/external_flash/devices.h for options diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index 7ea5fc4a82..e095d69403 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x239A USB_PID = 0x006A USB_PRODUCT = "stm32f411ce blackpill with flash" -USB_MANUFACTURER = "Unknown" +USB_MANUFACTURER = "WeAct" SPI_FLASH_FILESYSTEM = 1 #See supervisor/shared/external_flash/devices.h for options From 67551c1ac05074d063b927ed78fc09ae2d1fc710 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 6 Aug 2021 09:53:17 -0500 Subject: [PATCH 080/418] qrio: Split QRInfo & PixelPolicy to their own .c/.h files --- py/circuitpy_defns.mk | 3 +- shared-bindings/qrio/PixelPolicy.c | 56 ++++++++++++++++++++++++++ shared-bindings/qrio/PixelPolicy.h | 39 ++++++++++++++++++ shared-bindings/qrio/QRInfo.c | 64 ++++++++++++++++++++++++++++++ shared-bindings/qrio/QRInfo.h | 31 +++++++++++++++ shared-bindings/qrio/__init__.c | 62 +---------------------------- shared-bindings/qrio/__init__.h | 14 ------- shared-module/qrio/QRDecoder.c | 1 + shared-module/qrio/QRDecoder.h | 1 + 9 files changed, 196 insertions(+), 75 deletions(-) create mode 100644 shared-bindings/qrio/PixelPolicy.c create mode 100644 shared-bindings/qrio/PixelPolicy.h create mode 100644 shared-bindings/qrio/QRInfo.c create mode 100644 shared-bindings/qrio/QRInfo.h diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index a70f01d25e..5e7fd355fe 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -445,6 +445,8 @@ $(filter $(SRC_PATTERNS), \ _eve/__init__.c \ camera/ImageFormat.c \ canio/Match.c \ + qrio/PixelPolicy.c \ + qrio/QRInfo.c \ digitalio/Direction.c \ digitalio/DriveMode.c \ digitalio/Pull.c \ @@ -672,7 +674,6 @@ SRC_CIRCUITPY_COMMON = \ ifeq ($(CIRCUITPY_QRIO),1) SRC_CIRCUITPY_COMMON += lib/quirc/lib/decode.c lib/quirc/lib/identify.c lib/quirc/lib/quirc.c lib/quirc/lib/version_db.c $(BUILD)/lib/quirc/lib/%.o: CFLAGS += -Wno-shadow -Wno-sign-compare -include shared-module/qrio/quirc_alloc.h - endif ifdef LD_TEMPLATE_FILE diff --git a/shared-bindings/qrio/PixelPolicy.c b/shared-bindings/qrio/PixelPolicy.c new file mode 100644 index 0000000000..6887081b24 --- /dev/null +++ b/shared-bindings/qrio/PixelPolicy.c @@ -0,0 +1,56 @@ +/* + * This file is part of the CircuitPython project, https://github.com/adafruit/circuitpython + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler + * + * 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 "shared-bindings/qrio/__init__.h" +#include "shared-bindings/qrio/PixelPolicy.h" +#include "py/obj.h" +#include "py/enum.h" + +//| class PixelPolicy: +//| EVERY_BYTE: PixelPolicy +//| """The input buffer to `QRDecoder.decode` consists of greyscale values in every byte""" +//| +//| EVEN_BYTES: PixelPolicy +//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 0, 2, …, and ignored bytes in positions 1, 3, …. This can decode directly from YUV images where the even bytes hold the Y (luminance) data.""" +//| +//| ODD_BYTES: PixelPolicy +//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 1, 3, …, and ignored bytes in positions 0, 2, …. This can decode directly from YUV images where the odd bytes hold the Y (luminance) data""" +//| + +MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, EVERY_BYTE, QRIO_EVERY_BYTE); +MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, EVEN_BYTES, QRIO_EVEN_BYTES); +MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, ODD_BYTES, QRIO_EVEN_BYTES); + +MAKE_ENUM_MAP(qrio_pixel_policy) { + MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, EVERY_BYTE), + MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, EVEN_BYTES), + MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, ODD_BYTES), +}; +STATIC MP_DEFINE_CONST_DICT(qrio_pixel_policy_locals_dict, qrio_pixel_policy_locals_table); + +MAKE_PRINTER(qrio, qrio_pixel_policy); + +MAKE_ENUM_TYPE(qrio, PixelPolicy, qrio_pixel_policy); diff --git a/shared-bindings/qrio/PixelPolicy.h b/shared-bindings/qrio/PixelPolicy.h new file mode 100644 index 0000000000..8be5dde1cc --- /dev/null +++ b/shared-bindings/qrio/PixelPolicy.h @@ -0,0 +1,39 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/enum.h" +#include "py/obj.h" +#include "py/objnamedtuple.h" + +extern const mp_obj_type_t qrio_pixel_policy_type; + +typedef enum { + QRIO_EVERY_BYTE, QRIO_EVEN_BYTES, QRIO_ODD_BYTES +} qrio_pixel_policy_t; + +extern const cp_enum_obj_t qrio_pixel_policy_EVERY_BYTE_obj; diff --git a/shared-bindings/qrio/QRInfo.c b/shared-bindings/qrio/QRInfo.c new file mode 100644 index 0000000000..8eb03874ef --- /dev/null +++ b/shared-bindings/qrio/QRInfo.c @@ -0,0 +1,64 @@ +/* + * This file is part of the CircuitPython project, https://github.com/adafruit/circuitpython + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler + * + * 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 "shared-bindings/qrio/__init__.h" +#include "shared-bindings/qrio/QRInfo.h" +#include "py/obj.h" +#include "py/enum.h" + +//| class QRInfo: +//| """Information about a decoded QR code""" +//| +//| payload: bytes +//| """The content of the QR code""" +//| +//| data_type: Union[str, int] +//| """The encoding of the payload as a string (if a standard encoding) or int (if not standard)""" + +const mp_obj_namedtuple_type_t qrio_qrinfo_type_obj = { + .base = { + .base = { + .type = &mp_type_type + }, + .flags = MP_TYPE_FLAG_EXTENDED, + .name = MP_QSTR_QRInfo, + .print = namedtuple_print, + .parent = &mp_type_tuple, + .make_new = namedtuple_make_new, + .attr = namedtuple_attr, + MP_TYPE_EXTENDED_FIELDS( + .unary_op = mp_obj_tuple_unary_op, + .binary_op = mp_obj_tuple_binary_op, + .subscr = mp_obj_tuple_subscr, + .getiter = mp_obj_tuple_getiter, + ), + }, + .n_fields = 2, + .fields = { + MP_QSTR_payload, + MP_QSTR_data_type, + }, +}; diff --git a/shared-bindings/qrio/QRInfo.h b/shared-bindings/qrio/QRInfo.h new file mode 100644 index 0000000000..956cb42735 --- /dev/null +++ b/shared-bindings/qrio/QRInfo.h @@ -0,0 +1,31 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/objnamedtuple.h" + +extern const mp_obj_namedtuple_type_t qrio_qrinfo_type_obj; diff --git a/shared-bindings/qrio/__init__.c b/shared-bindings/qrio/__init__.c index 719c73eb13..b848190d7e 100644 --- a/shared-bindings/qrio/__init__.c +++ b/shared-bindings/qrio/__init__.c @@ -26,6 +26,8 @@ #include "shared-bindings/qrio/__init__.h" #include "shared-bindings/qrio/QRDecoder.h" +#include "shared-bindings/qrio/QRInfo.h" +#include "shared-bindings/qrio/PixelPolicy.h" #include "py/obj.h" #include "py/enum.h" @@ -34,66 +36,6 @@ //| Provides the `QRDecoder` object.""" //| -//| class PixelPolicy: -//| EVERY_BYTE: PixelPolicy -//| """The input buffer to `QRDecoder.decode` consists of greyscale values in every byte""" -//| -//| EVEN_BYTES: PixelPolicy -//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 0, 2, …, and ignored bytes in positions 1, 3, …. This can decode directly from YUV images where the even bytes hold the Y (luminance) data.""" -//| -//| ODD_BYTES: PixelPolicy -//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 1, 3, …, and ignored bytes in positions 0, 2, …. This can decode directly from YUV images where the odd bytes hold the Y (luminance) data""" -//| - -MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, EVERY_BYTE, QRIO_EVERY_BYTE); -MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, EVEN_BYTES, QRIO_EVEN_BYTES); -MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, ODD_BYTES, QRIO_EVEN_BYTES); - -MAKE_ENUM_MAP(qrio_pixel_policy) { - MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, EVERY_BYTE), - MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, EVEN_BYTES), - MAKE_ENUM_MAP_ENTRY(qrio_pixel_policy, ODD_BYTES), -}; -STATIC MP_DEFINE_CONST_DICT(qrio_pixel_policy_locals_dict, qrio_pixel_policy_locals_table); - -MAKE_PRINTER(qrio, qrio_pixel_policy); - -MAKE_ENUM_TYPE(qrio, PixelPolicy, qrio_pixel_policy); - -//| class QRInfo: -//| """Information about a decoded QR code""" -//| -//| payload: bytes -//| """The content of the QR code""" -//| -//| data_type: Union[str, int] -//| """The encoding of the payload as a string (if a standard encoding) or int (if not standard)""" - -const mp_obj_namedtuple_type_t qrio_qrinfo_type_obj = { - .base = { - .base = { - .type = &mp_type_type - }, - .flags = MP_TYPE_FLAG_EXTENDED, - .name = MP_QSTR_QRInfo, - .print = namedtuple_print, - .parent = &mp_type_tuple, - .make_new = namedtuple_make_new, - .attr = namedtuple_attr, - MP_TYPE_EXTENDED_FIELDS( - .unary_op = mp_obj_tuple_unary_op, - .binary_op = mp_obj_tuple_binary_op, - .subscr = mp_obj_tuple_subscr, - .getiter = mp_obj_tuple_getiter, - ), - }, - .n_fields = 2, - .fields = { - MP_QSTR_payload, - MP_QSTR_data_type, - }, -}; - STATIC const mp_rom_map_elem_t qrio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_qrio) }, { MP_ROM_QSTR(MP_QSTR_QRInfo), MP_ROM_PTR(&qrio_qrinfo_type_obj) }, diff --git a/shared-bindings/qrio/__init__.h b/shared-bindings/qrio/__init__.h index 0b731c4ca3..be9b3aefa7 100644 --- a/shared-bindings/qrio/__init__.h +++ b/shared-bindings/qrio/__init__.h @@ -25,17 +25,3 @@ */ #pragma once - -#include "py/enum.h" -#include "py/obj.h" -#include "py/objnamedtuple.h" - -extern const mp_obj_namedtuple_type_t qrio_qrinfo_type_obj; - -extern const mp_obj_type_t qrio_pixel_policy_type; - -typedef enum { - QRIO_EVERY_BYTE, QRIO_EVEN_BYTES, QRIO_ODD_BYTES -} qrio_pixel_policy_t; - -extern const cp_enum_obj_t qrio_pixel_policy_EVERY_BYTE_obj; diff --git a/shared-module/qrio/QRDecoder.c b/shared-module/qrio/QRDecoder.c index 1b59961631..227f3b39b4 100644 --- a/shared-module/qrio/QRDecoder.c +++ b/shared-module/qrio/QRDecoder.c @@ -29,6 +29,7 @@ #include "py/gc.h" #include "py/objnamedtuple.h" #include "shared-bindings/qrio/__init__.h" +#include "shared-bindings/qrio/QRInfo.h" #include "shared-module/qrio/QRDecoder.h" void shared_module_qrio_qrdecoder_construct(qrdecoder_qrdecoder_obj_t *self, int width, int height) { diff --git a/shared-module/qrio/QRDecoder.h b/shared-module/qrio/QRDecoder.h index af4eac5e46..096dcd2e3f 100644 --- a/shared-module/qrio/QRDecoder.h +++ b/shared-module/qrio/QRDecoder.h @@ -28,6 +28,7 @@ #include "py/obj.h" #include "lib/quirc/lib/quirc.h" +#include "shared-bindings/qrio/PixelPolicy.h" typedef struct qrio_qrdecoder_obj { mp_obj_base_t base; From c21c754a505f6ce8ada77fc305e40c01fd567afc Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 6 Aug 2021 21:10:25 +0200 Subject: [PATCH 081/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 40 ++++++++++++++++++++++------------- locale/cs.po | 40 ++++++++++++++++++++++------------- locale/de_DE.po | 43 +++++++++++++++++++++++++------------- locale/el.po | 40 ++++++++++++++++++++++------------- locale/en_GB.po | 43 +++++++++++++++++++++++++------------- locale/es.po | 43 +++++++++++++++++++++++++------------- locale/fil.po | 43 +++++++++++++++++++++++++------------- locale/fr.po | 43 +++++++++++++++++++++++++------------- locale/hi.po | 40 ++++++++++++++++++++++------------- locale/it_IT.po | 45 ++++++++++++++++++++++++++-------------- locale/ja.po | 43 +++++++++++++++++++++++++------------- locale/ko.po | 40 ++++++++++++++++++++++------------- locale/nl.po | 43 +++++++++++++++++++++++++------------- locale/pl.po | 43 +++++++++++++++++++++++++------------- locale/pt_BR.po | 43 +++++++++++++++++++++++++------------- locale/sv.po | 43 +++++++++++++++++++++++++------------- locale/zh_Latn_pinyin.po | 43 +++++++++++++++++++++++++------------- 17 files changed, 479 insertions(+), 239 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index f50cee00ed..eaacf139fc 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -42,11 +42,11 @@ msgstr "" "Harap ajukan masalah dengan konten drive CIRCUITPY Anda di\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " File \"%q\", baris %d" @@ -329,7 +329,7 @@ msgstr "'yield' diluar fungsi" msgid "*x must be assignment target" msgstr "*x harus menjadi target assignment" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", dalam %q\n" @@ -1205,11 +1205,6 @@ msgstr "" msgid "Input/output error" msgstr "Kesalahan input/output" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1526,6 +1521,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Harus berupa subclass %q." @@ -2246,7 +2246,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (bagian terakhir dari panggilan terkini):\n" @@ -2552,7 +2552,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "argumen num/types tidak cocok" @@ -3116,6 +3116,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "" @@ -3403,6 +3407,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "format tidak valid" @@ -3440,6 +3448,10 @@ msgstr "" msgid "invalid syntax for number" msgstr "" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "" @@ -3484,6 +3496,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3636,10 +3652,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "tidak ada ikatan/bind pada temuan nonlocal" diff --git a/locale/cs.po b/locale/cs.po index 4256b25202..a2a83042bc 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -38,11 +38,11 @@ msgstr "" "Založte prosím problém s obsahem vaší jednotky CIRCUITPY na adrese\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Soubor \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Soubor \"%q\", řádek %d" @@ -325,7 +325,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr "" @@ -1188,11 +1188,6 @@ msgstr "" msgid "Input/output error" msgstr "" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1509,6 +1504,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2215,7 +2215,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -2513,7 +2513,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3077,6 +3077,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "" @@ -3364,6 +3368,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3401,6 +3409,10 @@ msgstr "" msgid "invalid syntax for number" msgstr "" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "" @@ -3445,6 +3457,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3597,10 +3613,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 6de4c6db85..eb7d3df8bb 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -41,11 +41,11 @@ msgstr "" "Bitte melden Sie ein Problem mit dem Inhalt Ihres CIRCUITPY-Laufwerks unter\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Datei \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Datei \"%q\", Zeile %d" @@ -331,7 +331,7 @@ msgstr "'yield' außerhalb einer Funktion" msgid "*x must be assignment target" msgstr "*x muss Zuordnungsziel sein" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", in %q\n" @@ -1205,11 +1205,6 @@ msgstr "Input benötigt zu lange" msgid "Input/output error" msgstr "Eingabe-/Ausgabefehler" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1527,6 +1522,11 @@ msgstr "Fehlender first_out_pin. Instruktion %d schreibt Pin(s)" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "Fehlender first_set_pin. Instruktion %d setzt Pin(s)" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Muss eine %q Unterklasse sein." @@ -2247,7 +2247,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Zurückverfolgung (jüngste Aufforderung zuletzt):\n" @@ -2558,7 +2558,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "Anzahl/Typen der Argumente passen nicht" @@ -3134,6 +3134,10 @@ msgstr "f-string: einzelne '}' nicht erlaubt" msgid "file must be a file opened in byte mode" msgstr "Die Datei muss eine im Byte-Modus geöffnete Datei sein" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "Das Dateisystem muss eine Mount-Methode bereitstellen" @@ -3423,6 +3427,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "ungültiges Format" @@ -3460,6 +3468,10 @@ msgstr "ungültige Syntax für integer mit Basis %d" msgid "invalid syntax for number" msgstr "ungültige Syntax für number" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass() arg 1 muss eine Klasse sein" @@ -3508,6 +3520,10 @@ msgstr "Der Pegel muss zwischen 0 und 1 liegen" msgid "lhs and rhs should be compatible" msgstr "lhs und rhs sollten kompatibel sein" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "Lokales '%q' hat den Typ '%q', aber die Quelle ist '%q'" @@ -3662,10 +3678,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "Keine aktive Ausnahme zu verusachen (raise)" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "kein verfügbares Netzwerkadapter (NIC)" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "Kein Binding für nonlocal gefunden" @@ -4499,6 +4511,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "no available NIC" +#~ msgstr "kein verfügbares Netzwerkadapter (NIC)" + #~ msgid "Instruction %d jumps on pin" #~ msgstr "Instruktion %d springt auf Pin" diff --git a/locale/el.po b/locale/el.po index 68119f7714..fc901b157f 100644 --- a/locale/el.po +++ b/locale/el.po @@ -35,11 +35,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr "" @@ -322,7 +322,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr "" @@ -1185,11 +1185,6 @@ msgstr "" msgid "Input/output error" msgstr "" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1506,6 +1501,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2212,7 +2212,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -2510,7 +2510,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3074,6 +3074,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "" @@ -3361,6 +3365,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3398,6 +3406,10 @@ msgstr "" msgid "invalid syntax for number" msgstr "" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "" @@ -3442,6 +3454,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3594,10 +3610,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 6d0dd25051..191d3df59d 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -43,11 +43,11 @@ msgstr "" "Please file an issue with the contents of your CIRCUITPY drive at \n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " File \"%q\", line %d" @@ -331,7 +331,7 @@ msgstr "'yield' outside function" msgid "*x must be assignment target" msgstr "*x must be assignment target" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", in %q\n" @@ -1200,11 +1200,6 @@ msgstr "Input taking too long" msgid "Input/output error" msgstr "Input/output error" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1521,6 +1516,11 @@ msgstr "Missing first_out_pin. Instruction %d writes pin(s)" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "Missing first_set_pin. Instruction %d sets pin(s)" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Must be a %q subclass." @@ -2236,7 +2236,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (most recent call last):\n" @@ -2541,7 +2541,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "argument num/types mismatch" @@ -3108,6 +3108,10 @@ msgstr "f-string: single '}' is not allowed" msgid "file must be a file opened in byte mode" msgstr "file must be a file opened in byte mode" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "filesystem must provide mount method" @@ -3395,6 +3399,10 @@ msgstr "invalid element size %d for bits_per_pixel %d\n" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "invalid element_size %d, must be, 1, 2, or 4" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "invalid format" @@ -3433,6 +3441,10 @@ msgstr "invalid syntax for integer with base %d" msgid "invalid syntax for number" msgstr "invalid syntax for number" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass() arg 1 must be a class" @@ -3477,6 +3489,10 @@ msgstr "level must be between 0 and 1" msgid "lhs and rhs should be compatible" msgstr "lhs and rhs should be compatible" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "local '%q' has type '%q' but source is '%q'" @@ -3629,10 +3645,6 @@ msgstr "no SD card" msgid "no active exception to reraise" msgstr "no active exception to reraise" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "no available NIC" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "no binding for nonlocal found" @@ -4457,6 +4469,9 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "no available NIC" +#~ msgstr "no available NIC" + #~ msgid "" #~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " #~ "instead" diff --git a/locale/es.po b/locale/es.po index 2d5a57f92f..ac835d8b9f 100644 --- a/locale/es.po +++ b/locale/es.po @@ -44,11 +44,11 @@ msgstr "" "Presente un problema con el contenido de su unidad CIRCUITPY en\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Archivo \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Archivo \"%q\", línea %d" @@ -333,7 +333,7 @@ msgstr "'yield' fuera de una función" msgid "*x must be assignment target" msgstr "*x debe ser objetivo de la tarea" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", en %q\n" @@ -1218,11 +1218,6 @@ msgstr "La entrada está durando mucho tiempo" msgid "Input/output error" msgstr "error Input/output" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1543,6 +1538,11 @@ msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" "first_set_pin no encontrado. La instrucción %d configura el/los pin(es)" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Debe de ser una subclase de %q." @@ -2274,7 +2274,7 @@ msgstr "La cantidad total de datos es mas grande que %q" msgid "Touch alarms not available" msgstr "Alarmas táctiles no disponibles" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (ultima llamada reciente):\n" @@ -2585,7 +2585,7 @@ msgid "argument name reused" msgstr "nombre de argumento reutilizado" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "argumento número/tipos no coinciden" @@ -3156,6 +3156,10 @@ msgstr "cadena-f: solo '}' no está permitido" msgid "file must be a file opened in byte mode" msgstr "el archivo deberia ser una archivo abierto en modo byte" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "sistema de archivos debe proporcionar método de montaje" @@ -3443,6 +3447,10 @@ msgstr "el tamaño del elemento no es valido%d por bits_per_pixel %d\n" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "el element_size %d,no es valido, debe ser 1,2 ó 4" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "formato inválido" @@ -3480,6 +3488,10 @@ msgstr "sintaxis inválida para entero con base %d" msgid "invalid syntax for number" msgstr "sintaxis inválida para número" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass() arg 1 debe ser una clase" @@ -3527,6 +3539,10 @@ msgstr "el nivel debe ser entre 0 y 1" msgid "lhs and rhs should be compatible" msgstr "lhs y rhs deben ser compatibles" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "la variable local '%q' tiene el tipo '%q' pero la fuente es '%q'" @@ -3680,10 +3696,6 @@ msgstr "no hay tarjeta SD" msgid "no active exception to reraise" msgstr "exception no activa para reraise" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "NIC no disponible" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "no se ha encontrado ningún enlace para nonlocal" @@ -4512,6 +4524,9 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "no available NIC" +#~ msgstr "NIC no disponible" + #~ msgid "" #~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " #~ "instead" diff --git a/locale/fil.po b/locale/fil.po index 45a827b0e5..e7e1063c09 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -34,11 +34,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " File \"%q\", line %d" @@ -324,7 +324,7 @@ msgstr "'yield' sa labas ng function" msgid "*x must be assignment target" msgstr "*x ay dapat na assignment target" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", sa %q\n" @@ -1200,11 +1200,6 @@ msgstr "" msgid "Input/output error" msgstr "May mali sa Input/Output" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1521,6 +1516,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2232,7 +2232,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (pinakahuling huling tawag): \n" @@ -2538,7 +2538,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "hindi tugma ang argument num/types" @@ -3114,6 +3114,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "file ay dapat buksan sa byte mode" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "ang filesystem dapat mag bigay ng mount method" @@ -3402,6 +3406,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "hindi wastong pag-format" @@ -3439,6 +3447,10 @@ msgstr "maling sintaks sa integer na may base %d" msgid "invalid syntax for number" msgstr "maling sintaks sa number" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass() arg 1 ay dapat na class" @@ -3487,6 +3499,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "lhs at rhs ay dapat magkasundo" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "local '%q' ay may type '%q' pero ang source ay '%q'" @@ -3639,10 +3655,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "walang aktibong exception para i-reraise" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "walang magagamit na NIC" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "no binding para sa nonlocal, nahanap" @@ -4473,6 +4485,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "no available NIC" +#~ msgstr "walang magagamit na NIC" + #~ msgid "USB Busy" #~ msgstr "Busy ang USB" diff --git a/locale/fr.po b/locale/fr.po index 7ca4dcf764..c66fc05e24 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -44,11 +44,11 @@ msgstr "" "l'adresse\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Fichier \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Fichier \"%q\", ligne %d" @@ -333,7 +333,7 @@ msgstr "'yield' dehors d'une fonction" msgid "*x must be assignment target" msgstr "*x doit être la cible de l'assignement" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", dans %q\n" @@ -1224,11 +1224,6 @@ msgstr "L'entrée prend trop de temps" msgid "Input/output error" msgstr "Erreur d'entrée/sortie" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1551,6 +1546,11 @@ msgstr "first_out_pin manquant. Instruction %d écrit un/des broche(s)" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "first_set_pin manquant. L'instruction %d règle la/les broche(s)" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Doit être une sous-classe de %q." @@ -2274,7 +2274,7 @@ msgstr "Quantité de données à écrire est plus que %q" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (appels les plus récents en dernier) :\n" @@ -2587,7 +2587,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "Nombre/types de paramètres ne correspondent pas" @@ -3164,6 +3164,10 @@ msgstr "f-string : single '}' n'est pas autorisé" msgid "file must be a file opened in byte mode" msgstr "le fichier doit être un fichier ouvert en mode 'byte'" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "le system de fichier doit fournir une méthode 'mount'" @@ -3452,6 +3456,10 @@ msgstr "taille d'élément %d est invalide pour bits_per_pixel %d\n" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "element_size %d est invalide, doit être 1, 2 ou 4" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "format invalide" @@ -3489,6 +3497,10 @@ msgstr "syntaxe invalide pour un entier de base %d" msgid "invalid syntax for number" msgstr "syntaxe invalide pour un nombre" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "l'argument 1 de issubclass() doit être une classe" @@ -3537,6 +3549,10 @@ msgstr "le niveau doit être compris entre 0 et 1" msgid "lhs and rhs should be compatible" msgstr "Les parties gauches et droites doivent être compatibles" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "la variable locale '%q' a le type '%q' mais la source est '%q'" @@ -3689,10 +3705,6 @@ msgstr "pas de carte SD" msgid "no active exception to reraise" msgstr "aucune exception active à relever" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "adapteur réseau non disponible" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "pas de lien trouvé pour nonlocal" @@ -4523,6 +4535,9 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "no available NIC" +#~ msgstr "adapteur réseau non disponible" + #~ msgid "" #~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " #~ "instead" diff --git a/locale/hi.po b/locale/hi.po index 65ac583202..e6e08a9ecc 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -35,11 +35,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr "" @@ -322,7 +322,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr "" @@ -1185,11 +1185,6 @@ msgstr "" msgid "Input/output error" msgstr "" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1506,6 +1501,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2212,7 +2212,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -2510,7 +2510,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3074,6 +3074,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "" @@ -3361,6 +3365,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3398,6 +3406,10 @@ msgstr "" msgid "invalid syntax for number" msgstr "" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "" @@ -3442,6 +3454,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3594,10 +3610,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 53ce2e8fc0..b0c9259d9a 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -43,11 +43,11 @@ msgstr "" "Per favore, segnala il problema con il contenuto del tuo CIRCUITPY a\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " File \"%q\", riga %d" @@ -333,7 +333,7 @@ msgstr "'yield' al di fuori della funzione" msgid "*x must be assignment target" msgstr "*x deve essere il bersaglio del assegnamento" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", in %q\n" @@ -1209,11 +1209,6 @@ msgstr "" msgid "Input/output error" msgstr "Errore input/output" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1534,6 +1529,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2253,7 +2253,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (chiamata più recente per ultima):\n" @@ -2553,7 +2553,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "discrepanza di numero/tipo di argomenti" @@ -3127,6 +3127,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "il filesystem deve fornire un metodo di mount" @@ -3415,6 +3419,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "formato non valido" @@ -3452,6 +3460,10 @@ msgstr "sintassi invalida per l'intero con base %d" msgid "invalid syntax for number" msgstr "sintassi invalida per il numero" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "il primo argomento di issubclass() deve essere una classe" @@ -3501,6 +3513,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "lhs e rhs devono essere compatibili" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "local '%q' ha tipo '%q' ma sorgente è '%q'" @@ -3653,11 +3669,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "nessuna eccezione attiva da rilanciare" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -#, fuzzy -msgid "no available NIC" -msgstr "busio.UART non ancora implementato" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "nessun binding per nonlocal trovato" @@ -4492,6 +4503,10 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#, fuzzy +#~ msgid "no available NIC" +#~ msgstr "busio.UART non ancora implementato" + #~ msgid "Buffer too large and unable to allocate" #~ msgstr "Buffer troppo grande ed impossibile allocare" diff --git a/locale/ja.po b/locale/ja.po index f96c6c5c61..e02cd608ee 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -40,11 +40,11 @@ msgstr "" "CIRCUITPYドライブの内容を添えて問題を以下で報告してください:\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " ファイル \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " ファイル \"%q\", 行 %d" @@ -327,7 +327,7 @@ msgstr "関数外でのyield" msgid "*x must be assignment target" msgstr "*xは代入先でなければなりません" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr "" @@ -1196,11 +1196,6 @@ msgstr "" msgid "Input/output error" msgstr "入力/出力エラー" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1517,6 +1512,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "%q のサブクラスでなければなりません" @@ -2226,7 +2226,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "トレースバック(最新の呼び出しが末尾):\n" @@ -2525,7 +2525,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3093,6 +3093,10 @@ msgstr "f-string: 1つだけの'}'は許されません" msgid "file must be a file opened in byte mode" msgstr "fileはバイトモードで開かれたファイルでなければなりません" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "filesystemはmountメソッドを提供しなければなりません" @@ -3381,6 +3385,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "" @@ -3418,6 +3426,10 @@ msgstr "" msgid "invalid syntax for number" msgstr "数字として不正な構文" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass()の第1引数はクラスでなければなりません" @@ -3462,6 +3474,10 @@ msgstr "levelは0から1の間でなければなりません" msgid "lhs and rhs should be compatible" msgstr "左辺と右辺が互換でなければなりません" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3614,10 +3630,6 @@ msgstr "SDカードがありません" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "利用可能なNICがありません" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "nonlocalの対象が見つかりません" @@ -4443,6 +4455,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "no available NIC" +#~ msgstr "利用可能なNICがありません" + #~ msgid "Buffer too large and unable to allocate" #~ msgstr "バッファが大きすぎて確保できません" diff --git a/locale/ko.po b/locale/ko.po index da03abf101..ea31767cf3 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -36,11 +36,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " 파일 \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " 파일 \"%q\", 라인 %d" @@ -323,7 +323,7 @@ msgstr "'yield' 는 함수 외부에 존재합니다" msgid "*x must be assignment target" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", 에서 %q\n" @@ -1188,11 +1188,6 @@ msgstr "" msgid "Input/output error" msgstr "" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1509,6 +1504,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2215,7 +2215,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -2514,7 +2514,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3078,6 +3078,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "" @@ -3365,6 +3369,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "형식가 유효하지 않습니다" @@ -3402,6 +3410,10 @@ msgstr "구문(syntax)가 정수가 유효하지 않습니다" msgid "invalid syntax for number" msgstr "숫자에 대한 구문(syntax)가 유효하지 않습니다" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "" @@ -3446,6 +3458,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3598,10 +3614,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 99e166fed7..79db8928e9 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -38,11 +38,11 @@ msgstr "" "Meld een probleem met de inhoud van de CIRCUITPY drive op:\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Bestand" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Bestand \"%q\", regel %d" @@ -325,7 +325,7 @@ msgstr "'yield' buiten de functie" msgid "*x must be assignment target" msgstr "*x moet een assignment target zijn" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", in %q\n" @@ -1197,11 +1197,6 @@ msgstr "Invoer duurt te lang" msgid "Input/output error" msgstr "Input/Output fout" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1518,6 +1513,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "%q moet een subklasse zijn." @@ -2238,7 +2238,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (meest recente call laatst):\n" @@ -2547,7 +2547,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "argument num/typen komen niet overeen" @@ -3115,6 +3115,10 @@ msgstr "f-string: enkele '}' is niet toegestaan" msgid "file must be a file opened in byte mode" msgstr "bestand moet een bestand zijn geopend in byte modus" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "bestandssysteem moet een mount methode bieden" @@ -3403,6 +3407,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "ongeldig formaat" @@ -3440,6 +3448,10 @@ msgstr "ongeldige syntax voor integer met grondtal %d" msgid "invalid syntax for number" msgstr "ongeldige syntax voor nummer" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass() argument 1 moet een klasse zijn" @@ -3487,6 +3499,10 @@ msgstr "level moet tussen 0 en 1 liggen" msgid "lhs and rhs should be compatible" msgstr "lhs en rhs moeten compatibel zijn" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "lokale '%q' is van type '%q' maar bron is '%q'" @@ -3639,10 +3655,6 @@ msgstr "geen SD kaart" msgid "no active exception to reraise" msgstr "geen actieve uitzondering om opnieuw op te werpen (raise)" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "geen netwerkadapter (NIC) beschikbaar" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "geen binding voor nonlocal gevonden" @@ -4468,6 +4480,9 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "no available NIC" +#~ msgstr "geen netwerkadapter (NIC) beschikbaar" + #~ msgid "" #~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " #~ "instead" diff --git a/locale/pl.po b/locale/pl.po index 903ce103ef..273da75b7f 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -40,11 +40,11 @@ msgstr "" "Zgłoś problem z zawartością dysku CIRCUITPY pod adresem\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Plik \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Plik \"%q\", linia %d" @@ -327,7 +327,7 @@ msgstr "'yield' poza funkcją" msgid "*x must be assignment target" msgstr "*x musi być obiektem przypisania" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", w %q\n" @@ -1196,11 +1196,6 @@ msgstr "" msgid "Input/output error" msgstr "Błąd I/O" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1517,6 +1512,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2223,7 +2223,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Ślad wyjątku (najnowsze wywołanie na końcu):\n" @@ -2527,7 +2527,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "zła liczba lub typ argumentów" @@ -3092,6 +3092,10 @@ msgstr "" msgid "file must be a file opened in byte mode" msgstr "file musi być otwarte w trybie bajtowym" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "system plików musi mieć metodę mount" @@ -3379,6 +3383,10 @@ msgstr "" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "zły format" @@ -3416,6 +3424,10 @@ msgstr "zła składnia dla liczby całkowitej w bazie %d" msgid "invalid syntax for number" msgstr "zła składnia dla liczby" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "argument 1 dla issubclass() musi być klasą" @@ -3460,6 +3472,10 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "lewa i prawa strona powinny być kompatybilne" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "local '%q' jest typu '%q' lecz źródło jest '%q'" @@ -3612,10 +3628,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "brak wyjątku do ponownego rzucenia" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "brak wolnego NIC" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "brak wiązania dla zmiennej nielokalnej" @@ -4440,6 +4452,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "no available NIC" +#~ msgstr "brak wolnego NIC" + #~ msgid "Buffer too large and unable to allocate" #~ msgstr "Bufor jest zbyt duży i nie można go przydzielić" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 6eada6d856..93f1f270f6 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -42,11 +42,11 @@ msgstr "" "Registre um problema com o conteúdo do seu controlador no CIRCUITPY\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Arquivo \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Arquivo \"%q\", linha %d" @@ -335,7 +335,7 @@ msgstr "função externa 'yield'" msgid "*x must be assignment target" msgstr "*x deve ser o destino da atribuição" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", em %q\n" @@ -1219,11 +1219,6 @@ msgstr "A entrada está demorando demais" msgid "Input/output error" msgstr "Erro de entrada/saída" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "Falta o jmp_pin. A instrução %d salta no pino" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1540,6 +1535,11 @@ msgstr "Faltando first_out_pin. A instrução %d escreve nos pinos(s)" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "Faltando first_set_pin. A instrução %d define os pinos(s)" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "Falta o jmp_pin. A instrução %d salta no pino" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Deve ser uma subclasse %q." @@ -2277,7 +2277,7 @@ msgstr "O total dos dados que serão escritos é maior do que %q" msgid "Touch alarms not available" msgstr "Alarmes de toque não estão disponíveis" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (a última chamada mais recente):\n" @@ -2590,7 +2590,7 @@ msgid "argument name reused" msgstr "nome do argumento reutilizado" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "o argumento num/tipos não combinam" @@ -3163,6 +3163,10 @@ msgstr "f-string: um único '}' não é permitido" msgid "file must be a file opened in byte mode" msgstr "o arquivo deve ser um arquivo aberto no modo byte" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "sistema de arquivos deve fornecer método de montagem" @@ -3451,6 +3455,10 @@ msgstr "tamanho do elemento %d é inválido para bits_per_pixel %d\n" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "element_size %d é inválido, deve ser, 1, 2, ou 4" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "formato inválido" @@ -3488,6 +3496,10 @@ msgstr "sintaxe inválida para o número inteiro com base %d" msgid "invalid syntax for number" msgstr "sintaxe inválida para o número" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass() arg 1 deve ser uma classe" @@ -3535,6 +3547,10 @@ msgstr "o nível deve estar entre 0 e 1" msgid "lhs and rhs should be compatible" msgstr "o lhs e rhs devem ser compatíveis" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "o local '%q' tem o tipo '%q', porém a origem é '%q'" @@ -3689,10 +3705,6 @@ msgstr "nenhum cartão SD" msgid "no active exception to reraise" msgstr "nenhuma exceção ativa para reraise" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "não há uma Placa de Rede disponível" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "nenhuma ligação para nonlocal foi encontrada" @@ -4522,6 +4534,9 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "no available NIC" +#~ msgstr "não há uma Placa de Rede disponível" + #~ msgid "" #~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " #~ "instead" diff --git a/locale/sv.po b/locale/sv.po index 9a86c50c37..3d278d5310 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -42,11 +42,11 @@ msgstr "" "Vänligen skapa ett ärende med innehållet i din CIRCUITPY-enhet på\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Filen \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Fil \"%q\", rad %d" @@ -330,7 +330,7 @@ msgstr "'yield' utanför funktion" msgid "*x must be assignment target" msgstr "*x måste vara mål för tilldelning" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", i %q\n" @@ -1204,11 +1204,6 @@ msgstr "Indata tar för lång tid" msgid "Input/output error" msgstr "Indata-/utdatafel" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "Saknar jmp_pin. Instruktion %d hoppar på pin" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1526,6 +1521,11 @@ msgstr "Saknad first_out_pin. Instruktion %d skriver till pinnar" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "Saknad first_set_pin. Instruktion %d sätter pinnar" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "Saknar jmp_pin. Instruktion %d hoppar på pin" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Måste vara en %q-subklass." @@ -2252,7 +2252,7 @@ msgstr "Totala data att skriva är större än %q" msgid "Touch alarms not available" msgstr "Touchalarm är inte tillgängligt" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (senaste anrop):\n" @@ -2560,7 +2560,7 @@ msgid "argument name reused" msgstr "argumentnamn återanvänt" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "argument antal/typ matchar inte" @@ -3129,6 +3129,10 @@ msgstr "f-string: singel '}' är inte tillåten" msgid "file must be a file opened in byte mode" msgstr "filen måste vara en fil som öppnats i byte-läge" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "filsystemet måste tillhandahålla mount-metod" @@ -3416,6 +3420,10 @@ msgstr "ogiltig elementstorlek %d för bits_per_pixel %d\n" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "ogiltig element_size %d, måste vara, 1, 2 eller 4" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "ogiltigt format" @@ -3453,6 +3461,10 @@ msgstr "ogiltig syntax för heltal med bas %d" msgid "invalid syntax for number" msgstr "ogiltig syntax för tal" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass() arg 1 måste vara en klass" @@ -3500,6 +3512,10 @@ msgstr "level ska ligga mellan 0 och 1" msgid "lhs and rhs should be compatible" msgstr "lhs och rhs måste vara kompatibla" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "lokala '%q' har typ '%q' men källan är '%q'" @@ -3652,10 +3668,6 @@ msgstr "inget SD-kort" msgid "no active exception to reraise" msgstr "ingen aktiv exception för reraise" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "ingen tillgänglig NIC" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "ingen bindning för ickelokal hittad" @@ -4481,6 +4493,9 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "no available NIC" +#~ msgstr "ingen tillgänglig NIC" + #~ msgid "" #~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " #~ "instead" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index cf07059d1a..1ddecf8a8f 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -43,11 +43,11 @@ msgstr "" "Qǐng tōngguò https://github.com/adafruit/circuitpython/issues\n" "tíjiāo yǒuguān nín de CIRCUITPY qūdòngqì nèiróng de wèntí \n" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\"" msgstr " Wénjiàn \"%q\"" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid " File \"%q\", line %d" msgstr " Wénjiàn \"%q\", dì %d xíng" @@ -332,7 +332,7 @@ msgstr "'yield' wàibù gōngnéng" msgid "*x must be assignment target" msgstr "*x bìxū shì rènwù mùbiāo" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid ", in %q\n" msgstr ", zài %q\n" @@ -1207,11 +1207,6 @@ msgstr "Shūrù shíjiānguò zhǎng" msgid "Input/output error" msgstr "Shūrù/shūchū cuòwù" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1529,6 +1524,11 @@ msgstr "xiān lòu chū yǐn jiǎo. zhǐ lìng %d xiě rù yǐn jiǎo" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "quē shǎo dì yī zǔ yǐn jiǎo. zhǐ lìng %d shè zhì yǐn jiǎo" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Bìxū shì %q zi lèi." @@ -2253,7 +2253,7 @@ msgstr "yào biān xiě de zǒng shù jù dà yú %q" msgid "Touch alarms not available" msgstr "bù kě yòng chù mō bào jǐng qì" -#: py/obj.c +#: py/obj.c shared-bindings/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (Zuìjìn yīcì dǎ diànhuà):\n" @@ -2562,7 +2562,7 @@ msgid "argument name reused" msgstr "chóng fù shǐ yòng de cān shù míng chēng" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "cānshù biānhào/lèixíng bù pǐpèi" @@ -3132,6 +3132,10 @@ msgstr "f-string: bù yǔnxǔ shǐyòng dāngè '}'" msgid "file must be a file opened in byte mode" msgstr "wénjiàn bìxū shì zài zì jié móshì xià dǎkāi de wénjiàn" +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" msgstr "wénjiàn xìtǒng bìxū tígōng guà zài fāngfǎ" @@ -3419,6 +3423,10 @@ msgstr "wú xiào yuán jiàn dà xiǎo %d wéi bits_per_pixel %d\n" msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "wú xiào element_size %d, bì xū shì, 1, 2, huò 4" +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + #: extmod/modframebuf.c msgid "invalid format" msgstr "wúxiào géshì" @@ -3456,6 +3464,10 @@ msgstr "jīshù wèi %d de zhěng shǔ de yǔfǎ wúxiào" msgid "invalid syntax for number" msgstr "wúxiào de hàomǎ yǔfǎ" +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + #: py/objtype.c msgid "issubclass() arg 1 must be a class" msgstr "issubclass() cānshù 1 bìxū shì yīgè lèi" @@ -3501,6 +3513,10 @@ msgstr "Level bìxū jiè yú 0 hé 1 zhī jiān" msgid "lhs and rhs should be compatible" msgstr "lhs hé rhs yīnggāi jiānróng" +#: shared-bindings/traceback/__init__.c +msgid "limit should be an int" +msgstr "" + #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "bendì '%q' bāohán lèixíng '%q' dàn yuán shì '%q'" @@ -3653,10 +3669,6 @@ msgstr "méiyǒu SD kǎ" msgid "no active exception to reraise" msgstr "méiyǒu jīhuó de yìcháng lái chóngxīn píngjià" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "méiyǒu kěyòng de NIC" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "zhǎo bù dào fēi běndì de bǎng dìng" @@ -4481,6 +4493,9 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "no available NIC" +#~ msgstr "méiyǒu kěyòng de NIC" + #~ msgid "" #~ "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " #~ "instead" From 59bebfdb17ed00d0245ea60ac9a223f323bb3102 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 6 Aug 2021 19:30:52 +0000 Subject: [PATCH 082/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1013 of 1013 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 3d278d5310..7213c222a8 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-07-24 15:35+0000\n" +"PO-Revision-Date: 2021-08-07 04:00+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.7.2-dev\n" +"X-Generator: Weblate 4.8-dev\n" #: main.c msgid "" @@ -3131,7 +3131,7 @@ msgstr "filen måste vara en fil som öppnats i byte-läge" #: shared-bindings/traceback/__init__.c msgid "file write is not available" -msgstr "" +msgstr "Filskrivning är inte tillgängligt" #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" @@ -3422,7 +3422,7 @@ msgstr "ogiltig element_size %d, måste vara, 1, 2 eller 4" #: shared-bindings/traceback/__init__.c msgid "invalid exception" -msgstr "" +msgstr "Ogiltig exception" #: extmod/modframebuf.c msgid "invalid format" @@ -3463,7 +3463,7 @@ msgstr "ogiltig syntax för tal" #: py/objexcept.c shared-bindings/traceback/__init__.c msgid "invalid traceback" -msgstr "" +msgstr "Ogilitig källspårning" #: py/objtype.c msgid "issubclass() arg 1 must be a class" @@ -3514,7 +3514,7 @@ msgstr "lhs och rhs måste vara kompatibla" #: shared-bindings/traceback/__init__.c msgid "limit should be an int" -msgstr "" +msgstr "limit måste vara en int" #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" From 4abf9f3cf16838d70274a8fb7ea50a145f26ddbc Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Sat, 7 Aug 2021 06:00:29 +0200 Subject: [PATCH 083/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 1 - locale/cs.po | 1 - locale/de_DE.po | 1 - locale/el.po | 1 - locale/en_GB.po | 1 - locale/es.po | 1 - locale/fil.po | 1 - locale/fr.po | 1 - locale/hi.po | 1 - locale/it_IT.po | 1 - locale/ja.po | 1 - locale/ko.po | 1 - locale/nl.po | 1 - locale/pl.po | 1 - locale/pt_BR.po | 1 - locale/sv.po | 1 - locale/zh_Latn_pinyin.po | 1 - 17 files changed, 17 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index eaacf139fc..dac73ad20c 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -2097,7 +2097,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index a2a83042bc..63e7948ad8 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -2066,7 +2066,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index eb7d3df8bb..7c47677538 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -2095,7 +2095,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/el.po b/locale/el.po index fc901b157f..8bd093b1a5 100644 --- a/locale/el.po +++ b/locale/el.po @@ -2063,7 +2063,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 191d3df59d..f82ab09599 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -2087,7 +2087,6 @@ msgid "Size not supported" msgstr "Size not supported" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/es.po b/locale/es.po index ac835d8b9f..4107a1fd09 100644 --- a/locale/es.po +++ b/locale/es.po @@ -2115,7 +2115,6 @@ msgid "Size not supported" msgstr "Sin capacidades para el tamaño" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "Memoria de sueño no disponible" diff --git a/locale/fil.po b/locale/fil.po index e7e1063c09..c4c6a4c2b3 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -2083,7 +2083,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index c66fc05e24..7c70440b55 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -2124,7 +2124,6 @@ msgid "Size not supported" msgstr "Taille n'est pas supportée" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/hi.po b/locale/hi.po index e6e08a9ecc..4332db579e 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -2063,7 +2063,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index b0c9259d9a..a7dc7c05e1 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -2104,7 +2104,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index e02cd608ee..2844e59dea 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -2077,7 +2077,6 @@ msgid "Size not supported" msgstr "サイズは対応していません" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index ea31767cf3..6f0f95e382 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -2066,7 +2066,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 79db8928e9..c3cefa3327 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -2089,7 +2089,6 @@ msgid "Size not supported" msgstr "Afmeting niet ondersteund" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index 273da75b7f..b1bbfaa015 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -2074,7 +2074,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 93f1f270f6..cad52558af 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -2117,7 +2117,6 @@ msgid "Size not supported" msgstr "O tamanho não é suportado" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "Sleep memory não está disponível" diff --git a/locale/sv.po b/locale/sv.po index 7213c222a8..aef7f24bd2 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -2095,7 +2095,6 @@ msgid "Size not supported" msgstr "Storleken stöds inte" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "Sömnminne inte tillgängligt" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 1ddecf8a8f..67df4a18ba 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -2097,7 +2097,6 @@ msgid "Size not supported" msgstr "bù zhī chí dà xiǎo" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "shuì mián jì yì bù kě yòng" From d59a28db9774489a14e01e0f70db24cd3c9147c4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 7 Aug 2021 09:17:41 -0500 Subject: [PATCH 084/418] Compress word offset table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By storing "count of words by length", the long `wends` table can be replaced with a short `wlencount` table. This saves flash storage space. Extend the range of string lengths that can be in the dictionary. Originally it was to 2 to 9; at one point it was changed to 3 to 9. Putting the lower bound back at 2 has a positive impact on the French translation (a bunch of them, such as "ch", "\r\n", "%q", are used). Increasing the maximum length gets 'mpossible', ' doit être ', and 'CircuitPyth' at the long end. This adds a bit of processing time to makeqstrdata. The specific 2/11 values are again empirical based on the French translation on the adafruit_proxlight_trinkey_m0. --- py/makeqstrdata.py | 44 +++++++++++++++-------------------- supervisor/shared/translate.c | 24 ++++++++++++++----- supervisor/shared/translate.h | 9 ++++--- 3 files changed, 43 insertions(+), 34 deletions(-) diff --git a/py/makeqstrdata.py b/py/makeqstrdata.py index d2a10d29db..74ad78c47d 100644 --- a/py/makeqstrdata.py +++ b/py/makeqstrdata.py @@ -333,12 +333,9 @@ def compute_huffman_coding(translations, compression_filename): bits_per_codepoint = 16 if max_ord > 255 else 8 values_type = "uint16_t" if max_ord > 255 else "uint8_t" - max_words_len = 160 if max_ord > 255 else 255 - - sum_len = 0 - while True: + while len(words) < max_words: # Until the dictionary is filled to capacity, use a heuristic to find - # the best "word" (3- to 9-gram) to add to it. + # the best "word" (2- to 11-gram) to add to it. # # The TextSplitter allows us to avoid considering parts of the text # that are already covered by a previously chosen word, for example @@ -369,7 +366,8 @@ def compute_huffman_coding(translations, compression_filename): # the Huffman tree bumps up the encoding lengths of all words in the # same subtree. In the extreme case when the new word is so frequent # that it gets a one-bit encoding, all other words will cost an extra - # bit each. + # bit each. This is empirically modeled by the constant factor added to + # cost, but the specific value used isn't "proven" to be correct. # # Another source of inaccuracy is that compressed strings end up # on byte boundaries, not bit boundaries, so saving 1 bit somewhere @@ -383,14 +381,14 @@ def compute_huffman_coding(translations, compression_filename): # The difference between the two is the estimated net savings, in bits. def est_net_savings(s, occ): savings = occ * (bit_length(s) - est_len(occ)) - cost = len(s) * bits_per_codepoint + cost = len(s) * bits_per_codepoint + 24 return savings - cost counter = collections.Counter() for t in texts: for (found, word) in extractor.iter_words(t): if not found: - for substr in iter_substrings(word, minlen=3, maxlen=9): + for substr in iter_substrings(word, minlen=2, maxlen=11): counter[substr] += 1 # Score the candidates we found. This is a semi-empirical formula that @@ -410,16 +408,9 @@ def compute_huffman_coding(translations, compression_filename): break word = scores[0][0] - - # If we can successfully add it to the dictionary, do so. Otherwise, - # we've filled the dictionary to capacity and are done. - if sum_len + len(word) - 2 > max_words_len: - break - if len(words) == max_words: - break words.append(word) - sum_len += len(word) - 2 + words.sort(key=len) extractor = TextSplitter(words) counter = collections.Counter() for t in texts: @@ -469,16 +460,15 @@ def compute_huffman_coding(translations, compression_filename): len(translation.encode("utf-8")) for (original, translation) in translations ) - wends = list(len(w) - 2 for w in words) - for i in range(1, len(wends)): - wends[i] += wends[i - 1] + maxlen = len(words[-1]) + minlen = len(words[0]) + wlencount = [len([None for w in words if len(w) == l]) for l in range(minlen, maxlen + 1)] with open(compression_filename, "w") as f: + f.write("typedef {} mchar_t;".format(values_type)) f.write("const uint8_t lengths[] = {{ {} }};\n".format(", ".join(map(str, lengths)))) f.write( - "const {} values[] = {{ {} }};\n".format( - values_type, ", ".join(str(ord(u)) for u in values) - ) + "const mchar_t values[] = {{ {} }};\n".format(", ".join(str(ord(u)) for u in values)) ) f.write( "#define compress_max_length_bits ({})\n".format( @@ -486,13 +476,17 @@ def compute_huffman_coding(translations, compression_filename): ) ) f.write( - "const {} words[] = {{ {} }};\n".format( - values_type, ", ".join(str(ord(c)) for w in words for c in w) + "const mchar_t words[] = {{ {} }};\n".format( + ", ".join(str(ord(c)) for w in words for c in w) ) ) - f.write("const uint8_t wends[] = {{ {} }};\n".format(", ".join(str(p) for p in wends))) + f.write( + "const uint8_t wlencount[] = {{ {} }};\n".format(", ".join(str(p) for p in wlencount)) + ) f.write("#define word_start {}\n".format(word_start)) f.write("#define word_end {}\n".format(word_end)) + f.write("#define minlen {}\n".format(minlen)) + f.write("#define maxlen {}\n".format(maxlen)) return (values, lengths, words, canonical, extractor) diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c index 7afbd43e21..4d899ad6d0 100644 --- a/supervisor/shared/translate.c +++ b/supervisor/shared/translate.c @@ -43,22 +43,34 @@ void serial_write_compressed(const compressed_string_t *compressed) { serial_write(decompressed); } +STATIC void get_word(int n, const mchar_t **pos, const mchar_t **end) { + int len = minlen; + int i = 0; + *pos = words; + while (wlencount[i] <= n) { + n -= wlencount[i]; + *pos += len * wlencount[i]; + i++; + len++; + } + *pos += len * n; + *end = *pos + len; +} + STATIC int put_utf8(char *buf, int u) { if (u <= 0x7f) { *buf = u; return 1; } else if (word_start <= u && u <= word_end) { uint n = (u - word_start); - size_t pos = 0; - if (n > 0) { - pos = wends[n - 1] + (n * 2); - } + const mchar_t *pos, *end; + get_word(n, &pos, &end); int ret = 0; // note that at present, entries in the words table are // guaranteed not to represent words themselves, so this adds // at most 1 level of recursive call - for (; pos < wends[n] + (n + 1) * 2; pos++) { - int len = put_utf8(buf, words[pos]); + for (; pos < end; pos++) { + int len = put_utf8(buf, *pos); buf += len; ret += len; } diff --git a/supervisor/shared/translate.h b/supervisor/shared/translate.h index 3096fc3e80..26a961a3ed 100644 --- a/supervisor/shared/translate.h +++ b/supervisor/shared/translate.h @@ -50,11 +50,14 @@ // are computed with a heuristic based on frequent substrings of 2 to // 9 code points. These are called "words" but are not, grammatically // speaking, words. They're just spans of code points that frequently -// occur together. +// occur together. They are ordered shortest to longest. // // - dictionary entries are non-overlapping, and the _ending_ index of each -// entry is stored in an array. Since the index given is the ending -// index, the array is called "wends". +// entry is stored in an array. A count of words of each length, from +// minlen to maxlen, is given in the array called wlencount. From +// this small array, the start and end of the N'th word can be +// calculated by an efficient, small loop. (A bit of time is traded +// to reduce the size of this table indicating lengths) // // The "data" / "tail" construct is so that the struct's last member is a // "flexible array". However, the _only_ member is not permitted to be From b5837b157df0329d3c18e5e9f23a33a093cf8d2f Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sat, 7 Aug 2021 17:47:57 -0700 Subject: [PATCH 085/418] improve transpose and mirror * add heuristic to avoid drawing area unnecessarily * fix Polygon.points * fix transpose * fix mirror x and y Known broken: Polygon with negative Y coordinates does not work right. --- shared-module/vectorio/Polygon.c | 61 +++++--- shared-module/vectorio/Polygon.h | 4 +- shared-module/vectorio/VectorShape.c | 216 ++++++++++++++++++--------- 3 files changed, 185 insertions(+), 96 deletions(-) diff --git a/shared-module/vectorio/Polygon.c b/shared-module/vectorio/Polygon.c index db3deced2a..6cc99a6096 100644 --- a/shared-module/vectorio/Polygon.c +++ b/shared-module/vectorio/Polygon.c @@ -10,7 +10,7 @@ #define VECTORIO_POLYGON_DEBUG(...) (void)0 -// #define VECTORIO_POLYGON_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__) +// #define VECTORIO_POLYGON_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) // Converts a list of points tuples to a flat list of ints for speedier internal use. @@ -30,12 +30,12 @@ static void _clobber_points_list(vectorio_polygon_t *self, mp_obj_t points_tuple VECTORIO_POLYGON_DEBUG("free(%d), ", sizeof(self->points_list)); gc_free(self->points_list); } - self->points_list = gc_alloc(2 * len * sizeof(int), false, false); - VECTORIO_POLYGON_DEBUG("alloc(%p, %d)", self->points_list, 2 * len * sizeof(int)); + self->points_list = gc_alloc(2 * len * sizeof(uint16_t), false, false); + VECTORIO_POLYGON_DEBUG("alloc(%p, %d)", self->points_list, 2 * len * sizeof(uint16_t)); } self->len = 2 * len; - for (size_t i = 0; i < len; ++i) { + for (uint16_t i = 0; i < len; ++i) { size_t tuple_len = 0; mp_obj_t *tuple_items; mp_obj_tuple_get(items[i], &tuple_len, &tuple_items); @@ -43,14 +43,19 @@ static void _clobber_points_list(vectorio_polygon_t *self, mp_obj_t points_tuple if (tuple_len != 2) { mp_raise_ValueError_varg(translate("%q must be a tuple of length 2"), MP_QSTR_point); } - if (!mp_obj_get_int_maybe(tuple_items[ 0 ], &self->points_list[2 * i ]) - || !mp_obj_get_int_maybe(tuple_items[ 1 ], &self->points_list[2 * i + 1]) + mp_int_t x; + mp_int_t y; + if (!mp_obj_get_int_maybe(tuple_items[ 0 ], &x) + || !mp_obj_get_int_maybe(tuple_items[ 1 ], &y) + || x < SHRT_MIN || x > SHRT_MAX || y < SHRT_MIN || y > SHRT_MAX ) { - self->len = 0; gc_free(self->points_list); self->points_list = NULL; mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point); + self->len = 0; } + self->points_list[2 * i ] = (int16_t)x; + self->points_list[2 * i + 1] = (int16_t)y; } } @@ -68,16 +73,23 @@ void common_hal_vectorio_polygon_construct(vectorio_polygon_t *self, mp_obj_t po mp_obj_t common_hal_vectorio_polygon_get_points(vectorio_polygon_t *self) { VECTORIO_POLYGON_DEBUG("%p common_hal_vectorio_polygon_get_points {len: %d, points_list: %p}\n", self, self->len, self->points_list); - mp_obj_t list = mp_obj_new_list(self->len / 2, NULL); + mp_obj_list_t *list = MP_OBJ_TO_PTR(mp_obj_new_list(0, NULL)); + + VECTORIO_POLYGON_DEBUG(" >points\n"); + for (uint16_t i = 0; i < self->len; i += 2) { + VECTORIO_POLYGON_DEBUG(" (%4d, %4d)\n", self->points_list[i], self->points_list[i + 1]); + + mp_obj_tuple_t *pair = MP_OBJ_TO_PTR(mp_obj_new_tuple(2, NULL)); + pair->items[0] = mp_obj_new_int((mp_int_t) self->points_list[i ]); + pair->items[1] = mp_obj_new_int((mp_int_t) self->points_list[i + 1]); - for (size_t i = 0; i < self->len; i += 2) { - mp_obj_t tuple[] = { mp_obj_new_int(self->points_list[i]), mp_obj_new_int(self->points_list[i + 1]) }; mp_obj_list_append( list, - mp_obj_new_tuple(2, tuple) + pair ); } - return list; + VECTORIO_POLYGON_DEBUG(" x1 = SHRT_MAX; area->y1 = SHRT_MAX; area->x2 = SHRT_MIN; area->y2 = SHRT_MIN; - for (size_t i = 0; i < self->len; ++i) { - int x = self->points_list[i]; + for (uint16_t i = 0; i < self->len; ++i) { + int16_t x = self->points_list[i]; ++i; - int y = self->points_list[i]; + int16_t y = self->points_list[i]; if (x < area->x1) { + VECTORIO_POLYGON_DEBUG(" x1: %d\n", x); area->x1 = x; } if (y < area->y1) { + VECTORIO_POLYGON_DEBUG(" y1: %d\n", y); area->y1 = y; } if (x > area->x2) { + VECTORIO_POLYGON_DEBUG(" x2: %d\n", x); area->x2 = x; } if (y > area->y2) { + VECTORIO_POLYGON_DEBUG(" y2: %d\n", y); area->y2 = y; } } @@ -126,7 +143,7 @@ void common_hal_vectorio_polygon_get_area(void *polygon, displayio_area_t *area) // <0 if the point is to the left of the line vector // 0 if the point is on the line // >0 if the point is to the right of the line vector -__attribute__((always_inline)) static inline int line_side(mp_int_t x1, mp_int_t y1, mp_int_t x2, mp_int_t y2, int16_t px, int16_t py) { +__attribute__((always_inline)) static inline int line_side(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t px, int16_t py) { return (px - x1) * (y2 - y1) - (py - y1) * (x2 - x1); } @@ -140,14 +157,14 @@ uint32_t common_hal_vectorio_polygon_get_pixel(void *obj, int16_t x, int16_t y) return 0; } - int winding_number = 0; - int x1 = self->points_list[0]; - int y1 = self->points_list[1]; - for (size_t i = 2; i <= self->len + 1; ++i) { + int16_t winding_number = 0; + int16_t x1 = self->points_list[0]; + int16_t y1 = self->points_list[1]; + for (uint16_t i = 2; i <= self->len + 1; ++i) { VECTORIO_POLYGON_DEBUG(" {(%3d, %3d),", x1, y1); - int x2 = self->points_list[i % self->len]; + int16_t x2 = self->points_list[i % self->len]; ++i; - int y2 = self->points_list[i % self->len]; + int16_t y2 = self->points_list[i % self->len]; VECTORIO_POLYGON_DEBUG(" (%3d, %3d)}\n", x2, y2); if (y1 <= y) { if (y2 > y && line_side(x1, y1, x2, y2, x, y) < 0) { diff --git a/shared-module/vectorio/Polygon.h b/shared-module/vectorio/Polygon.h index 21d32d3581..e1d94f9f97 100644 --- a/shared-module/vectorio/Polygon.h +++ b/shared-module/vectorio/Polygon.h @@ -9,8 +9,8 @@ typedef struct { mp_obj_base_t base; // An int array[ x, y, ... ] - int *points_list; - size_t len; + int16_t *points_list; + uint16_t len; vectorio_event_t on_dirty; mp_obj_t draw_protocol_instance; } vectorio_polygon_t; diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 4406f20120..64c1b94c0d 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -14,8 +14,8 @@ #include "shared-bindings/vectorio/Rectangle.h" // Lifecycle actions. -#define VECTORIO_SHAPE_DEBUG(...) (void)0 -// #define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +// #define VECTORIO_SHAPE_DEBUG(...) (void)0 +#define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) // Used in both logging and ifdefs, for extra variables @@ -23,8 +23,43 @@ // Really verbose. -#define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 -// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 +#define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) + +#define U32_TO_BINARY_FMT "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" +#define U32_TO_BINARY(u32) \ + (u32 & 0x80000000 ? '1' : '0'), \ + (u32 & 0x40000000 ? '1' : '0'), \ + (u32 & 0x20000000 ? '1' : '0'), \ + (u32 & 0x10000000 ? '1' : '0'), \ + (u32 & 0x8000000 ? '1' : '0'), \ + (u32 & 0x4000000 ? '1' : '0'), \ + (u32 & 0x2000000 ? '1' : '0'), \ + (u32 & 0x1000000 ? '1' : '0'), \ + (u32 & 0x800000 ? '1' : '0'), \ + (u32 & 0x400000 ? '1' : '0'), \ + (u32 & 0x200000 ? '1' : '0'), \ + (u32 & 0x100000 ? '1' : '0'), \ + (u32 & 0x80000 ? '1' : '0'), \ + (u32 & 0x40000 ? '1' : '0'), \ + (u32 & 0x20000 ? '1' : '0'), \ + (u32 & 0x10000 ? '1' : '0'), \ + (u32 & 0x8000 ? '1' : '0'), \ + (u32 & 0x4000 ? '1' : '0'), \ + (u32 & 0x2000 ? '1' : '0'), \ + (u32 & 0x1000 ? '1' : '0'), \ + (u32 & 0x800 ? '1' : '0'), \ + (u32 & 0x400 ? '1' : '0'), \ + (u32 & 0x200 ? '1' : '0'), \ + (u32 & 0x100 ? '1' : '0'), \ + (u32 & 0x80 ? '1' : '0'), \ + (u32 & 0x40 ? '1' : '0'), \ + (u32 & 0x20 ? '1' : '0'), \ + (u32 & 0x10 ? '1' : '0'), \ + (u32 & 0x8 ? '1' : '0'), \ + (u32 & 0x4 ? '1' : '0'), \ + (u32 & 0x2 ? '1' : '0'), \ + (u32 & 0x1 ? '1' : '0') inline __attribute__((always_inline)) @@ -33,39 +68,41 @@ static int32_t max(int32_t a, int32_t b) { } inline __attribute__((always_inline)) -static int32_t min(int32_t a, int32_t b) { +static uint32_t min(uint32_t a, uint32_t b) { return a < b ? a : b; } +inline __attribute__((always_inline)) +static void area_transpose(displayio_area_t *to_transpose) { + int16_t swap = to_transpose->y1; + to_transpose->y1 = to_transpose->x1; + to_transpose->x1 = swap; + swap = to_transpose->y2; + to_transpose->y2 = to_transpose->x2; + to_transpose->x2 = swap; +} inline __attribute__((always_inline)) static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *out_area) { - VECTORIO_SHAPE_DEBUG("%p get_screen_area tform:{x:%d y:%d dx:%d dy:%d scl:%d w:%d h:%d mx:%d my:%d tr:%d}", self, + VECTORIO_SHAPE_DEBUG("%p get_screen_area (%3d,%3d) tform:{x:%d y:%d dx:%d dy:%d scl:%d w:%d h:%d mx:%d my:%d tr:%d}", self, self->x, self->y, self->absolute_transform->x, self->absolute_transform->y, self->absolute_transform->dx, self->absolute_transform->dy, self->absolute_transform->scale, self->absolute_transform->width, self->absolute_transform->height, self->absolute_transform->mirror_x, self->absolute_transform->mirror_y, self->absolute_transform->transpose_xy ); - displayio_area_t shape_area; - self->ishape.get_area(self->ishape.shape, &shape_area); - VECTORIO_SHAPE_DEBUG(" in:{(%5d,%5d), (%5d,%5d)}", shape_area.x1, shape_area.y1, shape_area.x2, shape_area.y2); + self->ishape.get_area(self->ishape.shape, out_area); + VECTORIO_SHAPE_DEBUG(" in:{(%5d,%5d), (%5d,%5d)}", out_area->x1, out_area->y1, out_area->x2, out_area->y2); - displayio_area_shift( - &shape_area, - self->x * self->absolute_transform->dx + min(0, self->absolute_transform->dx * displayio_area_width(&shape_area)), - self->y * self->absolute_transform->dy + min(0, self->absolute_transform->dy * displayio_area_height(&shape_area)) - ); - - displayio_area_transform_within( - false, - false, - self->absolute_transform->transpose_xy, - &shape_area, &shape_area, out_area - ); - - displayio_area_shift( - out_area, - self->absolute_transform->x, - self->absolute_transform->y - ); + int16_t x; + int16_t y; + if (self->absolute_transform->transpose_xy) { + x = self->absolute_transform->x + self->absolute_transform->dx * self->y; + y = self->absolute_transform->y + self->absolute_transform->dy * self->x; + area_transpose(out_area); + displayio_area_canon(out_area); + } else { + x = self->absolute_transform->x + self->absolute_transform->dx * self->x; + y = self->absolute_transform->y + self->absolute_transform->dy * self->y; + } + displayio_area_shift(out_area, x, y); VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2); } @@ -198,43 +235,34 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ self->absolute_transform->width, self->absolute_transform->height, self->absolute_transform->mirror_x, self->absolute_transform->mirror_y, self->absolute_transform->transpose_xy ); - uint32_t linestride_px = displayio_area_width(area); - uint32_t line_dirty_offset_px = (overlap.y1 - area->y1) * linestride_px; - uint32_t column_dirty_offset_px = overlap.x1 - area->x1; + uint16_t linestride_px = displayio_area_width(area); + uint16_t line_dirty_offset_px = (overlap.y1 - area->y1) * linestride_px; + uint16_t column_dirty_offset_px = overlap.x1 - area->x1; VECTORIO_SHAPE_DEBUG(", linestride:%3d line_offset:%3d col_offset:%3d depth:%2d ppb:%2d shape:%s", linestride_px, line_dirty_offset_px, column_dirty_offset_px, colorspace->depth, pixels_per_byte, mp_obj_get_type_str(self->ishape.shape)); displayio_input_pixel_t input_pixel; displayio_output_pixel_t output_pixel; - int16_t math_transform_offset_x; - int16_t math_transform_offset_y; - int16_t math_shape_offset_x; - int16_t math_shape_offset_y; + uint16_t width_px_indices; + uint16_t height_px_indices; if (self->absolute_transform->transpose_xy) { - math_transform_offset_x = self->absolute_transform->dy * self->y; - math_transform_offset_y = self->absolute_transform->dx * self->x; - math_shape_offset_x = min(0, self->absolute_transform->dy * displayio_area_width(&self->current_area)); - math_shape_offset_y = min(0, self->absolute_transform->dx * displayio_area_height(&self->current_area)); + width_px_indices = displayio_area_height(&self->current_area) - 1; + height_px_indices = displayio_area_width(&self->current_area) - 1; } else { - math_transform_offset_x = self->absolute_transform->dx * self->x; - math_transform_offset_y = self->absolute_transform->dy * self->y; - math_shape_offset_x = min(0, self->absolute_transform->dx * displayio_area_width(&self->current_area)); - math_shape_offset_y = min(0, self->absolute_transform->dy * displayio_area_height(&self->current_area)); + width_px_indices = displayio_area_width(&self->current_area) - 1; + height_px_indices = displayio_area_height(&self->current_area) - 1; } - VECTORIO_SHAPE_DEBUG(", transform_offset: (%3d,%3d), shape_offset: (%3d,%3d)", math_transform_offset_x, math_transform_offset_y, math_shape_offset_x, math_shape_offset_y); - - - uint32_t mask_start_px = line_dirty_offset_px; + uint16_t mask_start_px = line_dirty_offset_px; for (input_pixel.y = overlap.y1; input_pixel.y < overlap.y2; ++input_pixel.y) { mask_start_px += column_dirty_offset_px; for (input_pixel.x = overlap.x1; input_pixel.x < overlap.x2; ++input_pixel.x) { // Check the mask first to see if the pixel has already been set. - uint32_t pixel_index = mask_start_px + (input_pixel.x - overlap.x1); + uint16_t pixel_index = mask_start_px + (input_pixel.x - overlap.x1); uint32_t *mask_doubleword = &(mask[pixel_index / 32]); uint8_t mask_bit = pixel_index % 32; - VECTORIO_SHAPE_PIXEL_DEBUG("\n%p pixel_index: %5u mask_bit: %2u", self, pixel_index, mask_bit); + VECTORIO_SHAPE_PIXEL_DEBUG("\n%p pixel_index: %5u mask_bit: %2u mask: "U32_TO_BINARY_FMT, self, pixel_index, mask_bit, U32_TO_BINARY(*mask_doubleword)); if ((*mask_doubleword & (1u << mask_bit)) != 0) { VECTORIO_SHAPE_PIXEL_DEBUG(" masked"); continue; @@ -245,12 +273,27 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ int16_t pixel_to_get_x; int16_t pixel_to_get_y; if (self->absolute_transform->transpose_xy) { - pixel_to_get_x = (input_pixel.y - math_transform_offset_y - self->absolute_transform->y) - math_shape_offset_y; - pixel_to_get_y = (input_pixel.x - math_transform_offset_x - self->absolute_transform->x) - math_shape_offset_x; + pixel_to_get_x = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->x; + pixel_to_get_y = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->y; + + if (self->absolute_transform->mirror_x) { + pixel_to_get_y = height_px_indices - pixel_to_get_y; + } + if (self->absolute_transform->mirror_y) { + pixel_to_get_x = width_px_indices - pixel_to_get_x; + } } else { - pixel_to_get_x = (input_pixel.x - math_transform_offset_x - self->absolute_transform->x) - math_shape_offset_x; - pixel_to_get_y = (input_pixel.y - math_transform_offset_y - self->absolute_transform->y) - math_shape_offset_y; + pixel_to_get_x = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->x; + pixel_to_get_y = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->y; + + if (self->absolute_transform->mirror_x) { + pixel_to_get_x = width_px_indices - pixel_to_get_x; + } + if (self->absolute_transform->mirror_y) { + pixel_to_get_y = height_px_indices - pixel_to_get_y; + } } + VECTORIO_SHAPE_PIXEL_DEBUG(" get_pixel %p (%3d, %3d) -> ( %3d, %3d )", self->ishape.shape, input_pixel.x, input_pixel.y, pixel_to_get_x, pixel_to_get_y); #ifdef VECTORIO_PERF uint64_t pre_pixel = common_hal_time_monotonic_ns(); @@ -296,10 +339,9 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ } else if (colorspace->depth < 8) { // Reorder the offsets to pack multiple rows into a byte (meaning they share a column). if (!colorspace->pixels_in_byte_share_row) { - uint16_t width = linestride_px; - uint16_t row = pixel_index / width; - uint16_t col = pixel_index % width; - pixel_index = col * pixels_per_byte + (row / pixels_per_byte) * pixels_per_byte * width + row % pixels_per_byte; + uint16_t row = pixel_index / linestride_px; + uint16_t col = pixel_index % linestride_px; + pixel_index = col * pixels_per_byte + (row / pixels_per_byte) * pixels_per_byte * linestride_px + row % pixels_per_byte; } uint8_t shift = (pixel_index % pixels_per_byte) * colorspace->depth; if (colorspace->reverse_pixels_in_byte) { @@ -354,27 +396,57 @@ void vectorio_vector_shape_finish_refresh(vectorio_vector_shape_t *self) { // Assembles a singly linked list of dirty areas from all components on the display. displayio_area_t *vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_t *self, displayio_area_t *tail) { - displayio_area_t *new_tail = tail; - if (!displayio_area_empty(&self->ephemeral_dirty_area)) { - // vector.add_to_head - self->ephemeral_dirty_area.next = tail; - new_tail = &self->ephemeral_dirty_area; - VECTORIO_SHAPE_DEBUG("%p get_refresh_area dirty: {(%3d,%3d), (%3d,%3d)}", self, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); - } if (self->current_area_dirty || (mp_obj_is_type(self->pixel_shader, &displayio_palette_type) && displayio_palette_needs_refresh(self->pixel_shader)) || (mp_obj_is_type(self->pixel_shader, &displayio_colorconverter_type) && displayio_colorconverter_needs_refresh(self->pixel_shader)) ) { - self->current_area.next = new_tail; - new_tail = &self->current_area; - VECTORIO_SHAPE_DEBUG(" redrawing current: {(%3d,%3d), (%3d,%3d)}", self->current_area.x1, self->current_area.y1, self->current_area.x2, self->current_area.y2); + if (!displayio_area_empty(&self->ephemeral_dirty_area)) { + // Both are dirty, check if we should combine the areas or draw separately + // Draws as few pixels as possible both when animations move short distances and large distances. + // The display core implementation currently doesn't combine areas to reduce redrawing of masked areas. If it does, + // this could be simplified to just return the 2 possibly overlapping areas. + displayio_area_t area_swap; + displayio_area_compute_overlap(&self->ephemeral_dirty_area, &self->current_area, &area_swap); + uint32_t overlap_size = displayio_area_size(&area_swap); + displayio_area_union(&self->ephemeral_dirty_area, &self->current_area, &area_swap); // Leave area_swap as the union area for later. + uint32_t union_size = displayio_area_size(&area_swap); + uint32_t current_size = displayio_area_size(&self->current_area); + uint32_t dirty_size = displayio_area_size(&self->ephemeral_dirty_area); + + VECTORIO_SHAPE_DEBUG("%p get_refresh_area: dirty{(%3d,%3d), (%3d,%3d)} + current{(%3d,%3d), (%3d,%3d)} = union{(%3d,%3d), (%3d,%3d)}: union%d - dirty%d - curr%d + overlap%d = excluded%d : ", self, + self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2, + self->current_area.x1, self->current_area.y1, self->current_area.x2, self->current_area.y2, + area_swap.x1, area_swap.y1, area_swap.x2, area_swap.y2, + union_size, dirty_size, current_size, overlap_size, (int32_t)union_size - dirty_size - current_size + overlap_size + ); + + if ((int32_t)union_size - dirty_size - current_size + overlap_size <= min(dirty_size, current_size)) { + // The excluded / non-overlapping area from the disjoint dirty and current areas is smaller + // than the smallest area we need to draw. Redrawing the overlapping area would cost more + // than just drawing the union disjoint area once. + VECTORIO_SHAPE_DEBUG("combining to take disjoint area\n"); + displayio_area_copy(&area_swap, &self->ephemeral_dirty_area); + } else { + // The excluded area between the 2 dirty areas is larger than the smallest dirty area. It would be + // more costly to combine these areas than possibly redraw some overlap. + VECTORIO_SHAPE_DEBUG("excluded area too large, drawing separate area\n"); + self->current_area.next = tail; + tail = &self->current_area; + } + + self->ephemeral_dirty_area.next = tail; + tail = &self->ephemeral_dirty_area; + } else { + self->current_area.next = tail; + tail = &self->current_area; + VECTORIO_SHAPE_DEBUG("%p get_refresh_area: redrawing current: {(%3d,%3d), (%3d,%3d)}\n", self, self->current_area.x1, self->current_area.y1, self->current_area.x2, self->current_area.y2); + } + } else if (!displayio_area_empty(&self->ephemeral_dirty_area)) { + self->ephemeral_dirty_area.next = tail; + tail = &self->ephemeral_dirty_area; + VECTORIO_SHAPE_DEBUG("%p get_refresh_area redrawing dirty: {(%3d,%3d), (%3d,%3d)}\n", self, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); } - #ifdef VECTORIO_SHAPE_DEBUG - if (new_tail != tail) { - VECTORIO_SHAPE_DEBUG("\n"); - } - #endif - return new_tail; + return tail; } void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displayio_buffer_transform_t *group_transform) { From 051d7a970ef23b349f5b63e39f1c56f460c484e5 Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sat, 7 Aug 2021 19:32:02 -0700 Subject: [PATCH 086/418] fix rotation and mirroring now works with all vector shapes, even those with internal reference locations that are negative. All shape locations are anchored to their 0,0 but they can display pixels from negative coordinates if the shape's location on the screen would have room for it. --- shared-module/vectorio/VectorShape.c | 29 ++++++++++++---------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 64c1b94c0d..b18460868d 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -14,8 +14,8 @@ #include "shared-bindings/vectorio/Rectangle.h" // Lifecycle actions. -// #define VECTORIO_SHAPE_DEBUG(...) (void)0 -#define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +#define VECTORIO_SHAPE_DEBUG(...) (void)0 +// #define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) // Used in both logging and ifdefs, for extra variables @@ -23,8 +23,8 @@ // Really verbose. -// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 -#define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +#define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 +// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) #define U32_TO_BINARY_FMT "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" #define U32_TO_BINARY(u32) \ @@ -244,15 +244,8 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ displayio_input_pixel_t input_pixel; displayio_output_pixel_t output_pixel; - uint16_t width_px_indices; - uint16_t height_px_indices; - if (self->absolute_transform->transpose_xy) { - width_px_indices = displayio_area_height(&self->current_area) - 1; - height_px_indices = displayio_area_width(&self->current_area) - 1; - } else { - width_px_indices = displayio_area_width(&self->current_area) - 1; - height_px_indices = displayio_area_height(&self->current_area) - 1; - } + displayio_area_t shape_area; + self->ishape.get_area(self->ishape.shape, &shape_area); uint16_t mask_start_px = line_dirty_offset_px; for (input_pixel.y = overlap.y1; input_pixel.y < overlap.y2; ++input_pixel.y) { @@ -275,22 +268,24 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ if (self->absolute_transform->transpose_xy) { pixel_to_get_x = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->x; pixel_to_get_y = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->y; + VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); if (self->absolute_transform->mirror_x) { - pixel_to_get_y = height_px_indices - pixel_to_get_y; + pixel_to_get_y = shape_area.y2 - 1 - (pixel_to_get_y - shape_area.y1); } if (self->absolute_transform->mirror_y) { - pixel_to_get_x = width_px_indices - pixel_to_get_x; + pixel_to_get_x = shape_area.x2 - 1 - (pixel_to_get_x - shape_area.x1); } } else { pixel_to_get_x = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->x; pixel_to_get_y = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->y; + VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); if (self->absolute_transform->mirror_x) { - pixel_to_get_x = width_px_indices - pixel_to_get_x; + pixel_to_get_x = shape_area.x2 - 1 - (pixel_to_get_x - shape_area.x1); } if (self->absolute_transform->mirror_y) { - pixel_to_get_y = height_px_indices - pixel_to_get_y; + pixel_to_get_y = shape_area.y2 - 1 - (pixel_to_get_y - shape_area.y1); } } From bb25aeee510e41bb0e3ea7df5442af4782c30077 Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sat, 7 Aug 2021 19:40:07 -0700 Subject: [PATCH 087/418] fix code formatting that pre-commit --all-files did not locally report --- shared-module/vectorio/Polygon.c | 4 +- shared-module/vectorio/VectorShape.c | 66 ++++++++++++++-------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/shared-module/vectorio/Polygon.c b/shared-module/vectorio/Polygon.c index 6cc99a6096..f7199c7f83 100644 --- a/shared-module/vectorio/Polygon.c +++ b/shared-module/vectorio/Polygon.c @@ -80,8 +80,8 @@ mp_obj_t common_hal_vectorio_polygon_get_points(vectorio_polygon_t *self) { VECTORIO_POLYGON_DEBUG(" (%4d, %4d)\n", self->points_list[i], self->points_list[i + 1]); mp_obj_tuple_t *pair = MP_OBJ_TO_PTR(mp_obj_new_tuple(2, NULL)); - pair->items[0] = mp_obj_new_int((mp_int_t) self->points_list[i ]); - pair->items[1] = mp_obj_new_int((mp_int_t) self->points_list[i + 1]); + pair->items[0] = mp_obj_new_int((mp_int_t)self->points_list[i ]); + pair->items[1] = mp_obj_new_int((mp_int_t)self->points_list[i + 1]); mp_obj_list_append( list, diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index b18460868d..bf7cd7dc42 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -28,38 +28,38 @@ #define U32_TO_BINARY_FMT "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" #define U32_TO_BINARY(u32) \ - (u32 & 0x80000000 ? '1' : '0'), \ - (u32 & 0x40000000 ? '1' : '0'), \ - (u32 & 0x20000000 ? '1' : '0'), \ - (u32 & 0x10000000 ? '1' : '0'), \ - (u32 & 0x8000000 ? '1' : '0'), \ - (u32 & 0x4000000 ? '1' : '0'), \ - (u32 & 0x2000000 ? '1' : '0'), \ - (u32 & 0x1000000 ? '1' : '0'), \ - (u32 & 0x800000 ? '1' : '0'), \ - (u32 & 0x400000 ? '1' : '0'), \ - (u32 & 0x200000 ? '1' : '0'), \ - (u32 & 0x100000 ? '1' : '0'), \ - (u32 & 0x80000 ? '1' : '0'), \ - (u32 & 0x40000 ? '1' : '0'), \ - (u32 & 0x20000 ? '1' : '0'), \ - (u32 & 0x10000 ? '1' : '0'), \ - (u32 & 0x8000 ? '1' : '0'), \ - (u32 & 0x4000 ? '1' : '0'), \ - (u32 & 0x2000 ? '1' : '0'), \ - (u32 & 0x1000 ? '1' : '0'), \ - (u32 & 0x800 ? '1' : '0'), \ - (u32 & 0x400 ? '1' : '0'), \ - (u32 & 0x200 ? '1' : '0'), \ - (u32 & 0x100 ? '1' : '0'), \ - (u32 & 0x80 ? '1' : '0'), \ - (u32 & 0x40 ? '1' : '0'), \ - (u32 & 0x20 ? '1' : '0'), \ - (u32 & 0x10 ? '1' : '0'), \ - (u32 & 0x8 ? '1' : '0'), \ - (u32 & 0x4 ? '1' : '0'), \ - (u32 & 0x2 ? '1' : '0'), \ - (u32 & 0x1 ? '1' : '0') + (u32 & 0x80000000 ? '1' : '0'), \ + (u32 & 0x40000000 ? '1' : '0'), \ + (u32 & 0x20000000 ? '1' : '0'), \ + (u32 & 0x10000000 ? '1' : '0'), \ + (u32 & 0x8000000 ? '1' : '0'), \ + (u32 & 0x4000000 ? '1' : '0'), \ + (u32 & 0x2000000 ? '1' : '0'), \ + (u32 & 0x1000000 ? '1' : '0'), \ + (u32 & 0x800000 ? '1' : '0'), \ + (u32 & 0x400000 ? '1' : '0'), \ + (u32 & 0x200000 ? '1' : '0'), \ + (u32 & 0x100000 ? '1' : '0'), \ + (u32 & 0x80000 ? '1' : '0'), \ + (u32 & 0x40000 ? '1' : '0'), \ + (u32 & 0x20000 ? '1' : '0'), \ + (u32 & 0x10000 ? '1' : '0'), \ + (u32 & 0x8000 ? '1' : '0'), \ + (u32 & 0x4000 ? '1' : '0'), \ + (u32 & 0x2000 ? '1' : '0'), \ + (u32 & 0x1000 ? '1' : '0'), \ + (u32 & 0x800 ? '1' : '0'), \ + (u32 & 0x400 ? '1' : '0'), \ + (u32 & 0x200 ? '1' : '0'), \ + (u32 & 0x100 ? '1' : '0'), \ + (u32 & 0x80 ? '1' : '0'), \ + (u32 & 0x40 ? '1' : '0'), \ + (u32 & 0x20 ? '1' : '0'), \ + (u32 & 0x10 ? '1' : '0'), \ + (u32 & 0x8 ? '1' : '0'), \ + (u32 & 0x4 ? '1' : '0'), \ + (u32 & 0x2 ? '1' : '0'), \ + (u32 & 0x1 ? '1' : '0') inline __attribute__((always_inline)) @@ -413,7 +413,7 @@ displayio_area_t *vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_ self->current_area.x1, self->current_area.y1, self->current_area.x2, self->current_area.y2, area_swap.x1, area_swap.y1, area_swap.x2, area_swap.y2, union_size, dirty_size, current_size, overlap_size, (int32_t)union_size - dirty_size - current_size + overlap_size - ); + ); if ((int32_t)union_size - dirty_size - current_size + overlap_size <= min(dirty_size, current_size)) { // The excluded / non-overlapping area from the disjoint dirty and current areas is smaller From 5ed585d3f463f6a5a7f4205a9e19314068877175 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Sat, 7 Aug 2021 05:13:55 +0000 Subject: [PATCH 088/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1013 of 1013 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index cad52558af..c120f92ec0 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-07-24 15:35+0000\n" +"PO-Revision-Date: 2021-08-08 05:33+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.7.2-dev\n" +"X-Generator: Weblate 4.8-dev\n" #: main.c msgid "" @@ -3164,7 +3164,7 @@ msgstr "o arquivo deve ser um arquivo aberto no modo byte" #: shared-bindings/traceback/__init__.c msgid "file write is not available" -msgstr "" +msgstr "a gravação de arquivos não está disponível" #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" @@ -3456,7 +3456,7 @@ msgstr "element_size %d é inválido, deve ser, 1, 2, ou 4" #: shared-bindings/traceback/__init__.c msgid "invalid exception" -msgstr "" +msgstr "exceção inválida" #: extmod/modframebuf.c msgid "invalid format" @@ -3497,7 +3497,7 @@ msgstr "sintaxe inválida para o número" #: py/objexcept.c shared-bindings/traceback/__init__.c msgid "invalid traceback" -msgstr "" +msgstr "rastreamento inválido" #: py/objtype.c msgid "issubclass() arg 1 must be a class" @@ -3548,7 +3548,7 @@ msgstr "o lhs e rhs devem ser compatíveis" #: shared-bindings/traceback/__init__.c msgid "limit should be an int" -msgstr "" +msgstr "o limite deve ser um inteiro" #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" From a1fff320fb4b827dc59c6295d09bd749f6fcf7dd Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sun, 8 Aug 2021 00:14:53 -0700 Subject: [PATCH 089/418] add location property to vectorshape and all composed shapes --- locale/circuitpython.pot | 23 +++++++------- shared-bindings/vectorio/Circle.c | 1 + shared-bindings/vectorio/Polygon.c | 1 + shared-bindings/vectorio/Rectangle.c | 1 + shared-bindings/vectorio/VectorShape.c | 30 ++++++++++++++++++ shared-bindings/vectorio/VectorShape.h | 5 +++ shared-module/vectorio/VectorShape.c | 43 ++++++++++++++++++++++---- 7 files changed, 86 insertions(+), 18 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 81531c0cbd..885f596776 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -318,6 +318,10 @@ msgstr "" msgid "'yield' outside function" msgstr "" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "" @@ -1185,11 +1189,6 @@ msgstr "" msgid "Input/output error" msgstr "" -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Instruction %d shifts in more bits than pin count" @@ -1506,6 +1505,11 @@ msgstr "" msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "" +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" @@ -2063,7 +2067,6 @@ msgid "Size not supported" msgstr "" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c -#: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" msgstr "" @@ -2510,7 +2513,7 @@ msgid "argument name reused" msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +#: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" msgstr "" @@ -3594,10 +3597,6 @@ msgstr "" msgid "no active exception to reraise" msgstr "" -#: shared-bindings/socket/__init__.c shared-module/network/__init__.c -msgid "no available NIC" -msgstr "" - #: py/compile.c msgid "no binding for nonlocal found" msgstr "" @@ -4299,7 +4298,7 @@ msgid "unreadable attribute" msgstr "" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "" diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index 37780b5562..c0cc0bbcc2 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -86,6 +86,7 @@ STATIC const mp_rom_map_elem_t vectorio_circle_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_radius), MP_ROM_PTR(&vectorio_circle_radius_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) }, { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_circle_locals_dict, vectorio_circle_locals_dict_table); diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index 551954f98d..5d493a30b6 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -91,6 +91,7 @@ STATIC const mp_rom_map_elem_t vectorio_polygon_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_points), MP_ROM_PTR(&vectorio_polygon_points_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) }, { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_polygon_locals_dict, vectorio_polygon_locals_dict_table); diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index 1e885064ff..aa2c166a6d 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -64,6 +64,7 @@ STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = { // Properties { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) }, { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; STATIC MP_DEFINE_CONST_DICT(vectorio_rectangle_locals_dict, vectorio_rectangle_locals_dict_table); diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index f59ff26213..6e4299a6d3 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -143,6 +143,36 @@ const mp_obj_property_t vectorio_vector_shape_y_obj = { }; +// location: Tuple[int, int] +// """location of the center point of the shape in the parent.""" +// +STATIC mp_obj_t vectorio_vector_shape_obj_get_location(mp_obj_t wrapper_shape) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + + return MP_OBJ_TO_PTR(common_hal_vectorio_vector_shape_get_location(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_location_obj, vectorio_vector_shape_obj_get_location); + +STATIC mp_obj_t vectorio_vector_shape_obj_set_location(mp_obj_t wrapper_shape, mp_obj_t location_obj) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + + common_hal_vectorio_vector_shape_set_location(self, location_obj); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_location_obj, vectorio_vector_shape_obj_set_location); + +const mp_obj_property_t vectorio_vector_shape_location_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&vectorio_vector_shape_get_location_obj, + (mp_obj_t)&vectorio_vector_shape_set_location_obj, + MP_ROM_NONE}, +}; + + // pixel_shader: Union[ColorConverter, Palette] // """The pixel shader of the shape.""" // diff --git a/shared-bindings/vectorio/VectorShape.h b/shared-bindings/vectorio/VectorShape.h index 4cf2ae373b..9ac6906000 100644 --- a/shared-bindings/vectorio/VectorShape.h +++ b/shared-bindings/vectorio/VectorShape.h @@ -2,6 +2,7 @@ #define MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H #include "py/objproperty.h" +#include "py/objtuple.h" #include "shared-bindings/vectorio/__init__.h" #include "shared-module/vectorio/VectorShape.h" @@ -22,6 +23,9 @@ void common_hal_vectorio_vector_shape_set_dirty(void *self); mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x); +mp_obj_tuple_t *common_hal_vectorio_vector_shape_get_location(vectorio_vector_shape_t *self); +void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self, mp_obj_t xy); + mp_int_t common_hal_vectorio_vector_shape_get_y(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y); @@ -34,6 +38,7 @@ void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displ extern vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl; extern const mp_obj_property_t vectorio_vector_shape_x_obj; extern const mp_obj_property_t vectorio_vector_shape_y_obj; +extern const mp_obj_property_t vectorio_vector_shape_location_obj; extern const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj; #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index bf7cd7dc42..a6a63a498a 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -14,8 +14,8 @@ #include "shared-bindings/vectorio/Rectangle.h" // Lifecycle actions. -#define VECTORIO_SHAPE_DEBUG(...) (void)0 -// #define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +//#define VECTORIO_SHAPE_DEBUG(...) (void)0 +#define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) // Used in both logging and ifdefs, for extra variables @@ -23,8 +23,8 @@ // Really verbose. -#define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 -// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +//#define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 +#define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) #define U32_TO_BINARY_FMT "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" #define U32_TO_BINARY(u32) \ @@ -192,6 +192,37 @@ void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_in common_hal_vectorio_vector_shape_set_dirty(self); } +mp_obj_tuple_t *common_hal_vectorio_vector_shape_get_location(vectorio_vector_shape_t *self) { + VECTORIO_SHAPE_DEBUG("%p get_location\n", self); + mp_obj_tuple_t *pair = MP_OBJ_TO_PTR(mp_obj_new_tuple(2, NULL)); + pair->items[0] = mp_obj_new_int((mp_int_t)self->x); + pair->items[1] = mp_obj_new_int((mp_int_t)self->y); + return pair; +} + + +void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self, mp_obj_t xy) { + VECTORIO_SHAPE_DEBUG("%p set_location\n", self); + size_t tuple_len = 0; + mp_obj_t *tuple_items; + mp_obj_tuple_get(xy, &tuple_len, &tuple_items); + if (tuple_len != 2) { + mp_raise_TypeError_varg(translate("(x,y) integers required")); + } + + mp_int_t x; + mp_int_t y; + if (!mp_obj_get_int_maybe(tuple_items[ 0 ], &x) + || !mp_obj_get_int_maybe(tuple_items[ 1 ], &y) + || x < SHRT_MIN || x > SHRT_MAX || y < SHRT_MIN || y > SHRT_MAX + ) { + mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point); + } + self->x = (int16_t)x; + self->y = (int16_t)y; + common_hal_vectorio_vector_shape_set_dirty(self); +} + mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self) { VECTORIO_SHAPE_DEBUG("%p get_pixel_shader\n", self); @@ -271,10 +302,10 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); if (self->absolute_transform->mirror_x) { - pixel_to_get_y = shape_area.y2 - 1 - (pixel_to_get_y - shape_area.y1); + pixel_to_get_y = shape_area.y2 - 1 - pixel_to_get_y; } if (self->absolute_transform->mirror_y) { - pixel_to_get_x = shape_area.x2 - 1 - (pixel_to_get_x - shape_area.x1); + pixel_to_get_x = shape_area.x2 - 1 - pixel_to_get_x; } } else { pixel_to_get_x = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->x; From 9897ac6b5cf8d48219cbb05c37f3334e86cc08c7 Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sun, 8 Aug 2021 00:25:17 -0700 Subject: [PATCH 090/418] yet more failures of local pre-commit to find that which github pre-commit does --- shared-module/vectorio/VectorShape.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index a6a63a498a..259ab87251 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -14,7 +14,7 @@ #include "shared-bindings/vectorio/Rectangle.h" // Lifecycle actions. -//#define VECTORIO_SHAPE_DEBUG(...) (void)0 +// #define VECTORIO_SHAPE_DEBUG(...) (void)0 #define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) @@ -23,7 +23,7 @@ // Really verbose. -//#define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 +// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 #define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) #define U32_TO_BINARY_FMT "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" From bcfec105525501cec0a51cb71a1c55dfae61ca0d Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 8 Aug 2021 09:31:09 -0500 Subject: [PATCH 091/418] starting bitmaptools.paint_fill --- shared-bindings/bitmaptools/__init__.c | 58 ++++++++++++++++++++++++++ shared-bindings/bitmaptools/__init__.h | 4 ++ shared-module/bitmaptools/__init__.c | 7 ++++ 3 files changed, 69 insertions(+) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 2a5195d1a4..f06e4e0108 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -296,6 +296,63 @@ STATIC mp_obj_t bitmaptools_obj_fill_region(size_t n_args, const mp_obj_t *pos_a } MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_fill_region_obj, 0, bitmaptools_obj_fill_region); +//| +//| def paint_fill( +//| dest_bitmap: displayio.Bitmap, +//| x: int, y: int +//| value: int, background_value: int) -> None: +//| """Draws the color value into the destination bitmap enclosed +//| area of pixels of the background_value color. Like "Paint Bucket" +//| fill tool. +//| +//| :param bitmap dest_bitmap: Destination bitmap that will be written into +//| :param int x: x-pixel position of the first pixel to check and fill if needed +//| :param int y: y-pixel position of the first pixel to check and fill if needed +//| :param int value: Bitmap palette index that will be written into the rectangular +//| fill region in the destination bitmap""" +//| :param int background_value: Bitmap palette index that will filled with the +//| value color in the enclosed area in the destination bitmap""" +//| ... +//| +STATIC mp_obj_t bitmaptools_obj_paint_fill(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum {ARG_dest_bitmap, ARG_x, ARG_y, ARG_value, ARG_background_value}; + + static const mp_arg_t allowed_args[] = { + {MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ}, + {MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT}, + {MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT}, + {MP_QSTR_value, MP_ARG_REQUIRED | MP_ARG_INT}, + {MP_QSTR_background_value, MP_ARG_REQUIRED | MP_ARG_INT}, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + displayio_bitmap_t *destination = MP_OBJ_TO_PTR(args[ARG_dest_bitmap].u_obj); // the destination bitmap + + uint32_t value, color_depth; + value = args[ARG_value].u_int; + color_depth = (1 << destination->bits_per_value); + if (color_depth <= value) { + mp_raise_ValueError(translate("value out of range of target")); + } + + uint32_t background_value, color_depth; + background_value = args[ARG_background_value].u_int; + color_depth = (1 << destination->bits_per_value); + if (color_depth <= background_value) { + mp_raise_ValueError(translate("background value out of range of target")); + } + + int16_t x = args[ARG_x].u_int; + int16_t y = args[ARG_y].u_int; + + + common_hal_bitmaptools_paint_fill(destination, x, y, value, background_value); + + return mp_const_none; +} + +MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_paint_fill_obj, 0, bitmaptools_obj_paint_fill); // requires all 6 arguments //| @@ -520,6 +577,7 @@ STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_rotozoom), MP_ROM_PTR(&bitmaptools_rotozoom_obj) }, { MP_ROM_QSTR(MP_QSTR_arrayblit), MP_ROM_PTR(&bitmaptools_arrayblit_obj) }, { MP_ROM_QSTR(MP_QSTR_fill_region), MP_ROM_PTR(&bitmaptools_fill_region_obj) }, + { MP_ROM_QSTR(MP_QSTR_paint_fill), MP_ROM_PTR(&bitmaptools_paint_fill_obj) }, { MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&bitmaptools_draw_line_obj) }, }; STATIC MP_DEFINE_CONST_DICT(bitmaptools_module_globals, bitmaptools_module_globals_table); diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index fc1eb59068..94cf7e60c4 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -46,6 +46,10 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, int16_t x2, int16_t y2, uint32_t value); +void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, + int16_t x, int16_t y, + uint32_t value, uint32_t background_value); + void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, int16_t x0, int16_t y0, int16_t x1, int16_t y1, diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 4c8b887200..4da6c251a6 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -252,6 +252,13 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, } } +void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, + int16_t x, int16_t y, + uint32_t value, uint32_t background_value) { + + +} + void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, int16_t x0, int16_t y0, int16_t x1, int16_t y1, From 6d57f43eb355026d8d89a3dd648fed7ec6fcf7b4 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 8 Aug 2021 09:34:52 -0500 Subject: [PATCH 092/418] try adding print --- shared-module/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 4da6c251a6..bf091177f8 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -256,7 +256,7 @@ void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, int16_t x, int16_t y, uint32_t value, uint32_t background_value) { - + mp_printf(&mp_plat_print, "paint_fill"); } void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, From 158048e56bd88bb409bbf7121d274963b4dd77c6 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 8 Aug 2021 14:33:07 -0500 Subject: [PATCH 093/418] trying to make lists --- shared-bindings/bitmaptools/__init__.c | 3 +-- shared-module/bitmaptools/__init__.c | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index f06e4e0108..a7e0103a96 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -336,9 +336,8 @@ STATIC mp_obj_t bitmaptools_obj_paint_fill(size_t n_args, const mp_obj_t *pos_ar mp_raise_ValueError(translate("value out of range of target")); } - uint32_t background_value, color_depth; + uint32_t background_value; background_value = args[ARG_background_value].u_int; - color_depth = (1 << destination->bits_per_value); if (color_depth <= background_value) { mp_raise_ValueError(translate("background value out of range of target")); } diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index bf091177f8..3aeece186f 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -256,7 +256,29 @@ void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, int16_t x, int16_t y, uint32_t value, uint32_t background_value) { - mp_printf(&mp_plat_print, "paint_fill"); + /*def _boundaryFill4(self, px, py, fc, bc): # px & py = x, y coord to start fill, fc = fill color, bc = background color + fillArea = [[px, py]] + + while len(fillArea) > 0: + x, y = fillArea.pop() + + if self._bitmap[x, y] != bc: + continue + self._bitmap[x, y] = fc + fillArea.append((x + 1, y)) + fillArea.append((x - 1, y)) + fillArea.append((x, y + 1)) + fillArea.append((x, y - 1))*/ + mp_obj_list_t *fill_area; + + //mp_obj_list_t *point; + //mp_obj_list_append(point, x); + //mp_obj_list_append(point, y); + + mp_obj_list_append(MP_OBJ_FROM_PTR(*fill_area), MP_OBJ_NEW_QSTR(qstr_from_str("hello"))); + + //mp_printf(&mp_plat_print, fill_area[0]); + //mp_obj_print(mp_obj_list_pop(fill_area, 0), PRINT_STR); } void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, From a15ac65fa02cf5bb1c4dec9aae5c627750efedfb Mon Sep 17 00:00:00 2001 From: Nathan Young <77929198+NathanY3G@users.noreply.github.com> Date: Sun, 8 Aug 2021 21:43:12 +0200 Subject: [PATCH 094/418] Add board.LED for Grand Central M4 Express Fixes #5111 --- ports/atmel-samd/boards/grandcentral_m4_express/pins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c index b125aca086..cb683db0bd 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c +++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c @@ -137,6 +137,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PC24) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PB01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC31) }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC30) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From 7eece7d959b44247335b2c9fa192cc9a2f8bbd8f Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sun, 8 Aug 2021 15:35:36 -0700 Subject: [PATCH 095/418] dirty area computed for non-transposed but at least d-1 --- shared-module/vectorio/VectorShape.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 259ab87251..bd0684670a 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -97,11 +97,19 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou x = self->absolute_transform->x + self->absolute_transform->dx * self->y; y = self->absolute_transform->y + self->absolute_transform->dy * self->x; area_transpose(out_area); - displayio_area_canon(out_area); } else { + if (self->absolute_transform->dx < 1) { + out_area->x1 = out_area->x1 * -1 + 1; + out_area->x2 = out_area->x2 * -1 + 1; + } + if (self->absolute_transform->dy < 1) { + out_area->y1 = out_area->y1 * -1 + 1; + out_area->y2 = out_area->y2 * -1 + 1; + } x = self->absolute_transform->x + self->absolute_transform->dx * self->x; y = self->absolute_transform->y + self->absolute_transform->dy * self->y; } + displayio_area_canon(out_area); displayio_area_shift(out_area, x, y); VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2); @@ -313,10 +321,10 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); if (self->absolute_transform->mirror_x) { - pixel_to_get_x = shape_area.x2 - 1 - (pixel_to_get_x - shape_area.x1); + pixel_to_get_x = (shape_area.x2 - shape_area.x1) - (pixel_to_get_x + shape_area.x1) + shape_area.x1 - 1; } if (self->absolute_transform->mirror_y) { - pixel_to_get_y = shape_area.y2 - 1 - (pixel_to_get_y - shape_area.y1); + pixel_to_get_y = (shape_area.y2 - shape_area.y1) - (pixel_to_get_y + shape_area.y1) + +shape_area.y1 - 1; } } From cf2712d23f5c12694305c6ecbc3673c3aba37ef1 Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Sun, 8 Aug 2021 17:01:36 -0700 Subject: [PATCH 096/418] transposing and mirroring work * fix absolute_transform dirtying early instead of after the change, missing the draw * fix transpose and mirror. (0,0) -> location in all vector shapes now in all rotations. --- shared-module/vectorio/VectorShape.c | 55 +++++++++++++++++++--------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index bd0684670a..9d0279cf14 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -14,8 +14,8 @@ #include "shared-bindings/vectorio/Rectangle.h" // Lifecycle actions. -// #define VECTORIO_SHAPE_DEBUG(...) (void)0 -#define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +#define VECTORIO_SHAPE_DEBUG(...) (void)0 +// #define VECTORIO_SHAPE_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) // Used in both logging and ifdefs, for extra variables @@ -23,8 +23,8 @@ // Really verbose. -// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 -#define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +#define VECTORIO_SHAPE_PIXEL_DEBUG(...) (void)0 +// #define VECTORIO_SHAPE_PIXEL_DEBUG(...) mp_printf(&mp_plat_print, __VA_ARGS__) #define U32_TO_BINARY_FMT "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" #define U32_TO_BINARY(u32) \ @@ -96,8 +96,19 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou if (self->absolute_transform->transpose_xy) { x = self->absolute_transform->x + self->absolute_transform->dx * self->y; y = self->absolute_transform->y + self->absolute_transform->dy * self->x; + if (self->absolute_transform->dx < 1) { + out_area->y1 = out_area->y1 * -1 + 1; + out_area->y2 = out_area->y2 * -1 + 1; + } + if (self->absolute_transform->dy < 1) { + out_area->x1 = out_area->x1 * -1 + 1; + out_area->x2 = out_area->x2 * -1 + 1; + } area_transpose(out_area); } else { + x = self->absolute_transform->x + self->absolute_transform->dx * self->x; + y = self->absolute_transform->y + self->absolute_transform->dy * self->y; + if (self->absolute_transform->dx < 1) { out_area->x1 = out_area->x1 * -1 + 1; out_area->x2 = out_area->x2 * -1 + 1; @@ -106,8 +117,6 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou out_area->y1 = out_area->y1 * -1 + 1; out_area->y2 = out_area->y2 * -1 + 1; } - x = self->absolute_transform->x + self->absolute_transform->dx * self->x; - y = self->absolute_transform->y + self->absolute_transform->dy * self->y; } displayio_area_canon(out_area); displayio_area_shift(out_area, x, y); @@ -307,25 +316,35 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ if (self->absolute_transform->transpose_xy) { pixel_to_get_x = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->x; pixel_to_get_y = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->y; - VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - if (self->absolute_transform->mirror_x) { - pixel_to_get_y = shape_area.y2 - 1 - pixel_to_get_y; + VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); + if (self->absolute_transform->dx < 1) { + pixel_to_get_y *= -1; } - if (self->absolute_transform->mirror_y) { - pixel_to_get_x = shape_area.x2 - 1 - pixel_to_get_x; + if (self->absolute_transform->dy < 1) { + pixel_to_get_x *= -1; } + VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); } else { pixel_to_get_x = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->x; pixel_to_get_y = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->y; - VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - if (self->absolute_transform->mirror_x) { - pixel_to_get_x = (shape_area.x2 - shape_area.x1) - (pixel_to_get_x + shape_area.x1) + shape_area.x1 - 1; + VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); + if (self->absolute_transform->dx < 1) { + pixel_to_get_x *= -1; } - if (self->absolute_transform->mirror_y) { - pixel_to_get_y = (shape_area.y2 - shape_area.y1) - (pixel_to_get_y + shape_area.y1) + +shape_area.y1 - 1; + if (self->absolute_transform->dy < 1) { + pixel_to_get_y *= -1; } + VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); + + // It's mirrored via dx. Maybe we need to add support for also separately mirroring? + // if (self->absolute_transform->mirror_x) { + // pixel_to_get_x = (shape_area.x2 - shape_area.x1) - (pixel_to_get_x - shape_area.x1) + shape_area.x1 - 1; + // } + // if (self->absolute_transform->mirror_y) { + // pixel_to_get_y = (shape_area.y2 - shape_area.y1) - (pixel_to_get_y - shape_area.y1) + +shape_area.y1 - 1; + // } } VECTORIO_SHAPE_PIXEL_DEBUG(" get_pixel %p (%3d, %3d) -> ( %3d, %3d )", self->ishape.shape, input_pixel.x, input_pixel.y, pixel_to_get_x, pixel_to_get_y); @@ -407,7 +426,7 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ void vectorio_vector_shape_finish_refresh(vectorio_vector_shape_t *self) { - if (displayio_area_empty(&self->ephemeral_dirty_area)) { + if (displayio_area_empty(&self->ephemeral_dirty_area) && !self->current_area_dirty) { return; } VECTORIO_SHAPE_DEBUG("%p finish_refresh was:{(%3d,%3d), (%3d,%3d)}\n", self, self->ephemeral_dirty_area.x1, self->ephemeral_dirty_area.y1, self->ephemeral_dirty_area.x2, self->ephemeral_dirty_area.y2); @@ -484,6 +503,6 @@ displayio_area_t *vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_ } void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displayio_buffer_transform_t *group_transform) { - common_hal_vectorio_vector_shape_set_dirty(self); self->absolute_transform = group_transform == NULL ? &null_transform : group_transform; + common_hal_vectorio_vector_shape_set_dirty(self); } From 45d40589810970e6057350fff4d82734e6c3aef4 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 8 Aug 2021 21:25:54 -0600 Subject: [PATCH 097/418] adding initial files for BlueMicro840 Board --- .github/workflows/build.yml | 1 + ports/nrf/boards/bluemicro840/board.c | 38 ++++++++ ports/nrf/boards/bluemicro840/mpconfigboard.h | 46 ++++++++++ .../nrf/boards/bluemicro840/mpconfigboard.mk | 8 ++ ports/nrf/boards/bluemicro840/pins.c | 90 +++++++++++++++++++ 5 files changed, 183 insertions(+) create mode 100644 ports/nrf/boards/bluemicro840/board.c create mode 100644 ports/nrf/boards/bluemicro840/mpconfigboard.h create mode 100644 ports/nrf/boards/bluemicro840/mpconfigboard.mk create mode 100644 ports/nrf/boards/bluemicro840/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 744ef02f48..6d567ca9e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -232,6 +232,7 @@ jobs: - "bdmicro_vina_d51_pcb7" - "bless_dev_board_multi_sensor" - "blm_badge" + - "bluemicro840" - "capablerobot_usbhub" - "catwan_usbstick" - "circuitbrains_basic_m0" diff --git a/ports/nrf/boards/bluemicro840/board.c b/ports/nrf/boards/bluemicro840/board.c new file mode 100644 index 0000000000..688cfb4ded --- /dev/null +++ b/ports/nrf/boards/bluemicro840/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/bluemicro840/mpconfigboard.h b/ports/nrf/boards/bluemicro840/mpconfigboard.h new file mode 100644 index 0000000000..99a1e0bfbe --- /dev/null +++ b/ports/nrf/boards/bluemicro840/mpconfigboard.h @@ -0,0 +1,46 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2021 Pierre Constantineau + * + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "BlueMicro840" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define BOARD_HAS_CRYSTAL 1 + +#define MICROPY_HW_LED_STATUS (&pin_P1_04) // RED + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_17) // 0.17 - same position as Pro Micro +#define DEFAULT_I2C_BUS_SDA (&pin_P0_15) // 0.15 - same position as Pro Micro + +#define DEFAULT_SPI_BUS_SCK (&pin_P0_24) // 0.24 - same position as Pro Micro +#define DEFAULT_SPI_BUS_MOSI (&pin_P0_10) // 0.10 - same position as Pro Micro +#define DEFAULT_SPI_BUS_MISO (&pin_P0_09) // 0.09 - same position as Pro Micro + +#define DEFAULT_UART_BUS_RX (&pin_P0_08) // 0.08 - same position as Pro Micro +#define DEFAULT_UART_BUS_TX (&pin_P0_06) // 0.06 - same position as Pro Micro diff --git a/ports/nrf/boards/bluemicro840/mpconfigboard.mk b/ports/nrf/boards/bluemicro840/mpconfigboard.mk new file mode 100644 index 0000000000..a95662f5fd --- /dev/null +++ b/ports/nrf/boards/bluemicro840/mpconfigboard.mk @@ -0,0 +1,8 @@ +USB_VID = 0x1D50 +USB_PID = 0x6160 +USB_PRODUCT = "BlueMicro840" +USB_MANUFACTURER = "nrf52.jpconstantineau.com" + +MCU_CHIP = nrf52840 + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/bluemicro840/pins.c b/ports/nrf/boards/bluemicro840/pins.c new file mode 100644 index 0000000000..76020cab53 --- /dev/null +++ b/ports/nrf/boards/bluemicro840/pins.c @@ -0,0 +1,90 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + // XTAL { MP_ROM_QSTR(MP_QSTR_P0_00), MP_ROM_PTR(&pin_P0_00) }, + // XTAL { MP_ROM_QSTR(MP_QSTR_P0_01), MP_ROM_PTR(&pin_P0_01) }, + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_P0_05), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_P0_07), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_P0_08), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, //Vcc Enable + { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) }, + { MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) }, + // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) }, + { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, + { MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, + { MP_ROM_QSTR(MP_QSTR_P0_22), MP_ROM_PTR(&pin_P0_22) }, + { MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) }, + { MP_ROM_QSTR(MP_QSTR_P0_24), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_P0_25), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_P0_26), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_P0_27), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_P0_28), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_P0_30), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) }, + { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, //RED LED + { MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P1_10) }, //BLUE LED + { MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_P1_12), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_P1_14), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_17) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_24) }, + + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P1_10) }, + + { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_VCC_ON), MP_ROM_PTR(&pin_P0_12) }, // Turn on external VCC - connected to enable pin of second regulator + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); + + From 9de8045dcae8ac60b9d8af4177c8aa8bc2feb22d Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 8 Aug 2021 21:31:07 -0600 Subject: [PATCH 098/418] foromatting updates to pins.c --- ports/nrf/boards/bluemicro840/pins.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ports/nrf/boards/bluemicro840/pins.c b/ports/nrf/boards/bluemicro840/pins.c index 76020cab53..9b1a78182f 100644 --- a/ports/nrf/boards/bluemicro840/pins.c +++ b/ports/nrf/boards/bluemicro840/pins.c @@ -13,7 +13,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) }, { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) }, { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, - { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, //Vcc Enable + + //Vcc Enable + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, { MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, @@ -38,13 +40,17 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) }, { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) }, { MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) }, - { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, //RED LED + + //RED LED + { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, { MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) }, { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) }, { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) }, { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) }, { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, - { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P1_10) }, //BLUE LED + + //BLUE LED + { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_P1_12), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) }, @@ -78,7 +84,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_31) }, { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_31) }, - { MP_ROM_QSTR(MP_QSTR_VCC_ON), MP_ROM_PTR(&pin_P0_12) }, // Turn on external VCC - connected to enable pin of second regulator + // Turn on external VCC - connected to enable pin of second regulator + { MP_ROM_QSTR(MP_QSTR_VCC_ON), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From 579194a543ca407f20a6d88a641cf2f487feee3a Mon Sep 17 00:00:00 2001 From: Nathan Young <77929198+NathanY3G@users.noreply.github.com> Date: Mon, 9 Aug 2021 05:35:38 +0200 Subject: [PATCH 099/418] Colocated board.LED and D13 together (GCM4) --- ports/atmel-samd/boards/grandcentral_m4_express/pins.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c index cb683db0bd..7db9491dd3 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c +++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c @@ -52,6 +52,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PB22) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PB23) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PB00) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PB01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_TX3), MP_ROM_PTR(&pin_PB16) }, @@ -137,7 +139,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PC24) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PB01) }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC31) }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC30) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From b1d5b50551ef37633dce078b62c25d4c1b0add1e Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 8 Aug 2021 21:38:23 -0600 Subject: [PATCH 100/418] fromatting updates to pins.c --- ports/nrf/boards/bluemicro840/pins.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/ports/nrf/boards/bluemicro840/pins.c b/ports/nrf/boards/bluemicro840/pins.c index 9b1a78182f..755429b31e 100644 --- a/ports/nrf/boards/bluemicro840/pins.c +++ b/ports/nrf/boards/bluemicro840/pins.c @@ -1,8 +1,6 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - // XTAL { MP_ROM_QSTR(MP_QSTR_P0_00), MP_ROM_PTR(&pin_P0_00) }, - // XTAL { MP_ROM_QSTR(MP_QSTR_P0_01), MP_ROM_PTR(&pin_P0_01) }, { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, @@ -13,15 +11,12 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) }, { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) }, { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, - - //Vcc Enable { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, { MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, { MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) }, { MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) }, - // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) }, { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, { MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) }, { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, @@ -35,28 +30,22 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) }, { MP_ROM_QSTR(MP_QSTR_P0_30), MP_ROM_PTR(&pin_P0_30) }, { MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) }, - { MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) }, { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) }, { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) }, { MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) }, - - //RED LED { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, { MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) }, { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) }, { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) }, { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) }, { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, - - //BLUE LED { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_P1_12), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) }, { MP_ROM_QSTR(MP_QSTR_P1_14), MP_ROM_PTR(&pin_P1_14) }, { MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) }, - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_04) }, @@ -65,28 +54,20 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_29) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_30) }, { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_P0_31) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_15) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_17) }, - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_09) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_10) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_24) }, - { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P1_04) }, { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P1_10) }, - { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_04) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_31) }, { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_31) }, - - // Turn on external VCC - connected to enable pin of second regulator { MP_ROM_QSTR(MP_QSTR_VCC_ON), MP_ROM_PTR(&pin_P0_12) }, - { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, From 1a7cad6562a9ed0716627cd31a07724f1d203794 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 8 Aug 2021 21:43:03 -0600 Subject: [PATCH 101/418] removed trailing spaces in pins.c --- ports/nrf/boards/bluemicro840/pins.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/nrf/boards/bluemicro840/pins.c b/ports/nrf/boards/bluemicro840/pins.c index 755429b31e..f4041585d0 100644 --- a/ports/nrf/boards/bluemicro840/pins.c +++ b/ports/nrf/boards/bluemicro840/pins.c @@ -11,7 +11,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) }, { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) }, { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, - { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, { MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) }, { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, @@ -34,13 +34,13 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) }, { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) }, { MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) }, - { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, { MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) }, { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) }, { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) }, { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) }, { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, - { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_P1_12), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) }, @@ -67,7 +67,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_31) }, { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_31) }, - { MP_ROM_QSTR(MP_QSTR_VCC_ON), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_VCC_ON), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, From 7d02fd42f8e04537b70d477630378f5405a59d36 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 8 Aug 2021 21:56:24 -0600 Subject: [PATCH 102/418] removed trailing spaces at end of pins.c --- ports/nrf/boards/bluemicro840/pins.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/nrf/boards/bluemicro840/pins.c b/ports/nrf/boards/bluemicro840/pins.c index f4041585d0..e33aff2bfa 100644 --- a/ports/nrf/boards/bluemicro840/pins.c +++ b/ports/nrf/boards/bluemicro840/pins.c @@ -74,5 +74,3 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); - - From 51f86037837b57e404a5acd5d8851d4b1d9756ac Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Sun, 8 Aug 2021 15:15:15 +0530 Subject: [PATCH 103/418] add getpass module --- locale/circuitpython.pot | 14 +-- .../mpconfigboard.mk | 2 + .../boards/sensebox_mcu/mpconfigboard.mk | 2 + py/circuitpy_defns.mk | 4 + py/circuitpy_mpconfig.h | 8 ++ py/circuitpy_mpconfig.mk | 3 + shared-bindings/getpass/__init__.c | 86 +++++++++++++++++++ shared-module/getpass/__init__.c | 61 +++++++++++++ shared-module/getpass/__init__.h | 34 ++++++++ 9 files changed, 209 insertions(+), 5 deletions(-) create mode 100644 shared-bindings/getpass/__init__.c create mode 100644 shared-module/getpass/__init__.c create mode 100644 shared-module/getpass/__init__.h diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index f10f7fd019..0659588ae0 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -35,11 +35,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c shared-module/traceback/__init__.c msgid " File \"%q\"" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c shared-module/traceback/__init__.c msgid " File \"%q\", line %d" msgstr "" @@ -322,7 +322,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c shared-module/traceback/__init__.c msgid ", in %q\n" msgstr "" @@ -2211,7 +2211,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c shared-module/traceback/__init__.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -3903,6 +3903,10 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h @@ -4101,7 +4105,7 @@ msgstr "" msgid "stop not reachable from start" msgstr "" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "" diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index cf9afb3d21..3ef6dafac6 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -19,6 +19,8 @@ CIRCUITPY_PWMIO = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 CIRCUITPY_USB_MIDI = 0 + +CIRCUITPY_GETPASS = 0 CIRCUITPY_TRACEBACK = 0 CIRCUITPY_PIXELBUF = 1 diff --git a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk index 196d36816f..94a255529f 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk @@ -9,3 +9,5 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 + +CIRCUITPY_GETPASS = 0 diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 92bd3b4d1f..84c8e22b2b 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -188,6 +188,9 @@ endif ifeq ($(CIRCUITPY_GAMEPADSHIFT),1) SRC_PATTERNS += gamepadshift/% endif +ifeq ($(CIRCUITPY_GETPASS),1) +SRC_PATTERNS += getpass/% +endif ifeq ($(CIRCUITPY_GNSS),1) SRC_PATTERNS += gnss/% endif @@ -519,6 +522,7 @@ SRC_SHARED_MODULE_ALL = \ fontio/__init__.c \ framebufferio/FramebufferDisplay.c \ framebufferio/__init__.c \ + getpass/__init__.c \ ipaddress/IPv4Address.c \ ipaddress/__init__.c \ keypad/__init__.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 5a7be5b79e..b8dbcd6de2 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -483,6 +483,13 @@ extern const struct _mp_obj_module_t gamepadshift_module; #define GAMEPAD_ROOT_POINTERS #endif +#if CIRCUITPY_GETPASS +extern const struct _mp_obj_module_t getpass_module; +#define GETPASS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_getpass), (mp_obj_t)&getpass_module }, +#else +#define GETPASS_MODULE +#endif + #if CIRCUITPY_GNSS extern const struct _mp_obj_module_t gnss_module; #define GNSS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gnss), (mp_obj_t)&gnss_module }, @@ -896,6 +903,7 @@ extern const struct _mp_obj_module_t msgpack_module; FRAMEBUFFERIO_MODULE \ FREQUENCYIO_MODULE \ GAMEPADSHIFT_MODULE \ + GETPASS_MODULE \ GNSS_MODULE \ I2CPERIPHERAL_MODULE \ IPADDRESS_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 45bc2e8fed..4df9432efa 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -184,6 +184,9 @@ CFLAGS += -DCIRCUITPY_FREQUENCYIO=$(CIRCUITPY_FREQUENCYIO) CIRCUITPY_GAMEPADSHIFT ?= 0 CFLAGS += -DCIRCUITPY_GAMEPADSHIFT=$(CIRCUITPY_GAMEPADSHIFT) +CIRCUITPY_GETPASS ?= 1 +CFLAGS += -DCIRCUITPY_GETPASS=$(CIRCUITPY_GETPASS) + CIRCUITPY_GNSS ?= 0 CFLAGS += -DCIRCUITPY_GNSS=$(CIRCUITPY_GNSS) diff --git a/shared-bindings/getpass/__init__.c b/shared-bindings/getpass/__init__.c new file mode 100644 index 0000000000..d627087aae --- /dev/null +++ b/shared-bindings/getpass/__init__.c @@ -0,0 +1,86 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/stream.h" +#include "shared-module/getpass/__init__.h" + +//| """Getpass Module +//| +//| This module provides a way to get input from user without echoing it. +//| +//| """ +//| ... +//| + +//| def getpass(prompt: Optional[str] = 'Password: ', stream: Optional[io.FileIO] = None) -> str: +//| +//| """Prompt the user without echoing. +//| +//| :param str prompt: The user is prompted using the string ``prompt``, which defaults to ``'Password: '``. +//| :param io.FileIO stream: The ``prompt`` is written to the file-like object ``stream`` if provided. +//| +//| """ +//| ... +//| +STATIC mp_obj_t getpass_getpass(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_prompt, ARG_stream }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_prompt, MP_ARG_OBJ, {.u_obj = mp_const_none} }, + { MP_QSTR_stream, MP_ARG_OBJ, {.u_obj = mp_const_none} }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + const char *prompt = (args[ARG_prompt].u_obj == mp_const_none) ? "Password: " : mp_obj_str_get_str(args[ARG_prompt].u_obj); + + mp_print_t print = {.data = NULL}; + if (args[ARG_stream].u_obj != mp_const_none) { + #if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES + mp_get_stream_raise(args[ARG_stream].u_obj, MP_STREAM_OP_WRITE); + print.data = MP_OBJ_TO_PTR(args[ARG_stream].u_obj); + print.print_strn = mp_stream_write_adaptor; + #else + mp_raise_NotImplementedError(translate("stream operation not supported")); + #endif + } + + return shared_module_getpass_getpass(prompt, ((print.data) ? &print : NULL)); +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(getpass_getpass_obj, 0, getpass_getpass); + +STATIC const mp_rom_map_elem_t getpass_module_globals_table[] = { + // module name + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_getpass) }, + // module functions + { MP_ROM_QSTR(MP_QSTR_getpass), MP_ROM_PTR(&getpass_getpass_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(getpass_module_globals, getpass_module_globals_table); + +const mp_obj_module_t getpass_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)&getpass_module_globals, +}; diff --git a/shared-module/getpass/__init__.c b/shared-module/getpass/__init__.c new file mode 100644 index 0000000000..f7ab96c378 --- /dev/null +++ b/shared-module/getpass/__init__.c @@ -0,0 +1,61 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/mphal.h" +#include "lib/mp-readline/readline.h" +#include "shared-module/getpass/__init__.h" + +mp_obj_t shared_module_getpass_getpass(const char *prompt, mp_print_t *print) { + vstr_t vstr; + vstr_init(&vstr, 16); + + if (print == NULL) { + mp_hal_stdout_tx_str(prompt); + } else { + mp_printf(print, prompt); + } + + for (;;) { + int c = mp_hal_stdin_rx_chr(); + if (c == CHAR_CTRL_C) { + mp_raise_type(&mp_type_KeyboardInterrupt); + } else if (c == CHAR_CTRL_D && vstr.len == 0) { + mp_raise_type(&mp_type_EOFError); + } else if (c == 8 || c == 127) { + // backspace + vstr_cut_tail_bytes(&vstr, 1); + } else if (c >= 32) { + // printable character + vstr_ins_char(&vstr, vstr.len, c); + } else if (c == '\r') { + // newline + mp_hal_stdout_tx_str("\r\n"); + break; + } + } + + return mp_obj_new_str_from_vstr(&mp_type_str, &vstr); +} diff --git a/shared-module/getpass/__init__.h b/shared-module/getpass/__init__.h new file mode 100644 index 0000000000..80595d41ba --- /dev/null +++ b/shared-module/getpass/__init__.h @@ -0,0 +1,34 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_MODULE_GETPASS___INIT___H +#define MICROPY_INCLUDED_SHARED_MODULE_GETPASS___INIT___H + +#include "py/runtime.h" + +extern mp_obj_t shared_module_getpass_getpass(const char *prompt, mp_print_t *print); + +#endif // MICROPY_INCLUDED_SHARED_MODULE_GETPASS___INIT___H From bfea6947e510e5a20bd46db4946f9ae524077b47 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 8 Aug 2021 10:27:50 -0500 Subject: [PATCH 104/418] Improve mp_printf with support for compressed strings * The new nonstandard '%S' format takes a pointer to compressed_string_t and prints it * The new mp_cprintf and mp_vcprintf take a format string that is a compressed_string_t --- locale/circuitpython.pot | 12 ++++++--- py/builtinhelp.c | 25 +++++------------- py/mpprint.c | 42 +++++++++++++++++++++++++----- py/mpprint.h | 6 +++++ py/obj.c | 16 +++--------- py/objexcept.c | 5 +--- shared-module/traceback/__init__.c | 14 +++------- supervisor/shared/translate.c | 5 ++-- supervisor/shared/translate.h | 2 +- 9 files changed, 67 insertions(+), 60 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index f10f7fd019..720f52d40b 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -35,11 +35,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr "" @@ -322,7 +322,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr "" @@ -2211,7 +2211,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -3903,6 +3903,10 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/py/builtinhelp.c b/py/builtinhelp.c index 344ded80b0..8590c4beea 100644 --- a/py/builtinhelp.c +++ b/py/builtinhelp.c @@ -131,10 +131,7 @@ STATIC void mp_help_print_modules(void) { #if MICROPY_ENABLE_EXTERNAL_IMPORT // let the user know there may be other modules available from the filesystem - const compressed_string_t *compressed = translate("Plus any modules on the filesystem\n"); - char decompressed[decompress_length(compressed)]; - decompress(compressed, decompressed); - mp_print_str(MP_PYTHON_PRINTER, decompressed); + mp_printf(MP_PYTHON_PRINTER, "%S", translate("Plus any modules on the filesystem\n")); #endif } #endif @@ -150,18 +147,10 @@ STATIC void mp_help_print_obj(const mp_obj_t obj) { const mp_obj_type_t *type = mp_obj_get_type(obj); // try to print something sensible about the given object - const compressed_string_t *compressed = translate("object "); - char decompressed_object[decompress_length(compressed)]; - decompress(compressed, decompressed_object); - - mp_print_str(MP_PYTHON_PRINTER, decompressed_object); + mp_cprintf(MP_PYTHON_PRINTER, translate("object ")); mp_obj_print(obj, PRINT_STR); - compressed = translate(" is of type %q\n"); - char decompressed_typestring[decompress_length(compressed)]; - decompress(compressed, decompressed_typestring); - - mp_printf(MP_PYTHON_PRINTER, decompressed_typestring, type->name); + mp_cprintf(MP_PYTHON_PRINTER, translate(" is of type %q\n"), type->name); mp_map_t *map = NULL; if (type == &mp_type_module) { @@ -186,11 +175,9 @@ STATIC void mp_help_print_obj(const mp_obj_t obj) { STATIC mp_obj_t mp_builtin_help(size_t n_args, const mp_obj_t *args) { if (n_args == 0) { // print a general help message. Translate only works on single strings on one line. - const compressed_string_t *compressed = - translate("Welcome to Adafruit CircuitPython %s!\n\nPlease visit learn.adafruit.com/category/circuitpython for project guides.\n\nTo list built-in modules please do `help(\"modules\")`.\n"); - char decompressed[decompress_length(compressed)]; - decompress(compressed, decompressed); - mp_printf(MP_PYTHON_PRINTER, decompressed, MICROPY_GIT_TAG); + mp_cprintf(MP_PYTHON_PRINTER, + translate("Welcome to Adafruit CircuitPython %s!\n\nPlease visit learn.adafruit.com/category/circuitpython for project guides.\n\nTo list built-in modules please do `help(\"modules\")`.\n"), + MICROPY_GIT_TAG); } else { // try to print something sensible about the given object mp_help_print_obj(args[0]); diff --git a/py/mpprint.c b/py/mpprint.c index b99b5d658d..af485a50f2 100644 --- a/py/mpprint.c +++ b/py/mpprint.c @@ -376,6 +376,13 @@ int mp_print_float(const mp_print_t *print, mp_float_t f, char fmt, int flags, c } #endif +static int print_str_common(const mp_print_t *print, const char *str, int prec, size_t len, int flags, int fill, int width) { + if (prec >= 0 && (size_t)prec < len) { + len = prec; + } + return mp_print_strn(print, str, len, flags, fill, width); +} + int mp_printf(const mp_print_t *print, const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -484,19 +491,24 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) { qstr qst = va_arg(args, qstr); size_t len; const char *str = (const char *)qstr_data(qst, &len); - if (prec >= 0 && (size_t)prec < len) { - len = prec; - } - chrs += mp_print_strn(print, str, len, flags, fill, width); + chrs += print_str_common(print, str, prec, len, flags, fill, width); + break; + } + case 'S': { + compressed_string_t *arg = va_arg(args, compressed_string_t *); + size_t len_with_nul = decompress_length(arg); + size_t len = len_with_nul - 1; + char str[len_with_nul]; + decompress(arg, str); + chrs += print_str_common(print, str, prec, len, flags, fill, width); break; } case 's': { const char *str = va_arg(args, const char *); #ifndef NDEBUG // With debugging enabled, catch printing of null string pointers - if (prec != 0 && str == NULL) { - chrs += mp_print_strn(print, "(null)", 6, flags, fill, width); - break; + if (str == NULL) { + str = "(null)"; } #endif size_t len = strlen(str); @@ -574,3 +586,19 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) { } return chrs; } + +int mp_cprintf(const mp_print_t *print, const compressed_string_t *compressed_fmt, ...) { + va_list ap; + va_start(ap, compressed_fmt); + int ret = mp_vcprintf(print, compressed_fmt, ap); + va_end(ap); + return ret; +} + +int mp_vcprintf(const mp_print_t *print, const compressed_string_t *compressed_fmt, va_list args) { + char fmt[decompress_length(compressed_fmt)]; + // TODO: Optimise this to format-while-decompressing (and not require the temp stack space). + decompress(compressed_fmt, fmt); + + return mp_vprintf(print, fmt, args); +} diff --git a/py/mpprint.h b/py/mpprint.h index 4458ea883b..9284935f96 100644 --- a/py/mpprint.h +++ b/py/mpprint.h @@ -71,4 +71,10 @@ int mp_printf(const mp_print_t *print, const char *fmt, ...); int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args); #endif +struct compressed_string; +int mp_cprintf(const mp_print_t *print, const struct compressed_string *compressed_fmt, ...); +#ifdef va_start +int mp_vcprintf(const mp_print_t *print, const struct compressed_string *compressed_fmt, va_list args); +#endif + #endif // MICROPY_INCLUDED_PY_MPPRINT_H diff --git a/py/obj.c b/py/obj.c index c8a1106a3d..dcf48b81ae 100644 --- a/py/obj.c +++ b/py/obj.c @@ -149,35 +149,27 @@ void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) { mp_obj_exception_get_traceback(exc, &n, &values); if (n > 0) { assert(n % 3 == 0); - // Decompress the format strings - const compressed_string_t *traceback = MP_ERROR_TEXT("Traceback (most recent call last):\n"); - char decompressed[decompress_length(traceback)]; - decompress(traceback, decompressed); #if MICROPY_ENABLE_SOURCE_LINE const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\", line %d"); #else const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\""); #endif - char decompressed_frame[decompress_length(frame)]; - decompress(frame, decompressed_frame); const compressed_string_t *block_fmt = MP_ERROR_TEXT(", in %q\n"); - char decompressed_block[decompress_length(block_fmt)]; - decompress(block_fmt, decompressed_block); // Print the traceback - mp_print_str(print, decompressed); + mp_cprintf(print, MP_ERROR_TEXT("Traceback (most recent call last):\n")); for (int i = n - 3; i >= 0; i -= 3) { #if MICROPY_ENABLE_SOURCE_LINE - mp_printf(print, decompressed_frame, values[i], (int)values[i + 1]); + mp_cprintf(print, frame, values[i], (int)values[i + 1]); #else - mp_printf(print, decompressed_frame, values[i]); + mp_printf(print, frame, values[i]); #endif // the block name can be NULL if it's unknown qstr block = values[i + 2]; if (block == MP_QSTRnull) { mp_print_str(print, "\n"); } else { - mp_printf(print, decompressed_block, block); + mp_cprintf(print, block_fmt, block); } } } diff --git a/py/objexcept.c b/py/objexcept.c index 6488413115..e572225bbc 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -465,12 +465,9 @@ mp_obj_t mp_obj_new_exception_msg_vlist(const mp_obj_type_t *exc_type, const com o_str->data = NULL; } else { // We have some memory to format the string. - // TODO: Optimise this to format-while-decompressing (and not require the temp stack space). struct _exc_printer_t exc_pr = {!used_emg_buf, o_str_alloc, 0, o_str_buf}; mp_print_t print = {&exc_pr, exc_add_strn}; - char fmt_decompressed[decompress_length(fmt)]; - decompress(fmt, fmt_decompressed); - mp_vprintf(&print, fmt_decompressed, ap); + mp_vcprintf(&print, fmt, ap); exc_pr.buf[exc_pr.len] = '\0'; o_str->len = exc_pr.len; o_str->data = exc_pr.buf; diff --git a/shared-module/traceback/__init__.c b/shared-module/traceback/__init__.c index 388b1c18de..11237edb5c 100644 --- a/shared-module/traceback/__init__.c +++ b/shared-module/traceback/__init__.c @@ -35,18 +35,12 @@ void shared_module_traceback_print_exception(mp_obj_exception_t *exc, mp_print_t assert(n % 3 == 0); // Decompress the format strings const compressed_string_t *traceback = MP_ERROR_TEXT("Traceback (most recent call last):\n"); - char decompressed[decompress_length(traceback)]; - decompress(traceback, decompressed); #if MICROPY_ENABLE_SOURCE_LINE const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\", line %d"); #else const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\""); #endif - char decompressed_frame[decompress_length(frame)]; - decompress(frame, decompressed_frame); const compressed_string_t *block_fmt = MP_ERROR_TEXT(", in %q\n"); - char decompressed_block[decompress_length(block_fmt)]; - decompress(block_fmt, decompressed_block); // Set traceback formatting // Default: Print full traceback @@ -69,20 +63,20 @@ void shared_module_traceback_print_exception(mp_obj_exception_t *exc, mp_print_t } // Print the traceback - mp_print_str(print, decompressed); + mp_cprintf(print, traceback); for (; i >= limit; i -= 3) { j = (i < 0) ? -i : i; #if MICROPY_ENABLE_SOURCE_LINE - mp_printf(print, decompressed_frame, values[j], (int)values[j + 1]); + mp_cprintf(print, frame, values[j], (int)values[j + 1]); #else - mp_printf(print, decompressed_frame, values[j]); + mp_printf(print, frame, values[j]); #endif // The block name can be NULL if it's unknown qstr block = values[j + 2]; if (block == MP_QSTRnull) { mp_print_str(print, "\n"); } else { - mp_printf(print, decompressed_block, block); + mp_printf(print, block_fmt, block); } } } diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c index 4d899ad6d0..a14fa5c728 100644 --- a/supervisor/shared/translate.c +++ b/supervisor/shared/translate.c @@ -35,12 +35,11 @@ #endif #include "py/misc.h" +#include "py/mpprint.h" #include "supervisor/serial.h" void serial_write_compressed(const compressed_string_t *compressed) { - char decompressed[decompress_length(compressed)]; - decompress(compressed, decompressed); - serial_write(decompressed); + mp_printf(MP_PYTHON_PRINTER, "%S", compressed); } STATIC void get_word(int n, const mchar_t **pos, const mchar_t **end) { diff --git a/supervisor/shared/translate.h b/supervisor/shared/translate.h index 26a961a3ed..da58e1eb78 100644 --- a/supervisor/shared/translate.h +++ b/supervisor/shared/translate.h @@ -69,7 +69,7 @@ // flexible array}, but is also future-proofed against strings with // UTF-8 length above 256, with a savings of about 1.375 bytes per // string. -typedef struct { +typedef struct compressed_string { uint8_t data; const uint8_t tail[]; } compressed_string_t; From c1ffab7476d9bdb042eae89abecf46344ee34301 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 8 Aug 2021 10:36:25 -0500 Subject: [PATCH 105/418] Reduce code duplication in traceback module --- py/obj.c | 38 ++++++++++++++++---- py/obj.h | 1 + shared-module/traceback/__init__.c | 58 +----------------------------- 3 files changed, 34 insertions(+), 63 deletions(-) diff --git a/py/obj.c b/py/obj.c index dcf48b81ae..fa3cd0c51c 100644 --- a/py/obj.c +++ b/py/obj.c @@ -143,7 +143,7 @@ void mp_obj_print(mp_obj_t o_in, mp_print_kind_t kind) { } // helper function to print an exception with traceback -void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) { +void mp_obj_print_exception_with_limit(const mp_print_t *print, mp_obj_t exc, mp_int_t limit) { if (mp_obj_is_exception_instance(exc) && stack_ok()) { size_t n, *values; mp_obj_exception_get_traceback(exc, &n, &values); @@ -156,16 +156,38 @@ void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) { #endif const compressed_string_t *block_fmt = MP_ERROR_TEXT(", in %q\n"); + // Set traceback formatting + // Default: Print full traceback + limit = limit * 3; + mp_int_t i = n - 3, j; + if (limit > 0) { + // Print upto limit traceback + // entries from caller's frame + if ((unsigned)limit > n) { + limit = n; + } + limit = n - limit; + } else if (limit < 0) { + // Print upto limit traceback + // entries from last + if ((unsigned)-limit > n) { + limit = -n; + } + i = 0, limit = limit + 3; + } + // Print the traceback mp_cprintf(print, MP_ERROR_TEXT("Traceback (most recent call last):\n")); - for (int i = n - 3; i >= 0; i -= 3) { + + for (; i >= limit; i -= 3) { + j = (i < 0) ? -i : i; #if MICROPY_ENABLE_SOURCE_LINE - mp_cprintf(print, frame, values[i], (int)values[i + 1]); + mp_cprintf(print, frame, values[j], (int)values[j + 1]); #else - mp_printf(print, frame, values[i]); + mp_cprintf(print, frame, values[j]); #endif - // the block name can be NULL if it's unknown - qstr block = values[i + 2]; + // The block name can be NULL if it's unknown + qstr block = values[j + 2]; if (block == MP_QSTRnull) { mp_print_str(print, "\n"); } else { @@ -178,6 +200,10 @@ void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) { mp_print_str(print, "\n"); } +void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) { + mp_obj_print_exception_with_limit(print, exc, 0); +} + bool PLACE_IN_ITCM(mp_obj_is_true)(mp_obj_t arg) { if (arg == mp_const_false) { return 0; diff --git a/py/obj.h b/py/obj.h index b91932b11e..a043154ada 100644 --- a/py/obj.h +++ b/py/obj.h @@ -888,6 +888,7 @@ mp_obj_t mp_obj_cast_to_native_base(mp_obj_t self_in, mp_const_obj_t native_type void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind); void mp_obj_print(mp_obj_t o, mp_print_kind_t kind); void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc); +void mp_obj_print_exception_with_limit(const mp_print_t *print, mp_obj_t exc, mp_int_t limit); bool mp_obj_is_true(mp_obj_t arg); bool mp_obj_is_callable(mp_obj_t o_in); diff --git a/shared-module/traceback/__init__.c b/shared-module/traceback/__init__.c index 11237edb5c..a29bd5743f 100644 --- a/shared-module/traceback/__init__.c +++ b/shared-module/traceback/__init__.c @@ -27,61 +27,5 @@ #include "shared-module/traceback/__init__.h" void shared_module_traceback_print_exception(mp_obj_exception_t *exc, mp_print_t *print, mp_int_t limit) { - // Print traceback - if (exc->traceback != NULL) { - size_t n = exc->traceback->len; - size_t *values = exc->traceback->data; - if (n > 0) { - assert(n % 3 == 0); - // Decompress the format strings - const compressed_string_t *traceback = MP_ERROR_TEXT("Traceback (most recent call last):\n"); - #if MICROPY_ENABLE_SOURCE_LINE - const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\", line %d"); - #else - const compressed_string_t *frame = MP_ERROR_TEXT(" File \"%q\""); - #endif - const compressed_string_t *block_fmt = MP_ERROR_TEXT(", in %q\n"); - - // Set traceback formatting - // Default: Print full traceback - limit = limit * 3; - mp_int_t i = n - 3, j; - if (limit > 0) { - // Print upto limit traceback - // entries from caller's frame - if ((unsigned)limit > n) { - limit = n; - } - limit = n - limit; - } else if (limit < 0) { - // Print upto limit traceback - // entries from last - if ((unsigned)-limit > n) { - limit = -n; - } - i = 0, limit = limit + 3; - } - - // Print the traceback - mp_cprintf(print, traceback); - for (; i >= limit; i -= 3) { - j = (i < 0) ? -i : i; - #if MICROPY_ENABLE_SOURCE_LINE - mp_cprintf(print, frame, values[j], (int)values[j + 1]); - #else - mp_printf(print, frame, values[j]); - #endif - // The block name can be NULL if it's unknown - qstr block = values[j + 2]; - if (block == MP_QSTRnull) { - mp_print_str(print, "\n"); - } else { - mp_printf(print, block_fmt, block); - } - } - } - } - // Print exception - mp_obj_print_helper(print, exc, PRINT_EXC); - mp_print_str(print, "\n"); + mp_obj_print_exception_with_limit(print, exc, limit); } From 9a932a5a48487e511461940b3082c7125351c539 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 8 Aug 2021 11:03:03 -0500 Subject: [PATCH 106/418] traceback: Implement format_exception --- locale/circuitpython.pot | 4 -- shared-bindings/traceback/__init__.c | 96 +++++++++++++++++++++------- 2 files changed, 72 insertions(+), 28 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 720f52d40b..c7c4dfd098 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -3453,10 +3453,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index d5290559ca..828d6bc28e 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -38,6 +38,75 @@ //| ... //| +STATIC void traceback_exception_common(mp_print_t *print, mp_obj_t value, mp_obj_t tb_obj, mp_obj_t limit_obj) { + if (!mp_obj_is_exception_instance(value)) { + mp_raise_TypeError(translate("invalid exception")); + } + mp_obj_exception_t exc = *(mp_obj_exception_t *)MP_OBJ_TO_PTR(value); + + mp_int_t limit = 0; + bool print_tb = true; + if (limit_obj != mp_const_none) { + limit = mp_obj_get_int(limit_obj); + print_tb = (limit != 0); + } + + if (tb_obj != mp_const_none && print_tb) { + if (!mp_obj_is_type(tb_obj, &mp_type_traceback)) { + mp_raise_TypeError(translate("invalid traceback")); + } + exc.traceback = MP_OBJ_TO_PTR(tb_obj); + } else { + exc.traceback = NULL; + } + + shared_module_traceback_print_exception(&exc, print, limit); +} + +//| def format_exception(etype: Type[BaseException], value: BaseException, tb: TracebackType, +//| limit: Optional[int] = None, chain: Optional[bool] = True) -> None: +//| """Format a stack trace and the exception information. +//| +//| The arguments have the same meaning as the corresponding arguments +//| to print_exception(). The return value is a list of strings, each +//| ending in a newline and some containing internal newlines. When +//| these lines are concatenated and printed, exactly the same text is +//| printed as does print_exception(). +//| +//| .. note: Setting `chain` will have no effect as chained exceptions are not yet implemented. +//| +//| :param Type[BaseException] etype: This is ignored and inferred from the type of ``value``. +//| :param BaseException value: The exception. Must be an instance of `BaseException`. +//| :param TracebackType tb: The traceback object. If `None`, the traceback will not be printed. +//| :param int limit: Print up to limit stack trace entries (starting from the caller’s frame) if limit is positive. +//| Otherwise, print the last ``abs(limit)`` entries. If limit is omitted or None, all entries are printed. +//| :param bool chain: If `True` then chained exceptions will be printed (note: not yet implemented). +//| +//| """ +//| ... +//| +STATIC mp_obj_t traceback_format_exception(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_etype, ARG_value, ARG_tb, ARG_limit, ARG_chain }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_etype, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_value, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_tb, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_limit, MP_ARG_OBJ, {.u_obj = mp_const_none} }, + { MP_QSTR_chain, MP_ARG_BOOL, {.u_bool = true} }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_print_t print; + vstr_t vstr; + vstr_init_print(&vstr, 0, &print); + traceback_exception_common(&print, args[ARG_value].u_obj, args[ARG_tb].u_obj, args[ARG_limit].u_obj); + return mp_obj_new_str_from_vstr(&mp_type_str, &vstr); +} + +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(traceback_format_exception_obj, 3, traceback_format_exception); + //| def print_exception(etype: Type[BaseException], value: BaseException, tb: TracebackType, //| limit: Optional[int] = None, file: Optional[io.FileIO] = None, chain: Optional[bool] = True) -> None: //| @@ -57,6 +126,7 @@ //| """ //| ... //| + STATIC mp_obj_t traceback_print_exception(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_etype, ARG_value, ARG_tb, ARG_limit, ARG_file, ARG_chain }; static const mp_arg_t allowed_args[] = { @@ -71,11 +141,6 @@ STATIC mp_obj_t traceback_print_exception(size_t n_args, const mp_obj_t *pos_arg mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - if (!mp_obj_is_exception_instance(args[ARG_value].u_obj)) { - mp_raise_TypeError(translate("invalid exception")); - } - mp_obj_exception_t exc = *(mp_obj_exception_t *)MP_OBJ_TO_PTR(args[ARG_value].u_obj); - mp_print_t print = mp_plat_print; if (args[ARG_file].u_obj != mp_const_none) { #if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES @@ -87,25 +152,7 @@ STATIC mp_obj_t traceback_print_exception(size_t n_args, const mp_obj_t *pos_arg #endif } - mp_int_t limit = 0; - bool print_tb = true; - if (args[ARG_limit].u_obj != mp_const_none) { - if (!mp_obj_get_int_maybe(args[ARG_limit].u_obj, &limit)) { - mp_raise_TypeError(translate("limit should be an int")); - } - print_tb = (limit != 0); - } - - if (args[ARG_tb].u_obj != mp_const_none && print_tb) { - if (!mp_obj_is_type(args[ARG_tb].u_obj, &mp_type_traceback)) { - mp_raise_TypeError(translate("invalid traceback")); - } - exc.traceback = MP_OBJ_TO_PTR(args[ARG_tb].u_obj); - } else { - exc.traceback = NULL; - } - - shared_module_traceback_print_exception(&exc, &print, limit); + traceback_exception_common(&print, args[ARG_value].u_obj, args[ARG_tb].u_obj, args[ARG_limit].u_obj); return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(traceback_print_exception_obj, 3, traceback_print_exception); @@ -114,6 +161,7 @@ STATIC const mp_rom_map_elem_t traceback_module_globals_table[] = { // module name { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_traceback) }, // module functions + { MP_ROM_QSTR(MP_QSTR_format_exception), MP_ROM_PTR(&traceback_format_exception_obj) }, { MP_ROM_QSTR(MP_QSTR_print_exception), MP_ROM_PTR(&traceback_print_exception_obj) }, }; STATIC MP_DEFINE_CONST_DICT(traceback_module_globals, traceback_module_globals_table); From 87358f81b258b0950e76be7cdd530e579905998f Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 9 Aug 2021 08:30:12 -0500 Subject: [PATCH 107/418] trying to check next pixel --- shared-module/bitmaptools/__init__.c | 85 ++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 4 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 3aeece186f..3b421f2ccc 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#include #include "shared-bindings/bitmaptools/__init__.h" #include "shared-bindings/displayio/Bitmap.h" @@ -269,16 +270,92 @@ void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, fillArea.append((x - 1, y)) fillArea.append((x, y + 1)) fillArea.append((x, y - 1))*/ - mp_obj_list_t *fill_area; + mp_obj_t fill_area = mp_obj_new_list(0, NULL); + mp_obj_t point[] = { mp_obj_new_int(x), mp_obj_new_int(y) }; + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, point) + ); //mp_obj_list_t *point; //mp_obj_list_append(point, x); //mp_obj_list_append(point, y); - mp_obj_list_append(MP_OBJ_FROM_PTR(*fill_area), MP_OBJ_NEW_QSTR(qstr_from_str("hello"))); - //mp_printf(&mp_plat_print, fill_area[0]); - //mp_obj_print(mp_obj_list_pop(fill_area, 0), PRINT_STR); + mp_obj_t *fill_points; + size_t list_length = 0; + mp_obj_list_get(fill_area, &list_length, &fill_points); + mp_printf(&mp_plat_print, "\nLen bfore loop: %d", list_length); + mp_obj_t current_point; + uint32_t current_point_color_value; + + size_t tuple_len = 0; + mp_obj_t *tuple_items; + + + while (list_length > 0){ + mp_obj_list_get(fill_area, &list_length, &fill_points); + mp_printf(&mp_plat_print, "\nLen begin loop: %d\n", list_length); + current_point = mp_obj_list_pop(fill_area, 0); + + + //mp_obj_print(current_point, PRINT_STR); + mp_obj_tuple_get(current_point, &tuple_len, &tuple_items); + current_point_color_value = common_hal_displayio_bitmap_get_pixel( + destination, + mp_obj_get_int(tuple_items[0]), + mp_obj_get_int(tuple_items[1])); + + mp_printf(&mp_plat_print, "%d\n", current_point_color_value); + + if(current_point_color_value != background_value){ + mp_obj_list_get(fill_area, &list_length, &fill_points); + continue; + } + displayio_bitmap_write_pixel( + destination, + mp_obj_get_int(tuple_items[0]), + mp_obj_get_int(tuple_items[1]), + value); + + + //mp_obj_t above_point[] = { mp_obj_new_int(tuple_items[0]), mp_obj_new_int(tuple_items[1])-1 }; + mp_printf(&mp_plat_print,"math:\n"); + mp_printf(&mp_plat_print, "%d\n", mp_obj_get_int(tuple_items[0])); + mp_printf(&mp_plat_print, "%d\n", mp_obj_get_int(tuple_items[0])+1); + int16_t above_int = mp_obj_get_int(tuple_items[0])+1; + mp_printf(&mp_plat_print, "%d\n", above_int); + int16_t *above = &above_int; + mp_printf(&mp_plat_print, "%d\n", above); + + mp_obj_t above_point[] = { + tuple_items[0], + above}; + + mp_printf(&mp_plat_print,"above_point:\n"); + //mp_obj_print(above_point, PRINT_STR); + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, above_point)); + + mp_obj_list_get(fill_area, &list_length, &fill_points); + mp_printf(&mp_plat_print, "\nLen end loop: %d\n", list_length); + } + + //mp_obj_print(fill_area, PRINT_STR); + //mp_obj_print(current_point[0], PRINT_STR); + + /* + mp_printf(&mp_plat_print, "\nLen: %d", list_length); + size_t tuple_len = 0; + mp_obj_t *tuple_items; + mp_obj_tuple_get(current_point[0], &tuple_len, &tuple_items); + + //mp_obj_print(mp_obj_get_int(tuple_items[0])+1, PRINT_STR); + + mp_printf(&mp_plat_print, "\n%d", mp_obj_get_int(tuple_items[0])+1); + */ + } void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, From fd71d924d24e87401faca283843bdb5125d9e91e Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 28 Jul 2021 22:19:41 -0400 Subject: [PATCH 108/418] partial buffer mgmt fix --- ports/atmel-samd/audio_dma.c | 24 +++++++------ .../atmel-samd/common-hal/audiobusio/I2SOut.c | 9 +++-- ports/raspberrypi/audio_dma.c | 35 ++++++++++++------- .../common-hal/audiobusio/I2SOut.c | 3 +- 4 files changed, 42 insertions(+), 29 deletions(-) diff --git a/ports/atmel-samd/audio_dma.c b/ports/atmel-samd/audio_dma.c index 7f1260973d..fc57e404f7 100644 --- a/ports/atmel-samd/audio_dma.c +++ b/ports/atmel-samd/audio_dma.c @@ -214,21 +214,23 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, if (output_signed != samples_signed) { output_spacing = 1; max_buffer_length /= dma->spacing; - dma->first_buffer = (uint8_t *)m_realloc(dma->first_buffer, max_buffer_length); - if (dma->first_buffer == NULL) { + } + + dma->first_buffer = (uint8_t *)m_realloc(dma->first_buffer, max_buffer_length); + if (dma->first_buffer == NULL) { + return AUDIO_DMA_MEMORY_ERROR; + } + dma->first_buffer_free = true; + if (!single_buffer) { + dma->second_buffer = (uint8_t *)m_realloc(dma->second_buffer, max_buffer_length); + if (dma->second_buffer == NULL) { return AUDIO_DMA_MEMORY_ERROR; } - dma->first_buffer_free = true; - if (!single_buffer) { - dma->second_buffer = (uint8_t *)m_realloc(dma->second_buffer, max_buffer_length); - if (dma->second_buffer == NULL) { - return AUDIO_DMA_MEMORY_ERROR; - } - } - dma->signed_to_unsigned = !output_signed && samples_signed; - dma->unsigned_to_signed = output_signed && !samples_signed; } + dma->signed_to_unsigned = !output_signed && samples_signed; + dma->unsigned_to_signed = output_signed && !samples_signed; + dma->event_channel = 0xff; if (!single_buffer) { dma->second_descriptor = (DmacDescriptor *)m_malloc(sizeof(DmacDescriptor), false); diff --git a/ports/atmel-samd/common-hal/audiobusio/I2SOut.c b/ports/atmel-samd/common-hal/audiobusio/I2SOut.c index 2488b7b922..7a10ea81d7 100644 --- a/ports/atmel-samd/common-hal/audiobusio/I2SOut.c +++ b/ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -71,7 +71,7 @@ void i2sout_reset(void) { // Make sure the I2S peripheral is running so we can see if the resources we need are free. #ifdef SAM_D5X_E5X - // Connect the clock units to the 2mhz clock. It can't disable without it. + // Connect the clock units to the 2MHz clock. It can't disable without it. connect_gclk_to_peripheral(5, I2S_GCLK_ID_0); connect_gclk_to_peripheral(5, I2S_GCLK_ID_1); #endif @@ -83,7 +83,7 @@ void i2sout_reset(void) { // Make sure the I2S peripheral is running so we can see if the resources we need are free. #ifdef SAM_D5X_E5X - // Connect the clock units to the 2mhz clock by default. They can't reset without it. + // Connect the clock units to the 2MHz clock by default. They can't reset without it. disconnect_gclk_from_peripheral(5, I2S_GCLK_ID_0); disconnect_gclk_from_peripheral(5, I2S_GCLK_ID_1); @@ -222,7 +222,6 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { reset_pin_number(self->word_select->number); self->word_select = NULL; reset_pin_number(self->data->number); - self->data = NULL; } void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, @@ -288,7 +287,7 @@ void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, I2S->TXCTRL.reg = serctrl; #endif - // The DFLL is always a 48mhz clock + // The DFLL is always a 48MHz clock enable_clock_generator(self->gclk, CLOCK_48MHZ, divisor); connect_gclk_to_peripheral(self->gclk, I2S_GCLK_ID_0 + self->clock_unit); @@ -380,7 +379,7 @@ void common_hal_audiobusio_i2sout_stop(audiobusio_i2sout_obj_t *self) { } #endif disconnect_gclk_from_peripheral(self->gclk, I2S_GCLK_ID_0 + self->clock_unit); - disable_clock_generator(self->gclk); + disable_gclk(self->gclk); #ifdef SAM_D5X_E5X connect_gclk_to_peripheral(5, I2S_GCLK_ID_0 + self->clock_unit); diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index 52b1c84b91..d3c041a84d 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -135,12 +135,21 @@ void audio_dma_load_next_block(audio_dma_t *dma) { audio_dma_stop(dma); return; } + bool busy0 = dma_channel_is_busy(dma->channel[0]); + bool busy1 = dma_channel_is_busy(dma->channel[1]); + if (busy0 == busy1) { + mp_printf(&mp_plat_print, "busy: %d %d\n", busy0, busy1); + } + if (buffer_length < 256) { + mp_printf(&mp_plat_print, "%d length: %d\n", dma->first_channel_free, buffer_length); + } audio_dma_convert_signed(dma, buffer, buffer_length, &output_buffer, &output_buffer_length); // If we don't have an output buffer, save the pointer to first_buffer for use in the single // buffer special case. if (dma->first_buffer == NULL) { + mp_printf(&mp_plat_print,"no first buffer\n"); dma->first_buffer = output_buffer; } @@ -210,22 +219,24 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, dma->sample_spacing > 1 || (dma->sample_resolution != dma->output_resolution)) { max_buffer_length /= dma->sample_spacing; - dma->first_buffer = (uint8_t *)m_realloc(dma->first_buffer, max_buffer_length); - if (dma->first_buffer == NULL) { + } + + dma->first_buffer = (uint8_t *)m_realloc(dma->first_buffer, max_buffer_length); + if (dma->first_buffer == NULL) { + return AUDIO_DMA_MEMORY_ERROR; + } + + dma->first_buffer_free = true; + if (!single_buffer) { + dma->second_buffer = (uint8_t *)m_realloc(dma->second_buffer, max_buffer_length); + if (dma->second_buffer == NULL) { return AUDIO_DMA_MEMORY_ERROR; } - - dma->first_buffer_free = true; - if (!single_buffer) { - dma->second_buffer = (uint8_t *)m_realloc(dma->second_buffer, max_buffer_length); - if (dma->second_buffer == NULL) { - return AUDIO_DMA_MEMORY_ERROR; - } - } - dma->signed_to_unsigned = !output_signed && samples_signed; - dma->unsigned_to_signed = output_signed && !samples_signed; } + dma->signed_to_unsigned = !output_signed && samples_signed; + dma->unsigned_to_signed = output_signed && !samples_signed; + if (output_resolution > 8) { dma->output_size = 2; } else { diff --git a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c index 15a7cd523b..425b65e601 100644 --- a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c +++ b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -117,7 +117,8 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, } // Use the state machine to manage pins. - common_hal_rp2pio_statemachine_construct(&self->state_machine, + common_hal_rp2pio_statemachine_construct( + &self->state_machine, program, program_len, 44100 * 32 * 6, // Clock at 44.1 khz to warm the DAC up. NULL, 0, From 2cd80d10748335a5cdf1812675a2b81a8d596aff Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 29 Jul 2021 13:26:10 -0400 Subject: [PATCH 109/418] wip, with debugging printf's --- locale/circuitpython.pot | 8 ++++++++ ports/raspberrypi/audio_dma.c | 23 +++++++++++++++++++++-- ports/raspberrypi/audio_dma.h | 2 ++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index f10f7fd019..a33a4cca6c 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -489,6 +489,10 @@ msgstr "" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1213,6 +1217,10 @@ msgstr "" msgid "Insufficient encryption" msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "" diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index d3c041a84d..c2ff957622 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -51,11 +51,16 @@ void audio_dma_reset(void) { void audio_dma_convert_signed(audio_dma_t *dma, uint8_t *buffer, uint32_t buffer_length, uint8_t **output_buffer, uint32_t *output_buffer_length) { + + size_t output_buffer_max_length; if (dma->first_buffer_free) { *output_buffer = dma->first_buffer; + output_buffer_max_length = dma->first_buffer_length; } else { *output_buffer = dma->second_buffer; + output_buffer_max_length = dma->second_buffer_length; } + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" if (dma->signed_to_unsigned || @@ -65,6 +70,12 @@ void audio_dma_convert_signed(audio_dma_t *dma, uint8_t *buffer, uint32_t buffer *output_buffer_length = buffer_length / dma->sample_spacing; uint32_t out_i = 0; if (dma->sample_resolution <= 8 && dma->output_resolution > 8) { + // reading bytes, writing 16-bit samples + *output_buffer_length = *output_buffer_length * 2; + if (*output_buffer_length > output_buffer_max_length) { + mp_raise_RuntimeError(translate("Internal audio buffer too small")); + } + size_t shift = dma->output_resolution - dma->sample_resolution; for (uint32_t i = 0; i < buffer_length; i += dma->sample_spacing) { @@ -107,6 +118,10 @@ void audio_dma_convert_signed(audio_dma_t *dma, uint8_t *buffer, uint32_t buffer } out_i += 1; } + } else { + // (dma->sample_resolution > 8 && dma->output_resolution <= 8) + // Not currently used, but might be in the future. + mp_raise_RuntimeError(translate("Audio conversion not implemented")); } } else { *output_buffer = buffer; @@ -149,7 +164,6 @@ void audio_dma_load_next_block(audio_dma_t *dma) { // If we don't have an output buffer, save the pointer to first_buffer for use in the single // buffer special case. if (dma->first_buffer == NULL) { - mp_printf(&mp_plat_print,"no first buffer\n"); dma->first_buffer = output_buffer; } @@ -210,8 +224,11 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, uint32_t max_buffer_length; audiosample_get_buffer_structure(sample, single_channel_output, &single_buffer, &samples_signed, &max_buffer_length, &dma->sample_spacing); - + mp_printf(&mp_plat_print, "single_buffer: %d, samples_signed: %d, max_buffer_length: %d, dma->sample_spacing: %d\n", + single_buffer, samples_signed, max_buffer_length, dma->sample_spacing); //// // Check to see if we have to scale the resolution up. + mp_printf(&mp_plat_print, "dma->sample_resolution: %d, dma->output_resolution: %d, output_signed: %d, single_channel_output: %d\n", + dma->sample_resolution, dma->output_resolution, output_signed, single_channel_output); if (dma->sample_resolution <= 8 && dma->output_resolution > 8) { max_buffer_length *= 2; } @@ -222,6 +239,7 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, } dma->first_buffer = (uint8_t *)m_realloc(dma->first_buffer, max_buffer_length); + dma->first_buffer_length = max_buffer_length; if (dma->first_buffer == NULL) { return AUDIO_DMA_MEMORY_ERROR; } @@ -229,6 +247,7 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, dma->first_buffer_free = true; if (!single_buffer) { dma->second_buffer = (uint8_t *)m_realloc(dma->second_buffer, max_buffer_length); + dma->second_buffer_length = max_buffer_length; if (dma->second_buffer == NULL) { return AUDIO_DMA_MEMORY_ERROR; } diff --git a/ports/raspberrypi/audio_dma.h b/ports/raspberrypi/audio_dma.h index f84f6debeb..9df19d2299 100644 --- a/ports/raspberrypi/audio_dma.h +++ b/ports/raspberrypi/audio_dma.h @@ -48,7 +48,9 @@ typedef struct { uint8_t output_resolution; // in bits uint8_t sample_resolution; // in bits uint8_t *first_buffer; + size_t first_buffer_length; uint8_t *second_buffer; + size_t second_buffer_length; background_callback_t callback; } audio_dma_t; From 59b89fdc5c6a47737d69b3aa11c3c5f0b0d8a008 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 30 Jul 2021 13:54:33 -0400 Subject: [PATCH 110/418] Fix various audio DMA issues: RP2040 and SAMD51: - Detect when DMA has finished, and stop DMA audio explicitly. - Do not accidentally reuse `first_buffer` supplied by WaveFile or RawSample. Always realloc `first_buffer` and `second_buffer` RP2040: - When audio playing is stopped, write a final zero to the output register. This prevents residual PWM tones. - Handle buffer size for 8-bit samples properly for 16-bit output. - Fail on some edge cases (which may not be possible at the moment). --- ports/atmel-samd/audio_dma.c | 8 +++- .../atmel-samd/common-hal/audiobusio/I2SOut.c | 4 +- ports/raspberrypi/audio_dma.c | 37 +++++++++++-------- ports/raspberrypi/audio_dma.h | 1 + 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/ports/atmel-samd/audio_dma.c b/ports/atmel-samd/audio_dma.c index fc57e404f7..e03800f202 100644 --- a/ports/atmel-samd/audio_dma.c +++ b/ports/atmel-samd/audio_dma.c @@ -157,7 +157,13 @@ void audio_dma_load_next_block(audio_dma_t *dma) { if (dma->loop) { audiosample_reset_buffer(dma->sample, dma->single_channel_output, dma->audio_channel); } else { - descriptor->DESCADDR.reg = 0; + if ((output_buffer_length == 0) && dma_transfer_status(SHARED_RX_CHANNEL) & 0x3) { + // Nothing further to read and previous buffer is finished. + audio_dma_stop(dma); + } else { + // Break descriptor chain. + descriptor->DESCADDR.reg = 0; + } } } descriptor->BTCTRL.bit.VALID = true; diff --git a/ports/atmel-samd/common-hal/audiobusio/I2SOut.c b/ports/atmel-samd/common-hal/audiobusio/I2SOut.c index 7a10ea81d7..15a22744f1 100644 --- a/ports/atmel-samd/common-hal/audiobusio/I2SOut.c +++ b/ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -44,7 +44,7 @@ #include "atmel_start_pins.h" #include "hal/include/hal_gpio.h" -#include "hpl/gclk/hpl_gclk_base.h" +#include "hpl//hpl_gclk_base.h" #include "peripheral_clk_config.h" #ifdef SAMD21 @@ -379,7 +379,7 @@ void common_hal_audiobusio_i2sout_stop(audiobusio_i2sout_obj_t *self) { } #endif disconnect_gclk_from_peripheral(self->gclk, I2S_GCLK_ID_0 + self->clock_unit); - disable_gclk(self->gclk); + disable_clock_generator(self->gclk); #ifdef SAM_D5X_E5X connect_gclk_to_peripheral(5, I2S_GCLK_ID_0 + self->clock_unit); diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index c2ff957622..e55f4e0dc6 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -150,15 +150,7 @@ void audio_dma_load_next_block(audio_dma_t *dma) { audio_dma_stop(dma); return; } - bool busy0 = dma_channel_is_busy(dma->channel[0]); - bool busy1 = dma_channel_is_busy(dma->channel[1]); - if (busy0 == busy1) { - mp_printf(&mp_plat_print, "busy: %d %d\n", busy0, busy1); - } - if (buffer_length < 256) { - mp_printf(&mp_plat_print, "%d length: %d\n", dma->first_channel_free, buffer_length); - } audio_dma_convert_signed(dma, buffer, buffer_length, &output_buffer, &output_buffer_length); // If we don't have an output buffer, save the pointer to first_buffer for use in the single @@ -169,13 +161,21 @@ void audio_dma_load_next_block(audio_dma_t *dma) { dma_channel_set_trans_count(dma_channel, output_buffer_length / dma->output_size, false /* trigger */); dma_channel_set_read_addr(dma_channel, output_buffer, false /* trigger */); + if (get_buffer_result == GET_BUFFER_DONE) { if (dma->loop) { audiosample_reset_buffer(dma->sample, dma->single_channel_output, dma->audio_channel); } else { - // Set channel trigger to ourselves so we don't keep going. - dma_channel_hw_t *c = &dma_hw->ch[dma_channel]; - c->al1_ctrl = (c->al1_ctrl & ~DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS) | (dma_channel << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB); + if (output_buffer_length == 0 && + !dma_channel_is_busy(dma->channel[0]) && + !dma_channel_is_busy(dma->channel[1])) { + // No data has been read, and both DMA channels have now finished, so it's safe to stop. + audio_dma_stop(dma); + } else { + // Set channel trigger to ourselves so we don't keep going. + dma_channel_hw_t *c = &dma_hw->ch[dma_channel]; + c->al1_ctrl = (c->al1_ctrl & ~DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS) | (dma_channel << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB); + } } } } @@ -217,6 +217,8 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, dma->first_channel_free = true; dma->output_resolution = output_resolution; dma->sample_resolution = audiosample_bits_per_sample(sample); + dma->output_register_address = output_register_address; + audiosample_reset_buffer(sample, single_channel_output, audio_channel); bool single_buffer; @@ -224,11 +226,8 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, uint32_t max_buffer_length; audiosample_get_buffer_structure(sample, single_channel_output, &single_buffer, &samples_signed, &max_buffer_length, &dma->sample_spacing); - mp_printf(&mp_plat_print, "single_buffer: %d, samples_signed: %d, max_buffer_length: %d, dma->sample_spacing: %d\n", - single_buffer, samples_signed, max_buffer_length, dma->sample_spacing); //// + // Check to see if we have to scale the resolution up. - mp_printf(&mp_plat_print, "dma->sample_resolution: %d, dma->output_resolution: %d, output_signed: %d, single_channel_output: %d\n", - dma->sample_resolution, dma->output_resolution, output_signed, single_channel_output); if (dma->sample_resolution <= 8 && dma->output_resolution > 8) { max_buffer_length *= 2; } @@ -343,6 +342,14 @@ void audio_dma_stop(audio_dma_t *dma) { if (dma_channel_is_busy(channel)) { dma_channel_abort(channel); } + + // Write a zero as the last sample. This stops any PWM output. + if (dma->output_resolution <= 8) { + *((uint8_t *)dma->output_register_address) = 0; + } else { + *((uint16_t *)dma->output_register_address) = 0; + } + dma_channel_set_read_addr(channel, NULL, false /* trigger */); dma_channel_set_write_addr(channel, NULL, false /* trigger */); dma_channel_set_trans_count(channel, 0, false /* trigger */); diff --git a/ports/raspberrypi/audio_dma.h b/ports/raspberrypi/audio_dma.h index 9df19d2299..c3c0344096 100644 --- a/ports/raspberrypi/audio_dma.h +++ b/ports/raspberrypi/audio_dma.h @@ -51,6 +51,7 @@ typedef struct { size_t first_buffer_length; uint8_t *second_buffer; size_t second_buffer_length; + uint32_t output_register_address; background_callback_t callback; } audio_dma_t; From 2451c788f42146d26dc9ae9bfd944a5734c5b985 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 3 Aug 2021 19:12:14 -0400 Subject: [PATCH 111/418] valid channels in audio_dma_stop; cleaner supervisor_ticks mgmt in keypad --- .../atmel-samd/common-hal/audiobusio/I2SOut.c | 2 +- ports/raspberrypi/audio_dma.c | 29 ++++++++++++------- ports/raspberrypi/audio_dma.h | 1 + .../common-hal/audiopwmio/PWMAudioOut.c | 1 - shared-module/keypad/KeyMatrix.c | 2 -- shared-module/keypad/Keys.c | 2 -- shared-module/keypad/ShiftRegisterKeys.c | 2 -- shared-module/keypad/__init__.c | 13 +++++---- 8 files changed, 28 insertions(+), 24 deletions(-) diff --git a/ports/atmel-samd/common-hal/audiobusio/I2SOut.c b/ports/atmel-samd/common-hal/audiobusio/I2SOut.c index 15a22744f1..a434e2541b 100644 --- a/ports/atmel-samd/common-hal/audiobusio/I2SOut.c +++ b/ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -44,7 +44,7 @@ #include "atmel_start_pins.h" #include "hal/include/hal_gpio.h" -#include "hpl//hpl_gclk_base.h" +#include "hpl/gclk/hpl_gclk_base.h" #include "peripheral_clk_config.h" #ifdef SAMD21 diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index e55f4e0dc6..da3d851392 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -37,10 +37,8 @@ #if CIRCUITPY_AUDIOPWMIO || CIRCUITPY_AUDIOBUSIO -#define AUDIO_DMA_CHANNEL_COUNT NUM_DMA_CHANNELS - void audio_dma_reset(void) { - for (size_t channel = 0; channel < AUDIO_DMA_CHANNEL_COUNT; channel++) { + for (size_t channel = 0; channel < NUM_DMA_CHANNELS; channel++) { if (MP_STATE_PORT(playing_audio)[channel] == NULL) { continue; } @@ -171,6 +169,7 @@ void audio_dma_load_next_block(audio_dma_t *dma) { !dma_channel_is_busy(dma->channel[1])) { // No data has been read, and both DMA channels have now finished, so it's safe to stop. audio_dma_stop(dma); + dma->playing_in_progress = false; } else { // Set channel trigger to ourselves so we don't keep going. dma_channel_hw_t *c = &dma_hw->ch[dma_channel]; @@ -318,6 +317,7 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, irq_set_mask_enabled(1 << DMA_IRQ_0, true); } + dma->playing_in_progress = true; dma_channel_start(dma->channel[0]); return AUDIO_DMA_OK; @@ -325,7 +325,14 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, void audio_dma_stop(audio_dma_t *dma) { // Disable our interrupts. - dma_hw->inte0 &= ~((1 << dma->channel[0]) | (1 << dma->channel[1])); + uint32_t channel_mask = 0; + if (dma->channel[0] < NUM_DMA_CHANNELS) { + channel_mask |= 1 << dma->channel[0]; + } + if (dma->channel[1] < NUM_DMA_CHANNELS) { + channel_mask |= 1 << dma->channel[1]; + } + dma_hw->inte0 &= ~channel_mask; irq_set_mask_enabled(1 << DMA_IRQ_0, false); // Run any remaining audio tasks because we remove ourselves from @@ -334,6 +341,10 @@ void audio_dma_stop(audio_dma_t *dma) { for (size_t i = 0; i < 2; i++) { size_t channel = dma->channel[i]; + if (channel == NUM_DMA_CHANNELS) { + // Channel not in use. + continue; + } dma_channel_config c = dma_channel_get_default_config(dma->channel[i]); channel_config_set_enable(&c, false); @@ -357,6 +368,7 @@ void audio_dma_stop(audio_dma_t *dma) { MP_STATE_PORT(playing_audio)[channel] = NULL; dma->channel[i] = NUM_DMA_CHANNELS; } + dma->playing_in_progress = false; // Hold onto our buffers. } @@ -381,7 +393,7 @@ void audio_dma_resume(audio_dma_t *dma) { } bool audio_dma_get_paused(audio_dma_t *dma) { - if (dma->channel[0] >= AUDIO_DMA_CHANNEL_COUNT) { + if (dma->channel[0] >= NUM_DMA_CHANNELS) { return false; } uint32_t control = dma_hw->ch[dma->channel[0]].ctrl_trig; @@ -408,12 +420,7 @@ bool audio_dma_get_playing(audio_dma_t *dma) { if (dma->channel[0] == NUM_DMA_CHANNELS) { return false; } - if (!dma_channel_is_busy(dma->channel[0]) && - !dma_channel_is_busy(dma->channel[1])) { - return false; - } - - return true; + return dma->playing_in_progress; } // WARN(tannewt): DO NOT print from here, or anything it calls. Printing calls diff --git a/ports/raspberrypi/audio_dma.h b/ports/raspberrypi/audio_dma.h index c3c0344096..1ef1ca6d29 100644 --- a/ports/raspberrypi/audio_dma.h +++ b/ports/raspberrypi/audio_dma.h @@ -45,6 +45,7 @@ typedef struct { bool output_signed; bool first_channel_free; bool first_buffer_free; + bool playing_in_progress; uint8_t output_resolution; // in bits uint8_t sample_resolution; // in bits uint8_t *first_buffer; diff --git a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c index 3a8a7ef226..efaeb5ef35 100644 --- a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +++ b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -38,7 +38,6 @@ #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Processor.h" -#include "supervisor/shared/tick.h" #include "supervisor/shared/translate.h" #include "src/rp2040/hardware_structs/include/hardware/structs/dma.h" diff --git a/shared-module/keypad/KeyMatrix.c b/shared-module/keypad/KeyMatrix.c index 88e9d09a83..6db012d0f6 100644 --- a/shared-module/keypad/KeyMatrix.c +++ b/shared-module/keypad/KeyMatrix.c @@ -77,8 +77,6 @@ void common_hal_keypad_keymatrix_construct(keypad_keymatrix_obj_t *self, mp_uint // Add self to the list of active keypad scanners. keypad_register_scanner((keypad_scanner_obj_t *)self); - - supervisor_enable_tick(); } void common_hal_keypad_keymatrix_deinit(keypad_keymatrix_obj_t *self) { diff --git a/shared-module/keypad/Keys.c b/shared-module/keypad/Keys.c index 1f232a03ed..2880d18de5 100644 --- a/shared-module/keypad/Keys.c +++ b/shared-module/keypad/Keys.c @@ -63,8 +63,6 @@ void common_hal_keypad_keys_construct(keypad_keys_obj_t *self, mp_uint_t num_pin // Add self to the list of active keypad scanners. keypad_register_scanner((keypad_scanner_obj_t *)self); - - supervisor_enable_tick(); } void common_hal_keypad_keys_deinit(keypad_keys_obj_t *self) { diff --git a/shared-module/keypad/ShiftRegisterKeys.c b/shared-module/keypad/ShiftRegisterKeys.c index 074f226998..5075437214 100644 --- a/shared-module/keypad/ShiftRegisterKeys.c +++ b/shared-module/keypad/ShiftRegisterKeys.c @@ -71,8 +71,6 @@ void common_hal_keypad_shiftregisterkeys_construct(keypad_shiftregisterkeys_obj_ // Add self to the list of active keypad scanners. keypad_register_scanner((keypad_scanner_obj_t *)self); - - supervisor_enable_tick(); } void common_hal_keypad_shiftregisterkeys_deinit(keypad_shiftregisterkeys_obj_t *self) { diff --git a/shared-module/keypad/__init__.c b/shared-module/keypad/__init__.c index fc41396617..e239c56b61 100644 --- a/shared-module/keypad/__init__.c +++ b/shared-module/keypad/__init__.c @@ -57,12 +57,9 @@ void keypad_tick(void) { } void keypad_reset(void) { - if (MP_STATE_VM(keypad_scanners_linked_list)) { - supervisor_disable_tick(); + while (MP_STATE_VM(keypad_scanners_linked_list)) { + keypad_deregister_scanner(MP_STATE_VM(keypad_scanners_linked_list)); } - - MP_STATE_VM(keypad_scanners_linked_list) = NULL; - keypad_scanners_linked_list_lock = false; } // Register a Keys, KeyMatrix, etc. that will be scanned in the background @@ -71,10 +68,16 @@ void keypad_register_scanner(keypad_scanner_obj_t *scanner) { scanner->next = MP_STATE_VM(keypad_scanners_linked_list); MP_STATE_VM(keypad_scanners_linked_list) = scanner; supervisor_release_lock(&keypad_scanners_linked_list_lock); + + // One more request for ticks. + supervisor_enable_tick(); } // Remove scanner from the list of active scanners. void keypad_deregister_scanner(keypad_scanner_obj_t *scanner) { + // One less request for ticks. + supervisor_disable_tick(); + supervisor_acquire_lock(&keypad_scanners_linked_list_lock); if (MP_STATE_VM(keypad_scanners_linked_list) == scanner) { // Scanner is at the front; splice it out. From 6764af182a95cce1f106a2cbcbecc3c7d9595f3e Mon Sep 17 00:00:00 2001 From: Eddie Espinal Date: Mon, 9 Aug 2021 11:31:20 -0400 Subject: [PATCH 112/418] Fixes the MOSI and MISO pins. By mistake I added them backward in this mapping --- ports/esp32s2/boards/atmegazero_esp32s2/pins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c b/ports/esp32s2/boards/atmegazero_esp32s2/pins.c index cfc4ef6223..96dd940985 100644 --- a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c +++ b/ports/esp32s2/boards/atmegazero_esp32s2/pins.c @@ -64,9 +64,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO40) }, From 32ee06b293b2ff2d619835bf4b9c25f0ec09d36e Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Mon, 9 Aug 2021 22:53:23 +0530 Subject: [PATCH 113/418] fix crash when traceback object is supplied --- shared-bindings/traceback/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index 828d6bc28e..dc5be20a88 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -57,7 +57,7 @@ STATIC void traceback_exception_common(mp_print_t *print, mp_obj_t value, mp_obj } exc.traceback = MP_OBJ_TO_PTR(tb_obj); } else { - exc.traceback = NULL; + exc.traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; } shared_module_traceback_print_exception(&exc, print, limit); From fd372cf06c363d60a215c55e46ac78f3175d95c3 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 9 Aug 2021 13:15:58 -0500 Subject: [PATCH 114/418] it works! --- shared-module/bitmaptools/__init__.c | 53 +++++++++++++++++++++------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 3b421f2ccc..bd3a4b4d8f 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -285,7 +285,7 @@ void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, mp_obj_t *fill_points; size_t list_length = 0; mp_obj_list_get(fill_area, &list_length, &fill_points); - mp_printf(&mp_plat_print, "\nLen bfore loop: %d", list_length); + //mp_printf(&mp_plat_print, "\nLen bfore loop: %d", list_length); mp_obj_t current_point; uint32_t current_point_color_value; @@ -295,7 +295,7 @@ void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, while (list_length > 0){ mp_obj_list_get(fill_area, &list_length, &fill_points); - mp_printf(&mp_plat_print, "\nLen begin loop: %d\n", list_length); + //mp_printf(&mp_plat_print, "\nLen begin loop: %d\n", list_length); current_point = mp_obj_list_pop(fill_area, 0); @@ -306,12 +306,15 @@ void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, mp_obj_get_int(tuple_items[0]), mp_obj_get_int(tuple_items[1])); - mp_printf(&mp_plat_print, "%d\n", current_point_color_value); + //mp_printf(&mp_plat_print, "%d\n", current_point_color_value); if(current_point_color_value != background_value){ mp_obj_list_get(fill_area, &list_length, &fill_points); continue; } + + + displayio_bitmap_write_pixel( destination, mp_obj_get_int(tuple_items[0]), @@ -320,28 +323,52 @@ void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, //mp_obj_t above_point[] = { mp_obj_new_int(tuple_items[0]), mp_obj_new_int(tuple_items[1])-1 }; - mp_printf(&mp_plat_print,"math:\n"); - mp_printf(&mp_plat_print, "%d\n", mp_obj_get_int(tuple_items[0])); - mp_printf(&mp_plat_print, "%d\n", mp_obj_get_int(tuple_items[0])+1); - int16_t above_int = mp_obj_get_int(tuple_items[0])+1; - mp_printf(&mp_plat_print, "%d\n", above_int); - int16_t *above = &above_int; - mp_printf(&mp_plat_print, "%d\n", above); + //mp_printf(&mp_plat_print,"math:\n"); + //mp_printf(&mp_plat_print, "%d\n", mp_obj_get_int(tuple_items[0])); + //mp_printf(&mp_plat_print, "%d\n", mp_obj_get_int(tuple_items[0])+1); + //int16_t above_int = mp_obj_get_int(tuple_items[0])+1; + //mp_printf(&mp_plat_print, "%d\n", above_int); + //int16_t *above = &above_int; + //mp_printf(&mp_plat_print, "%d\n", above); mp_obj_t above_point[] = { tuple_items[0], - above}; + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1])-1)}; - mp_printf(&mp_plat_print,"above_point:\n"); + //mp_printf(&mp_plat_print,"above_point:\n"); //mp_obj_print(above_point, PRINT_STR); mp_obj_list_append( fill_area, mp_obj_new_tuple(2, above_point)); + mp_obj_t left_point[] = { + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0])-1), + tuple_items[1]}; + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, left_point)); + + mp_obj_t right_point[] = { + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0])+1), + tuple_items[1]}; + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, right_point)); + + mp_obj_t below_point[] = { + tuple_items[0], + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1])+1)}; + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, below_point)); + mp_obj_list_get(fill_area, &list_length, &fill_points); - mp_printf(&mp_plat_print, "\nLen end loop: %d\n", list_length); + //mp_printf(&mp_plat_print, "\nLen end loop: %d\n", list_length); } + displayio_area_t area = { 0, 0, destination->width, destination->height }; + displayio_bitmap_set_dirty_area(destination, &area); + //mp_obj_print(fill_area, PRINT_STR); //mp_obj_print(current_point[0], PRINT_STR); From 185d0f2a24ddfdad831dd614325416b97039083a Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 9 Aug 2021 21:04:49 +0200 Subject: [PATCH 115/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 6 +++++- locale/cs.po | 6 +++++- locale/de_DE.po | 6 +++++- locale/el.po | 6 +++++- locale/en_GB.po | 6 +++++- locale/es.po | 6 +++++- locale/fil.po | 6 +++++- locale/fr.po | 6 +++++- locale/hi.po | 6 +++++- locale/it_IT.po | 6 +++++- locale/ja.po | 6 +++++- locale/ko.po | 6 +++++- locale/nl.po | 6 +++++- locale/pl.po | 6 +++++- locale/pt_BR.po | 6 +++++- locale/sv.po | 6 +++++- locale/zh_Latn_pinyin.po | 6 +++++- 17 files changed, 85 insertions(+), 17 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index dac73ad20c..9c5a6ebd87 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -325,6 +325,10 @@ msgstr "'yield from' di dalam fungsi async" msgid "'yield' outside function" msgstr "'yield' diluar fungsi" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x harus menjadi target assignment" @@ -4353,7 +4357,7 @@ msgid "unreadable attribute" msgstr "" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 63e7948ad8..dca71d3f83 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -321,6 +321,10 @@ msgstr "" msgid "'yield' outside function" msgstr "" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "" @@ -4313,7 +4317,7 @@ msgid "unreadable attribute" msgstr "" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 7c47677538..f5635c2936 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -327,6 +327,10 @@ msgstr "'yield from' innerhalb einer async Funktion" msgid "'yield' outside function" msgstr "'yield' außerhalb einer Funktion" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x muss Zuordnungsziel sein" @@ -4389,7 +4393,7 @@ msgid "unreadable attribute" msgstr "nicht lesbares Attribut" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "Nicht unterstützter %q-Typ" diff --git a/locale/el.po b/locale/el.po index 8bd093b1a5..2dd32e422c 100644 --- a/locale/el.po +++ b/locale/el.po @@ -318,6 +318,10 @@ msgstr "" msgid "'yield' outside function" msgstr "" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "" @@ -4310,7 +4314,7 @@ msgid "unreadable attribute" msgstr "" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index f82ab09599..c0215dbec2 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -327,6 +327,10 @@ msgstr "'yield from' inside async function" msgid "'yield' outside function" msgstr "'yield' outside function" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x must be assignment target" @@ -4347,7 +4351,7 @@ msgid "unreadable attribute" msgstr "unreadable attribute" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "unsupported %q type" diff --git a/locale/es.po b/locale/es.po index 4107a1fd09..1f04cf018f 100644 --- a/locale/es.po +++ b/locale/es.po @@ -329,6 +329,10 @@ msgstr "'yield from' dentro de una función asincrónica" msgid "'yield' outside function" msgstr "'yield' fuera de una función" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x debe ser objetivo de la tarea" @@ -4402,7 +4406,7 @@ msgid "unreadable attribute" msgstr "atributo no legible" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "tipo de %q no soportado" diff --git a/locale/fil.po b/locale/fil.po index c4c6a4c2b3..7cf59f900a 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -320,6 +320,10 @@ msgstr "" msgid "'yield' outside function" msgstr "'yield' sa labas ng function" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x ay dapat na assignment target" @@ -4361,7 +4365,7 @@ msgid "unreadable attribute" msgstr "hindi mabasa ang attribute" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "Hindi supportadong tipo ng %q" diff --git a/locale/fr.po b/locale/fr.po index 7c70440b55..7c7bc0f7e0 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -329,6 +329,10 @@ msgstr "'yield from' dans une fonction async" msgid "'yield' outside function" msgstr "'yield' dehors d'une fonction" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x doit être la cible de l'assignement" @@ -4413,7 +4417,7 @@ msgid "unreadable attribute" msgstr "attribut illisible" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "type %q non pris on charge" diff --git a/locale/hi.po b/locale/hi.po index 4332db579e..1ba411f6bc 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -318,6 +318,10 @@ msgstr "" msgid "'yield' outside function" msgstr "" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "" @@ -4310,7 +4314,7 @@ msgid "unreadable attribute" msgstr "" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index a7dc7c05e1..b89cbbbd26 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -329,6 +329,10 @@ msgstr "'yield from' è nella funzione sincronizzazione" msgid "'yield' outside function" msgstr "'yield' al di fuori della funzione" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x deve essere il bersaglio del assegnamento" @@ -4379,7 +4383,7 @@ msgid "unreadable attribute" msgstr "attributo non leggibile" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "tipo di %q non supportato" diff --git a/locale/ja.po b/locale/ja.po index 2844e59dea..1e66015081 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -323,6 +323,10 @@ msgstr "" msgid "'yield' outside function" msgstr "関数外でのyield" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*xは代入先でなければなりません" @@ -4333,7 +4337,7 @@ msgid "unreadable attribute" msgstr "読み込み不可能な属性" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "非対応の型 %q" diff --git a/locale/ko.po b/locale/ko.po index 6f0f95e382..8f33e79adc 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -319,6 +319,10 @@ msgstr "" msgid "'yield' outside function" msgstr "'yield' 는 함수 외부에 존재합니다" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "" @@ -4314,7 +4318,7 @@ msgid "unreadable attribute" msgstr "" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index c3cefa3327..3eb6d54b87 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -321,6 +321,10 @@ msgstr "'yield from' binnen asynchrone functie" msgid "'yield' outside function" msgstr "'yield' buiten de functie" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x moet een assignment target zijn" @@ -4358,7 +4362,7 @@ msgid "unreadable attribute" msgstr "onleesbaar attribuut" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "niet ondersteund %q type" diff --git a/locale/pl.po b/locale/pl.po index b1bbfaa015..290527b133 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -323,6 +323,10 @@ msgstr "'yield from' wewnątrz funkcji asynchronicznej" msgid "'yield' outside function" msgstr "'yield' poza funkcją" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x musi być obiektem przypisania" @@ -4330,7 +4334,7 @@ msgid "unreadable attribute" msgstr "nieczytelny atrybut" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "zły typ %q" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index c120f92ec0..be14ce3e28 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -331,6 +331,10 @@ msgstr "'yield a partir' de dentro da função async" msgid "'yield' outside function" msgstr "função externa 'yield'" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x deve ser o destino da atribuição" @@ -4412,7 +4416,7 @@ msgid "unreadable attribute" msgstr "atributo ilegível" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "tipo %q não suportado" diff --git a/locale/sv.po b/locale/sv.po index aef7f24bd2..40bd71231c 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -326,6 +326,10 @@ msgstr "'yield from' i async-funktion" msgid "'yield' outside function" msgstr "'yield' utanför funktion" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x måste vara mål för tilldelning" @@ -4371,7 +4375,7 @@ msgid "unreadable attribute" msgstr "attribut kan inte läsas" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "typ %q stöds inte" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 67df4a18ba..802fa8cab0 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -328,6 +328,10 @@ msgstr "Yì bù hán shù zhōng de 'yield from'" msgid "'yield' outside function" msgstr "'yield' wàibù gōngnéng" +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + #: py/compile.c msgid "*x must be assignment target" msgstr "*x bìxū shì rènwù mùbiāo" @@ -4371,7 +4375,7 @@ msgid "unreadable attribute" msgstr "bùkě dú shǔxìng" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c msgid "unsupported %q type" msgstr "bù zhīchí %q lèixíng" From 9fab48dad29c38d0db389ea4686e6009cdd4614b Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 9 Aug 2021 21:17:26 +0200 Subject: [PATCH 116/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 16 ++++++++-------- locale/cs.po | 16 ++++++++-------- locale/de_DE.po | 16 ++++++++-------- locale/el.po | 16 ++++++++-------- locale/en_GB.po | 16 ++++++++-------- locale/es.po | 16 ++++++++-------- locale/fil.po | 16 ++++++++-------- locale/fr.po | 16 ++++++++-------- locale/hi.po | 16 ++++++++-------- locale/it_IT.po | 16 ++++++++-------- locale/ja.po | 16 ++++++++-------- locale/ko.po | 16 ++++++++-------- locale/nl.po | 16 ++++++++-------- locale/pl.po | 16 ++++++++-------- locale/pt_BR.po | 19 +++++++++++-------- locale/sv.po | 19 +++++++++++-------- locale/zh_Latn_pinyin.po | 16 ++++++++-------- 17 files changed, 142 insertions(+), 136 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 9c5a6ebd87..15b6b6c1af 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -42,11 +42,11 @@ msgstr "" "Harap ajukan masalah dengan konten drive CIRCUITPY Anda di\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " File \"%q\", baris %d" @@ -333,7 +333,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x harus menjadi target assignment" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", dalam %q\n" @@ -2249,7 +2249,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (bagian terakhir dari panggilan terkini):\n" @@ -3499,10 +3499,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3950,6 +3946,10 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/cs.po b/locale/cs.po index dca71d3f83..cde1a48f52 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -38,11 +38,11 @@ msgstr "" "Založte prosím problém s obsahem vaší jednotky CIRCUITPY na adrese\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Soubor \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Soubor \"%q\", řádek %d" @@ -329,7 +329,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr "" @@ -2218,7 +2218,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -3460,10 +3460,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3910,6 +3906,10 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/de_DE.po b/locale/de_DE.po index f5635c2936..921d509d2a 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -41,11 +41,11 @@ msgstr "" "Bitte melden Sie ein Problem mit dem Inhalt Ihres CIRCUITPY-Laufwerks unter\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Datei \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Datei \"%q\", Zeile %d" @@ -335,7 +335,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x muss Zuordnungsziel sein" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", in %q\n" @@ -2250,7 +2250,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Zurückverfolgung (jüngste Aufforderung zuletzt):\n" @@ -3523,10 +3523,6 @@ msgstr "Der Pegel muss zwischen 0 und 1 liegen" msgid "lhs and rhs should be compatible" msgstr "lhs und rhs sollten kompatibel sein" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "Lokales '%q' hat den Typ '%q', aber die Quelle ist '%q'" @@ -3979,6 +3975,10 @@ msgstr "pow () mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/el.po b/locale/el.po index 2dd32e422c..0325c16161 100644 --- a/locale/el.po +++ b/locale/el.po @@ -35,11 +35,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr "" @@ -326,7 +326,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr "" @@ -2215,7 +2215,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -3457,10 +3457,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3907,6 +3903,10 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/en_GB.po b/locale/en_GB.po index c0215dbec2..b24fd3b9fe 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -43,11 +43,11 @@ msgstr "" "Please file an issue with the contents of your CIRCUITPY drive at \n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " File \"%q\", line %d" @@ -335,7 +335,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x must be assignment target" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", in %q\n" @@ -2239,7 +2239,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (most recent call last):\n" @@ -3492,10 +3492,6 @@ msgstr "level must be between 0 and 1" msgid "lhs and rhs should be compatible" msgstr "lhs and rhs should be compatible" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "local '%q' has type '%q' but source is '%q'" @@ -3942,6 +3938,10 @@ msgstr "pow() with 3 arguments requires integers" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/es.po b/locale/es.po index 1f04cf018f..a0b4d585c6 100644 --- a/locale/es.po +++ b/locale/es.po @@ -44,11 +44,11 @@ msgstr "" "Presente un problema con el contenido de su unidad CIRCUITPY en\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Archivo \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Archivo \"%q\", línea %d" @@ -337,7 +337,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x debe ser objetivo de la tarea" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", en %q\n" @@ -2277,7 +2277,7 @@ msgstr "La cantidad total de datos es mas grande que %q" msgid "Touch alarms not available" msgstr "Alarmas táctiles no disponibles" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (ultima llamada reciente):\n" @@ -3542,10 +3542,6 @@ msgstr "el nivel debe ser entre 0 y 1" msgid "lhs and rhs should be compatible" msgstr "lhs y rhs deben ser compatibles" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "la variable local '%q' tiene el tipo '%q' pero la fuente es '%q'" @@ -3996,6 +3992,10 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/fil.po b/locale/fil.po index 7cf59f900a..14b9d5b6b0 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -34,11 +34,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " File \"%q\", line %d" @@ -328,7 +328,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x ay dapat na assignment target" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", sa %q\n" @@ -2235,7 +2235,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (pinakahuling huling tawag): \n" @@ -3502,10 +3502,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "lhs at rhs ay dapat magkasundo" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "local '%q' ay may type '%q' pero ang source ay '%q'" @@ -3954,6 +3950,10 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/fr.po b/locale/fr.po index 7c7bc0f7e0..c004fd9c74 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -44,11 +44,11 @@ msgstr "" "l'adresse\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Fichier \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Fichier \"%q\", ligne %d" @@ -337,7 +337,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x doit être la cible de l'assignement" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", dans %q\n" @@ -2277,7 +2277,7 @@ msgstr "Quantité de données à écrire est plus que %q" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (appels les plus récents en dernier) :\n" @@ -3552,10 +3552,6 @@ msgstr "le niveau doit être compris entre 0 et 1" msgid "lhs and rhs should be compatible" msgstr "Les parties gauches et droites doivent être compatibles" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "la variable locale '%q' a le type '%q' mais la source est '%q'" @@ -4007,6 +4003,10 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/hi.po b/locale/hi.po index 1ba411f6bc..f84fa97fad 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -35,11 +35,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr "" @@ -326,7 +326,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr "" @@ -2215,7 +2215,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -3457,10 +3457,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3907,6 +3903,10 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/it_IT.po b/locale/it_IT.po index b89cbbbd26..4a0593fd13 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -43,11 +43,11 @@ msgstr "" "Per favore, segnala il problema con il contenuto del tuo CIRCUITPY a\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " File \"%q\", riga %d" @@ -337,7 +337,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x deve essere il bersaglio del assegnamento" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", in %q\n" @@ -2256,7 +2256,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (chiamata più recente per ultima):\n" @@ -3516,10 +3516,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "lhs e rhs devono essere compatibili" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "local '%q' ha tipo '%q' ma sorgente è '%q'" @@ -3972,6 +3968,10 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/ja.po b/locale/ja.po index 1e66015081..74472f7973 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -40,11 +40,11 @@ msgstr "" "CIRCUITPYドライブの内容を添えて問題を以下で報告してください:\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " ファイル \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " ファイル \"%q\", 行 %d" @@ -331,7 +331,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*xは代入先でなければなりません" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr "" @@ -2229,7 +2229,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "トレースバック(最新の呼び出しが末尾):\n" @@ -3477,10 +3477,6 @@ msgstr "levelは0から1の間でなければなりません" msgid "lhs and rhs should be compatible" msgstr "左辺と右辺が互換でなければなりません" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3929,6 +3925,10 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/ko.po b/locale/ko.po index 8f33e79adc..a87bd2dbb9 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -36,11 +36,11 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " 파일 \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " 파일 \"%q\", 라인 %d" @@ -327,7 +327,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", 에서 %q\n" @@ -2218,7 +2218,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" @@ -3461,10 +3461,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "" @@ -3911,6 +3907,10 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/nl.po b/locale/nl.po index 3eb6d54b87..6b7f41a45f 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -38,11 +38,11 @@ msgstr "" "Meld een probleem met de inhoud van de CIRCUITPY drive op:\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Bestand" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Bestand \"%q\", regel %d" @@ -329,7 +329,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x moet een assignment target zijn" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", in %q\n" @@ -2241,7 +2241,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (meest recente call laatst):\n" @@ -3502,10 +3502,6 @@ msgstr "level moet tussen 0 en 1 liggen" msgid "lhs and rhs should be compatible" msgstr "lhs en rhs moeten compatibel zijn" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "lokale '%q' is van type '%q' maar bron is '%q'" @@ -3953,6 +3949,10 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/pl.po b/locale/pl.po index 290527b133..e05513b947 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -40,11 +40,11 @@ msgstr "" "Zgłoś problem z zawartością dysku CIRCUITPY pod adresem\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Plik \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Plik \"%q\", linia %d" @@ -331,7 +331,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x musi być obiektem przypisania" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", w %q\n" @@ -2226,7 +2226,7 @@ msgstr "" msgid "Touch alarms not available" msgstr "" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Ślad wyjątku (najnowsze wywołanie na końcu):\n" @@ -3475,10 +3475,6 @@ msgstr "" msgid "lhs and rhs should be compatible" msgstr "lewa i prawa strona powinny być kompatybilne" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "local '%q' jest typu '%q' lecz źródło jest '%q'" @@ -3926,6 +3922,10 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/pt_BR.po b/locale/pt_BR.po index be14ce3e28..f1ef5661b2 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -42,11 +42,11 @@ msgstr "" "Registre um problema com o conteúdo do seu controlador no CIRCUITPY\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Arquivo \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Arquivo \"%q\", linha %d" @@ -339,7 +339,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x deve ser o destino da atribuição" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", em %q\n" @@ -2280,7 +2280,7 @@ msgstr "O total dos dados que serão escritos é maior do que %q" msgid "Touch alarms not available" msgstr "Alarmes de toque não estão disponíveis" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (a última chamada mais recente):\n" @@ -3550,10 +3550,6 @@ msgstr "o nível deve estar entre 0 e 1" msgid "lhs and rhs should be compatible" msgstr "o lhs e rhs devem ser compatíveis" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "o limite deve ser um inteiro" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "o local '%q' tem o tipo '%q', porém a origem é '%q'" @@ -4007,6 +4003,10 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h @@ -4537,6 +4537,9 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "limit should be an int" +#~ msgstr "o limite deve ser um inteiro" + #~ msgid "no available NIC" #~ msgstr "não há uma Placa de Rede disponível" diff --git a/locale/sv.po b/locale/sv.po index 40bd71231c..149ccc7213 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -42,11 +42,11 @@ msgstr "" "Vänligen skapa ett ärende med innehållet i din CIRCUITPY-enhet på\n" "https://github.com/adafruit/circuitpython/issues\n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Filen \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Fil \"%q\", rad %d" @@ -334,7 +334,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x måste vara mål för tilldelning" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", i %q\n" @@ -2255,7 +2255,7 @@ msgstr "Totala data att skriva är större än %q" msgid "Touch alarms not available" msgstr "Touchalarm är inte tillgängligt" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (senaste anrop):\n" @@ -3515,10 +3515,6 @@ msgstr "level ska ligga mellan 0 och 1" msgid "lhs and rhs should be compatible" msgstr "lhs och rhs måste vara kompatibla" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "limit måste vara en int" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "lokala '%q' har typ '%q' men källan är '%q'" @@ -3966,6 +3962,10 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h @@ -4496,6 +4496,9 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "limit should be an int" +#~ msgstr "limit måste vara en int" + #~ msgid "no available NIC" #~ msgstr "ingen tillgänglig NIC" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 802fa8cab0..ffb56a0efc 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -43,11 +43,11 @@ msgstr "" "Qǐng tōngguò https://github.com/adafruit/circuitpython/issues\n" "tíjiāo yǒuguān nín de CIRCUITPY qūdòngqì nèiróng de wèntí \n" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\"" msgstr " Wénjiàn \"%q\"" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid " File \"%q\", line %d" msgstr " Wénjiàn \"%q\", dì %d xíng" @@ -336,7 +336,7 @@ msgstr "" msgid "*x must be assignment target" msgstr "*x bìxū shì rènwù mùbiāo" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid ", in %q\n" msgstr ", zài %q\n" @@ -2256,7 +2256,7 @@ msgstr "yào biān xiě de zǒng shù jù dà yú %q" msgid "Touch alarms not available" msgstr "bù kě yòng chù mō bào jǐng qì" -#: py/obj.c shared-bindings/traceback/__init__.c +#: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (Zuìjìn yīcì dǎ diànhuà):\n" @@ -3516,10 +3516,6 @@ msgstr "Level bìxū jiè yú 0 hé 1 zhī jiān" msgid "lhs and rhs should be compatible" msgstr "lhs hé rhs yīnggāi jiānróng" -#: shared-bindings/traceback/__init__.c -msgid "limit should be an int" -msgstr "" - #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" msgstr "bendì '%q' bāohán lèixíng '%q' dàn yuán shì '%q'" @@ -3966,6 +3962,10 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h #: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h From aec965e6d9f69a2342810d5f29c021758b50e28a Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Mon, 9 Aug 2021 15:25:06 -0600 Subject: [PATCH 117/418] changed PID as suggested by Scott --- ports/nrf/boards/bluemicro840/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/boards/bluemicro840/mpconfigboard.mk b/ports/nrf/boards/bluemicro840/mpconfigboard.mk index a95662f5fd..16d36704a3 100644 --- a/ports/nrf/boards/bluemicro840/mpconfigboard.mk +++ b/ports/nrf/boards/bluemicro840/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x1D50 -USB_PID = 0x6160 +USB_PID = 0x6161 USB_PRODUCT = "BlueMicro840" USB_MANUFACTURER = "nrf52.jpconstantineau.com" From 46ad22143adcb9d5ae3dc3fe1d42b9a39ccc4a9b Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Mon, 9 Aug 2021 21:37:32 +0000 Subject: [PATCH 118/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1013 of 1013 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index f1ef5661b2..c2fe4e330f 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-08 05:33+0000\n" +"PO-Revision-Date: 2021-08-10 02:41+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -333,7 +333,7 @@ msgstr "função externa 'yield'" #: shared-module/vectorio/VectorShape.c msgid "(x,y) integers required" -msgstr "" +msgstr "(x,y) é obrigatório o uso de números inteiros" #: py/compile.c msgid "*x must be assignment target" From f38436708617c09e4b742935bbdf4eb3f4d1fc32 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Mon, 9 Aug 2021 20:00:10 +0000 Subject: [PATCH 119/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1013 of 1013 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 149ccc7213..6c5463e5d4 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-07 04:00+0000\n" +"PO-Revision-Date: 2021-08-10 02:41+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -328,7 +328,7 @@ msgstr "'yield' utanför funktion" #: shared-module/vectorio/VectorShape.c msgid "(x,y) integers required" -msgstr "" +msgstr "(x,y) heltal krävs" #: py/compile.c msgid "*x must be assignment target" From 10884e0a0d365b123c1c4bd069c2177d2ebedb17 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 10 Aug 2021 04:41:03 +0200 Subject: [PATCH 120/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 2 +- locale/cs.po | 2 +- locale/de_DE.po | 2 +- locale/el.po | 2 +- locale/en_GB.po | 2 +- locale/es.po | 2 +- locale/fil.po | 2 +- locale/fr.po | 2 +- locale/hi.po | 2 +- locale/it_IT.po | 2 +- locale/ja.po | 2 +- locale/ko.po | 2 +- locale/nl.po | 2 +- locale/pl.po | 2 +- locale/pt_BR.po | 2 +- locale/sv.po | 2 +- locale/zh_Latn_pinyin.po | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 15b6b6c1af..99b3fea4f8 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -4148,7 +4148,7 @@ msgstr "" msgid "stop not reachable from start" msgstr "" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index cde1a48f52..352bb822f4 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -4108,7 +4108,7 @@ msgstr "" msgid "stop not reachable from start" msgstr "" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 921d509d2a..1655db5150 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -4179,7 +4179,7 @@ msgstr "stop muss 1 oder 2 sein" msgid "stop not reachable from start" msgstr "stop ist von start aus nicht erreichbar" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "stream operation ist nicht unterstützt" diff --git a/locale/el.po b/locale/el.po index 0325c16161..fb84d25d23 100644 --- a/locale/el.po +++ b/locale/el.po @@ -4105,7 +4105,7 @@ msgstr "" msgid "stop not reachable from start" msgstr "" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index b24fd3b9fe..99f8d4c16a 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -4142,7 +4142,7 @@ msgstr "stop must be 1 or 2" msgid "stop not reachable from start" msgstr "stop not reachable from start" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "stream operation not supported" diff --git a/locale/es.po b/locale/es.po index a0b4d585c6..4212d45df6 100644 --- a/locale/es.po +++ b/locale/es.po @@ -4196,7 +4196,7 @@ msgstr "stop debe ser 1 ó 2" msgid "stop not reachable from start" msgstr "stop no se puede alcanzar del principio" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "operación stream no soportada" diff --git a/locale/fil.po b/locale/fil.po index 14b9d5b6b0..b7bc9f8428 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -4155,7 +4155,7 @@ msgstr "stop dapat 1 o 2" msgid "stop not reachable from start" msgstr "stop hindi maabot sa simula" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "stream operation hindi sinusuportahan" diff --git a/locale/fr.po b/locale/fr.po index c004fd9c74..694e71b840 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -4207,7 +4207,7 @@ msgstr "stop doit être 1 ou 2" msgid "stop not reachable from start" msgstr "stop n'est pas accessible au démarrage" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "opération de flux non supportée" diff --git a/locale/hi.po b/locale/hi.po index f84fa97fad..2fb00e2272 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -4105,7 +4105,7 @@ msgstr "" msgid "stop not reachable from start" msgstr "" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 4a0593fd13..a8786c7e32 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -4173,7 +4173,7 @@ msgstr "" msgid "stop not reachable from start" msgstr "stop non raggiungibile dall'inizio" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "operazione di stream non supportata" diff --git a/locale/ja.po b/locale/ja.po index 74472f7973..cfe5556941 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -4128,7 +4128,7 @@ msgstr "stopは1または2のいずれか" msgid "stop not reachable from start" msgstr "" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "ストリーム操作は非対応" diff --git a/locale/ko.po b/locale/ko.po index a87bd2dbb9..b46d9f5d11 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -4109,7 +4109,7 @@ msgstr "" msgid "stop not reachable from start" msgstr "" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 6b7f41a45f..ec26087cd6 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -4153,7 +4153,7 @@ msgstr "stop moet 1 of 2 zijn" msgid "stop not reachable from start" msgstr "stop is niet bereikbaar vanaf start" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "stream operatie niet ondersteund" diff --git a/locale/pl.po b/locale/pl.po index e05513b947..9a0f6614b8 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -4125,7 +4125,7 @@ msgstr "stop musi być 1 lub 2" msgid "stop not reachable from start" msgstr "stop nie jest osiągalne ze start" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "operacja na strumieniu nieobsługiwana" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index c2fe4e330f..49f333678d 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -4207,7 +4207,7 @@ msgstr "o stop deve ser 1 ou 2" msgid "stop not reachable from start" msgstr "stop não está acessível a partir do início" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "a operação do fluxo não é compatível" diff --git a/locale/sv.po b/locale/sv.po index 6c5463e5d4..15cb50e88d 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -4166,7 +4166,7 @@ msgstr "stop måste vara 1 eller 2" msgid "stop not reachable from start" msgstr "stop kan inte nås från start" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "stream-åtgärd stöds inte" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index ffb56a0efc..8ff9e807ca 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -4166,7 +4166,7 @@ msgstr "tíngzhǐ bìxū wèi 1 huò 2" msgid "stop not reachable from start" msgstr "tíngzhǐ wúfǎ cóng kāishǐ zhōng zhǎodào" -#: py/stream.c +#: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" msgstr "bù zhīchí liú cāozuò" From e741330ca8281defd33b18ba728ab25aa8d07e86 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 9 Aug 2021 22:53:16 -0700 Subject: [PATCH 121/418] Consistent pin naming for SparkFun MicroMod processor boards. --- .../sparkfun_samd51_micromod/mpconfigboard.h | 5 +- .../sparkfun_samd51_micromod/mpconfigboard.mk | 2 +- .../boards/sparkfun_samd51_micromod/pins.c | 281 ++++++++++++----- .../sparkfun_nrf52840_micromod/README.md | 62 ++-- .../mpconfigboard.h | 5 +- .../mpconfigboard.mk | 2 +- .../boards/sparkfun_nrf52840_micromod/pins.c | 292 ++++++++++++------ .../sparkfun_micromod_rp2040/mpconfigboard.h | 11 +- .../sparkfun_micromod_rp2040/mpconfigboard.mk | 4 +- .../boards/sparkfun_micromod_rp2040/pins.c | 288 ++++++++++++----- 10 files changed, 661 insertions(+), 291 deletions(-) diff --git a/ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.h index 1842629266..5344e3c1ca 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.h @@ -1,8 +1,11 @@ -#define MICROPY_HW_BOARD_NAME "SparkFun MicroMod SAMD51" +#define MICROPY_HW_BOARD_NAME "SparkFun MicroMod SAMD51 Processor" #define MICROPY_HW_MCU_NAME "samd51j20" #define CIRCUITPY_MCU_FAMILY samd51 +// Status LED +#define MICROPY_HW_LED_STATUS (&pin_PA23) + // On-board flash #define SPI_FLASH_MOSI_PIN &pin_PA09 #define SPI_FLASH_MISO_PIN &pin_PA10 diff --git a/ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.mk index 63d52382a2..3ae3d8f5a9 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd51_micromod/mpconfigboard.mk @@ -1,7 +1,7 @@ LD_FILE = boards/samd51x20-bootloader-external-flash.ld USB_VID = 0x1b4f USB_PID = 0x0020 # Used by uf2 bootloader -USB_PRODUCT = "SparkFun MicroMod SAMD51" +USB_PRODUCT = "SparkFun MicroMod SAMD51 Processor" USB_MANUFACTURER = "SparkFun Electronics" CHIP_VARIANT = SAMD51J20A diff --git a/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c b/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c index 49411217d7..2233635084 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c @@ -1,97 +1,224 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2021 Chris Wilson + * + * 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 "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - // D (digital only) pins (D0,D1) - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB04) }, - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB05) }, + // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. + // The 0th peripheral is the default and the "0" is omitted from the + // peripheral name (e.g. "I2C" instead of "I2C0"). + // + // For more details, see https://www.sparkfun.com/micromod#tech-specs - // A (ADC) pins (A0-A4) - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB00) }, - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB01) }, - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB02) }, - { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB03) }, + // MicroMod built-in status LED pin + // Requirement from the "Designing with MicroMod" SparkFun article: + // "... every Processor Board shall include one status LED connected to a + // pin that is not connected to the board edge." + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA23) }, // MicroMod LED (PA23) - // DAC - { MP_ROM_QSTR(MP_QSTR_DAC), MP_ROM_PTR(&pin_PA02) }, + // MicroMod USB bus input voltage (+5V) pin + // { MP_ROM_QSTR(MP_QSTR_USB_VIN), MP_ROM_PTR() }, // MicroMod USB_VIN (not connected) - // G (General/BUS) pins (G0-G9) - { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA06) }, - { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_PA06) }, - { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA15) }, - { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_PA06) }, - { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB08) }, - { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_PB08) }, - { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PB09) }, - { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_PB09) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PB10) }, - { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_PB10) }, - { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB11) }, - { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_PB11) }, - { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB12) }, - { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_PB12) }, - { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PB13) }, - { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_PB13) }, - { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA14) }, - { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_PA14) }, - { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA15) }, - { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_PA15) }, - { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_PB31) }, - { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_PB30) }, - { MP_ROM_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_PB14) }, - { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_PB14) }, - { MP_ROM_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_PB15) }, - { MP_ROM_QSTR(MP_QSTR_G11), MP_ROM_PTR(&pin_PB15) }, + // MicroMod +3.3V enable pin + { MP_ROM_QSTR(MP_QSTR_P3V3_EN), MP_ROM_PTR(&pin_PA19) }, // MicroMod 3.3V_EN (PA19) - // PWM pins (PWM0, PWM1) - { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_PB01) }, - { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_PB02) }, + // MicroMod battery voltage sense pin + { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_PB03) }, // MicroMod BATT_VIN/3 (PB03) - // AUD (audio) - { MP_ROM_QSTR(MP_QSTR_AUD_MCLK), MP_ROM_PTR(&pin_PB17) }, - { MP_ROM_QSTR(MP_QSTR_AUD_OUT), MP_ROM_PTR(&pin_PA21) }, - { MP_ROM_QSTR(MP_QSTR_AUD_IN), MP_ROM_PTR(&pin_PA22) }, - { MP_ROM_QSTR(MP_QSTR_AUD_LRCLK), MP_ROM_PTR(&pin_PA20) }, - { MP_ROM_QSTR(MP_QSTR_AUD_BCLK), MP_ROM_PTR(&pin_PB16) }, + // MicroMod reset pin + // { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR() }, // MicroMod RESET# (SAMD51 has a dedicated HW RESETN pin) - // I2C - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) }, - { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_PA17) }, - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) }, - { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_PA16) }, + // MicroMod boot pin + // { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR() }, // MicroMod BOOT (not connected) - { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_PA18) }, + // MicroMod USB device pins + // USB device is always used internally by CircuitPython, so skip creating + // the pin objects for it. See explicit ignores in mpconfigboard.h. + // { MP_ROM_QSTR(MP_QSTR_USB_DM), MP_ROM_PTR(&pin_PA24) }, // MicroMod USB_D- (PA24) + // { MP_ROM_QSTR(MP_QSTR_USB_DP), MP_ROM_PTR(&pin_PA25) }, // MicroMod USB_D+ (PA25) - // I2C2 - { MP_ROM_QSTR(MP_QSTR_SDA2), MP_ROM_PTR(&pin_PA13) }, - { MP_ROM_QSTR(MP_QSTR_SCL2), MP_ROM_PTR(&pin_PA12) }, + // MicroMod USB host pins + // { MP_ROM_QSTR(MP_QSTR_USBHOST_DM), MP_ROM_PTR() }, // MicroMod USBHOST_D- (not connected) + // { MP_ROM_QSTR(MP_QSTR_USBHOST_DP), MP_ROM_PTR() }, // MicroMod USBHOST_D+ (not connected) - // SPI - { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_PA06) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA06) }, - { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_PA04) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA04) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA05) }, - { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_PA07) }, + // MicroMod CAN pins + { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB15) }, // MicroMod CAN_RX (PB15) + { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB14) }, // MicroMod CAN_TX (PB14) - // Status LED - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA23) }, + // Note: MicroMod UART (UART0) is not present in the edge connector pinout + // because the primary debug serial port is exposed as a virtual serial port + // over USB. - // UART - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB30) }, - { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_PB30) }, - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB31) }, - { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_PB31) }, + // MicroMod UART1 pins + { MP_ROM_QSTR(MP_QSTR_UART_TX1), MP_ROM_PTR(&pin_PB31) }, // MicroMod UART_TX1 | CircuitPython TX (PB31) + { MP_ROM_QSTR(MP_QSTR_UART_RX1), MP_ROM_PTR(&pin_PB30) }, // MicroMod UART_RX1 | CircuitPython RX (PB30) + // { MP_ROM_QSTR(MP_QSTR_UART_RTS1), MP_ROM_PTR() }, // MicroMod RTS1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_UART_CTS1), MP_ROM_PTR() }, // MicroMod CTS1 (not connected) - // UART2 - { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_PA13) }, - { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_PA12) }, + // CircuitPython default UART pins + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB31) }, // CircuitPython TX | MicroMod UART_TX1 (PB31) + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB30) }, // CircuitPython RX | MicroMod UART_RX1 (PB30) + // MicroMod UART2 pins + { MP_ROM_QSTR(MP_QSTR_UART_TX2), MP_ROM_PTR(&pin_PA12) }, // MicroMod UART_TX2 (PA12) + { MP_ROM_QSTR(MP_QSTR_UART_RX2), MP_ROM_PTR(&pin_PA13) }, // MicroMod UART_RX2 (PA13) - // Board objects - { 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) }, + // MicroMod I2C pins + { MP_ROM_QSTR(MP_QSTR_I2C_SDA), MP_ROM_PTR(&pin_PA17) }, // MicroMod I2C_SDA | CircuitPython SDA (PA17) + { MP_ROM_QSTR(MP_QSTR_I2C_SCL), MP_ROM_PTR(&pin_PA16) }, // MicroMod I2C_SCL | CircuitPython SCL (PA16) + // CircuitPython default I2C pins + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) }, // CircuitPython SDA | MicroMod I2C_SDA (PA17) + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) }, // CircuitPython SCL | MicroMod I2C_SCL (PA16) + + // MicroMod I2C interrupt pin + { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_PA18) }, // MicroMod I2C_INT (PA18) + + // MicroMod I2C1 pins + { MP_ROM_QSTR(MP_QSTR_I2C_SDA1), MP_ROM_PTR(&pin_PA13) }, // MicroMod I2C_SDA1 (PA13) + { MP_ROM_QSTR(MP_QSTR_I2C_SCL1), MP_ROM_PTR(&pin_PA12) }, // MicroMod I2C_SCL1 (PA12) + + // MicroMod SPI pins + { MP_ROM_QSTR(MP_QSTR_SPI_CIPO), MP_ROM_PTR(&pin_PA06) }, // MicroMod SPI_CIPO | CircuitPython CIPO (PA06) + { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PA06) }, // MicroMod SPI_MISO | CircuitPython MISO (PA06) + { MP_ROM_QSTR(MP_QSTR_SPI_COPI), MP_ROM_PTR(&pin_PA04) }, // MicroMod SPI_COPI | CircuitPython COPI | LED_DAT (PA04) + { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PA04) }, // MicroMod SPI_MOSI | CircuitPython MOSI (PA04) + { MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_PA05) }, // MicroMod SPI_SCK | CircuitPython SCK | LED_CLK (PA05) + { MP_ROM_QSTR(MP_QSTR_SPI_CS), MP_ROM_PTR(&pin_PA07) }, // MicroMod SPI_CS | CircuitPython CS (PA07) + + // CircuitPython default SPI pins + { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_PA06) }, // CircuitPython CIPO | MicroMod SPI_CIPO (PA06) + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA06) }, // CircuitPython MISO | MicroMod SPI_MISO (PA06) + { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_PA04) }, // CircuitPython COPI | MicroMod SPI_COPI | LED_DAT (PA04) + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA04) }, // CircuitPython MOSI | MicroMod SPI_MOSI (PA04) + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA05) }, // CircuitPython SCK | MicroMod SPI_SCK | LED_CLK (PA05) + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_PA07) }, // CircuitPython CS | MicroMod SPI_CS (PA07) + + // MicroMod 2-wire serial LED pins + { MP_ROM_QSTR(MP_QSTR_LED_DAT), MP_ROM_PTR(&pin_PA04) }, // MicroMod LED_DAT | SPI_COPI (PA04) + { MP_ROM_QSTR(MP_QSTR_LED_CLK), MP_ROM_PTR(&pin_PA05) }, // MicroMod LED_CLK | SPI_SCK (PA05) + + // MicroMod SDIO pins + // { MP_ROM_QSTR(MP_QSTR_SDIO_CLK), MP_ROM_PTR() }, // MicroMod SDIO_SCK | SPI_SCK1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_CMD), MP_ROM_PTR() }, // MicroMod SDIO_CMD | SPI_COPI1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_DATA0), MP_ROM_PTR() }, // MicroMod SDIO_DATA0 | SPI_CIPO1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_DATA1), MP_ROM_PTR() }, // MicroMod SDIO_DATA1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR() }, // MicroMod SDIO_DATA2 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_DATA3), MP_ROM_PTR() }, // MicroMod SDIO_DATA3 | SPI_CS1 (not connected) + + // MicroMod SPI1 pins + // { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR() }, // MicroMod SPI_CIPO1 | SDIO_DATA0 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_MISO1), MP_ROM_PTR() }, // MicroMod SPI_MISO1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR() }, // MicroMod SPI_COPI1 | SDIO_CMD (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_MOSI1), MP_ROM_PTR() }, // MicroMod SPI_MOSI1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR() }, // MicroMod SPI_SCK1 | SDIO_SCK (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR() }, // MicroMod SPI_CS1 | SDIO_DATA3 (not connected) + + // MicroMod audio pins + { MP_ROM_QSTR(MP_QSTR_AUD_MCLK), MP_ROM_PTR(&pin_PB17) }, // MicroMod AUD_MCLK (PB17) + { MP_ROM_QSTR(MP_QSTR_AUD_OUT), MP_ROM_PTR(&pin_PA21) }, // MicroMod AUD_OUT | I2S_OUT | PCM_OUT | CAM_MCLK (PA21) + { MP_ROM_QSTR(MP_QSTR_AUD_IN), MP_ROM_PTR(&pin_PA22) }, // MicroMod AUD_IN | I2S_IN | PCM_IN | CAM_PCLK (PA22) + { MP_ROM_QSTR(MP_QSTR_AUD_LRCLK), MP_ROM_PTR(&pin_PA20) }, // MicroMod AUD_LRCLK | I2S_WS | PCM_SYNC | PDM_DATA (PA20) + { MP_ROM_QSTR(MP_QSTR_AUD_BCLK), MP_ROM_PTR(&pin_PB16) }, // MicroMod AUD_BCLK | I2S_SCK | PCM_CLK | PDM_CLK (PB16) + + // MicroMod I2S pins + { MP_ROM_QSTR(MP_QSTR_I2S_OUT), MP_ROM_PTR(&pin_PA21) }, // MicroMod I2S_OUT | AUD_OUT | PCM_OUT | CAM_MCLK (PA21) + { MP_ROM_QSTR(MP_QSTR_I2S_IN), MP_ROM_PTR(&pin_PA22) }, // MicroMod I2S_IN | AUD_IN | PCM_IN | CAM_PCLK (PA22) + { MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_PA20) }, // MicroMod I2S_WS | AUD_LRCLK | PCM_SYNC | PDM_DATA (PA20) + { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_PB16) }, // MicroMod I2S_SCK | AUD_BCLK | PCM_CLK | PDM_CLK (PB16) + + // MicroMod PCM pins + { MP_ROM_QSTR(MP_QSTR_PCM_OUT), MP_ROM_PTR(&pin_PA21) }, // MicroMod PCM_OUT | AUD_OUT | I2S_OUT | CAM_MCLK (PA21) + { MP_ROM_QSTR(MP_QSTR_PCM_IN), MP_ROM_PTR(&pin_PA22) }, // MicroMod PCM_IN | AUD_IN | I2S_IN | CAM_PCLK (PA22) + { MP_ROM_QSTR(MP_QSTR_PCM_SYNC), MP_ROM_PTR(&pin_PA20) }, // MicroMod PCM_SYNC | AUD_LRCLK | I2S_WS | PDM_DATA (PA20) + { MP_ROM_QSTR(MP_QSTR_PCM_CLK), MP_ROM_PTR(&pin_PB16) }, // MicroMod PCM_CLK | AUD_BCLK | I2S_SCK | PDM_CLK (PB16) + + // MicroMod PDM pins + { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_PA20) }, // MicroMod PDM_DATA | AUD_LRCLK | I2S_WS | PCM_SYNC (PA20) + { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_PB16) }, // MicroMod PDM_CLK | AUD_BCLK | I2S_SCK | PCM_CLK (PB16) + + // MicroMod SWD pins + { MP_ROM_QSTR(MP_QSTR_SWDIO), MP_ROM_PTR(&pin_PA31) }, // MicroMod SWDIO (PA31) + { MP_ROM_QSTR(MP_QSTR_SWCLK), MP_ROM_PTR(&pin_PA30) }, // MicroMod SWDCK (PA30) + // { MP_ROM_QSTR(MP_QSTR_SWO), MP_ROM_PTR() }, // MicroMod SWO | G11 (not connected) + + // MicroMod ADC pins + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, // MicroMod A0 (PA02) + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB00) }, // MicroMod A1 (PB00) + + // MicroMod PWM pins + { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_PB01) }, // MicroMod PWM0 (PB01) + { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_PB02) }, // MicroMod PWM1 (PB02) + + // MicroMod digital pins + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB04) }, // MicroMod D0 (PB04) + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB05) }, // MicroMod D1 | CAM_TRIG (PB05) + + // MicroMod general purpose pins + { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_PB06) }, // MicroMod G0 | BUS0 (PB06) + { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_PB07) }, // MicroMod G1 | BUS1 (PB07) + { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_PB08) }, // MicroMod G2 | BUS2 (PB08) + { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_PB09) }, // MicroMod G3 | BUS3 (PB09) + { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_PB10) }, // MicroMod G4 | BUS4 (PB10) + { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_PB11) }, // MicroMod G5 | BUS5 (PB11) + { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_PB12) }, // MicroMod G6 | BUS6 (PB12) + { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_PB13) }, // MicroMod G7 | BUS7 (PB13) + { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_PA14) }, // MicroMod G8 (PA14) + { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_PA15) }, // MicroMod G9 | ADC_D- | CAM_HSYNC (PA15) + // { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR() }, // MicroMod G10 | ADC_D+ | CAM_VSYNC (not connected) + { MP_ROM_QSTR(MP_QSTR_G11), MP_ROM_PTR(&pin_PA27) }, // MicroMod G11 | SWO (PA27) + + // MicroMod 8-bit bus pins + { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_PB06) }, // MicroMod BUS0 | G0 (PB06) + { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_PB07) }, // MicroMod BUS1 | G1 (PB07) + { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_PB08) }, // MicroMod BUS2 | G2 (PB08) + { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_PB09) }, // MicroMod BUS3 | G3 (PB09) + { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_PB10) }, // MicroMod BUS4 | G4 (PB10) + { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_PB11) }, // MicroMod BUS5 | G5 (PB11) + { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_PB12) }, // MicroMod BUS6 | G6 (PB12) + { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_PB13) }, // MicroMod BUS7 | G7 (PB13) + + // MicroMod differential ADC input pins + // { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_PA15) }, // MicroMod ADC_D- | G9 | CAM_HSYNC (PA15) + // { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR() }, // MicroMod ADC_D+ | G10 | CAM_VSYNC (not connected) + + // MicroMod camera pins + // { MP_ROM_QSTR(MP_QSTR_CAM_MCLK), MP_ROM_PTR(&pin_PA21) }, // MicroMod CAM_MCLK | AUD_OUT | I2S_OUT | PCM_OUT (PA21) + // { MP_ROM_QSTR(MP_QSTR_CAM_PCLK), MP_ROM_PTR(&pin_PA22) }, // MicroMod CAM_PCLK | AUD_IN | I2S_IN | PCM_IN (PA22) + // { MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_PB05) }, // MicroMod CAM_TRIG | D1 (PB05) + // { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_PA15 }, // MicroMod CAM_HSYNC | ADC_D- | G9 (PA15) + // { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR() }, // MicroMod CAM_VSYNC | ADC_D+ | G10 (not connected) + + // Module-specific aliases (not part of the MicroMod spec) + { MP_ROM_QSTR(MP_QSTR_HOST_ENABLE), MP_ROM_PTR(&pin_PA27) }, // HOST_ENABLE | G11 | SWO (PA27) + + // CircuitPython board objects + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, // CircuitPython I2C + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, // CircuitPython SPI + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, // CircuitPython UART }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md b/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md index 094102c277..5c41fdb7cf 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/README.md @@ -10,56 +10,64 @@ We've also routed two I2C buses, 2 SPI buses, eleven GPIO, dedicated CircuitPython pin definitions, while simialr to other boards represent a slight departure from just the typical `A` and `D` pin definitions. The majority of general pins are labled as `G` (or alternatively, `BUS`,) as the MicroMod system they build on uses those names to specify pins that may not be specficially analog or digital. -This can be somewhat confusing, especially around the analog pins. Here's a quick pin-map. This pin map will use the label either on the [SparkFun MicroMod ATP Carrier Board](https://www.sparkfun.com/products/16885), or the pin name on the [graphical datasheet](https://cdn.sparkfun.com/assets/learn_tutorials/1/4/0/1/MicroMod_nRF52840_v1.0_Graphical_Datasheet.pdf). Some of the aditional aliases are just names to make naming consistent (e.g.: RTS/CTS), but they also can refer to additional functionality a pin may have (e.g.: NFC pins) +This can be somewhat confusing, especially around the analog pins. Here's a quick pin-map: MicroMod Pin # | ATP Pin Label | Pin Definition | Additional Definitons | Pin/Port Reference | Notes :--------------|:--------------|:--------------|:-----------------------|:-------------------|:------ 8 | G11 | | | (Not Connected) | 10 | D0 | D0 | | P0_27 | -11 | BOOT | BOOT | BUTTON1 | P0_07 | -12 | SDA | SDA | | P0_08 | -13 | RTS1 | RTS | RTS1 | P1_02 | -14 | SCL | SCL | | P0_11 | -15 | CTS1 | CTS | CTS1 | P1_09 | -16 | /I2C INT | I2C_INT | P0_15 | -17 | TX | TX | TX1 | P1_03 | -18 | D1 | D1 | CAM_TRIG | P1_08 | -19 | RX | RX | RX1 | P1_10 | -20 | RX2 | RX2 | | P1_05 | -22 | TX2 | TX2 | | P1_07 | -32 | PWM0 | PWM0 | P0_06 | -34 | A0 | A0 | ADC0 | P0_04 | Attached to AIN2 -38 | A1 | A1 | ADC1 | P0_05 | Attached to AIN3 +11 | BOOT | BOOT | | P0_07 | +12 | SDA | I2C_SDA | SDA | P0_08 | +13 | RTS1 | UART_RTS1 | | P1_02 | +14 | SCL | I2C_SCL | SCL | P0_11 | +15 | CTS1 | UART_CTS1 | | P1_09 | +16 | /I2C INT | I2C_INT | |P0_15| +17 | TX | UART_TX1 | TX | P1_03 | +18 | D1 | D1 | | P1_08 | +19 | RX | UART_RX1 | RX | P1_10 | +20 | RX2 | UART_RX2 | | P1_05 | +22 | TX2 | UART_TX2 | | P1_07 | +32 | PWM0 | PWM0 | |P0_06| +34 | A0 | A0 | | P0_04 | Attached to AIN2 +38 | A1 | A1 | | P0_05 | Attached to AIN3 40 | G0 | G0 | BUS0 | P0_29 | Attached to AIN5 42 | G1 | G1 | BUS1 | P0_03 | Attached to AIN1 44 | G2 | G2 | BUS2 | P1_13 | 46 | G3 | G3 | BUS3 | P1_12 | -47 | PWM1 | PWM1 | P0_16 | +47 | PWM1 | PWM1 | |P0_16| 48 | G4 | G4 | BUS4 | P1_11 | -49 | BATT_VIN | BATT_VIN3 | | P0_30 | Attached to AIN6, will be battery voltage / 3. | +49 | BATT_VIN | BATT_VIN3 | | P0_30 | Attached to AIN6, will be battery voltage / 3. 50 | PDM_CLK | PDM_CLK | | P0_25 | -51 | SDA1 | SDA1 | | P1_01 | +51 | SDA1 | I2C_SDA1 | | P1_01 | 52 | PDM_DATA | PDM_DATA | | P0_26 | -53 | SCL1 | SCL1 | | P0_24 | -55 | /CS | CS | | P0_20 | -57 | SCK | SCK | | P0_28 | Attached to AIN4 -59 | COPI | COPI | MOSI | P0_31 | Attached to AIN7 -61 | CIPO | CIPO | MISO | P0_02 | -63 | G10 | G10 | NFC2, ADC_DP, CAM_VSYNC | P0_10 | Attached to NFC2 -65 | G9 | G9 | NFC1, ADC_DM, CAM_HSYNC | P0_09 | Attached to NFC1 +53 | SCL1 | I2C_SCL1 | | P0_24 | +55 | /CS | SPI_CS | | P0_20 | +57 | SCK | SPI_SCK | LED_CLK | P0_28 | Attached to AIN4 +59 | COPI | SPI_COPI | SPI_MOSI, LED_DAT | P0_31 | Attached to AIN7 +60 | SCK1 | SDIO_SCK | SPI_SCK1 | | +61 | CIPO | SPI_CIPO | SPI_MISO | P0_02 | +62 | COPI1 | SDIO_CMD | SPI_COPI1 | | +63 | G10 | G10 | | P0_10 | Attached to NFC2 +64 | CIPO1 | SDIO_DATA0 | SPI_CIPO1 | | +65 | G9 | G9 | | P0_09 | Attached to NFC1 +66 | DAT1 | SDIO_DATA1 | | | 67 | G8 | G8 | | P1_14 | +68 | DAT2 | SDIO_DATA2 | | | 69 | G7 | G7 | BUS7 | P1_04 | +70 | CS1 | SDIO_DATA3 | SPI_CS1 | | 71 | G6 | G6 | BUS6 | P1_06 | 73 | G5 | G5 | BUS5 | P0_15 | ## Peripheral Naming -CircuitPython attempts to stay in line with the naming of the serial peripheral naming in the MicroMod system. The bare UART pins are also named 1. The UART 2 pins are named 2. However, the I2C names on MicroMod are and 1. Perhaps this will change in the future, but as of [Interface v1](https://cdn.sparkfun.com/assets/learn_tutorials/1/2/0/6/SparkFun_MicroMod_Interface_v1.0_-_Pin_Descriptions.pdf), it may lead to some confusion. +The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. The 0th peripheral is the default and the "0" is omitted from the peripheral name. For example, the first I2C peripheral is named `I2C` (instead of `I2C0`) and the second I2C peripheral is named `I2C1`. Note: MicroMod `UART` is not present in the edge connector pinout because the primary debug serial port (i.e.`UART0`) is exposed as a virtual serial port over USB. As a result, the first UART peripheral in the edge connector pinout is `UART1` and the second UART peripheral is `UART2`. + +For more details, see https://www.sparkfun.com/micromod#tech-specs. ## Bootloader Notes -The MicroMod nRF52840 Processor needs to have the [Adafruit nRF52 UF2 bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader/pull/194) flashed on it. [[TODO: LINK TO BUILD]] +The MicroMod nRF52840 Processor needs to have the [Adafruit nRF52 UF2 bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases/latest) flashed on it. ## Hardware Reference diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h index c53fc45d22..fec1d5ae02 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.h @@ -27,9 +27,12 @@ #include "nrfx/hal/nrf_gpio.h" -#define MICROPY_HW_BOARD_NAME "SparkFun MicroMod nRF52840" +#define MICROPY_HW_BOARD_NAME "SparkFun MicroMod nRF52840 Processor" #define MICROPY_HW_MCU_NAME "nRF52840" +// Status LED +#define MICROPY_HW_LED_STATUS (&pin_P0_13) + #define DEFAULT_I2C_BUS_SCL (&pin_P0_11) #define DEFAULT_I2C_BUS_SDA (&pin_P0_08) diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk index 21ca20825a..83d51ecc6d 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x1B4F USB_PID = 0x0021 -USB_PRODUCT = "SFE_nRF52840_MicroMod" +USB_PRODUCT = "SparkFun MicroMod nRF52840 Processor" USB_MANUFACTURER = "SparkFun Electronics" MCU_CHIP = nrf52840 diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c index 65700f24e4..11ca39f28d 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c @@ -1,113 +1,221 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2021 Chris Wilson + * + * 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 "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - // D pins (D0-D1) - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_27) }, // 0.27 - D0 - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_08) }, // 1.08 - D1 | CAM_TRIG - { MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_P1_08) }, // CAM_TRIG alias + // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. + // The 0th peripheral is the default and the "0" is omitted from the + // peripheral name (e.g. "I2C" instead of "I2C0"). + // + // For more details, see https://www.sparkfun.com/micromod#tech-specs - // A pins (A0-A1) - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, // 0.04 - A0 | ADC0 (AIN2) - { MP_ROM_QSTR(MP_QSTR_ADC0), MP_ROM_PTR(&pin_P0_04) }, // ADC0 alias - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, // 0.05 - A1 | ADC1 (AIN3) - { MP_ROM_QSTR(MP_QSTR_ADC1), MP_ROM_PTR(&pin_P0_05) }, // ADC1 alias + // MicroMod built-in status LED pin + // Requirement from the "Designing with MicroMod" SparkFun article: + // "... every Processor Board shall include one status LED connected to a + // pin that is not connected to the board edge." + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_13) }, // MicroMod LED (P0.13) - // G pins (G0-G11, G11 NC) - { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_P0_29) }, // 0.29 - G0 | GPIO0 | BUS0 (AIN5) - { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_P0_29) }, // BUS0 alias - { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_P0_03) }, // 0.03 - G1 | GPIO1 | BUS1 (AIN1) - { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_P0_03) }, // BUS1 alias - { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_P1_13) }, // 1.13 - G2 | GPIO2 | BUS2 - { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_P1_13) }, // BUS2 alias - { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_P1_12) }, // 1.12 - G3 | GPIO3 | BUS3 - { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_P1_12) }, // BUS3 alias - { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_P1_11) }, // 1.11 - G4 | GPIO4 | BUS4 - { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_P1_11) }, // BUS4 alias - { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_P0_17) }, // 0.17 - G5 | GPIO5 | BUS5 - { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_P0_17) }, // BUS5 alias - { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_P1_06) }, // 1.06 - G6 | GPIO6 | BUS6 - { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_P1_06) }, // BUS6 alias - { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_P1_04) }, // 1.04 - G7 | GPIO7 | BUS7 - { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_P1_04) }, // BUS7 alias - { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_P1_14) }, // 1.14 - G8 | GPIO8 - { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_P0_09) }, // 0.09 - G9 | GPIO9/NFC1 | ADC_D- | CAM_HSYNC (NFC1) - { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, // NFC1 alias - { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_P0_09) }, // ADC_DM alias - { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_P0_09) }, // CAM_HSYNC alias - { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_P0_10) }, // 0.10 - G10 | GPIO10/NFC2 | ADC_D+ | CAM_VSYNC (NFC2) - { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, // NFC2 alias - { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_P0_10) }, // ADC_DP alias - { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_P0_10) }, // CAM_VSYNC alias - // NC - G11 + // MicroMod USB bus input voltage (+5V) pin + // { MP_ROM_QSTR(MP_QSTR_USB_VIN), MP_ROM_PTR() }, // MicroMod USB_VIN (MDBT50Q-P1M has a dedicated HW VBUS pin) - // PWM pins (PWM0-PWM1) - { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_P0_06) }, // 0.06 - PWM0 - { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_P0_16) }, // 0.16 - PWM1 + // MicroMod +3.3V enable pin + { MP_ROM_QSTR(MP_QSTR_P3V3_EN), MP_ROM_PTR(&pin_P1_15) }, // MicroMod 3.3V_EN (P1.15) - // PDM - { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P0_25) }, // 0.25 - PDM_CLK | AUD_BCLK - { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_26) }, // 0.26 - PDM_DATA | AUD_LRCLK + // MicroMod battery voltage sense pin + { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_P0_30) }, // MicroMod BATT_VIN/3 (P0.30) - // Battery Voltage Monitor - { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_P0_30) }, // 0.30 - BATT_VIN/3 (AIN6) + // MicroMod reset pin + { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P0_18) }, // MicroMod RESET# (P0.18) - // I2C - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_08) }, // 0.08 - SDA - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, // 0.11 - SCL (TRACEDATA2) + // MicroMod boot pin + { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_P0_07) }, // MicroMod BOOT (P0.07) - { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_P0_15) }, // 0.15 - I2C_INT + // MicroMod USB device pins + // USB device is always used internally by CircuitPython, so skip creating + // the pin objects for it. + // { MP_ROM_QSTR(MP_QSTR_USB_DM), MP_ROM_PTR() }, // MicroMod USB_D- (MDBT50Q-P1M has a dedicated HW D- pin) + // { MP_ROM_QSTR(MP_QSTR_USB_DP), MP_ROM_PTR() }, // MicroMod USB_D+ (MDBT50Q-P1M has a dedicated HW D+ pin) - { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_P1_01) }, // 1.01 - SDA1 - { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_P0_24) }, // 0.24 - SCL1 + // MicroMod USB host pins + // { MP_ROM_QSTR(MP_QSTR_USBHOST_DM), MP_ROM_PTR() }, // MicroMod USBHOST_D- (not supported) + // { MP_ROM_QSTR(MP_QSTR_USBHOST_DP), MP_ROM_PTR() }, // MicroMod USBHOST_D+ (not supported) - // SPI - { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_P0_02) }, // 0.02 - CIPO | SPI_CIPO - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_02) }, // MISO alias - { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_P0_31) }, // 0.31 - COPI | SPI_COPI (AIN7) - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_31) }, // MOSI alias - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_28) }, // 0.28 - SCK | SPI_SCK (AIN4) - { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_P0_20) }, // 0.20 - /CS | SPI_/CS + // MicroMod CAN pins + // { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR() }, // MicroMod CAN_RX (not supported) + // { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR() }, // MicroMod CAN_TX (not supported) - // QSPI, used by flash on this board, but is broken out - // on the MicroMod connector, to to the SDIO pins. - { MP_ROM_QSTR(MP_QSTR_SDIO_CLK), MP_ROM_PTR(&pin_P0_19) }, // 0.00 - SDIO SCK | Used as: QSPI flash SCK - { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_P0_19) }, // SPI_SCK1 alias - { MP_ROM_QSTR(MP_QSTR_SDIO_CMD), MP_ROM_PTR(&pin_P0_14) }, // 0.00 - SDIO CMD | Used as: QSPI flash D0 (or SDI) - { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_P0_14) }, // SPI_COPI1 alias - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA0), MP_ROM_PTR(&pin_P0_21) },// 0.00 - SDIO DATA0 | Used as: QSPI flash D1 (or SDO) - { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_P0_21) }, // SPI_CIPO1 alias - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA1), MP_ROM_PTR(&pin_P0_22) },// 0.00 - SDIO DATA1 | Unused for flash. - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_P0_23) },// 0.00 - SDIO DATA2 | Used as: QSPI flash D2 - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA3), MP_ROM_PTR(&pin_P1_00) },// 0.00 - SDIO DATA3 | Use das: QSPI flash D3 (or /HOLD) - { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_P1_00) }, // SPI_CS1 alias + // Note: MicroMod UART (UART0) is not present in the edge connector pinout + // because the primary debug serial port is exposed as a virtual serial port + // over USB. - // Reset Pin - { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P1_14) }, // 0.18 - /RESET (NRESET) + // MicroMod UART1 pins + { MP_ROM_QSTR(MP_QSTR_UART_TX1), MP_ROM_PTR(&pin_P1_03) }, // MicroMod UART_TX1 | CircuitPython TX (P1.03) + { MP_ROM_QSTR(MP_QSTR_UART_RX1), MP_ROM_PTR(&pin_P1_10) }, // MicroMod UART_RX1 | CircuitPython RX (P1.10) + { MP_ROM_QSTR(MP_QSTR_UART_RTS1), MP_ROM_PTR(&pin_P1_02) }, // MicroMod RTS1 (P1.02) + { MP_ROM_QSTR(MP_QSTR_UART_CTS1), MP_ROM_PTR(&pin_P1_09) }, // MicroMod CTS1 (P1.09) - // LED - { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13) }, // 0.13 - LED_BUILTIN | STAT | Blue LED + // CircuitPython default UART pins + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_03) }, // CircuitPython TX | MicroMod UART_TX1 (P1.03) + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_10) }, // CircuitPython RX | MicroMod UART_RX1 (P1.10) - // Button - { MP_ROM_QSTR(MP_QSTR_BUTTON1), MP_ROM_PTR(&pin_P0_07) }, // 0.07 - /BOOT [Active Low] (TRACECLK) - Is button on carriers. - { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_P0_07) }, // BOOT alias + // MicroMod UART2 pins + { MP_ROM_QSTR(MP_QSTR_UART_TX2), MP_ROM_PTR(&pin_P1_07) }, // MicroMod UART_TX2 (P1.07) + { MP_ROM_QSTR(MP_QSTR_UART_RX2), MP_ROM_PTR(&pin_P1_05) }, // MicroMod UART_RX2 (P1.05) - // UART - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_10) }, // 1.10 - UART RX | RX1 - { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_P1_10) }, // RX1 alias - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_03) }, // 1.03 - UART TX | TX1 - { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_P1_03) }, // TX1 alias - { MP_ROM_QSTR(MP_QSTR_CTS), MP_ROM_PTR(&pin_P1_09) }, // 1.09 - UART CTS | CTS1 (TRACEDATA3) - { MP_ROM_QSTR(MP_QSTR_CTS1), MP_ROM_PTR(&pin_P1_09) }, // CTS1 alias - { MP_ROM_QSTR(MP_QSTR_RTS), MP_ROM_PTR(&pin_P1_02) }, // 1.02 - UART RTS | RTS1 - { MP_ROM_QSTR(MP_QSTR_RTS1), MP_ROM_PTR(&pin_P1_02) }, // RTS1 alias + // MicroMod I2C pins + { MP_ROM_QSTR(MP_QSTR_I2C_SDA), MP_ROM_PTR(&pin_P0_08) }, // MicroMod I2C_SDA (P0.08) + { MP_ROM_QSTR(MP_QSTR_I2C_SCL), MP_ROM_PTR(&pin_P0_11) }, // MicroMod I2C_SCL (P0.11) - { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_P1_05) }, // 1.05 - UART RX | RX2 - { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_P1_07) }, // 1.07 - UART TX | TX2 + // CircuitPython default I2C pins + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_08) }, // CircuitPython SDA | MicroMod I2C_SDA (P0.08) + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, // CircuitPython SCL | MicroMod I2C_SCL (P0.11) - // Board Objects - { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + // MicroMod I2C interrupt pin + { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_P0_15) }, // MicroMod I2C_INT (P0.15) + + // MicroMod I2C1 pins + { MP_ROM_QSTR(MP_QSTR_I2C_SDA1), MP_ROM_PTR(&pin_P1_01) }, // MicroMod I2C_SDA1 (P1.01) + { MP_ROM_QSTR(MP_QSTR_I2C_SCL1), MP_ROM_PTR(&pin_P0_24) }, // MicroMod I2C_SCL1 (P0.24) + + // MicroMod SPI pins + { MP_ROM_QSTR(MP_QSTR_SPI_CIPO), MP_ROM_PTR(&pin_P0_02) }, // MicroMod SPI_CIPO | CircuitPython CIPO (P0.02) + { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_P0_02) }, // MicroMod SPI_MISO | CircuitPython MISO (P0.02) + { MP_ROM_QSTR(MP_QSTR_SPI_COPI), MP_ROM_PTR(&pin_P0_31) }, // MicroMod SPI_COPI | CircuitPython COPI | LED_DAT (P0.31) + { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_P0_31) }, // MicroMod SPI_MOSI | CircuitPython MOSI (P0.31) + { MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_P0_28) }, // MicroMod SPI_SCK | CircuitPython SCK | LED_CLK (P0.28) + { MP_ROM_QSTR(MP_QSTR_SPI_CS), MP_ROM_PTR(&pin_P0_20) }, // MicroMod SPI_CS | CircuitPython CS (P0.20) + + // CircuitPython default SPI pins + { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_P0_02) }, // CircuitPython CIPO | MicroMod SPI_CIPO (P0.02) + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_02) }, // CircuitPython MISO | MicroMod SPI_MISO (P0.02) + { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_P0_31) }, // CircuitPython COPI | MicroMod SPI_COPI | LED_DAT (P0.31) + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_31) }, // CircuitPython MOSI | MicroMod SPI_MOSI (P0.31) + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_28) }, // CircuitPython SCK | MicroMod SPI_SCK | LED_CLK (P0.28) + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_P0_20) }, // CircuitPython CS | MicroMod SPI_CS (P0.20) + + // MicroMod 2-wire serial LED pins + { MP_ROM_QSTR(MP_QSTR_LED_DAT), MP_ROM_PTR(&pin_P0_31) }, // MicroMod LED_DAT | SPI_COPI (P0.31) + { MP_ROM_QSTR(MP_QSTR_LED_CLK), MP_ROM_PTR(&pin_P0_28) }, // MicroMod LED_CLK | SPI_SCK (P0.28) + + // MicroMod SDIO pins + { MP_ROM_QSTR(MP_QSTR_SDIO_CLK), MP_ROM_PTR(&pin_P0_19) }, // MicroMod SDIO_SCK | SPI_SCK1 (P0.19) + { MP_ROM_QSTR(MP_QSTR_SDIO_CMD), MP_ROM_PTR(&pin_P0_14) }, // MicroMod SDIO_CMD | SPI_COPI1 (P0.14) + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA0), MP_ROM_PTR(&pin_P0_21) }, // MicroMod SDIO_DATA0 | SPI_CIPO1 (P0.21) + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA1), MP_ROM_PTR(&pin_P0_22) }, // MicroMod SDIO_DATA1 (P0.22) + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_P0_23) }, // MicroMod SDIO_DATA2 (P0.23) + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA3), MP_ROM_PTR(&pin_P1_00) }, // MicroMod SDIO_DATA3 | SPI_CS1 (P1.00) + + // MicroMod SPI1 pins + { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_P0_21) }, // MicroMod SPI_CIPO1 | SDIO_DATA0 (P0.21) + { MP_ROM_QSTR(MP_QSTR_SPI_MISO1), MP_ROM_PTR(&pin_P0_21) }, // MicroMod SPI_MISO1 (P0.21) + { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_P0_14) }, // MicroMod SPI_COPI1 | SDIO_CMD (P0.14) + { MP_ROM_QSTR(MP_QSTR_SPI_MOSI1), MP_ROM_PTR(&pin_P0_14) }, // MicroMod SPI_MOSI1 (P0.14) + { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_P0_19) }, // MicroMod SPI_SCK1 | SDIO_SCK (P0.19) + { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_P1_00) }, // MicroMod SPI_CS1 | SDIO_DATA3 (P1.00) + + // MicroMod audio pins (not supported by MDBT50Q-P1M) + // { MP_ROM_QSTR(MP_QSTR_AUD_MCLK), MP_ROM_PTR() }, // MicroMod AUD_MCLK (not connected) + // { MP_ROM_QSTR(MP_QSTR_AUD_OUT), MP_ROM_PTR() }, // MicroMod AUD_OUT | I2S_OUT | PCM_OUT | CAM_MCLK (not connected) + // { MP_ROM_QSTR(MP_QSTR_AUD_IN), MP_ROM_PTR() }, // MicroMod AUD_IN | I2S_IN | PCM_IN | CAM_PCLK (not connected) + // { MP_ROM_QSTR(MP_QSTR_AUD_LRCLK), MP_ROM_PTR(&pin_P0_26) },// MicroMod AUD_LRCLK | I2S_WS | PCM_SYNC | PDM_DATA (P0.26) + // { MP_ROM_QSTR(MP_QSTR_AUD_BCLK), MP_ROM_PTR(&pin_P0_25) }, // MicroMod AUD_BCLK | I2S_SCK | PCM_CLK | PDM_CLK (P0.25) + + // MicroMod I2S pins (not supported by MDBT50Q-P1M) + // { MP_ROM_QSTR(MP_QSTR_I2S_OUT), MP_ROM_PTR() }, // MicroMod I2S_OUT | AUD_OUT | PCM_OUT | CAM_MCLK (not connected) + // { MP_ROM_QSTR(MP_QSTR_I2S_IN), MP_ROM_PTR() }, // MicroMod I2S_IN | AUD_IN | PCM_IN | CAM_PCLK (not connected) + // { MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_P0_26) }, // MicroMod I2S_WS | AUD_LRCLK | PCM_SYNC | PDM_DATA (P0.26) + // { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_P0_25) }, // MicroMod I2S_SCK | AUD_BCLK | PCM_CLK | PDM_CLK (P0.25) + + // MicroMod PCM pins (not supported by MDBT50Q-P1M) + // { MP_ROM_QSTR(MP_QSTR_PCM_OUT), MP_ROM_PTR() }, // MicroMod PCM_OUT | AUD_OUT | I2S_OUT | CAM_MCLK (not connected) + // { MP_ROM_QSTR(MP_QSTR_PCM_IN), MP_ROM_PTR() }, // MicroMod PCM_IN | AUD_IN | I2S_IN | CAM_PCLK (not connected) + // { MP_ROM_QSTR(MP_QSTR_PCM_SYNC), MP_ROM_PTR(&pin_P0_26) }, // MicroMod PCM_SYNC | AUD_LRCLK | I2S_WS | PDM_DATA (P0.26) + // { MP_ROM_QSTR(MP_QSTR_PCM_CLK), MP_ROM_PTR(&pin_P0_25) }, // MicroMod PCM_CLK | AUD_BCLK | I2S_SCK | PDM_CLK (P0.25) + + // MicroMod PDM pins + { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_26) }, // MicroMod PDM_DATA | AUD_LRCLK | I2S_WS | PCM_SYNC (P0.26) + { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P0_25) }, // MicroMod PDM_CLK | AUD_BCLK | I2S_SCK | PCM_CLK (P0.25) + + // MicroMod SWD pins + // { MP_ROM_QSTR(MP_QSTR_SWDIO), MP_ROM_PTR() }, // MicroMod SWDIO (MDBT50Q-P1M has a dedicated HW SWDIO pin) + // { MP_ROM_QSTR(MP_QSTR_SWCLK), MP_ROM_PTR() }, // MicroMod SWDCK (MDBT50Q-P1M has a dedicated HW SWDCLK pin) + // { MP_ROM_QSTR(MP_QSTR_SWO), MP_ROM_PTR() }, // MicroMod SWO | G11 (not supported) + + // MicroMod ADC pins + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_05) }, // MicroMod A0 (P0.05) + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, // MicroMod A1 (P0.04) + + // MicroMod PWM pins + { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_P0_06) }, // MicroMod PWM0 (P0.06) + { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_P0_16) }, // MicroMod PWM1 (P0.16) + + // MicroMod digital pins + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_27) }, // MicroMod D0 (P0.27) + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_08) }, // MicroMod D1 | CAM_TRIG (P1.08) + + // MicroMod general purpose pins + { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_P0_29) }, // MicroMod G0 | BUS0 (P0.29) + { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_P0_03) }, // MicroMod G1 | BUS1 (P0.03) + { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_P1_13) }, // MicroMod G2 | BUS2 (P1.13) + { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_P1_12) }, // MicroMod G3 | BUS3 (P1.12) + { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_P1_11) }, // MicroMod G4 | BUS4 (P1.11) + { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_P0_17) }, // MicroMod G5 | BUS5 (P0.17) + { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_P1_06) }, // MicroMod G6 | BUS6 (P1.06) + { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_P1_04) }, // MicroMod G7 | BUS7 (P1.04) + { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR(&pin_P1_14) }, // MicroMod G8 (P1.14) + { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_P0_09) }, // MicroMod G9 | ADC_D- | CAM_HSYNC (P0.09) + { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_P0_10) }, // MicroMod G10 | ADC_D+ | CAM_VSYNC (P0.10) + // { MP_ROM_QSTR(MP_QSTR_G11), MP_ROM_PTR() }, // MicroMod G11 | SWO (not connected) + + // MicroMod 8-bit bus pins + { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_P0_29) }, // MicroMod BUS0 | G0 (P0.29) + { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_P0_03) }, // MicroMod BUS1 | G1 (P0.03) + { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_P1_13) }, // MicroMod BUS2 | G2 (P1.13) + { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_P1_12) }, // MicroMod BUS3 | G3 (P1.12) + { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_P1_11) }, // MicroMod BUS4 | G4 (P1.11) + { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_P0_17) }, // MicroMod BUS5 | G5 (P0.17) + { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_P1_06) }, // MicroMod BUS6 | G6 (P1.06) + { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_P1_04) }, // MicroMod BUS7 | G7 (P1.04) + + // MicroMod differential ADC input pins (not supported by MDBT50Q-P1M) + // { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_P0_09) }, // MicroMod ADC_D- | G9 | CAM_HSYNC (P0.09) + // { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_P0_10) }, // MicroMod ADC_D+ | G10 | CAM_VSYNC (P0.10) + + // MicroMod camera pins (not supported by MDBT50Q-P1M) + // { MP_ROM_QSTR(MP_QSTR_CAM_MCLK), MP_ROM_PTR() }, // MicroMod CAM_MCLK | AUD_OUT | I2S_OUT | PCM_OUT (not connected) + // { MP_ROM_QSTR(MP_QSTR_CAM_PCLK), MP_ROM_PTR() }, // MicroMod CAM_PCLK | AUD_IN | I2S_IN | PCM_IN (not connected) + // { MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_P1_08) }, // MicroMod CAM_TRIG | D1 (P1.08) + // { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_P0_09) },// MicroMod CAM_HSYNC | ADC_D- | G9 (P0.09) + // { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_P0_10) },// MicroMod CAM_VSYNC | ADC_D+ | G10 (P0.10) + + // CircuitPython board objects + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, // CircuitPython I2C + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, // CircuitPython SPI + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, // CircuitPython UART }; - MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/mpconfigboard.h index d7dd7a6376..edeaf2e039 100644 --- a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/mpconfigboard.h @@ -1,12 +1,15 @@ -#define MICROPY_HW_BOARD_NAME "SparkFun MicroMod ATP - RP2040" +#define MICROPY_HW_BOARD_NAME "SparkFun MicroMod RP2040 Processor" #define MICROPY_HW_MCU_NAME "rp2040" +// Status LED +#define MICROPY_HW_LED_STATUS (&pin_GPIO25) + #define DEFAULT_I2C_BUS_SCL (&pin_GPIO5) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO4) -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO14) -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO15) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO12) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO22) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO23) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) diff --git a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/mpconfigboard.mk index 2ed559d8db..90f05a1754 100644 --- a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x1B4F USB_PID = 0x0024 -USB_PRODUCT = "MicroMod RP2040" -USB_MANUFACTURER = "SparkFun" +USB_PRODUCT = "SparkFun MicroMod RP2040 Processor" +USB_MANUFACTURER = "SparkFun Electronics" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 diff --git a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c index 90069a7e6f..ea9d38402c 100644 --- a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c @@ -1,105 +1,223 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2021 Chris Wilson + * + * 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 "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - // D (Digital only) pins (D0,D1) - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO6) }, // GPIO6 - D0 - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO7) }, // GPIO7 - D1 + // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. + // The 0th peripheral is the default and the "0" is omitted from the + // peripheral name (e.g. "I2C" instead of "I2C0"). + // + // For more details, see https://www.sparkfun.com/micromod#tech-specs - // A (ADC) pins (A0,A1) - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, // GPIO26 - A0 | ADC0 - { MP_ROM_QSTR(MP_QSTR_ADC0), MP_ROM_PTR(&pin_GPIO26) }, // ADC0 alias - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, // GPIO27 - A1 | ADC1 - { MP_ROM_QSTR(MP_QSTR_ADC1), MP_ROM_PTR(&pin_GPIO27) }, // ADC1 alias + // MicroMod built-in status LED pin + // Requirement from the "Designing with MicroMod" SparkFun article: + // "... every Processor Board shall include one status LED connected to a + // pin that is not connected to the board edge." + // Note: GPIO25 is connected to both the status LED and edge connector pin + // G10, which doesn't comply with the requirement above... + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, // MicroMod LED (GPIO25) - // G (General/BUS) pins (G0-G7, G8 NC, G9-G10, G11 NC) - { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_GPIO16) }, // GPIO16 - G0 | BUS0 - { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_GPIO16) }, // BUS0 alias - { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_GPIO17) }, // GPIO17 - G1 | BUS1 - { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_GPIO17) }, // BUS1 alias - { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_GPIO18) }, // GPIO18 - G2 | BUS2 - { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_GPIO18) }, // BUS2 alias - { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_GPIO19) }, // GPIO19 - G3 | BUS3 - { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_GPIO19) }, // BUS3 alias - { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_GPIO20) }, // GPIO20 - G4 | BUS4 | SPI_CIPO - { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_GPIO20) }, // BUS4 alias - { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_GPIO21) }, // GPIO21 - G5 | BUS5 | SPI_CS - { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_GPIO21) }, // BUS5 alias - { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_GPIO22) }, // GPIO22 - G6 | BUS6 | SPI_SCK - { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_GPIO22) }, // BUS6 alias - { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_GPIO23) }, // GPIO23 - G7 | BUS7 | SPI_COPI - { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_GPIO23) }, // BUS7 alias - // NC - G8 - { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_GPIO28) }, // GPIO28- G9 | BUS9 | ADC_D- | CAM_HSYNC - { MP_ROM_QSTR(MP_QSTR_BUS9), MP_ROM_PTR(&pin_GPIO28) }, // BUS9 alias - { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_GPIO28) }, // ADC_DM alias - { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_GPIO28) }, // CAM_HSYNC alias - { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_GPIO25) }, // GPIO25 - G10 | BUS10 | ADC_D+ | CAM_VSYNC - { MP_ROM_QSTR(MP_QSTR_BUS10), MP_ROM_PTR(&pin_GPIO25) }, // BUS10 alias - { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_GPIO25) }, // ADC_DP alias - { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_GPIO25) }, // CAM_VSYNC alias - // NC - G11 + // MicroMod USB bus input voltage (+5V) pin + // { MP_ROM_QSTR(MP_QSTR_USB_VIN), MP_ROM_PTR() }, // MicroMod USB_VIN (not connected) - // PWM pins (PWM0,PWM1) - { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_GPIO13) }, // GPIO13 - PWM0 - { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_GPIO24) }, // GPIO24 - PWM1 | AUD_MCLK + // MicroMod +3.3V enable pin + // { MP_ROM_QSTR(MP_QSTR_P3V3_EN), MP_ROM_PTR() }, // MicroMod 3.3V_EN (not connected) - // AUD (audio) - { MP_ROM_QSTR(MP_QSTR_AUD_MCLK), MP_ROM_PTR(&pin_GPIO24) }, // GPIO24 - AUD_MCLK | PWM1 - { MP_ROM_QSTR(MP_QSTR_AUD_OUT), MP_ROM_PTR(&pin_GPIO10) }, // GPIO10 - AUD_OUT | SDIO_DAT2 - { MP_ROM_QSTR(MP_QSTR_AUD_IN), MP_ROM_PTR(&pin_GPIO11) }, // GPIO11 - AUD_IN | SDIO_DAT1 - { MP_ROM_QSTR(MP_QSTR_AUD_LRCLK), MP_ROM_PTR(&pin_GPIO2) }, // GPIO2 - AUD_LRCLK | CTS1 - { MP_ROM_QSTR(MP_QSTR_AUD_BCLK), MP_ROM_PTR(&pin_GPIO3) }, // GPIO3 - AUD_BCLK | UART_RTS1 + // MicroMod battery voltage sense pin + { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_GPIO29) }, // MicroMod BATT_VIN/3 (GPIO29) - // Battery Voltage Monitor - { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_GPIO29) }, // GPIO29 - BATT_VIN/3 (ADC03) + // MicroMod reset pin + // { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR() }, // MicroMod RESET# (RP2040 has a dedicated HW RUN pin) + // MicroMod boot pin + // { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR() }, // MicroMod BOOT (RP2040 does not have a dedicated BOOT pin) - // I2C - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO4) }, // GPIO4 - SDA - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO5) }, // GPIO5 - SCL + // MicroMod USB device pins + // USB device is always used internally by CircuitPython, so skip creating + // the pin objects for it. + // { MP_ROM_QSTR(MP_QSTR_USB_DM), MP_ROM_PTR() }, // MicroMod USB_D- (RP2040 has a dedicated HW USB_DM pin) + // { MP_ROM_QSTR(MP_QSTR_USB_DP), MP_ROM_PTR() }, // MicroMod USB_D+ (RP2040 has a dedicated HW USB_DP pin) - { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_GPIO8) }, // GPIO9 - I2C_INT | TX2 + // MicroMod USB host pins + // { MP_ROM_QSTR(MP_QSTR_USBHOST_DM), MP_ROM_PTR() }, // MicroMod USBHOST_D- (RP2040 has a dedicated HW USB_DM pin) + // { MP_ROM_QSTR(MP_QSTR_USBHOST_DP), MP_ROM_PTR() }, // MicroMod USBHOST_D+ (RP2040 has a dedicated HW USB_DP pin) - // SPI - { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_GPIO20) }, // GPIO20 - CIPO | SPI_CIPO | G4 - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, // MISO alias - { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_GPIO23) }, // GPIO23 - COPI | SPI_COPI | G7 - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, // MOSI alias - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO22) }, // GPIO22 - SCK | SPI_SCK | G6 - { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO21) }, // GPIO21 - /CS | SPI_/CS | G5 + // MicroMod CAN pins + // { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR() }, // MicroMod CAN_RX (not supported) + // { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR() }, // MicroMod CAN_TX (not supported) - // SDI/SPI1 - { MP_ROM_QSTR(MP_QSTR_SDIO_CLK), MP_ROM_PTR(&pin_GPIO14) }, // GPIO14 - SDIO SCK | SDIO_CLK - { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_GPIO14) }, // SPI_SCK1 alias - { MP_ROM_QSTR(MP_QSTR_SDIO_CMD), MP_ROM_PTR(&pin_GPIO15) }, // GPIO15 - SDIO CMD | SDIO_CMD - { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_GPIO15) },// SPI_COPI1 alias - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA0), MP_ROM_PTR(&pin_GPIO12) },// GPIO12 - SDIO DATA0 | SDIO_DATA0 - { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_GPIO12) }, // SPI_CIPO1 alias - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA1), MP_ROM_PTR(&pin_GPIO11) },// GPIO11 - SDIO DATA1 | SDIO_DATA1 | AUD_IN - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_GPIO10) },// GPIO10 - SDIO DATA2 | SDIO_DATA2 | AUD_OUT - { MP_ROM_QSTR(MP_QSTR_SDIO_DATA3), MP_ROM_PTR(&pin_GPIO9) },// GPIO9 - SDIO DATA3 | SDIO_DATA3 | SPI_CS1 - { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_GPIO9) }, // SPI_CS1 alias + // Note: MicroMod UART (UART0) is not present in the edge connector pinout + // because the primary debug serial port is exposed as a virtual serial port + // over USB. - // Status LED - { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_GPIO25) }, // GPIO25 - LED_BUILTIN | STAT | Blue LED | G10 + // MicroMod UART1 pins + { MP_ROM_QSTR(MP_QSTR_UART_TX1), MP_ROM_PTR(&pin_GPIO0) }, // MicroMod UART_TX1 | CircuitPython TX (GPIO0) + { MP_ROM_QSTR(MP_QSTR_UART_RX1), MP_ROM_PTR(&pin_GPIO1) }, // MicroMod UART_RX1 | CircuitPython RX (GPIO1) + { MP_ROM_QSTR(MP_QSTR_UART_RTS1), MP_ROM_PTR(&pin_GPIO3) }, // MicroMod RTS1 (GPIO3) + { MP_ROM_QSTR(MP_QSTR_UART_CTS1), MP_ROM_PTR(&pin_GPIO2) }, // MicroMod CTS1 (GPIO2) - // UART - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, // GPIO1 - UART RX | UART_RX1 | RX1 - { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_GPIO1) }, // RX1 alias - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, // GPIO0 - UART TX | UART_TX1 | TX1 - { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_GPIO0) }, // TX1 alias - { MP_ROM_QSTR(MP_QSTR_CTS), MP_ROM_PTR(&pin_GPIO2) }, // GPIO2 - UART CTS | CTS1 (TRACEDATA3) - { MP_ROM_QSTR(MP_QSTR_CTS1), MP_ROM_PTR(&pin_GPIO2) }, // CTS1 alias - { MP_ROM_QSTR(MP_QSTR_RTS), MP_ROM_PTR(&pin_GPIO3) }, // GPIO3 - UART RTS | RTS1 - { MP_ROM_QSTR(MP_QSTR_RTS1), MP_ROM_PTR(&pin_GPIO3) }, // RTS1 alias + // CircuitPython default UART pins + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, // CircuitPython TX | MicroMod UART_TX1 (GPIO0) + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, // CircuitPython RX | MicroMod UART_RX1 (GPIO1) - { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_GPIO9) }, // GPIO9 - UART RX | UART_RX2 | RX2 | SDIO_DAT3 | SPI_CS1 - { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_GPIO8) }, // GPIO8 - UART TX | UART_TX2 | TX2 | I2C_INT + // MicroMod UART2 pins + { MP_ROM_QSTR(MP_QSTR_UART_TX2), MP_ROM_PTR(&pin_GPIO8) }, // MicroMod UART_TX2 (GPIO8) + { MP_ROM_QSTR(MP_QSTR_UART_RX2), MP_ROM_PTR(&pin_GPIO9) }, // MicroMod UART_RX2 (GPIO9) - // Board objects - { 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) }, + // MicroMod I2C pins + { MP_ROM_QSTR(MP_QSTR_I2C_SDA), MP_ROM_PTR(&pin_GPIO4) }, // MicroMod I2C_SDA | CircuitPython SDA (GPIO4) + { MP_ROM_QSTR(MP_QSTR_I2C_SCL), MP_ROM_PTR(&pin_GPIO5) }, // MicroMod I2C_SCL | CircuitPython SCL (GPIO5) + // CircuitPython default I2C pins + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO4) }, // CircuitPython SDA | MicroMod I2C_SDA (GPIO4) + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO5) }, // CircuitPython SCL | MicroMod I2C_SCL (GPIO5) + + // MicroMod I2C interrupt pin + { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_GPIO8) }, // MicroMod I2C_INT (GPIO8) + + // MicroMod I2C1 pins + // { MP_ROM_QSTR(MP_QSTR_I2C_SDA1), MP_ROM_PTR() }, // MicroMod I2C_SDA1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_I2C_SCL1), MP_ROM_PTR() }, // MicroMod I2C_SCL1 (not connected) + + // MicroMod SPI pins + { MP_ROM_QSTR(MP_QSTR_SPI_CIPO), MP_ROM_PTR(&pin_GPIO20) }, // MicroMod SPI_CIPO | CircuitPython CIPO (GPIO20) + { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_GPIO20) }, // MicroMod SPI_MISO | CircuitPython MISO (GPIO20) + { MP_ROM_QSTR(MP_QSTR_SPI_COPI), MP_ROM_PTR(&pin_GPIO23) }, // MicroMod SPI_COPI | CircuitPython COPI | LED_DAT (GPIO23) + { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_GPIO23) }, // MicroMod SPI_MOSI | CircuitPython MOSI (GPIO23) + { MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_GPIO22) }, // MicroMod SPI_SCK | CircuitPython SCK | LED_CLK (GPIO22) + { MP_ROM_QSTR(MP_QSTR_SPI_CS), MP_ROM_PTR(&pin_GPIO21) }, // MicroMod SPI_CS | CircuitPython CS (GPIO21) + + // CircuitPython default SPI pins + { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_GPIO20) }, // CircuitPython CIPO | MicroMod SPI_CIPO (GPIO20) + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, // CircuitPython MISO | MicroMod SPI_MISO (GPIO20) + { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_GPIO23) }, // CircuitPython COPI | MicroMod SPI_COPI | LED_DAT (GPIO23) + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, // CircuitPython MOSI | MicroMod SPI_MOSI (GPIO23) + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO22) }, // CircuitPython SCK | MicroMod SPI_SCK | LED_CLK (GPIO22) + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO21) }, // CircuitPython CS | MicroMod SPI_CS (GPIO21) + + // MicroMod 2-wire serial LED pins + { MP_ROM_QSTR(MP_QSTR_LED_DAT), MP_ROM_PTR(&pin_GPIO23) }, // MicroMod LED_DAT | SPI_COPI + { MP_ROM_QSTR(MP_QSTR_LED_CLK), MP_ROM_PTR(&pin_GPIO22) }, // MicroMod LED_CLK | SPI_SCK + + // MicroMod SDIO pins + { MP_ROM_QSTR(MP_QSTR_SDIO_CLK), MP_ROM_PTR(&pin_GPIO14) }, // MicroMod SDIO_SCK | SPI_SCK1 (GPIO14) + { MP_ROM_QSTR(MP_QSTR_SDIO_CMD), MP_ROM_PTR(&pin_GPIO15) }, // MicroMod SDIO_CMD | SPI_COPI1 (GPIO15) + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA0), MP_ROM_PTR(&pin_GPIO12) }, // MicroMod SDIO_DATA0 | SPI_CIPO1 (GPIO12) + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA1), MP_ROM_PTR(&pin_GPIO11) }, // MicroMod SDIO_DATA1 (GPIO11) + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_GPIO10) }, // MicroMod SDIO_DATA2 (GPIO10) + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA3), MP_ROM_PTR(&pin_GPIO9) }, // MicroMod SDIO_DATA3 | SPI_CS1 (GPIO9) + + // MicroMod SPI1 pins + { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR(&pin_GPIO12) }, // MicroMod SPI_CIPO1 | SDIO_DATA0 (GPIO12) + { MP_ROM_QSTR(MP_QSTR_SPI_MISO1), MP_ROM_PTR(&pin_GPIO12) }, // MicroMod SPI_MISO1 (GPIO12) + { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR(&pin_GPIO15) }, // MicroMod SPI_COPI1 | SDIO_CMD (GPIO15) + { MP_ROM_QSTR(MP_QSTR_SPI_MOSI1), MP_ROM_PTR(&pin_GPIO15) }, // MicroMod SPI_MOSI1 (GPIO15) + { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR(&pin_GPIO14) }, // MicroMod SPI_SCK1 | SDIO_SCK (GPIO14) + { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR(&pin_GPIO9) }, // MicroMod SPI_CS1 | SDIO_DATA3 (GPIO9) + + // MicroMod audio pins + { MP_ROM_QSTR(MP_QSTR_AUD_MCLK), MP_ROM_PTR(&pin_GPIO24) }, // MicroMod AUD_MCLK (GPIO24) + { MP_ROM_QSTR(MP_QSTR_AUD_OUT), MP_ROM_PTR(&pin_GPIO10) }, // MicroMod AUD_OUT | I2S_OUT | PCM_OUT | CAM_MCLK (GPIO10) + { MP_ROM_QSTR(MP_QSTR_AUD_IN), MP_ROM_PTR(&pin_GPIO11) }, // MicroMod AUD_IN | I2S_IN | PCM_IN | CAM_PCLK (GPIO11) + { MP_ROM_QSTR(MP_QSTR_AUD_LRCLK), MP_ROM_PTR(&pin_GPIO2) }, // MicroMod AUD_LRCLK | I2S_WS | PCM_SYNC | PDM_DATA (GPIO2) + { MP_ROM_QSTR(MP_QSTR_AUD_BCLK), MP_ROM_PTR(&pin_GPIO3) }, // MicroMod AUD_BCLK | I2S_SCK | PCM_CLK | PDM_CLK (GPIO3) + + // MicroMod I2S pins + { MP_ROM_QSTR(MP_QSTR_I2S_OUT), MP_ROM_PTR(&pin_GPIO10) }, // MicroMod I2S_OUT | AUD_OUT | PCM_OUT | CAM_MCLK (GPIO10) + { MP_ROM_QSTR(MP_QSTR_I2S_IN), MP_ROM_PTR(&pin_GPIO11) }, // MicroMod I2S_IN | AUD_IN | PCM_IN | CAM_PCLK (GPIO11) + { MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_GPIO2) }, // MicroMod I2S_WS | AUD_LRCLK | PCM_SYNC | PDM_DATA (GPIO2) + { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO3) }, // MicroMod I2S_SCK | AUD_BCLK | PCM_CLK | PDM_CLK (GPIO3) + + // MicroMod PCM pins + { MP_ROM_QSTR(MP_QSTR_PCM_OUT), MP_ROM_PTR(&pin_GPIO10) }, // MicroMod PCM_OUT | AUD_OUT | I2S_OUT | CAM_MCLK (GPIO10) + { MP_ROM_QSTR(MP_QSTR_PCM_IN), MP_ROM_PTR(&pin_GPIO11) }, // MicroMod PCM_IN | AUD_IN | I2S_IN | CAM_PCLK (GPIO11) + { MP_ROM_QSTR(MP_QSTR_PCM_SYNC), MP_ROM_PTR(&pin_GPIO2) }, // MicroMod PCM_SYNC | AUD_LRCLK | I2S_WS | PDM_DATA (GPIO2) + { MP_ROM_QSTR(MP_QSTR_PCM_CLK), MP_ROM_PTR(&pin_GPIO3) }, // MicroMod PCM_CLK | AUD_BCLK | I2S_SCK | PDM_CLK (GPIO3) + + // MicroMod PDM pins + { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_GPIO2) }, // MicroMod PDM_DATA | AUD_LRCLK | I2S_WS | PCM_SYNC (GPIO2) + { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_GPIO3) }, // MicroMod PDM_CLK | AUD_BCLK | I2S_SCK | PCM_CLK (GPIO3) + + // MicroMod SWD pins + // { MP_ROM_QSTR(MP_QSTR_SWDIO), MP_ROM_PTR() }, // MicroMod SWDIO (RP2040 has a dedicated HW SWDIO pin) + // { MP_ROM_QSTR(MP_QSTR_SWCLK), MP_ROM_PTR() }, // MicroMod SWDCK (RP2040 has a dedicated HW SWCLK pin) + // { MP_ROM_QSTR(MP_QSTR_SWO), MP_ROM_PTR() }, // MicroMod SWO | G11 (not supported) + + // MicroMod ADC pins + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, // MicroMod A0 (GPIO26) + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, // MicroMod A1 (GPIO27) + + // MicroMod PWM pins + { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_GPIO13) }, // MicroMod PWM0 (GPIO13) + { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_GPIO24) }, // MicroMod PWM1 (GPIO24) + + // MicroMod digital pins + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO6) }, // MicroMod D0 (GPIO6) + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO7) }, // MicroMod D1 | CAM_TRIG (GPIO7) + + // MicroMod general purpose pins + { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_GPIO16) }, // MicroMod G0 | BUS0 (GPIO16) + { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_GPIO17) }, // MicroMod G1 | BUS1 (GPIO17) + { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_GPIO18) }, // MicroMod G2 | BUS2 (GPIO18) + { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_GPIO19) }, // MicroMod G3 | BUS3 (GPIO19) + { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_GPIO20) }, // MicroMod G4 | BUS4 (GPIO20) + { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_GPIO21) }, // MicroMod G5 | BUS5 (GPIO21) + { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_GPIO22) }, // MicroMod G6 | BUS6 (GPIO22) + { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR(&pin_GPIO23) }, // MicroMod G7 | BUS7 (GPIO23) + // { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR() }, // MicroMod G8 (not connected) + { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_GPIO28) }, // MicroMod G9 | ADC_D- | CAM_HSYNC (GPIO28) + { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_GPIO25) }, // MicroMod G10 | ADC_D+ | CAM_VSYNC (GPIO25) + // { MP_ROM_QSTR(MP_QSTR_G11), MP_ROM_PTR() }, // MicroMod G11 | SWO (not connected) + + // MicroMod 8-bit bus pins + { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_GPIO16) }, // MicroMod BUS0 | G0 (GPIO16) + { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_GPIO17) }, // MicroMod BUS1 | G1 (GPIO17) + { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_GPIO18) }, // MicroMod BUS2 | G2 (GPIO18) + { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_GPIO19) }, // MicroMod BUS3 | G3 (GPIO19) + { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_GPIO20) }, // MicroMod BUS4 | G4 (GPIO20) + { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_GPIO21) }, // MicroMod BUS5 | G5 (GPIO21) + { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_GPIO22) }, // MicroMod BUS6 | G6 (GPIO22) + { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR(&pin_GPIO23) }, // MicroMod BUS7 | G7 (GPIO23) + + // MicroMod differential ADC input pins (not supported by RP2040) + // { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR(&pin_GPIO28) }, // MicroMod ADC_D- | G9 | CAM_HSYNC (GPIO28) + // { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_GPIO25) }, // MicroMod ADC_D+ | G10 | CAM_VSYNC (GPIO25) + + // MicroMod camera pins + { MP_ROM_QSTR(MP_QSTR_CAM_MCLK), MP_ROM_PTR(&pin_GPIO10) }, // MicroMod CAM_MCLK | AUD_OUT | I2S_OUT | PCM_OUT (GPIO10) + { MP_ROM_QSTR(MP_QSTR_CAM_PCLK), MP_ROM_PTR(&pin_GPIO11) }, // MicroMod CAM_PCLK | AUD_IN | I2S_IN | PCM_IN (GPIO11) + { MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_GPIO7) }, // MicroMod CAM_TRIG | D1 (GPIO7) + { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR(&pin_GPIO28) }, // MicroMod CAM_HSYNC | ADC_D- | G9 (GPIO28) + { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_GPIO25) }, // MicroMod CAM_VSYNC | ADC_D+ | G10 (GPIO25) + + // CircuitPython board objects + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, // CircuitPython I2C + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, // CircuitPython SPI + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, // CircuitPython UART }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From c0902dade6c20c4106af8fbe54a96ba619e449d0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 9 Aug 2021 22:54:20 -0700 Subject: [PATCH 122/418] stm/boards: Add support for SparkFun STM32 MicroMod Processor board. --- .github/workflows/build.yml | 1 + .../sparkfun_stm32f405_micromod/board.c | 39 +++ .../mpconfigboard.h | 65 +++++ .../mpconfigboard.mk | 19 ++ .../boards/sparkfun_stm32f405_micromod/pins.c | 224 ++++++++++++++++++ 5 files changed, 348 insertions(+) create mode 100644 ports/stm/boards/sparkfun_stm32f405_micromod/board.c create mode 100644 ports/stm/boards/sparkfun_stm32f405_micromod/mpconfigboard.h create mode 100644 ports/stm/boards/sparkfun_stm32f405_micromod/mpconfigboard.mk create mode 100644 ports/stm/boards/sparkfun_stm32f405_micromod/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 744ef02f48..606c9914cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -369,6 +369,7 @@ jobs: - "sparkfun_samd21_mini" - "sparkfun_samd51_micromod" - "sparkfun_samd51_thing_plus" + - "sparkfun_stm32f405_micromod" - "sparkfun_thing_plus_rp2040" - "spresense" - "stackrduino_m0_pro" diff --git a/ports/stm/boards/sparkfun_stm32f405_micromod/board.c b/ports/stm/boards/sparkfun_stm32f405_micromod/board.c new file mode 100644 index 0000000000..f8e462f938 --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32f405_micromod/board.c @@ -0,0 +1,39 @@ +/* + * 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 "supervisor/board.h" +#include "mpconfigboard.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/stm/boards/sparkfun_stm32f405_micromod/mpconfigboard.h b/ports/stm/boards/sparkfun_stm32f405_micromod/mpconfigboard.h new file mode 100644 index 0000000000..ed3a643322 --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32f405_micromod/mpconfigboard.h @@ -0,0 +1,65 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Chris Wilson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "SparkFun STM32 MicroMod Processor" +#define MICROPY_HW_MCU_NAME "STM32F405RG" + +#define FLASH_SIZE (0x100000) +#define FLASH_PAGE_SIZE (0x4000) + +#define HSE_VALUE ((uint32_t)12000000) +#define LSE_VALUE ((uint32_t)32768) +#define BOARD_HAS_LOW_SPEED_CRYSTAL (1) + +// Status LED +#define MICROPY_HW_LED_STATUS (&pin_PA15) + +// On-board SPI flash +#define SPI_FLASH_MOSI_PIN (&pin_PC12) +#define SPI_FLASH_MISO_PIN (&pin_PC11) +#define SPI_FLASH_SCK_PIN (&pin_PC10) +#define SPI_FLASH_CS_PIN (&pin_PC03) + +// Bootloader only +#ifdef UF2_BOOTLOADER_ENABLED + #define BOARD_VTOR_DEFER (1) // Leave VTOR relocation to bootloader +#endif + +#define DEFAULT_I2C_BUS_SCL (&pin_PB10) +#define DEFAULT_I2C_BUS_SDA (&pin_PB11) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA05) +#define DEFAULT_SPI_BUS_MOSI (&pin_PA07) +#define DEFAULT_SPI_BUS_MISO (&pin_PA06) + +#define DEFAULT_UART_BUS_RX (&pin_PA03) +#define DEFAULT_UART_BUS_TX (&pin_PA02) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA11 (1) +#define IGNORE_PIN_PA12 (1) diff --git a/ports/stm/boards/sparkfun_stm32f405_micromod/mpconfigboard.mk b/ports/stm/boards/sparkfun_stm32f405_micromod/mpconfigboard.mk new file mode 100644 index 0000000000..d1df685c67 --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32f405_micromod/mpconfigboard.mk @@ -0,0 +1,19 @@ +USB_VID = 0X1B4F +USB_PID = 0x0027 +USB_PRODUCT = "SparkFun STM32 MicroMod Processor" +USB_MANUFACTURER = "SparkFun Electronics" + +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = W25Q128JVxM + +MCU_SERIES = F4 +MCU_VARIANT = STM32F405xx +MCU_PACKAGE = LQFP64 + +LD_COMMON = boards/common_default.ld +LD_DEFAULT = boards/STM32F405_default.ld +# UF2 boot option +LD_BOOT = boards/STM32F405_boot.ld +UF2_OFFSET = 0x8010000 + +CIRCUITPY_RGBMATRIX ?= 1 diff --git a/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c b/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c new file mode 100644 index 0000000000..2379e9a371 --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c @@ -0,0 +1,224 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Chris Wilson + * + * 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 "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. + // The 0th peripheral is the default and the "0" is omitted from the + // peripheral name (e.g. "I2C" instead of "I2C0"). + // + // For more details, see https://www.sparkfun.com/micromod#tech-specs + + // MicroMod built-in status LED pin + // Requirement from the "Designing with MicroMod" SparkFun article: + // "... every Processor Board shall include one status LED connected to a + // pin that is not connected to the board edge." + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA15) }, // MicroMod LED (PA15) + + // MicroMod USB bus input voltage (+5V) pin + // { MP_ROM_QSTR(MP_QSTR_USB_VIN), MP_ROM_PTR() }, // MicroMod USB_VIN (not connected) + + // MicroMod +3.3V enable pin + // { MP_ROM_QSTR(MP_QSTR_P3V3_EN), MP_ROM_PTR() }, // MicroMod 3.3V_EN (not connected) + + // MicroMod battery voltage sense pin + { MP_ROM_QSTR(MP_QSTR_BATT_VIN3), MP_ROM_PTR(&pin_PA01) }, // MicroMod BATT_VIN/3 (PA1) + + // MicroMod reset pin + // { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR() }, // MicroMod RESET# (STM32 has a dedicated HW NRST pin) + + // MicroMod boot pin + // { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR() }, // MicroMod BOOT (STM32 has a dedicated HW BOOT0 pin) + + // MicroMod USB device pins + // USB device is always used internally by CircuitPython, so skip creating + // the pin objects for it. See explicit ignores in mpconfigboard.h. + // { MP_ROM_QSTR(MP_QSTR_USB_DM), MP_ROM_PTR(&pin_PA11) }, // MicroMod USB_D- (PA11) + // { MP_ROM_QSTR(MP_QSTR_USB_DP), MP_ROM_PTR(&pin_PA12) }, // MicroMod USB_D+ (PA12) + + // MicroMod USB host pins + { MP_ROM_QSTR(MP_QSTR_USBHOST_DM), MP_ROM_PTR(&pin_PB14) }, // MicroMod USBHOST_D- (PB14) + { MP_ROM_QSTR(MP_QSTR_USBHOST_DP), MP_ROM_PTR(&pin_PB15) }, // MicroMod USBHOST_D+ (PB15) + + // MicroMod CAN pins + { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB08) }, // MicroMod CAN_RX (PB8) + { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB09) }, // MicroMod CAN_TX (PB9) + + // Note: MicroMod UART (UART0) is not present in the edge connector pinout + // because the primary debug serial port is exposed as a virtual serial port + // over USB. + + // MicroMod UART1 pins + { MP_ROM_QSTR(MP_QSTR_UART_TX1), MP_ROM_PTR(&pin_PA02) }, // MicroMod UART_TX1 | CircuitPython TX (PA2) + { MP_ROM_QSTR(MP_QSTR_UART_RX1), MP_ROM_PTR(&pin_PA03) }, // MicroMod UART_RX1 | CircuitPython RX (PA3) + // { MP_ROM_QSTR(MP_QSTR_UART_RTS1), MP_ROM_PTR() }, // MicroMod RTS1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_UART_CTS1), MP_ROM_PTR() }, // MicroMod CTS1 (not connected) + + // CircuitPython default UART pins + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA02) }, // CircuitPython TX | MicroMod UART_TX1 (PA2) + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA03) }, // CircuitPython RX | MicroMod UART_RX1 (PA3) + + // MicroMod UART2 pins + // { MP_ROM_QSTR(MP_QSTR_UART_TX2), MP_ROM_PTR() }, // MicroMod UART_TX2 (not connected) + // { MP_ROM_QSTR(MP_QSTR_UART_RX2), MP_ROM_PTR() }, // MicroMod UART_RX2 (not connected) + + // MicroMod I2C pins + { MP_ROM_QSTR(MP_QSTR_I2C_SDA), MP_ROM_PTR(&pin_PB11) }, // MicroMod I2C_SDA | CircuitPython SDA (PB11) + { MP_ROM_QSTR(MP_QSTR_I2C_SCL), MP_ROM_PTR(&pin_PB10) }, // MicroMod I2C_SCL | CircuitPython SCL (PB10) + + // CircuitPython default I2C pins + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB11) }, // CircuitPython SDA | MicroMod I2C_SDA (PB11) + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB10) }, // CircuitPython SCL | MicroMod I2C_SCL (PB10) + + // MicroMod I2C interrupt pin + { MP_ROM_QSTR(MP_QSTR_I2C_INT), MP_ROM_PTR(&pin_PB01) }, // MicroMod I2C_INT (PB1) + + // MicroMod I2C1 pins + { MP_ROM_QSTR(MP_QSTR_I2C_SDA1), MP_ROM_PTR(&pin_PB07) }, // MicroMod I2C_SDA1 (PB7) + { MP_ROM_QSTR(MP_QSTR_I2C_SCL1), MP_ROM_PTR(&pin_PB06) }, // MicroMod I2C_SCL1 (PB6) + + // MicroMod SPI pins + { MP_ROM_QSTR(MP_QSTR_SPI_CIPO), MP_ROM_PTR(&pin_PA06) }, // MicroMod SPI_CIPO | CircuitPython CIPO (PA6) + { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PA06) }, // MicroMod SPI_MISO | CircuitPython MISO (PA6) + { MP_ROM_QSTR(MP_QSTR_SPI_COPI), MP_ROM_PTR(&pin_PA07) }, // MicroMod SPI_COPI | CircuitPython COPI | LED_DAT (PA7) + { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PA07) }, // MicroMod SPI_MOSI | CircuitPython MOSI (PA7) + { MP_ROM_QSTR(MP_QSTR_SPI_SCK), MP_ROM_PTR(&pin_PA05) }, // MicroMod SPI_SCK | CircuitPython SCK | LED_CLK (PA5) + { MP_ROM_QSTR(MP_QSTR_SPI_CS), MP_ROM_PTR(&pin_PA04) }, // MicroMod SPI_CS | CircuitPython CS (PC4) + + // CircuitPython default SPI pins + { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_PA06) }, // CircuitPython CIPO | MicroMod SPI_CIPO (PA6) + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA06) }, // CircuitPython MISO | MicroMod SPI_MISO (PA6) + { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_PA07) }, // CircuitPython COPI | MicroMod SPI_COPI | LED_DAT (PA7) + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA07) }, // CircuitPython MOSI | MicroMod SPI_MOSI (PA7) + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA05) }, // CircuitPython SCK | MicroMod SPI_SCK | LED_CLK (PA5) + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_PA04) }, // CircuitPython CS | MicroMod SPI_CS (PC4) + + // MicroMod 2-wire serial LED pins + { MP_ROM_QSTR(MP_QSTR_LED_DAT), MP_ROM_PTR(&pin_PA07) }, // MicroMod LED_DAT | SPI_COPI (PA7) + { MP_ROM_QSTR(MP_QSTR_LED_CLK), MP_ROM_PTR(&pin_PA05) }, // MicroMod LED_CLK | SPI_SCK (PA5) + + // MicroMod SDIO pins + // { MP_ROM_QSTR(MP_QSTR_SDIO_CLK), MP_ROM_PTR() }, // MicroMod SDIO_SCK | SPI_SCK1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_CMD), MP_ROM_PTR() }, // MicroMod SDIO_CMD | SPI_COPI1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_DATA0), MP_ROM_PTR() }, // MicroMod SDIO_DATA0 | SPI_CIPO1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_DATA1), MP_ROM_PTR() }, // MicroMod SDIO_DATA1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR() }, // MicroMod SDIO_DATA2 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SDIO_DATA3), MP_ROM_PTR() }, // MicroMod SDIO_DATA3 | SPI_CS1 (not connected) + + // MicroMod SPI1 pins + // { MP_ROM_QSTR(MP_QSTR_SPI_CIPO1), MP_ROM_PTR() }, // MicroMod SPI_CIPO1 | SDIO_DATA0 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_MISO1), MP_ROM_PTR() }, // MicroMod SPI_MISO1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_COPI1), MP_ROM_PTR() }, // MicroMod SPI_COPI1 | SDIO_CMD (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_MOSI1), MP_ROM_PTR() }, // MicroMod SPI_MOSI1 (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_SCK1), MP_ROM_PTR() }, // MicroMod SPI_SCK1 | SDIO_SCK (not connected) + // { MP_ROM_QSTR(MP_QSTR_SPI_CS1), MP_ROM_PTR() }, // MicroMod SPI_CS1 | SDIO_DATA3 (not connected) + + // MicroMod audio pins + // { MP_ROM_QSTR(MP_QSTR_AUD_MCLK), MP_ROM_PTR() }, // MicroMod AUD_MCLK (not connected) + // { MP_ROM_QSTR(MP_QSTR_AUD_OUT), MP_ROM_PTR(&pin_PB04) }, // MicroMod AUD_OUT | I2S_OUT | PCM_OUT | CAM_MCLK (PB4) + // { MP_ROM_QSTR(MP_QSTR_AUD_IN), MP_ROM_PTR(&pin_PB05) }, // MicroMod AUD_IN | I2S_IN | PCM_IN | CAM_PCLK (PB5) + // { MP_ROM_QSTR(MP_QSTR_AUD_LRCLK), MP_ROM_PTR(&pin_PA04) }, // MicroMod AUD_LRCLK | I2S_WS | PCM_SYNC | PDM_DATA (PA4) + // { MP_ROM_QSTR(MP_QSTR_AUD_BCLK), MP_ROM_PTR(&pin_PB03) }, // MicroMod AUD_BCLK | I2S_SCK | PCM_CLK | PDM_CLK (PB3) + + // MicroMod I2S pins + { MP_ROM_QSTR(MP_QSTR_I2S_OUT), MP_ROM_PTR(&pin_PB04) }, // MicroMod I2S_OUT | AUD_OUT | PCM_OUT | CAM_MCLK (PB4) + { MP_ROM_QSTR(MP_QSTR_I2S_IN), MP_ROM_PTR(&pin_PB05) }, // MicroMod I2S_IN | AUD_IN | PCM_IN | CAM_PCLK (PB5) + { MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_PA04) }, // MicroMod I2S_WS | AUD_LRCLK | PCM_SYNC | PDM_DATA (PA4) + { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_PB03) }, // MicroMod I2S_SCK | AUD_BCLK | PCM_CLK | PDM_CLK (PB3) + + // MicroMod PCM pins + { MP_ROM_QSTR(MP_QSTR_PCM_OUT), MP_ROM_PTR(&pin_PB04) }, // MicroMod PCM_OUT | AUD_OUT | I2S_OUT | CAM_MCLK (PB4) + { MP_ROM_QSTR(MP_QSTR_PCM_IN), MP_ROM_PTR(&pin_PB05) }, // MicroMod PCM_IN | AUD_IN | I2S_IN | CAM_PCLK (PB5) + { MP_ROM_QSTR(MP_QSTR_PCM_SYNC), MP_ROM_PTR(&pin_PA04) }, // MicroMod PCM_SYNC | AUD_LRCLK | I2S_WS | PDM_DATA (PA4) + { MP_ROM_QSTR(MP_QSTR_PCM_CLK), MP_ROM_PTR(&pin_PB03) }, // MicroMod PCM_CLK | AUD_BCLK | I2S_SCK | PDM_CLK (PB3) + + // MicroMod PDM pins + { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_PA04) }, // MicroMod PDM_DATA | AUD_LRCLK | I2S_WS | PCM_SYNC (PA4) + { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_PB03) }, // MicroMod PDM_CLK | AUD_BCLK | I2S_SCK | PCM_CLK (PB3) + + // MicroMod SWD pins + { MP_ROM_QSTR(MP_QSTR_SWDIO), MP_ROM_PTR(&pin_PA13) }, // MicroMod SWDIO (PA13) + { MP_ROM_QSTR(MP_QSTR_SWCLK), MP_ROM_PTR(&pin_PA14) }, // MicroMod SWDCK (PA14) + // { MP_ROM_QSTR(MP_QSTR_SWO), MP_ROM_PTR() }, // MicroMod SWO | G11 (not connected) + + // MicroMod ADC pins + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PC05) }, // MicroMod A0 (PC5) + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB00) }, // MicroMod A1 (PB0) + + // MicroMod PWM pins + { MP_ROM_QSTR(MP_QSTR_PWM0), MP_ROM_PTR(&pin_PC06) }, // MicroMod PWM0 (PC6) + { MP_ROM_QSTR(MP_QSTR_PWM1), MP_ROM_PTR(&pin_PC07) }, // MicroMod PWM1 (PC7) + + // MicroMod digital pins + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PC00) }, // MicroMod D0 (PC0) + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC01) }, // MicroMod D1 | CAM_TRIG (PC1) + + // MicroMod general purpose pins + { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_PD02) }, // MicroMod G0 | BUS0 (PD2) + { MP_ROM_QSTR(MP_QSTR_G1), MP_ROM_PTR(&pin_PA08) }, // MicroMod G1 | BUS1 (PA8) + { MP_ROM_QSTR(MP_QSTR_G2), MP_ROM_PTR(&pin_PA00) }, // MicroMod G2 | BUS2 (PA0) + { MP_ROM_QSTR(MP_QSTR_G3), MP_ROM_PTR(&pin_PC08) }, // MicroMod G3 | BUS3 (PC8) + { MP_ROM_QSTR(MP_QSTR_G4), MP_ROM_PTR(&pin_PC09) }, // MicroMod G4 | BUS4 (PC9) + { MP_ROM_QSTR(MP_QSTR_G5), MP_ROM_PTR(&pin_PC13) }, // MicroMod G5 | BUS5 (PC13) + { MP_ROM_QSTR(MP_QSTR_G6), MP_ROM_PTR(&pin_PC02) }, // MicroMod G6 | BUS6 (PC2) + // { MP_ROM_QSTR(MP_QSTR_G7), MP_ROM_PTR() }, // MicroMod G7 | BUS7 (not connected) + // { MP_ROM_QSTR(MP_QSTR_G8), MP_ROM_PTR() }, // MicroMod G8 (not connected) + // { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR() }, // MicroMod G9 | ADC_D- | CAM_HSYNC (not connected) + { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_PB13) }, // MicroMod G10 | ADC_D+ | CAM_VSYNC (PB13) + { MP_ROM_QSTR(MP_QSTR_G11), MP_ROM_PTR(&pin_PB12) }, // MicroMod G11 | SWO (PB12) + + // MicroMod 8-bit bus pins + { MP_ROM_QSTR(MP_QSTR_BUS0), MP_ROM_PTR(&pin_PD02) }, // MicroMod BUS0 | G0 (PD2) + { MP_ROM_QSTR(MP_QSTR_BUS1), MP_ROM_PTR(&pin_PA08) }, // MicroMod BUS1 | G1 (PA8) + { MP_ROM_QSTR(MP_QSTR_BUS2), MP_ROM_PTR(&pin_PA00) }, // MicroMod BUS2 | G2 (PA0) + { MP_ROM_QSTR(MP_QSTR_BUS3), MP_ROM_PTR(&pin_PC08) }, // MicroMod BUS3 | G3 (PC8) + { MP_ROM_QSTR(MP_QSTR_BUS4), MP_ROM_PTR(&pin_PC09) }, // MicroMod BUS4 | G4 (PC9) + { MP_ROM_QSTR(MP_QSTR_BUS5), MP_ROM_PTR(&pin_PC13) }, // MicroMod BUS5 | G5 (PC13) + { MP_ROM_QSTR(MP_QSTR_BUS6), MP_ROM_PTR(&pin_PC02) }, // MicroMod BUS6 | G6 (PC2) + // { MP_ROM_QSTR(MP_QSTR_BUS7), MP_ROM_PTR() }, // MicroMod BUS7 | G7 (not connected) + + // MicroMod differential ADC input pins + // { MP_ROM_QSTR(MP_QSTR_ADC_DM), MP_ROM_PTR() }, // MicroMod ADC_D- | G9 | CAM_HSYNC (not connected) + // { MP_ROM_QSTR(MP_QSTR_ADC_DP), MP_ROM_PTR(&pin_PB13) }, // MicroMod ADC_D+ | G10 | CAM_VSYNC (PB13) + + // MicroMod camera pins + // { MP_ROM_QSTR(MP_QSTR_CAM_MCLK), MP_ROM_PTR(&pin_PB04) }, // MicroMod CAM_MCLK | AUD_OUT | I2S_OUT | PCM_OUT (PB4) + // { MP_ROM_QSTR(MP_QSTR_CAM_PCLK), MP_ROM_PTR(&pin_PB05) }, // MicroMod CAM_PCLK | AUD_IN | I2S_IN | PCM_IN (PB5) + // { MP_ROM_QSTR(MP_QSTR_CAM_TRIG), MP_ROM_PTR(&pin_PC01) }, // MicroMod CAM_TRIG | D1 (PC1) + // { MP_ROM_QSTR(MP_QSTR_CAM_HSYNC), MP_ROM_PTR() }, // MicroMod CAM_HSYNC | ADC_D- | G9 (not connected) + // { MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_PB13) }, // MicroMod CAM_VSYNC | ADC_D+ | G10 (PB13) + + // Module-specific aliases (not part of the MicroMod spec) + { MP_ROM_QSTR(MP_QSTR_HOST_VBUS), MP_ROM_PTR(&pin_PB13) }, // HOST_VBUS | G10 | ADC_D+ | CAM_VSYNC (PB13) + { MP_ROM_QSTR(MP_QSTR_HOST_ID), MP_ROM_PTR(&pin_PB12) }, // HOST_ID | G11 | SWO (PB12) + + // CircuitPython board objects + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, // CircuitPython I2C + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, // CircuitPython SPI + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, // CircuitPython UART +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From e587bd7dc047716f6254f9e6f6368cfc28ab8152 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Tue, 10 Aug 2021 11:17:06 +0100 Subject: [PATCH 123/418] Added final USB PIDs --- .../raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk | 4 ++-- ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk index a513a1df11..b52b31a9d9 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x16D0 -USB_PID = 0x08C7 +USB_VID = 0x2E8A +USB_PID = 0x1009 USB_PRODUCT = "Interstate 75" USB_MANUFACTURER = "Pimoroni" diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk index 3b2ef47fe8..10bfb5cc87 100644 --- a/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x16D0 -USB_PID = 0x08C7 +USB_VID = 0x2E8A +USB_PID = 0x100a USB_PRODUCT = "Plasma 2040" USB_MANUFACTURER = "Pimoroni" From f0859ac954e71e00e298843dc7f9f9c09a9bf570 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 10 Aug 2021 15:23:45 -0700 Subject: [PATCH 124/418] Switch SAMD21 ticks to PER event The EVSYS is used to generate an interrupt from the event. This simplifies timing used in pulseio that conflicted with the auto-reload countdown. Fixes #3890 --- lib/utils/pyexec.c | 2 +- ports/atmel-samd/audio_dma.c | 30 +---- ports/atmel-samd/audio_dma.h | 2 + ports/atmel-samd/supervisor/port.c | 187 ++++++++++++++++++----------- 4 files changed, 126 insertions(+), 95 deletions(-) diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index 50f73fc170..bc47f61829 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -149,7 +149,7 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input mp_hal_stdout_tx_strn("\x04", 1); } // check for SystemExit - if (mp_obj_is_subclass_fast(MP_OBJ_FROM_PTR(((mp_obj_base_t *)nlr.ret_val)->type), MP_OBJ_FROM_PTR(&mp_type_SystemExit))) { + if (mp_obj_is_subclass_fast(mp_obj_get_type((mp_obj_t)nlr.ret_val), MP_OBJ_FROM_PTR(&mp_type_SystemExit))) { // at the moment, the value of SystemExit is unused ret = pyexec_system_exit; #if CIRCUITPY_ALARM diff --git a/ports/atmel-samd/audio_dma.c b/ports/atmel-samd/audio_dma.c index 7f1260973d..fca8c23a78 100644 --- a/ports/atmel-samd/audio_dma.c +++ b/ports/atmel-samd/audio_dma.c @@ -265,13 +265,13 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, #ifdef SAM_D5X_E5X int irq = dma->event_channel < 4 ? EVSYS_0_IRQn + dma->event_channel : EVSYS_4_IRQn; + // Only disable and clear on SAMD51 because the SAMD21 shares EVSYS with ticks. + NVIC_DisableIRQ(irq); + NVIC_ClearPendingIRQ(irq); #else int irq = EVSYS_IRQn; #endif - NVIC_DisableIRQ(irq); - NVIC_ClearPendingIRQ(irq); - DmacDescriptor *first_descriptor = dma_descriptor(dma_channel); setup_audio_descriptor(first_descriptor, dma->beat_size, output_spacing, output_register_address); if (single_buffer) { @@ -366,7 +366,7 @@ STATIC void dma_callback_fun(void *arg) { audio_dma_load_next_block(dma); } -void evsyshandler_common(void) { +void audio_evsys_handler(void) { for (uint8_t i = 0; i < AUDIO_DMA_CHANNEL_COUNT; i++) { audio_dma_t *dma = audio_dma_state[i]; if (dma == NULL) { @@ -380,26 +380,4 @@ void evsyshandler_common(void) { } } -#ifdef SAM_D5X_E5X -void EVSYS_0_Handler(void) { - evsyshandler_common(); -} -void EVSYS_1_Handler(void) { - evsyshandler_common(); -} -void EVSYS_2_Handler(void) { - evsyshandler_common(); -} -void EVSYS_3_Handler(void) { - evsyshandler_common(); -} -void EVSYS_4_Handler(void) { - evsyshandler_common(); -} -#else -void EVSYS_Handler(void) { - evsyshandler_common(); -} -#endif - #endif diff --git a/ports/atmel-samd/audio_dma.h b/ports/atmel-samd/audio_dma.h index bc5beb3bf5..d06b589759 100644 --- a/ports/atmel-samd/audio_dma.h +++ b/ports/atmel-samd/audio_dma.h @@ -99,4 +99,6 @@ void audio_dma_background(void); uint8_t find_sync_event_channel_raise(void); +void audio_evsys_handler(void); + #endif // MICROPY_INCLUDED_ATMEL_SAMD_AUDIO_DMA_H diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index c03b79ce4f..73303a8218 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -91,26 +91,19 @@ #if CIRCUITPY_PEW #include "common-hal/_pew/PewPew.h" #endif -volatile bool hold_interrupt = false; +static volatile bool sleep_ok = true; #ifdef SAMD21 -static void rtc_set_continuous(bool continuous) { - while (RTC->MODE0.STATUS.bit.SYNCBUSY) { - ; - } - RTC->MODE0.READREQ.reg = (continuous ? RTC_READREQ_RCONT : 0) | 0x0010; - while (RTC->MODE0.STATUS.bit.SYNCBUSY) { - ; - } -} +static uint8_t _tick_event_channel = 0; +// Sleeping requires a register write that can stall interrupt handling. Turning +// off sleeps allows for more accurate interrupt timing. (Python still thinks +// it is sleeping though.) void rtc_start_pulse(void) { - rtc_set_continuous(true); - hold_interrupt = true; + sleep_ok = false; } void rtc_end_pulse(void) { - hold_interrupt = false; - rtc_set_continuous(false); + sleep_ok = true; } #endif @@ -161,6 +154,20 @@ static void save_usb_clock_calibration(void) { } #endif +static void rtc_continuous_mode(void) { + #ifdef SAMD21 + while (RTC->MODE0.STATUS.bit.SYNCBUSY) { + } + RTC->MODE0.READREQ.reg = RTC_READREQ_RCONT | 0x0010; + while (RTC->MODE0.STATUS.bit.SYNCBUSY) { + } + // Do the first request and wait for it. + RTC->MODE0.READREQ.reg = RTC_READREQ_RREQ | RTC_READREQ_RCONT | 0x0010; + while (RTC->MODE0.STATUS.bit.SYNCBUSY) { + } + #endif +} + static void rtc_init(void) { #ifdef SAMD21 _gclk_enable_channel(RTC_GCLK_ID, GCLK_CLKCTRL_GEN_GCLK2_Val); @@ -168,9 +175,17 @@ static void rtc_init(void) { while (RTC->MODE0.CTRL.bit.SWRST != 0) { } + // Turn on periodic events to use as tick. We control whether it interrupts + // us with the EVSYS INTEN register. + RTC->MODE0.EVCTRL.reg = RTC_MODE0_EVCTRL_PEREO2; + RTC->MODE0.CTRL.reg = RTC_MODE0_CTRL_ENABLE | RTC_MODE0_CTRL_MODE_COUNT32 | RTC_MODE0_CTRL_PRESCALER_DIV2; + + // Turn on continuous sync of the count register. This will speed up all + // tick reads. + rtc_continuous_mode(); #endif #ifdef SAM_D5X_E5X hri_mclk_set_APBAMASK_RTC_bit(MCLK); @@ -363,6 +378,9 @@ void reset_port(void) { #endif reset_event_system(); + #ifdef SAMD21 + _tick_event_channel = EVSYS_SYNCH_NUM; + #endif reset_all_pins(); @@ -430,21 +448,14 @@ uint32_t port_get_saved_word(void) { // TODO: Move this to an RTC backup register so we can preserve it when only the BACKUP power domain // is enabled. static volatile uint64_t overflowed_ticks = 0; -#ifdef SAMD21 -static volatile bool _ticks_enabled = false; -#endif static uint32_t _get_count(uint64_t *overflow_count) { #ifdef SAM_D5X_E5X while ((RTC->MODE0.SYNCBUSY.reg & (RTC_MODE0_SYNCBUSY_COUNTSYNC | RTC_MODE0_SYNCBUSY_COUNT)) != 0) { } #endif - #ifdef SAMD21 - // Request a read so we don't stall the bus later. See section 14.3.1.5 Read Request - RTC->MODE0.READREQ.reg = RTC_READREQ_RREQ | 0x0010; - while (RTC->MODE0.STATUS.bit.SYNCBUSY != 0) { - } - #endif + // SAMD21 does continuous sync so we don't need to wait here. + // Disable interrupts so we can grab the count and the overflow. common_hal_mcu_disable_interrupts(); uint32_t count = RTC->MODE0.COUNT.reg; @@ -458,29 +469,6 @@ static uint32_t _get_count(uint64_t *overflow_count) { volatile bool _woken_up; -static void _port_interrupt_after_ticks(uint32_t ticks) { - uint32_t current_ticks = _get_count(NULL); - if (ticks > 1 << 28) { - // We'll interrupt sooner with an overflow. - return; - } - #ifdef SAMD21 - if (hold_interrupt) { - return; - } - #endif - uint32_t target = current_ticks + (ticks << 4); - RTC->MODE0.COMP[0].reg = target; - #ifdef SAM_D5X_E5X - while ((RTC->MODE0.SYNCBUSY.reg & (RTC_MODE0_SYNCBUSY_COMP0)) != 0) { - } - #endif - RTC->MODE0.INTFLAG.reg = RTC_MODE0_INTFLAG_CMP0; - RTC->MODE0.INTENSET.reg = RTC_MODE0_INTENSET_CMP0; - current_ticks = _get_count(NULL); - _woken_up = current_ticks >= target; -} - void RTC_Handler(void) { uint32_t intflag = RTC->MODE0.INTFLAG.reg; if (intflag & RTC_MODE0_INTFLAG_OVF) { @@ -497,19 +485,10 @@ void RTC_Handler(void) { } #endif if (intflag & RTC_MODE0_INTFLAG_CMP0) { - // Clear the interrupt because we may have hit a sleep and _ticks_enabled + // Clear the interrupt because we may have hit a sleep RTC->MODE0.INTFLAG.reg = RTC_MODE0_INTFLAG_CMP0; _woken_up = true; - #ifdef SAMD21 - if (_ticks_enabled) { - // Do things common to all ports when the tick occurs. - supervisor_tick(); - // Check _ticks_enabled again because a tick handler may have turned it off. - if (_ticks_enabled) { - _port_interrupt_after_ticks(1); - } - } - #endif + // SAMD21 ticks are handled by EVSYS #ifdef SAM_D5X_E5X RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_CMP0; #endif @@ -526,6 +505,39 @@ uint64_t port_get_raw_ticks(uint8_t *subticks) { return overflow_count + current_ticks / 16; } +void evsyshandler_common(void) { + #ifdef SAMD21 + if (_tick_event_channel < EVSYS_SYNCH_NUM && event_interrupt_active(_tick_event_channel)) { + supervisor_tick(); + } + #endif + #if CIRCUITPY_AUDIOIO || CIRCUITPY_AUDIOBUSIO + audio_evsys_handler(); + #endif +} + +#ifdef SAM_D5X_E5X +void EVSYS_0_Handler(void) { + evsyshandler_common(); +} +void EVSYS_1_Handler(void) { + evsyshandler_common(); +} +void EVSYS_2_Handler(void) { + evsyshandler_common(); +} +void EVSYS_3_Handler(void) { + evsyshandler_common(); +} +void EVSYS_4_Handler(void) { + evsyshandler_common(); +} +#else +void EVSYS_Handler(void) { + evsyshandler_common(); +} +#endif + // Enable 1/1024 second tick. void port_enable_tick(void) { #ifdef SAM_D5X_E5X @@ -533,9 +545,23 @@ void port_enable_tick(void) { RTC->MODE0.INTENSET.reg = RTC_MODE0_INTENSET_PER2; #endif #ifdef SAMD21 - // TODO: Switch to using the PER *event* from the RTC to generate an interrupt via EVSYS. - _ticks_enabled = true; - _port_interrupt_after_ticks(1); + // SAMD21 ticks won't survive port_reset(). This *should* be ok since it'll + // be triggered by ticks and no Python will be running. + if (_tick_event_channel >= EVSYS_SYNCH_NUM) { + turn_on_event_system(); + _tick_event_channel = find_sync_event_channel(); + } + // This turns on both the event detected interrupt (EVD) and overflow (OVR). + init_event_channel_interrupt(_tick_event_channel, CORE_GCLK, EVSYS_ID_GEN_RTC_PER_2); + // Disable overflow interrupt because we ignore it. + if (_tick_event_channel >= 8) { + uint8_t value = 1 << (_tick_event_channel - 8); + EVSYS->INTENCLR.reg = EVSYS_INTENSET_OVRp8(value); + } else { + uint8_t value = 1 << _tick_event_channel; + EVSYS->INTENCLR.reg = EVSYS_INTENSET_OVR(value); + } + NVIC_EnableIRQ(EVSYS_IRQn); #endif } @@ -545,21 +571,46 @@ void port_disable_tick(void) { RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_PER2; #endif #ifdef SAMD21 - _ticks_enabled = false; - RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_CMP0; + if (_tick_event_channel >= 8) { + uint8_t value = 1 << (_tick_event_channel - 8); + EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVDp8(value); + } else { + uint8_t value = 1 << _tick_event_channel; + EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVD(value); + } #endif } -// This is called by sleep, we ignore it when our ticks are enabled because -// they'll wake us up earlier. If we don't, we'll mess up ticks by overwriting -// the next RTC wake up time. void port_interrupt_after_ticks(uint32_t ticks) { + uint32_t current_ticks = _get_count(NULL); + if (ticks > 1 << 28) { + // We'll interrupt sooner with an overflow. + return; + } #ifdef SAMD21 - if (_ticks_enabled) { + if (!sleep_ok) { return; } #endif - _port_interrupt_after_ticks(ticks); + + uint32_t target = current_ticks + (ticks << 4); + // Try and avoid a bus stall when writing COMP by checking for an obvious + // existing sync. + while (RTC->MODE0.STATUS.bit.SYNCBUSY == 1) { + } + // Writing the COMP register can take up to 180us to synchronize. During + // this time, the bus will stall and no interrupts will be serviced. + RTC->MODE0.COMP[0].reg = target; + #ifdef SAM_D5X_E5X + while ((RTC->MODE0.SYNCBUSY.reg & (RTC_MODE0_SYNCBUSY_COMP0)) != 0) { + } + #endif + RTC->MODE0.INTFLAG.reg = RTC_MODE0_INTFLAG_CMP0; + RTC->MODE0.INTENSET.reg = RTC_MODE0_INTENSET_CMP0; + // Set continuous mode again because setting COMP may disable it. + rtc_continuous_mode(); + current_ticks = _get_count(NULL); + _woken_up = current_ticks >= target; } void port_idle_until_interrupt(void) { @@ -571,7 +622,7 @@ void port_idle_until_interrupt(void) { } #endif common_hal_mcu_disable_interrupts(); - if (!tud_task_event_ready() && !hold_interrupt && !_woken_up) { + if (!tud_task_event_ready() && sleep_ok && !_woken_up) { __DSB(); __WFI(); } From e18ceea9ba2dd628bebb7463b47b1dc5cc57783c Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Tue, 10 Aug 2021 18:18:21 -0500 Subject: [PATCH 125/418] Check for duplicate pins in rows and columns --- locale/circuitpython.pot | 4 ++++ shared-bindings/keypad/KeyMatrix.c | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 67683abfdc..8fee3982a6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1998,6 +1998,10 @@ msgstr "" msgid "Row entry must be digitalio.DigitalInOut" msgstr "" +#: shared-bindings/keypad/KeyMatrix.c +msgid "Row or Column pin duplicated" +msgstr "" + #: main.c msgid "Running in safe mode! Not running saved code.\n" msgstr "" diff --git a/shared-bindings/keypad/KeyMatrix.c b/shared-bindings/keypad/KeyMatrix.c index 0b854ef475..eb87d2bd22 100644 --- a/shared-bindings/keypad/KeyMatrix.c +++ b/shared-bindings/keypad/KeyMatrix.c @@ -102,6 +102,28 @@ STATIC mp_obj_t keypad_keymatrix_make_new(const mp_obj_type_t *type, size_t n_ar column_pins_array[column] = pin; } + for (size_t row = 0; row < num_row_pins; row++) { + for (size_t row2 = row + 1; row2 < num_row_pins; row2++) { + if (row_pins_array[row] == row_pins_array[row2]) { + mp_raise_ValueError(translate("Row or Column pin duplicated")); + } + } + + for (size_t column = 0; column < num_column_pins; column++) { + if (row_pins_array[row] == column_pins_array[column]) { + mp_raise_ValueError(translate("Row or Column pin duplicated")); + } + } + } + + for (size_t column = 0; column < num_column_pins; column++) { + for (size_t column2 = column + 1; column2 < num_column_pins; column2++) { + if (column_pins_array[column] == column_pins_array[column2]) { + mp_raise_ValueError(translate("Row or Column pin duplicated")); + } + } + } + common_hal_keypad_keymatrix_construct(self, num_row_pins, row_pins_array, num_column_pins, column_pins_array, args[ARG_columns_to_anodes].u_bool, interval, max_events); return MP_OBJ_FROM_PTR(self); } From 24e61a7da89795f6361c35fbc0f924dc4bcf63da Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 10 Aug 2021 22:00:09 -0400 Subject: [PATCH 126/418] Track more carefully which audio buffers to fill, based on interrupt channels --- ports/raspberrypi/audio_dma.c | 185 +++++++++++------- ports/raspberrypi/audio_dma.h | 9 +- .../common-hal/audiopwmio/PWMAudioOut.c | 42 ++-- shared-module/audiocore/WaveFile.c | 2 +- 4 files changed, 136 insertions(+), 102 deletions(-) diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index da3d851392..012d755e66 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -28,6 +28,7 @@ #include "shared-bindings/audiocore/RawSample.h" #include "shared-bindings/audiocore/WaveFile.h" +#include "shared-bindings/microcontroller/__init__.h" #include "supervisor/background_callback.h" #include "py/mpstate.h" @@ -47,71 +48,78 @@ void audio_dma_reset(void) { } } -void audio_dma_convert_signed(audio_dma_t *dma, uint8_t *buffer, uint32_t buffer_length, - uint8_t **output_buffer, uint32_t *output_buffer_length) { - size_t output_buffer_max_length; - if (dma->first_buffer_free) { - *output_buffer = dma->first_buffer; - output_buffer_max_length = dma->first_buffer_length; - } else { - *output_buffer = dma->second_buffer; - output_buffer_max_length = dma->second_buffer_length; - } +STATIC void audio_dma_convert_samples( + audio_dma_t *dma, + uint8_t *input, uint32_t input_length, + uint8_t *available_output_buffer, uint32_t available_output_buffer_length, + uint8_t **output, uint32_t *output_length) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" + + // Check whether a conversion is necessary if (dma->signed_to_unsigned || dma->unsigned_to_signed || dma->sample_spacing > 1 || (dma->sample_resolution != dma->output_resolution)) { - *output_buffer_length = buffer_length / dma->sample_spacing; + + // Must convert. + // Write the conversion into the passed-in output buffer + *output = available_output_buffer; + *output_length = input_length / dma->sample_spacing; + + if (*output_length > available_output_buffer_length) { + mp_raise_RuntimeError(translate("Internal audio buffer too small")); + } + uint32_t out_i = 0; if (dma->sample_resolution <= 8 && dma->output_resolution > 8) { - // reading bytes, writing 16-bit samples - *output_buffer_length = *output_buffer_length * 2; - if (*output_buffer_length > output_buffer_max_length) { + // reading bytes, writing 16-bit words, so output buffer will be bigger. + + *output_length = *output_length * 2; + if (*output_length > available_output_buffer_length) { mp_raise_RuntimeError(translate("Internal audio buffer too small")); } size_t shift = dma->output_resolution - dma->sample_resolution; - for (uint32_t i = 0; i < buffer_length; i += dma->sample_spacing) { + for (uint32_t i = 0; i < input_length; i += dma->sample_spacing) { if (dma->signed_to_unsigned) { - ((uint16_t *)*output_buffer)[out_i] = ((uint16_t)((int8_t *)buffer)[i] + 0x80) << shift; + ((uint16_t *)*output)[out_i] = ((uint16_t)((int8_t *)input)[i] + 0x80) << shift; } else if (dma->unsigned_to_signed) { - ((int16_t *)*output_buffer)[out_i] = ((int16_t)((uint8_t *)buffer)[i] - 0x80) << shift; + ((int16_t *)*output)[out_i] = ((int16_t)((uint8_t *)input)[i] - 0x80) << shift; } else { - ((uint16_t *)*output_buffer)[out_i] = ((uint16_t)((uint8_t *)buffer)[i]) << shift; + ((uint16_t *)*output)[out_i] = ((uint16_t)((uint8_t *)input)[i]) << shift; } out_i += 1; } } else if (dma->sample_resolution <= 8 && dma->output_resolution <= 8) { - for (uint32_t i = 0; i < buffer_length; i += dma->sample_spacing) { + for (uint32_t i = 0; i < input_length; i += dma->sample_spacing) { if (dma->signed_to_unsigned) { - ((uint8_t *)*output_buffer)[out_i] = ((int8_t *)buffer)[i] + 0x80; + ((uint8_t *)*output)[out_i] = ((int8_t *)input)[i] + 0x80; } else if (dma->unsigned_to_signed) { - ((int8_t *)*output_buffer)[out_i] = ((uint8_t *)buffer)[i] - 0x80; + ((int8_t *)*output)[out_i] = ((uint8_t *)input)[i] - 0x80; } else { - ((uint8_t *)*output_buffer)[out_i] = ((uint8_t *)buffer)[i]; + ((uint8_t *)*output)[out_i] = ((uint8_t *)input)[i]; } out_i += 1; } } else if (dma->sample_resolution > 8 && dma->output_resolution > 8) { size_t shift = 16 - dma->output_resolution; - for (uint32_t i = 0; i < buffer_length / 2; i += dma->sample_spacing) { + for (uint32_t i = 0; i < input_length / 2; i += dma->sample_spacing) { if (dma->signed_to_unsigned) { - ((uint16_t *)*output_buffer)[out_i] = ((int16_t *)buffer)[i] + 0x8000; + ((uint16_t *)*output)[out_i] = ((int16_t *)input)[i] + 0x8000; } else if (dma->unsigned_to_signed) { - ((int16_t *)*output_buffer)[out_i] = ((uint16_t *)buffer)[i] - 0x8000; + ((int16_t *)*output)[out_i] = ((uint16_t *)input)[i] - 0x8000; } else { - ((uint16_t *)*output_buffer)[out_i] = ((uint16_t *)buffer)[i]; + ((uint16_t *)*output)[out_i] = ((uint16_t *)input)[i]; } if (dma->output_resolution < 16) { if (dma->output_signed) { - ((int16_t *)*output_buffer)[out_i] = ((int16_t *)*output_buffer)[out_i] >> shift; + ((int16_t *)*output)[out_i] = ((int16_t *)*output)[out_i] >> shift; } else { - ((uint16_t *)*output_buffer)[out_i] = ((uint16_t *)*output_buffer)[out_i] >> shift; + ((uint16_t *)*output)[out_i] = ((uint16_t *)*output)[out_i] >> shift; } } out_i += 1; @@ -122,65 +130,70 @@ void audio_dma_convert_signed(audio_dma_t *dma, uint8_t *buffer, uint32_t buffer mp_raise_RuntimeError(translate("Audio conversion not implemented")); } } else { - *output_buffer = buffer; - *output_buffer_length = buffer_length; + // No conversion necessary. Designate the input buffer as the output buffer. + *output = input; + *output_length = input_length; } #pragma GCC diagnostic pop - dma->first_buffer_free = !dma->first_buffer_free; } -void audio_dma_load_next_block(audio_dma_t *dma) { - uint8_t dma_channel = dma->channel[1]; - if (dma->first_channel_free) { - dma_channel = dma->channel[0]; - } - dma->first_channel_free = !dma->first_channel_free; +// channel_idx is 0 or 1. +STATIC void audio_dma_load_next_block(audio_dma_t *dma, size_t buffer_idx) { + size_t dma_channel = dma->channel[buffer_idx]; - uint8_t *output_buffer; - uint32_t output_buffer_length; audioio_get_buffer_result_t get_buffer_result; - uint8_t *buffer; - uint32_t buffer_length; + uint8_t *sample_buffer; + uint32_t sample_buffer_length; get_buffer_result = audiosample_get_buffer(dma->sample, - dma->single_channel_output, dma->audio_channel, &buffer, &buffer_length); + dma->single_channel_output, dma->audio_channel, &sample_buffer, &sample_buffer_length); if (get_buffer_result == GET_BUFFER_ERROR) { audio_dma_stop(dma); return; } - audio_dma_convert_signed(dma, buffer, buffer_length, &output_buffer, &output_buffer_length); + // Convert the sample format resolution and signedness, as necessary. + // The input sample buffer is what was read from a file or a raw sample buffer. + // The output buffer is one of the DMA buffers (passed in), or if no conversion was done, + // the original sample buffer (to save copying). - // If we don't have an output buffer, save the pointer to first_buffer for use in the single - // buffer special case. - if (dma->first_buffer == NULL) { - dma->first_buffer = output_buffer; - } + // audio_dma_convert_samples() will write the converted samples into the given output + // buffer if necessary. If no conversion was needed, it will return the sample buffer + // as the output buffer. + uint8_t *output_buffer; + uint32_t output_buffer_length; + + audio_dma_convert_samples(dma, sample_buffer, sample_buffer_length, + dma->buffer[buffer_idx], dma->buffer_length[buffer_idx], + &output_buffer, &output_buffer_length); - dma_channel_set_trans_count(dma_channel, output_buffer_length / dma->output_size, false /* trigger */); dma_channel_set_read_addr(dma_channel, output_buffer, false /* trigger */); + dma_channel_set_trans_count(dma_channel, output_buffer_length / dma->output_size, false /* trigger */); if (get_buffer_result == GET_BUFFER_DONE) { if (dma->loop) { audiosample_reset_buffer(dma->sample, dma->single_channel_output, dma->audio_channel); } else { + // Set channel trigger to ourselves so we don't keep going. + dma_channel_hw_t *c = &dma_hw->ch[dma_channel]; + c->al1_ctrl = + (c->al1_ctrl & ~DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS) | + (dma_channel << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB); + if (output_buffer_length == 0 && !dma_channel_is_busy(dma->channel[0]) && !dma_channel_is_busy(dma->channel[1])) { // No data has been read, and both DMA channels have now finished, so it's safe to stop. audio_dma_stop(dma); dma->playing_in_progress = false; - } else { - // Set channel trigger to ourselves so we don't keep going. - dma_channel_hw_t *c = &dma_hw->ch[dma_channel]; - c->al1_ctrl = (c->al1_ctrl & ~DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS) | (dma_channel << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB); } } } } // Playback should be shutdown before calling this. -audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, +audio_dma_result audio_dma_setup_playback( + audio_dma_t *dma, mp_obj_t sample, bool loop, bool single_channel_output, @@ -189,6 +202,7 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, uint8_t output_resolution, uint32_t output_register_address, uint8_t dma_trigger_source) { + // Use two DMA channels to play because the DMA can't wrap to itself without the // buffer being power of two aligned. int dma_channel_0_maybe = dma_claim_unused_channel(false); @@ -213,14 +227,15 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, dma->unsigned_to_signed = false; dma->output_signed = output_signed; dma->sample_spacing = 1; - dma->first_channel_free = true; dma->output_resolution = output_resolution; dma->sample_resolution = audiosample_bits_per_sample(sample); dma->output_register_address = output_register_address; audiosample_reset_buffer(sample, single_channel_output, audio_channel); - bool single_buffer; + + bool single_buffer; // True if data fits in one single buffer. + bool samples_signed; uint32_t max_buffer_length; audiosample_get_buffer_structure(sample, single_channel_output, &single_buffer, &samples_signed, @@ -236,17 +251,16 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, max_buffer_length /= dma->sample_spacing; } - dma->first_buffer = (uint8_t *)m_realloc(dma->first_buffer, max_buffer_length); - dma->first_buffer_length = max_buffer_length; - if (dma->first_buffer == NULL) { + dma->buffer[0] = (uint8_t *)m_realloc(dma->buffer[0], max_buffer_length); + dma->buffer_length[0] = max_buffer_length; + if (dma->buffer[0] == NULL) { return AUDIO_DMA_MEMORY_ERROR; } - dma->first_buffer_free = true; if (!single_buffer) { - dma->second_buffer = (uint8_t *)m_realloc(dma->second_buffer, max_buffer_length); - dma->second_buffer_length = max_buffer_length; - if (dma->second_buffer == NULL) { + dma->buffer[1] = (uint8_t *)m_realloc(dma->buffer[1], max_buffer_length); + dma->buffer_length[1] = max_buffer_length; + if (dma->buffer[1] == NULL) { return AUDIO_DMA_MEMORY_ERROR; } } @@ -276,9 +290,11 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, channel_config_set_dreq(&c, dma_trigger_source); channel_config_set_read_increment(&c, true); channel_config_set_write_increment(&c, false); + // Chain to the other channel by default. channel_config_set_chain_to(&c, dma->channel[(i + 1) % 2]); dma_channel_set_config(dma->channel[i], &c, false /* trigger */); + dma_channel_set_write_addr(dma->channel[i], (void *)output_register_address, false /* trigger */); } @@ -288,9 +304,9 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, MP_STATE_PORT(playing_audio)[dma->channel[1]] = dma; // Load the first two blocks up front. - audio_dma_load_next_block(dma); + audio_dma_load_next_block(dma, 0); if (!single_buffer) { - audio_dma_load_next_block(dma); + audio_dma_load_next_block(dma, 1); } // Special case the DMA for a single buffer. It's commonly used for a single wave length of sound @@ -307,11 +323,11 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, channel_config_set_chain_to(&c, dma->channel[1]); // Chain to ourselves so we stop. dma_channel_configure(dma->channel[1], &c, &dma_hw->ch[dma->channel[0]].al3_read_addr_trig, // write address - &dma->first_buffer, // read address + &dma->buffer[0], // read address 1, // transaction count false); // trigger } else { - // Enable our DMA channels on DMA0 to the CPU. This will wake us up when + // Enable our DMA channels on DMA_IRQ_0 to the CPU. This will wake us up when // we're WFI. dma_hw->inte0 |= (1 << dma->channel[0]) | (1 << dma->channel[1]); irq_set_mask_enabled(1 << DMA_IRQ_0, true); @@ -402,18 +418,19 @@ bool audio_dma_get_paused(audio_dma_t *dma) { } void audio_dma_init(audio_dma_t *dma) { - dma->first_buffer = NULL; - dma->second_buffer = NULL; + dma->buffer[0] = NULL; + dma->buffer[1] = NULL; + dma->channel[0] = NUM_DMA_CHANNELS; dma->channel[1] = NUM_DMA_CHANNELS; } void audio_dma_deinit(audio_dma_t *dma) { - m_free(dma->first_buffer); - dma->first_buffer = NULL; + m_free(dma->buffer[0]); + dma->buffer[0] = NULL; - m_free(dma->second_buffer); - dma->second_buffer = NULL; + m_free(dma->buffer[1]); + dma->buffer[1] = NULL; } bool audio_dma_get_playing(audio_dma_t *dma) { @@ -433,7 +450,25 @@ STATIC void dma_callback_fun(void *arg) { return; } - audio_dma_load_next_block(dma); + common_hal_mcu_disable_interrupts(); + uint32_t channels_to_load_mask = dma->channels_to_load_mask; + dma->channels_to_load_mask = 0; + common_hal_mcu_enable_interrupts(); + + // Load the blocks for the requested channels. + uint32_t channel = 0; + while (channels_to_load_mask) { + if (channels_to_load_mask & 1) { + if (dma->channel[0] == channel) { + audio_dma_load_next_block(dma, 0); + } + if (dma->channel[1] == channel) { + audio_dma_load_next_block(dma, 1); + } + } + channels_to_load_mask >>= 1; + channel++; + } } void isr_dma_0(void) { @@ -441,6 +476,8 @@ void isr_dma_0(void) { uint32_t mask = 1 << i; if ((dma_hw->intr & mask) != 0 && MP_STATE_PORT(playing_audio)[i] != NULL) { audio_dma_t *dma = MP_STATE_PORT(playing_audio)[i]; + // Record all channels whose DMA has completed; they need loading. + dma->channels_to_load_mask |= mask; background_callback_add(&dma->callback, dma_callback_fun, (void *)dma); dma_hw->ints0 = mask; } diff --git a/ports/raspberrypi/audio_dma.h b/ports/raspberrypi/audio_dma.h index 1ef1ca6d29..0ca911d337 100644 --- a/ports/raspberrypi/audio_dma.h +++ b/ports/raspberrypi/audio_dma.h @@ -43,15 +43,12 @@ typedef struct { bool signed_to_unsigned; bool unsigned_to_signed; bool output_signed; - bool first_channel_free; - bool first_buffer_free; bool playing_in_progress; uint8_t output_resolution; // in bits uint8_t sample_resolution; // in bits - uint8_t *first_buffer; - size_t first_buffer_length; - uint8_t *second_buffer; - size_t second_buffer_length; + uint8_t *buffer[2]; + size_t buffer_length[2]; + uint32_t channels_to_load_mask; uint32_t output_register_address; background_callback_t callback; } audio_dma_t; diff --git a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c index efaeb5ef35..ea587867c0 100644 --- a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +++ b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -157,27 +157,6 @@ void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t *self, tx_register += self->left_pwm.channel * sizeof(uint16_t); } - audio_dma_result result = audio_dma_setup_playback( - &self->dma, - sample, - loop, - false, // single channel - 0, // audio channel - false, // output signed - BITS_PER_SAMPLE, - (uint32_t)tx_register, // output register: PWM cc register - 0x3b + pacing_timer); // data request line - - if (result == AUDIO_DMA_DMA_BUSY) { - common_hal_audiopwmio_pwmaudioout_stop(self); - mp_raise_RuntimeError(translate("No DMA channel found")); - } - if (result == AUDIO_DMA_MEMORY_ERROR) { - common_hal_audiopwmio_pwmaudioout_stop(self); - mp_raise_RuntimeError(translate("Unable to allocate buffers for signed conversion")); - } - - // OK! We got all of the resources we need and dma is ready. self->pacing_timer = pacing_timer; // Playback with two independent clocks. One is the sample rate which @@ -214,6 +193,27 @@ void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t *self, } dma_hw->timer[pacing_timer] = best_numerator << 16 | best_denominator; + + audio_dma_result result = audio_dma_setup_playback( + &self->dma, + sample, + loop, + false, // single channel + 0, // audio channel + false, // output signed + BITS_PER_SAMPLE, + (uint32_t)tx_register, // output register: PWM cc register + 0x3b + pacing_timer); // data request line + + if (result == AUDIO_DMA_DMA_BUSY) { + common_hal_audiopwmio_pwmaudioout_stop(self); + mp_raise_RuntimeError(translate("No DMA channel found")); + } + if (result == AUDIO_DMA_MEMORY_ERROR) { + common_hal_audiopwmio_pwmaudioout_stop(self); + mp_raise_RuntimeError(translate("Unable to allocate buffers for signed conversion")); + } + // OK! We got all of the resources we need and dma is ready. } void common_hal_audiopwmio_pwmaudioout_stop(audiopwmio_pwmaudioout_obj_t *self) { diff --git a/shared-module/audiocore/WaveFile.c b/shared-module/audiocore/WaveFile.c index 6d42d27ddb..14c92ca411 100644 --- a/shared-module/audiocore/WaveFile.c +++ b/shared-module/audiocore/WaveFile.c @@ -206,7 +206,7 @@ audioio_get_buffer_result_t audioio_wavefile_get_buffer(audioio_wavefile_obj_t * } if (need_more_data) { - uint16_t num_bytes_to_load = self->len; + uint32_t num_bytes_to_load = self->len; if (num_bytes_to_load > self->bytes_remaining) { num_bytes_to_load = self->bytes_remaining; } From 35aac3d26b5c18edf6e1562dbd95020d5b9e2751 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 11 Aug 2021 10:48:53 -0400 Subject: [PATCH 127/418] display SPI now 10MHz; set PWM duty cycle to zero at stop to quiet output --- ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c | 2 +- ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c index 214662e331..2882e57922 100644 --- a/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c @@ -69,7 +69,7 @@ void board_init(void) { &pin_GPIO24, // Command or data &pin_GPIO22, // Chip select &pin_GPIO23, // Reset - 1000000, // Baudrate + 10000000, // Baudrate 0, // Polarity 0); // Phase diff --git a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c index ea587867c0..05246ef1be 100644 --- a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +++ b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -225,9 +225,11 @@ void common_hal_audiopwmio_pwmaudioout_stop(audiopwmio_pwmaudioout_obj_t *self) audio_dma_stop(&self->dma); // Set to quiescent level. - pwm_hw->slice[self->left_pwm.slice].cc = self->quiescent_value; + common_hal_pwmio_pwmout_set_duty_cycle(&self->left_pwm, self->quiescent_value); + pwmio_pwmout_set_top(&self->left_pwm, PWM_TOP); if (self->stereo) { - pwm_hw->slice[self->right_pwm.slice].cc = self->quiescent_value; + common_hal_pwmio_pwmout_set_duty_cycle(&self->right_pwm, self->quiescent_value); + pwmio_pwmout_set_top(&self->right_pwm, PWM_TOP); } } From 4608877c12f2a7a0d4ace4f7e656b352ccf15bfe Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 11 Aug 2021 12:10:49 -0400 Subject: [PATCH 128/418] address review comments --- ports/raspberrypi/audio_dma.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index 012d755e66..e9f62281cf 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -153,7 +153,7 @@ STATIC void audio_dma_load_next_block(audio_dma_t *dma, size_t buffer_idx) { } // Convert the sample format resolution and signedness, as necessary. - // The input sample buffer is what was read from a file or a raw sample buffer. + // The input sample buffer is what was read from a file, Mixer, or a raw sample buffer. // The output buffer is one of the DMA buffers (passed in), or if no conversion was done, // the original sample buffer (to save copying). @@ -370,13 +370,6 @@ void audio_dma_stop(audio_dma_t *dma) { dma_channel_abort(channel); } - // Write a zero as the last sample. This stops any PWM output. - if (dma->output_resolution <= 8) { - *((uint8_t *)dma->output_register_address) = 0; - } else { - *((uint16_t *)dma->output_register_address) = 0; - } - dma_channel_set_read_addr(channel, NULL, false /* trigger */); dma_channel_set_write_addr(channel, NULL, false /* trigger */); dma_channel_set_trans_count(channel, 0, false /* trigger */); From 67c6932ca21942bd1b61dc6e3e13e9da30aac651 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 11 Aug 2021 09:58:31 -0700 Subject: [PATCH 129/418] Reset timers separate from pwmio This prevents timer leakage on builds without pwmio. Fixes #5057 --- ports/atmel-samd/Makefile | 8 +++ ports/atmel-samd/common-hal/pwmio/PWMOut.c | 38 +--------- ports/atmel-samd/shared_timers.c | 84 ++++++++++++++++++++++ ports/atmel-samd/shared_timers.h | 36 ++++++++++ ports/atmel-samd/supervisor/port.c | 4 ++ ports/atmel-samd/timer_handler.h | 4 -- 6 files changed, 133 insertions(+), 41 deletions(-) create mode 100644 ports/atmel-samd/shared_timers.c create mode 100644 ports/atmel-samd/shared_timers.h diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 14fc9d43b9..00ce562e9e 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -322,6 +322,14 @@ SRC_C += \ reset.c \ timer_handler.c \ +ifeq ($(CIRCUITPY_PWMIO),1) +SRC_C += shared_timers.c +endif + +ifeq ($(CIRCUITPY_AUDIOIO),1) +SRC_C += shared_timers.c +endif + ifeq ($(CIRCUITPY_SDIOIO),1) SRC_C += ports/atmel-samd/sd_mmc/sd_mmc.c endif diff --git a/ports/atmel-samd/common-hal/pwmio/PWMOut.c b/ports/atmel-samd/common-hal/pwmio/PWMOut.c index 4f6661b55d..3528b55e98 100644 --- a/ports/atmel-samd/common-hal/pwmio/PWMOut.c +++ b/ports/atmel-samd/common-hal/pwmio/PWMOut.c @@ -60,24 +60,6 @@ uint8_t tcc_channels[3]; // Set by pwmout_reset() to {0xf0, 0xfc, 0xfc} initia uint8_t tcc_channels[5]; // Set by pwmout_reset() to {0xc0, 0xf0, 0xf8, 0xfc, 0xfc} initially. #endif -static uint8_t never_reset_tc_or_tcc[TC_INST_NUM + TCC_INST_NUM]; - -STATIC void timer_refcount(int index, bool is_tc, int increment) { - if (is_tc) { - never_reset_tc_or_tcc[index] += increment; - } else { - never_reset_tc_or_tcc[TC_INST_NUM + index] += increment; - } -} - -void timer_never_reset(int index, bool is_tc) { - timer_refcount(index, is_tc, 1); -} - -void timer_reset_ok(int index, bool is_tc) { - timer_refcount(index, is_tc, -1); -} - void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self) { timer_never_reset(self->timer->index, self->timer->is_tc); @@ -97,32 +79,14 @@ void pwmout_reset(void) { } Tcc *tccs[TCC_INST_NUM] = TCC_INSTS; for (int i = 0; i < TCC_INST_NUM; i++) { - if (never_reset_tc_or_tcc[TC_INST_NUM + i] > 0) { + if (!timer_ok_to_reset(i, false)) { continue; } - // Disable the module before resetting it. - if (tccs[i]->CTRLA.bit.ENABLE == 1) { - tccs[i]->CTRLA.bit.ENABLE = 0; - while (tccs[i]->SYNCBUSY.bit.ENABLE == 1) { - } - } uint8_t mask = 0xff; for (uint8_t j = 0; j < tcc_cc_num[i]; j++) { mask <<= 1; } tcc_channels[i] = mask; - tccs[i]->CTRLA.bit.SWRST = 1; - while (tccs[i]->CTRLA.bit.SWRST == 1) { - } - } - Tc *tcs[TC_INST_NUM] = TC_INSTS; - for (int i = 0; i < TC_INST_NUM; i++) { - if (never_reset_tc_or_tcc[i] > 0) { - continue; - } - tcs[i]->COUNT16.CTRLA.bit.SWRST = 1; - while (tcs[i]->COUNT16.CTRLA.bit.SWRST == 1) { - } } } diff --git a/ports/atmel-samd/shared_timers.c b/ports/atmel-samd/shared_timers.c new file mode 100644 index 0000000000..f07bd372da --- /dev/null +++ b/ports/atmel-samd/shared_timers.c @@ -0,0 +1,84 @@ +/* + * 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 + +#include "samd/timers.h" + +#include "shared_timers.h" + +static uint8_t never_reset_tc_or_tcc[TC_INST_NUM + TCC_INST_NUM]; + +static void timer_refcount(int index, bool is_tc, int increment) { + if (is_tc) { + never_reset_tc_or_tcc[index] += increment; + } else { + never_reset_tc_or_tcc[TC_INST_NUM + index] += increment; + } +} + +void timer_never_reset(int index, bool is_tc) { + timer_refcount(index, is_tc, 1); +} + +void timer_reset_ok(int index, bool is_tc) { + timer_refcount(index, is_tc, -1); +} + +bool timer_ok_to_reset(int index, bool is_tc) { + if (is_tc) { + return never_reset_tc_or_tcc[index] == 0; + } + return never_reset_tc_or_tcc[TC_INST_NUM + index] == 0; +} + +void reset_timers(void) { + // Reset all timers + Tcc *tccs[TCC_INST_NUM] = TCC_INSTS; + for (int i = 0; i < TCC_INST_NUM; i++) { + if (!timer_ok_to_reset(i, false)) { + continue; + } + // Disable the module before resetting it. + if (tccs[i]->CTRLA.bit.ENABLE == 1) { + tccs[i]->CTRLA.bit.ENABLE = 0; + while (tccs[i]->SYNCBUSY.bit.ENABLE == 1) { + } + } + tccs[i]->CTRLA.bit.SWRST = 1; + while (tccs[i]->CTRLA.bit.SWRST == 1) { + } + } + Tc *tcs[TC_INST_NUM] = TC_INSTS; + for (int i = 0; i < TC_INST_NUM; i++) { + if (!timer_ok_to_reset(i, true)) { + continue; + } + tcs[i]->COUNT16.CTRLA.bit.SWRST = 1; + while (tcs[i]->COUNT16.CTRLA.bit.SWRST == 1) { + } + } +} diff --git a/ports/atmel-samd/shared_timers.h b/ports/atmel-samd/shared_timers.h new file mode 100644 index 0000000000..88edd3aa12 --- /dev/null +++ b/ports/atmel-samd/shared_timers.h @@ -0,0 +1,36 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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. + */ +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_SHARED_TIMERS_H +#define MICROPY_INCLUDED_ATMEL_SAMD_SHARED_TIMERS_H + +#include + +void timer_never_reset(int index, bool is_tc); +void timer_reset_ok(int index, bool is_tc); +bool timer_ok_to_reset(int index, bool is_tc); +void reset_timers(void); + +#endif // MICROPY_INCLUDED_ATMEL_SAMD_SHARED_TIMERS_H diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index c03b79ce4f..4cd0ee4e73 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -77,6 +77,7 @@ #include "samd/dma.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/rtc/__init__.h" +#include "shared_timers.h" #include "reset.h" #include "supervisor/shared/safe_mode.h" @@ -347,6 +348,9 @@ void reset_port(void) { #if CIRCUITPY_PWMIO pwmout_reset(); #endif + #if CIRCUITPY_PWMIO || CIRCUITPY_AUDIOIO + reset_timers(); + #endif #if CIRCUITPY_ANALOGIO analogin_reset(); diff --git a/ports/atmel-samd/timer_handler.h b/ports/atmel-samd/timer_handler.h index 34efda4d9e..517ad768ba 100644 --- a/ports/atmel-samd/timer_handler.h +++ b/ports/atmel-samd/timer_handler.h @@ -36,8 +36,4 @@ void set_timer_handler(bool is_tc, uint8_t index, uint8_t timer_handler); void shared_timer_handler(bool is_tc, uint8_t index); -// implementation of these functions is in PWMOut.c -void timer_never_reset(int index, bool is_tc); -void timer_reset_ok(int index, bool is_tc); - #endif // MICROPY_INCLUDED_ATMEL_SAMD_TIMER_HANDLER_H From b56455ffbb3a73cd4e0ef4c965adddd7d2a5e6d7 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 11 Aug 2021 10:48:39 -0700 Subject: [PATCH 130/418] Allow sleep while paused --- ports/atmel-samd/common-hal/pulseio/PulseIn.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/atmel-samd/common-hal/pulseio/PulseIn.c b/ports/atmel-samd/common-hal/pulseio/PulseIn.c index 49cef92478..507db7e437 100644 --- a/ports/atmel-samd/common-hal/pulseio/PulseIn.c +++ b/ports/atmel-samd/common-hal/pulseio/PulseIn.c @@ -272,6 +272,9 @@ void common_hal_pulseio_pulsein_deinit(pulseio_pulsein_obj_t *self) { void common_hal_pulseio_pulsein_pause(pulseio_pulsein_obj_t *self) { uint32_t mask = 1 << self->channel; EIC->INTENCLR.reg = mask << EIC_INTENSET_EXTINT_Pos; + #ifdef SAMD21 + rtc_end_pulse(); + #endif } void common_hal_pulseio_pulsein_resume(pulseio_pulsein_obj_t *self, @@ -299,6 +302,9 @@ void common_hal_pulseio_pulsein_resume(pulseio_pulsein_obj_t *self, EIC->INTFLAG.reg = mask << EIC_INTFLAG_EXTINT_Pos; EIC->INTENSET.reg = mask << EIC_INTENSET_EXTINT_Pos; + #ifdef SAMD21 + rtc_start_pulse(); + #endif pulsein_set_config(self, true); } From b8e526be3b59b6c6d31df34b4efe4ea2549c25b8 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 11 Aug 2021 20:20:03 +0200 Subject: [PATCH 131/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 8 ++++++++ locale/cs.po | 8 ++++++++ locale/de_DE.po | 8 ++++++++ locale/el.po | 8 ++++++++ locale/en_GB.po | 8 ++++++++ locale/es.po | 8 ++++++++ locale/fil.po | 8 ++++++++ locale/fr.po | 8 ++++++++ locale/hi.po | 8 ++++++++ locale/it_IT.po | 8 ++++++++ locale/ja.po | 8 ++++++++ locale/ko.po | 8 ++++++++ locale/nl.po | 8 ++++++++ locale/pl.po | 8 ++++++++ locale/pt_BR.po | 8 ++++++++ locale/sv.po | 8 ++++++++ locale/zh_Latn_pinyin.po | 8 ++++++++ 17 files changed, 136 insertions(+) diff --git a/locale/ID.po b/locale/ID.po index 99b3fea4f8..22518a63e0 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -500,6 +500,10 @@ msgstr "" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1237,6 +1241,10 @@ msgstr "Otentikasi tidak cukup" msgid "Insufficient encryption" msgstr "Enkripsi tidak cukup" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Kesalahan definisi internal" diff --git a/locale/cs.po b/locale/cs.po index 352bb822f4..450c75e205 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -496,6 +496,10 @@ msgstr "" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1220,6 +1224,10 @@ msgstr "" msgid "Insufficient encryption" msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 1655db5150..8f4de5386c 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -502,6 +502,10 @@ msgstr "Versuche %d Blöcke zu allokieren" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1237,6 +1241,10 @@ msgstr "Unzureichende Authentifizierung" msgid "Insufficient encryption" msgstr "Unzureichende Verschlüsselung" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Interner Definitionsfehler" diff --git a/locale/el.po b/locale/el.po index fb84d25d23..f011a09bb6 100644 --- a/locale/el.po +++ b/locale/el.po @@ -493,6 +493,10 @@ msgstr "" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1217,6 +1221,10 @@ msgstr "" msgid "Insufficient encryption" msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 99f8d4c16a..3400421b2a 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -502,6 +502,10 @@ msgstr "Attempt to allocate %d blocks" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1232,6 +1236,10 @@ msgstr "Insufficient authentication" msgid "Insufficient encryption" msgstr "Insufficient encryption" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Internal define error" diff --git a/locale/es.po b/locale/es.po index 4212d45df6..f53451c342 100644 --- a/locale/es.po +++ b/locale/es.po @@ -506,6 +506,10 @@ msgstr "Tratando de localizar %d bloques" msgid "Attempted heap allocation when VM not running." msgstr "Asignación del montículo mientras la VM no esta ejecutándose." +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "AuthMode.OPEN no se usa con contraseña" @@ -1250,6 +1254,10 @@ msgstr "Autenticación insuficiente" msgid "Insufficient encryption" msgstr "Cifrado insuficiente" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Error interno de definición" diff --git a/locale/fil.po b/locale/fil.po index b7bc9f8428..78d8f09ea3 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -496,6 +496,10 @@ msgstr "" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1232,6 +1236,10 @@ msgstr "" msgid "Insufficient encryption" msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 694e71b840..d1ed977567 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -508,6 +508,10 @@ msgstr "" "Tentative d'allocation à la pile quand la Machine Virtuelle n'est pas en " "exécution." +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "AuthMode.OPEN n'est pas utilisé avec un mot de passe" @@ -1260,6 +1264,10 @@ msgstr "Authentification insuffisante" msgid "Insufficient encryption" msgstr "Chiffrement insuffisant" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Erreur de définition interne" diff --git a/locale/hi.po b/locale/hi.po index 2fb00e2272..4ffcfe51ba 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -493,6 +493,10 @@ msgstr "" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1217,6 +1221,10 @@ msgstr "" msgid "Insufficient encryption" msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index a8786c7e32..b4f8a1c19c 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -505,6 +505,10 @@ msgstr "Provo ad allocare %d blocchi" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1241,6 +1245,10 @@ msgstr "" msgid "Insufficient encryption" msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index cfe5556941..a51b48f55d 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -498,6 +498,10 @@ msgstr "%d個のブロックの確保を試みました" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1228,6 +1232,10 @@ msgstr "認証が不十分" msgid "Insufficient encryption" msgstr "暗号化が不十分" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "内部定義エラー" diff --git a/locale/ko.po b/locale/ko.po index b46d9f5d11..b3dbf6c3e4 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -494,6 +494,10 @@ msgstr "" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1220,6 +1224,10 @@ msgstr "" msgid "Insufficient encryption" msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index ec26087cd6..344b214289 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -496,6 +496,10 @@ msgstr "Poging om %d blokken toe te wijzen" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1229,6 +1233,10 @@ msgstr "Onvoldoende authenticatie" msgid "Insufficient encryption" msgstr "Onvoldoende encryptie" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Interne define fout" diff --git a/locale/pl.po b/locale/pl.po index 9a0f6614b8..268e12f340 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -498,6 +498,10 @@ msgstr "Próba przydzielenia %d bloków" msgid "Attempted heap allocation when VM not running." msgstr "" +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "" @@ -1228,6 +1232,10 @@ msgstr "Niewystarczające uwierzytelnienie" msgid "Insufficient encryption" msgstr "Niewystarczające szyfrowanie" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 49f333678d..53c3ae381e 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -507,6 +507,10 @@ msgid "Attempted heap allocation when VM not running." msgstr "" "Tentativa de alocação das pilhas quando o VM não estiver em funcionamento." +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "O AuthMode.OPEN não é usado com senha" @@ -1251,6 +1255,10 @@ msgstr "Autenticação insuficiente" msgid "Insufficient encryption" msgstr "Criptografia insuficiente" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Erro interno de definição" diff --git a/locale/sv.po b/locale/sv.po index 15cb50e88d..612121de2d 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -501,6 +501,10 @@ msgstr "Försök att tilldela %d block" msgid "Attempted heap allocation when VM not running." msgstr "Försök till heap-allokering när den virtuella maskinen inte är igång." +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "AuthMode.OPEN används inte med lösenord" @@ -1236,6 +1240,10 @@ msgstr "Otillräcklig autentisering" msgid "Insufficient encryption" msgstr "Otillräcklig kryptering" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Internt define-fel" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 8ff9e807ca..a172375454 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -503,6 +503,10 @@ msgstr "cháng shì fēn pèi %d kuài" msgid "Attempted heap allocation when VM not running." msgstr "dāng VM bú yùn xíng shí, cháng shì duī fēn pèi." +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" msgstr "AuthMode.OPEN wèi shǐ yòng mì mǎ" @@ -1239,6 +1243,10 @@ msgstr "Rènzhèng bùzú" msgid "Insufficient encryption" msgstr "Jiāmì bùzú" +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" msgstr "Nèibù dìngyì cuòwù" From 083960ce907b00d63f1c0aa7099d52e097f3b10a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 11 Aug 2021 11:53:26 -0700 Subject: [PATCH 132/418] Fix SAMD51 builds and Prox Trinkey Adds CIRCUITPY_BUSIO_UART to disable UART by raising ValueError that no pins work. --- .../mpconfigboard.h | 1 + .../mpconfigboard.mk | 1 + ports/atmel-samd/supervisor/port.c | 2 ++ py/circuitpy_mpconfig.mk | 6 ++++++ shared-bindings/busio/SPI.c | 2 +- shared-bindings/busio/UART.c | 19 +++++++++++++++++++ 6 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.h index c792b01272..878b25f2f8 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.h @@ -2,6 +2,7 @@ #define MICROPY_HW_MCU_NAME "samd21e18" #define MICROPY_HW_NEOPIXEL (&pin_PA15) +#define MICROPY_HW_NEOPIXEL_COUNT (2) #define IGNORE_PIN_PA01 1 #define IGNORE_PIN_PA02 1 diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index cf9afb3d21..1e1284ecb0 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -14,6 +14,7 @@ CIRCUITPY_FULL_BUILD = 0 CIRCUITPY_ANALOGIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO_SPI = 0 +CIRCUITPY_BUSIO_UART = 0 CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_ROTARYIO = 0 diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 73303a8218..9ad54e5604 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -594,10 +594,12 @@ void port_interrupt_after_ticks(uint32_t ticks) { #endif uint32_t target = current_ticks + (ticks << 4); + #ifdef SAMD21 // Try and avoid a bus stall when writing COMP by checking for an obvious // existing sync. while (RTC->MODE0.STATUS.bit.SYNCBUSY == 1) { } + #endif // Writing the COMP register can take up to 180us to synchronize. During // this time, the bus will stall and no interrupts will be serviced. RTC->MODE0.COMP[0].reg = target; diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 45bc2e8fed..fd15be92b0 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -121,9 +121,15 @@ CFLAGS += -DCIRCUITPY_BUILTINS_POW3=$(CIRCUITPY_BUILTINS_POW3) CIRCUITPY_BUSIO ?= 1 CFLAGS += -DCIRCUITPY_BUSIO=$(CIRCUITPY_BUSIO) +# These two flags pretend to implement their class but raise a ValueError due to +# unsupported pins. This should be used sparingly on boards that don't break out +# generic IO but need parts of busio. CIRCUITPY_BUSIO_SPI ?= 1 CFLAGS += -DCIRCUITPY_BUSIO_SPI=$(CIRCUITPY_BUSIO_SPI) +CIRCUITPY_BUSIO_UART ?= 1 +CFLAGS += -DCIRCUITPY_BUSIO_UART=$(CIRCUITPY_BUSIO_UART) + CIRCUITPY_CAMERA ?= 0 CFLAGS += -DCIRCUITPY_CAMERA=$(CIRCUITPY_CAMERA) diff --git a/shared-bindings/busio/SPI.c b/shared-bindings/busio/SPI.c index 31f3a9021e..a611d8e1d5 100644 --- a/shared-bindings/busio/SPI.c +++ b/shared-bindings/busio/SPI.c @@ -104,7 +104,7 @@ STATIC mp_obj_t busio_spi_make_new(const mp_obj_type_t *type, size_t n_args, con common_hal_busio_spi_construct(self, clock, mosi, miso); return MP_OBJ_FROM_PTR(self); #else - mp_raise_NotImplementedError(NULL); + mp_raise_ValueError(translate("Invalid pins")); #endif // CIRCUITPY_BUSIO_SPI } diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c index bd97910192..efb0643d0b 100644 --- a/shared-bindings/busio/UART.c +++ b/shared-bindings/busio/UART.c @@ -72,13 +72,16 @@ typedef struct { extern const busio_uart_parity_obj_t busio_uart_parity_even_obj; extern const busio_uart_parity_obj_t busio_uart_parity_odd_obj; +#if CIRCUITPY_BUSIO_UART STATIC void validate_timeout(mp_float_t timeout) { if (timeout < (mp_float_t)0.0f || timeout > (mp_float_t)100.0f) { mp_raise_ValueError(translate("timeout must be 0.0-100.0 seconds")); } } +#endif // CIRCUITPY_BUSIO_UART STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + #if CIRCUITPY_BUSIO_UART // Always initially allocate the UART object within the long-lived heap. // This is needed to avoid crashes with certain UART implementations which // cannot accomodate being moved after creation. (See @@ -141,8 +144,12 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co args[ARG_baudrate].u_int, bits, parity, stop, timeout, args[ARG_receiver_buffer_size].u_int, NULL, false); return (mp_obj_t)self; + #else + mp_raise_ValueError(translate("Invalid pins")); + #endif // CIRCUITPY_BUSIO_UART } +#if CIRCUITPY_BUSIO_UART // Helper to ensure we have the native super class instead of a subclass. busio_uart_obj_t *native_uart(mp_obj_t uart_obj) { @@ -358,6 +365,7 @@ STATIC mp_obj_t busio_uart_obj_reset_input_buffer(mp_obj_t self_in) { return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_1(busio_uart_reset_input_buffer_obj, busio_uart_obj_reset_input_buffer); +#endif // CIRCUITPY_BUSIO_UART //| class Parity: //| """Enum-like class to define the parity used to verify correct data transfer.""" @@ -400,6 +408,7 @@ const mp_obj_type_t busio_uart_parity_type = { }; STATIC const mp_rom_map_elem_t busio_uart_locals_dict_table[] = { + #if CIRCUITPY_BUSIO_UART { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&busio_uart_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&busio_uart_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) }, @@ -417,12 +426,14 @@ STATIC const mp_rom_map_elem_t busio_uart_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_baudrate), MP_ROM_PTR(&busio_uart_baudrate_obj) }, { MP_ROM_QSTR(MP_QSTR_in_waiting), MP_ROM_PTR(&busio_uart_in_waiting_obj) }, { MP_ROM_QSTR(MP_QSTR_timeout), MP_ROM_PTR(&busio_uart_timeout_obj) }, + #endif // CIRCUITPY_BUSIO_UART // Nested Enum-like Classes. { MP_ROM_QSTR(MP_QSTR_Parity), MP_ROM_PTR(&busio_uart_parity_type) }, }; STATIC MP_DEFINE_CONST_DICT(busio_uart_locals_dict, busio_uart_locals_dict_table); +#if CIRCUITPY_BUSIO_UART STATIC const mp_stream_p_t uart_stream_p = { MP_PROTO_IMPLEMENT(MP_QSTR_protocol_stream) .read = busio_uart_read, @@ -445,3 +456,11 @@ const mp_obj_type_t busio_uart_type = { .protocol = &uart_stream_p, ), }; +#else +const mp_obj_type_t busio_uart_type = { + { &mp_type_type }, + .name = MP_QSTR_UART, + .make_new = busio_uart_make_new, + .locals_dict = (mp_obj_dict_t *)&busio_uart_locals_dict, +}; +#endif // CIRCUITPY_BUSIO_UART From 7f016ae11e687efe699b019e551b18cfa0b3f291 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 11 Aug 2021 12:10:51 -0700 Subject: [PATCH 133/418] Fix build with filter to do OR --- ports/atmel-samd/Makefile | 8 +++----- ports/atmel-samd/common-hal/pwmio/PWMOut.c | 11 +++-------- ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c | 1 + 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 00ce562e9e..810d86581b 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -322,11 +322,9 @@ SRC_C += \ reset.c \ timer_handler.c \ -ifeq ($(CIRCUITPY_PWMIO),1) -SRC_C += shared_timers.c -endif - -ifeq ($(CIRCUITPY_AUDIOIO),1) +# This is an OR because it filters to any 1s and then checks to see if it is not +# empty. +ifneq (,$(filter 1,$(CIRCUITPY_PWMIO) $(CIRCUITPY_AUDIOIO) $(CIRCUITPY_RGBMATRIX))) SRC_C += shared_timers.c endif diff --git a/ports/atmel-samd/common-hal/pwmio/PWMOut.c b/ports/atmel-samd/common-hal/pwmio/PWMOut.c index 3528b55e98..fa6a2d3f47 100644 --- a/ports/atmel-samd/common-hal/pwmio/PWMOut.c +++ b/ports/atmel-samd/common-hal/pwmio/PWMOut.c @@ -31,15 +31,15 @@ #include "common-hal/pwmio/PWMOut.h" #include "shared-bindings/pwmio/PWMOut.h" #include "shared-bindings/microcontroller/Processor.h" +#include "shared_timers.h" #include "timer_handler.h" #include "atmel_start_pins.h" #include "hal/utils/include/utils_repeat_macro.h" +#include "samd/pins.h" #include "samd/timers.h" #include "supervisor/shared/translate.h" -#include "samd/pins.h" - #undef ENABLE #define _TCC_SIZE(unused, n) TCC##n##_SIZE, @@ -77,16 +77,11 @@ void pwmout_reset(void) { target_tcc_frequencies[i] = 0; tcc_refcount[i] = 0; } - Tcc *tccs[TCC_INST_NUM] = TCC_INSTS; for (int i = 0; i < TCC_INST_NUM; i++) { if (!timer_ok_to_reset(i, false)) { continue; } - uint8_t mask = 0xff; - for (uint8_t j = 0; j < tcc_cc_num[i]; j++) { - mask <<= 1; - } - tcc_channels[i] = mask; + tcc_channels[i] = 0xff << tcc_cc_num[i]; } } diff --git a/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c index aa0bd78275..eca3757f20 100644 --- a/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c +++ b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c @@ -29,6 +29,7 @@ #include "common-hal/rgbmatrix/RGBMatrix.h" #include "samd/timers.h" +#include "shared_timers.h" #include "timer_handler.h" void *common_hal_rgbmatrix_timer_allocate(rgbmatrix_rgbmatrix_obj_t *self) { From 4be64cd8a9cf98e367f269057d9bdefc41aa5302 Mon Sep 17 00:00:00 2001 From: Bruce Segal Date: Wed, 11 Aug 2021 13:11:17 -0700 Subject: [PATCH 134/418] Initial MorphESP-240 support --- .../boards/morpheans_morphesp-240/board.c | 227 ++++++++++++++++++ .../morpheans_morphesp-240/mpconfigboard.h | 44 ++++ .../morpheans_morphesp-240/mpconfigboard.mk | 17 ++ .../boards/morpheans_morphesp-240/pins.c | 58 +++++ .../boards/morpheans_morphesp-240/sdkconfig | 6 + 5 files changed, 352 insertions(+) create mode 100644 ports/esp32s2/boards/morpheans_morphesp-240/board.c create mode 100644 ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h create mode 100644 ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/morpheans_morphesp-240/pins.c create mode 100644 ports/esp32s2/boards/morpheans_morphesp-240/sdkconfig diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/board.c b/ports/esp32s2/boards/morpheans_morphesp-240/board.c new file mode 100644 index 0000000000..3dcf6d2465 --- /dev/null +++ b/ports/esp32s2/boards/morpheans_morphesp-240/board.c @@ -0,0 +1,227 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" + +#define DELAY 0x80 + +// From Arduino-ST7789 library https://github.com/ananevilya/Arduino-ST7789-Library/blob/master/Arduino_ST7789.cpp +#define ST7789_TFTWIDTH 240 +#define ST7789_TFTHEIGHT 240 + +#define ST7789_240x240_XSTART 0 +#define ST7789_240x240_YSTART 0 + +#define ST7789_NOP 0x00 +#define ST7789_SWRESET 0x01 +#define ST7789_RDDID 0x04 +#define ST7789_RDDST 0x09 + +#define ST7789_SLPIN 0x10 +#define ST7789_SLPOUT 0x11 +#define ST7789_PTLON 0x12 +#define ST7789_NORON 0x13 + +#define ST7789_INVOFF 0x20 +#define ST7789_INVON 0x21 +#define ST7789_DISPOFF 0x28 +#define ST7789_DISPON 0x29 +#define ST7789_CASET 0x2A +#define ST7789_RASET 0x2B +#define ST7789_RAMWR 0x2C +#define ST7789_RAMRD 0x2E + +#define ST7789_PTLAR 0x30 +#define ST7789_COLMOD 0x3A +#define ST7789_MADCTL 0x36 +#define ST7789_VSCSAD 0x37 +#define ST7789_PORCTRL 0xB2 +#define ST7789_GCTRL 0xB7 +#define ST7789_VCOMS 0xBB +#define ST7789_LCMCTRL 0xC0 +#define ST7789_IDSET 0xC1 +#define ST7789_VDVVRHEN 0xC2 +#define ST7789_VRHS 0xC3 +#define ST7789_VDVS 0xC4 +#define ST7789_VCMOFSET 0xC5 +#define ST7789_FRCTRL2 0xC6 +#define ST7789_CABCCTRL 0xC7 +#define ST7789_REGSEL1 0xC8 +#define ST7789_REGSEL2 0xCA +#define ST7789_PWMFRSEL 0xCC +#define ST7789_PWCTRL1 0xD0 +#define ST7789_VAPVANEN 0xD2 +#define ST7789_PVGAMCTRL 0xE0 +#define ST7789_NVGAMCTRL 0xE1 + +#define ST7789_MADCTL_MY 0x80 +#define ST7789_MADCTL_MX 0x40 +#define ST7789_MADCTL_MV 0x20 +#define ST7789_MADCTL_ML 0x10 +#define ST7789_MADCTL_RGB 0x00 + +#define ST7789_RDID1 0xDA +#define ST7789_RDID2 0xDB +#define ST7789_RDID3 0xDC +#define ST7789_RDID4 0xDD + +#define DISPLAY_MADCTL (ST7789_MADCTL_RGB) +#define DISPLAY_VSCSAD 0 + +// The init_sequence is bitpacked to minimize the ram impact. Every command begins with a +// command byte followed by a byte to determine the parameter count and delay. When the top bit +// of the second byte is 1 (0x80), a delay will occur after the command parameters are sent. +// The remaining 7 bits are the parameter count excluding any delay byte. The bytes following +// are the parameters. When the delay bit is set, a single byte after the parameters specifies +// the delay duration in milliseconds. The value 0xff will lead to an extra long 500 ms delay +// instead of 255 ms.uint8_t display_init_sequence[] = { +// display init sequence according to LilyGO example app + +uint8_t display_init_sequence[] = { + // From Lilygo example + // sw reset + 0x01, 0 | DELAY, 150, + // sleep out + 0x11, 0 | DELAY, 120, + // normal display mode on + 0x13, 0, + // display and color format settings + 0x36, 1, DISPLAY_MADCTL, + 0xB6, 2, 0x0A, 0x82, + 0x3A, 1 | DELAY, 0x55, 10, + // ST7789V frame rate setting + 0xB2, 5, 0x0C, 0x0C, 0x00, 0x33, 0x33, + // voltages: VGH / VGL + 0xB7, 1, 0x35, + // ST7789V power setting + 0xBB, 1, 0x28, + 0xC0, 1, 0x0C, + 0xC2, 2, 0x01, 0xFF, + 0xC3, 1, 0x10, + 0xC4, 1, 0x20, + 0xC6, 1, 0x0F, + 0xD0, 2, 0xA4, 0xA1, + // ST7789V gamma setting + 0xE0, 14, 0xD0, 0x00, 0x02, 0x07, 0x0A, 0x28, 0x32, 0x44, 0x42, 0x06, 0x0E, 0x12, 0x14, 0x17, + 0xE1, 14, 0xD0, 0x00, 0x02, 0x07, 0x0A, 0x28, 0x31, 0x54, 0x47, 0x0E, 0x1C, 0x17, 0x1B, 0x1E, + 0x21, 0, + // display on + 0x21, 0 | DELAY, 10, // _INVON + 0x29, 0 | DELAY, 120 +}; + + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO6); + common_hal_never_reset_pin(&pin_GPIO7); + #endif /* DEBUG */ + + // Display + + busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; + + common_hal_busio_spi_construct( + spi, + &pin_GPIO12, // CLK + &pin_GPIO11, // MOSI + NULL // MISO not connected + ); + + 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_GPIO14, // DC + &pin_GPIO10, // CS + &pin_GPIO9, // RST + 40000000, // baudrate + 0, // polarity + 0 // phase + ); + + // workaround as board_init() is called before reset_port() in main.c + pwmout_reset(); + + displayio_display_obj_t *display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct( + display, + bus, + 240, // width (after rotation) + 240, // height (after rotation) + 0, // column start + 80, // row start + 0, // rotation + 16, // color depth + false, // grayscale + false, // pixels in a byte share a row. Only valid for depths < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_pixels_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command + MIPI_COMMAND_WRITE_MEMORY_START, // write memory command + 0x37, // set vertical scroll command + display_init_sequence, + sizeof(display_init_sequence), + NULL, // There is no backlight pin, defined for now. + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false, // data_as_commands + true, // auto_refresh + 60, // native_frames_per_second + false, // backlight_on_high + false // SH1107_addressing + ); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { + common_hal_displayio_release_displays(); +} diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h b/ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h new file mode 100644 index 0000000000..6a18f996bb --- /dev/null +++ b/ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h @@ -0,0 +1,44 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "MORPHEANS MorphESP-240" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO16) +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO7) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO6) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO12) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO13) diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.mk b/ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.mk new file mode 100644 index 0000000000..aee744ca1a --- /dev/null +++ b/ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303a +USB_PID = 0x80B7 +USB_PRODUCT = "MORPHESP-240" +USB_MANUFACTURER = "MORPHEANS" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_MODULE = wroom diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c new file mode 100644 index 0000000000..a41da9e996 --- /dev/null +++ b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c @@ -0,0 +1,58 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + // Serial UART on breakout board + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO18) }, + + // I2C on breakout board. + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO7) }, + + // WS2812B RGB LED + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) }, + + // SPI on breakout board + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, + + // 1.3" 240x240 LCD ST7789 + { MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_LCD_CLK), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_LCD_D_C), MP_ROM_PTR(&pin_GPIO14) }, + { 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/esp32s2/boards/morpheans_morphesp-240/sdkconfig b/ports/esp32s2/boards/morpheans_morphesp-240/sdkconfig new file mode 100644 index 0000000000..36ada0b0c7 --- /dev/null +++ b/ports/esp32s2/boards/morpheans_morphesp-240/sdkconfig @@ -0,0 +1,6 @@ +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="MORPHESP-240" +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# end of LWIP \ No newline at end of file From f35afa8239ebd6b5da7f0d2d3f63b08fb2e2c089 Mon Sep 17 00:00:00 2001 From: Bruce Segal Date: Wed, 11 Aug 2021 13:43:08 -0700 Subject: [PATCH 135/418] Formatting and build.yml --- .github/workflows/build.yml | 1 + ports/esp32s2/boards/morpheans_morphesp-240/pins.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d567ca9e2..fc96bc8995 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -516,6 +516,7 @@ jobs: - "gravitech_cucumber_rs" - "lilygo_ttgo_t8_s2_st7789" - "microdev_micro_s2" + - "morpheans_morphesp-240" - "muselab_nanoesp32_s2_wroom" - "muselab_nanoesp32_s2_wrover" - "targett_module_clip_wroom" diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c index a41da9e996..f311daeaa2 100644 --- a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c +++ b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c @@ -34,7 +34,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO18) }, - // I2C on breakout board. + // I2C on breakout board. { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO7) }, From fb6b4385801fc05ac993c2fc4866a0f16bdfc4f5 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 11 Aug 2021 14:47:35 -0700 Subject: [PATCH 136/418] Make `getpass` and `traceback` full build only This leaves much more space on SAMD21 builds that aren't "full builds". These are new APIs that we don't need to add to old boards. Also, tweak two Arduino boards to save space on them. --- .../boards/arduino_mkr1300/mpconfigboard.h | 13 +++++++++++++ .../boards/arduino_nano_33_iot/mpconfigboard.h | 8 ++++++++ py/circuitpy_mpconfig.mk | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h index f0748f35de..6a3f7a9687 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h @@ -16,3 +16,16 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 +// USD ID +#define IGNORE_PIN_PA18 1 + +// Hooked to the external crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// SWD only +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 + +// Not connected +#define IGNORE_PIN_PA28 1 diff --git a/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.h b/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.h index 62883ad4a5..6be4f5606a 100644 --- a/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.h @@ -16,3 +16,11 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Not connected +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// SWD only +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index e22cccda43..be68904d18 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -190,7 +190,7 @@ CFLAGS += -DCIRCUITPY_FREQUENCYIO=$(CIRCUITPY_FREQUENCYIO) CIRCUITPY_GAMEPADSHIFT ?= 0 CFLAGS += -DCIRCUITPY_GAMEPADSHIFT=$(CIRCUITPY_GAMEPADSHIFT) -CIRCUITPY_GETPASS ?= 1 +CIRCUITPY_GETPASS ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_GETPASS=$(CIRCUITPY_GETPASS) CIRCUITPY_GNSS ?= 0 @@ -336,7 +336,7 @@ CFLAGS += -DCIRCUITPY_TOUCHIO_USE_NATIVE=$(CIRCUITPY_TOUCHIO_USE_NATIVE) CIRCUITPY_TOUCHIO ?= 1 CFLAGS += -DCIRCUITPY_TOUCHIO=$(CIRCUITPY_TOUCHIO) -CIRCUITPY_TRACEBACK ?= 1 +CIRCUITPY_TRACEBACK ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_TRACEBACK=$(CIRCUITPY_TRACEBACK) # For debugging. From 47c8ff05707fb23814a44101d77df2f9cc2c737b Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Wed, 11 Aug 2021 23:34:20 +0100 Subject: [PATCH 137/418] Removed unnecessary defines --- .../pimoroni_interstate75/mpconfigboard.h | 31 ------------------- .../pimoroni_plasma2040/mpconfigboard.h | 29 ----------------- 2 files changed, 60 deletions(-) diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h index 1ce8e1e7e1..052c47fa68 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h @@ -1,41 +1,10 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni Interstate 75" #define MICROPY_HW_MCU_NAME "rp2040" -#define MICROPY_HW_R0 (&pin_GPIO0) -#define MICROPY_HW_G0 (&pin_GPIO1) -#define MICROPY_HW_B0 (&pin_GPIO2) -#define MICROPY_HW_R1 (&pin_GPIO3) -#define MICROPY_HW_G1 (&pin_GPIO4) -#define MICROPY_HW_B1 (&pin_GPIO5) - -#define MICROPY_HW_ROW_A (&pin_GPIO6) -#define MICROPY_HW_ROW_B (&pin_GPIO7) -#define MICROPY_HW_ROW_C (&pin_GPIO8) -#define MICROPY_HW_ROW_D (&pin_GPIO9) -#define MICROPY_HW_ROW_E (&pin_GPIO10) - -#define MICROPY_HW_CLK (&pin_GPIO11) -#define MICROPY_HW_LAT (&pin_GPIO12) -#define MICROPY_HW_OE (&pin_GPIO13) - -#define MICROPY_HW_SW_A (&pin_GPIO14) - #define CIRCUITPY_RGB_STATUS_INVERTED_PWM #define CIRCUITPY_RGB_STATUS_R (&pin_GPIO16) #define CIRCUITPY_RGB_STATUS_G (&pin_GPIO17) #define CIRCUITPY_RGB_STATUS_B (&pin_GPIO18) -#define MICROPY_HW_I2C_INT (&pin_GPIO19) - #define DEFAULT_I2C_BUS_SCL (&pin_GPIO21) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO20) - -#define MICROPY_HW_USER_SW (&pin_GPIO23) - -#define MICROPY_HW_CURRENT_SENSE (&pin_GPIO29) - -// These pins are unconnected -#define IGNORE_PIN_GPIO15 1 -#define IGNORE_PIN_GPIO22 1 -#define IGNORE_PIN_GPIO24 1 -#define IGNORE_PIN_GPIO25 1 diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h index 6d1e137906..b8e48a26a2 100644 --- a/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/mpconfigboard.h @@ -1,39 +1,10 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni Plasma 2040" #define MICROPY_HW_MCU_NAME "rp2040" -#define MICROPY_HW_SW_A (&pin_GPIO12) -#define MICROPY_HW_SW_B (&pin_GPIO13) - -#define MICROPY_HW_CLK (&pin_GPIO14) -#define MICROPY_HW_DATA (&pin_GPIO15) - #define CIRCUITPY_RGB_STATUS_INVERTED_PWM #define CIRCUITPY_RGB_STATUS_R (&pin_GPIO16) #define CIRCUITPY_RGB_STATUS_G (&pin_GPIO17) #define CIRCUITPY_RGB_STATUS_B (&pin_GPIO18) -#define MICROPY_HW_I2C_INT (&pin_GPIO19) - #define DEFAULT_I2C_BUS_SCL (&pin_GPIO21) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO20) - -#define MICROPY_HW_USER_SW (&pin_GPIO23) - -#define MICROPY_HW_CURRENT_SENSE (&pin_GPIO29) - -// These pins are unconnected -#define IGNORE_PIN_GPIO0 1 -#define IGNORE_PIN_GPIO1 1 -#define IGNORE_PIN_GPIO2 1 -#define IGNORE_PIN_GPIO3 1 -#define IGNORE_PIN_GPIO4 1 -#define IGNORE_PIN_GPIO5 1 -#define IGNORE_PIN_GPIO6 1 -#define IGNORE_PIN_GPIO7 1 -#define IGNORE_PIN_GPIO8 1 -#define IGNORE_PIN_GPIO9 1 -#define IGNORE_PIN_GPIO10 1 -#define IGNORE_PIN_GPIO11 1 -#define IGNORE_PIN_GPIO22 1 -#define IGNORE_PIN_GPIO24 1 -#define IGNORE_PIN_GPIO25 1 From 05205259c655a99bf3082848a044377cd0abd013 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 11 Aug 2021 21:52:20 -0400 Subject: [PATCH 138/418] update tools/adabot submodule --- requirements-dev.txt | 1 + tools/adabot | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6db56d8940..c3b33f8713 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,6 +7,7 @@ jinja2 typer requests +requests-cache sh click setuptools diff --git a/tools/adabot b/tools/adabot index 393c275671..f879b24c5f 160000 --- a/tools/adabot +++ b/tools/adabot @@ -1 +1 @@ -Subproject commit 393c2756714b5cccf028a82c23b873d36b2d9e8b +Subproject commit f879b24c5fcf759be3ecbd2ef6c5302b2acc8d28 From a48aa979740a925bc3bec5ed81736b160a154c80 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 12 Aug 2021 07:47:34 -0400 Subject: [PATCH 139/418] riscv buidl: pip install -r requirements-dev.txt --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d078ad3f5f..abe8627489 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -462,7 +462,7 @@ jobs: - name: Install deps run: | sudo apt-get install -y gettext - pip install requests sh click setuptools awscli + pip install -r requirements-dev.txt wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz - name: Versions From 670d295db53e69828ee1d7598333c5b6b185765a Mon Sep 17 00:00:00 2001 From: James Carr Date: Thu, 12 Aug 2021 14:05:17 +0100 Subject: [PATCH 140/418] Update the __init__ documentation for EPaperDisplay. The unknown parameter `single_byte_bounds` was removed. The missing parameters `set_current_column_command` and `set_current_row_command` were added. --- shared-bindings/displayio/EPaperDisplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index e80b243223..0f62ae63b4 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -54,7 +54,9 @@ //| width: int, height: int, ram_width: int, ram_height: int, //| colstart: int = 0, rowstart: int = 0, rotation: int = 0, //| set_column_window_command: Optional[int] = None, -//| set_row_window_command: Optional[int] = None, single_byte_bounds: bool = False, +//| set_row_window_command: Optional[int] = None, +//| set_current_column_command: Optional[int] = None, +//| set_current_row_command: Optional[int] = None, //| write_black_ram_command: int, black_bits_inverted: bool = False, //| write_color_ram_command: Optional[int] = None, //| color_bits_inverted: bool = False, highlight_color: int = 0x000000, From e8df829714199435b886af1d4580a94a7337c4a4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 12 Aug 2021 11:59:58 -0500 Subject: [PATCH 141/418] Displayio: change refresh minimum_frames_per_second default to 0 Closes: #5133 --- shared-bindings/displayio/Display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index e12e398802..3509c7626a 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -230,7 +230,7 @@ STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in) } MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show); -//| def refresh(self, *, target_frames_per_second: Optional[int] = None, minimum_frames_per_second: int = 1) -> bool: +//| def refresh(self, *, target_frames_per_second: Optional[int] = None, minimum_frames_per_second: int = 0) -> bool: //| """When auto refresh is off, waits for the target frame rate and then refreshes the display, //| returning True. If the call has taken too long since the last refresh call for the given //| target frame rate, then the refresh returns False immediately without updating the screen to @@ -254,7 +254,7 @@ STATIC mp_obj_t displayio_display_obj_refresh(size_t n_args, const mp_obj_t *pos enum { ARG_target_frames_per_second, ARG_minimum_frames_per_second }; static const mp_arg_t allowed_args[] = { { MP_QSTR_target_frames_per_second, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, - { MP_QSTR_minimum_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} }, + { MP_QSTR_minimum_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; From de796e230478b19bbdd2f1a031da973be10f8c15 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 12 Aug 2021 10:47:14 -0700 Subject: [PATCH 142/418] Move OneWire to `onewireio` from `busio` This will allow finer grained inclusion in 8.0.0 Fixes #5135 --- ports/atmel-samd/common-hal/busio/OneWire.h | 33 ---- ports/cxd56/common-hal/busio/OneWire.h | 33 ---- ports/esp32s2/common-hal/busio/OneWire.h | 33 ---- ports/mimxrt10xx/common-hal/busio/OneWire.h | 33 ---- ports/raspberrypi/common-hal/busio/OneWire.h | 33 ---- py/circuitpy_defns.mk | 17 +- py/circuitpy_mpconfig.h | 8 + py/circuitpy_mpconfig.mk | 9 +- shared-bindings/bitbangio/OneWire.c | 172 ------------------ shared-bindings/bitbangio/__init__.c | 4 +- shared-bindings/busio/OneWire.h | 43 ----- shared-bindings/busio/__init__.c | 4 +- .../{busio => onewireio}/OneWire.c | 76 ++++---- .../{bitbangio => onewireio}/OneWire.h | 22 +-- .../onewireio/__init__.c | 32 +++- .../onewireio/__init__.h | 11 +- shared-module/busio/OneWire.c | 59 ------ .../{bitbangio => onewireio}/OneWire.c | 16 +- .../{bitbangio => onewireio}/OneWire.h | 8 +- .../onewireio/__init__.c | 8 +- 20 files changed, 118 insertions(+), 536 deletions(-) delete mode 100644 ports/atmel-samd/common-hal/busio/OneWire.h delete mode 100644 ports/cxd56/common-hal/busio/OneWire.h delete mode 100644 ports/esp32s2/common-hal/busio/OneWire.h delete mode 100644 ports/mimxrt10xx/common-hal/busio/OneWire.h delete mode 100644 ports/raspberrypi/common-hal/busio/OneWire.h delete mode 100644 shared-bindings/bitbangio/OneWire.c delete mode 100644 shared-bindings/busio/OneWire.h rename shared-bindings/{busio => onewireio}/OneWire.c (60%) rename shared-bindings/{bitbangio => onewireio}/OneWire.h (63%) rename shared-module/busio/OneWire.h => shared-bindings/onewireio/__init__.c (61%) rename ports/nrf/common-hal/busio/OneWire.h => shared-bindings/onewireio/__init__.h (84%) delete mode 100644 shared-module/busio/OneWire.c rename shared-module/{bitbangio => onewireio}/OneWire.c (85%) rename shared-module/{bitbangio => onewireio}/OneWire.h (86%) rename ports/stm/common-hal/busio/OneWire.h => shared-module/onewireio/__init__.c (83%) diff --git a/ports/atmel-samd/common-hal/busio/OneWire.h b/ports/atmel-samd/common-hal/busio/OneWire.h deleted file mode 100644 index a09a44c262..0000000000 --- a/ports/atmel-samd/common-hal/busio/OneWire.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Scott Shawcroft - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H - -// Use bitbangio. -#include "shared-module/busio/OneWire.h" - -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_ONEWIRE_H diff --git a/ports/cxd56/common-hal/busio/OneWire.h b/ports/cxd56/common-hal/busio/OneWire.h deleted file mode 100644 index 17c1b22375..0000000000 --- a/ports/cxd56/common-hal/busio/OneWire.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright 2019 Sony Semiconductor Solutions Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_CXD56_COMMON_HAL_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_CXD56_COMMON_HAL_BUSIO_ONEWIRE_H - -// Use bitbangio. -#include "shared-module/busio/OneWire.h" - -#endif // MICROPY_INCLUDED_CXD56_COMMON_HAL_BUSIO_ONEWIRE_H diff --git a/ports/esp32s2/common-hal/busio/OneWire.h b/ports/esp32s2/common-hal/busio/OneWire.h deleted file mode 100644 index bb6a014190..0000000000 --- a/ports/esp32s2/common-hal/busio/OneWire.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2020 Scott Shawcroft - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_ONEWIRE_H - -// Use bitbangio. -#include "shared-module/busio/OneWire.h" - -#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_BUSIO_ONEWIRE_H diff --git a/ports/mimxrt10xx/common-hal/busio/OneWire.h b/ports/mimxrt10xx/common-hal/busio/OneWire.h deleted file mode 100644 index bb4bc016a4..0000000000 --- a/ports/mimxrt10xx/common-hal/busio/OneWire.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2016 Scott Shawcroft - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_ONEWIRE_H - -// Use bitbangio. -#include "shared-module/busio/OneWire.h" - -#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_BUSIO_ONEWIRE_H diff --git a/ports/raspberrypi/common-hal/busio/OneWire.h b/ports/raspberrypi/common-hal/busio/OneWire.h deleted file mode 100644 index e27723ab2c..0000000000 --- a/ports/raspberrypi/common-hal/busio/OneWire.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_BUSIO_ONEWIRE_H - -// Use bitbangio. -#include "shared-module/busio/OneWire.h" - -#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_BUSIO_ONEWIRE_H diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 84c8e22b2b..cd4fab9f09 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -155,7 +155,7 @@ ifeq ($(CIRCUITPY_BUSDEVICE),1) SRC_PATTERNS += adafruit_bus_device/% endif ifeq ($(CIRCUITPY_BUSIO),1) -SRC_PATTERNS += busio/% bitbangio/OneWire.% +SRC_PATTERNS += busio/% endif ifeq ($(CIRCUITPY_CAMERA),1) SRC_PATTERNS += camera/% @@ -218,6 +218,9 @@ endif ifeq ($(CIRCUITPY_NVM),1) SRC_PATTERNS += nvm/% endif +ifeq ($(CIRCUITPY_ONEWIREIO),1) +SRC_PATTERNS += onewireio/% +endif ifeq ($(CIRCUITPY_OS),1) SRC_PATTERNS += os/% endif @@ -493,7 +496,6 @@ SRC_SHARED_MODULE_ALL = \ audiomp3/__init__.c \ audiopwmio/__init__.c \ bitbangio/I2C.c \ - bitbangio/OneWire.c \ bitbangio/SPI.c \ bitbangio/__init__.c \ bitmaptools/__init__.c \ @@ -502,7 +504,6 @@ SRC_SHARED_MODULE_ALL = \ adafruit_bus_device/__init__.c \ adafruit_bus_device/I2CDevice.c \ adafruit_bus_device/SPIDevice.c \ - busio/OneWire.c \ canio/Match.c \ canio/Message.c \ canio/RemoteTransmissionRequest.c \ @@ -522,6 +523,8 @@ SRC_SHARED_MODULE_ALL = \ fontio/__init__.c \ framebufferio/FramebufferDisplay.c \ framebufferio/__init__.c \ + gamepadshift/GamePadShift.c \ + gamepadshift/__init__.c \ getpass/__init__.c \ ipaddress/IPv4Address.c \ ipaddress/__init__.c \ @@ -531,15 +534,13 @@ SRC_SHARED_MODULE_ALL = \ keypad/KeyMatrix.c \ keypad/ShiftRegisterKeys.c \ keypad/Keys.c \ - sdcardio/SDCard.c \ - sdcardio/__init__.c \ - gamepadshift/GamePadShift.c \ - gamepadshift/__init__.c \ memorymonitor/__init__.c \ memorymonitor/AllocationAlarm.c \ memorymonitor/AllocationSize.c \ network/__init__.c \ msgpack/__init__.c \ + onewireio/__init__.c \ + onewireio/OneWire.c \ os/__init__.c \ qrio/__init__.c \ qrio/QRDecoder.c \ @@ -548,6 +549,8 @@ SRC_SHARED_MODULE_ALL = \ rgbmatrix/RGBMatrix.c \ rgbmatrix/__init__.c \ rotaryio/IncrementalEncoder.c \ + sdcardio/SDCard.c \ + sdcardio/__init__.c \ sharpdisplay/SharpMemoryFramebuffer.c \ sharpdisplay/__init__.c \ socket/__init__.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index b8dbcd6de2..aff54f51e5 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -583,6 +583,13 @@ extern const struct _mp_obj_module_t neopixel_write_module; extern const struct _mp_obj_module_t nvm_module; #endif +#if CIRCUITPY_OS +extern const struct _mp_obj_module_t onewireio_module; +#define ONEWIREIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_onewireio), (mp_obj_t)&onewireio_module }, +#else +#define ONEWIREIO_MODULE +#endif + #if CIRCUITPY_OS extern const struct _mp_obj_module_t os_module; #define OS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_os), (mp_obj_t)&os_module }, @@ -915,6 +922,7 @@ extern const struct _mp_obj_module_t msgpack_module; MICROCONTROLLER_MODULE \ MSGPACK_MODULE \ NEOPIXEL_WRITE_MODULE \ + ONEWIREIO_MODULE \ PEW_MODULE \ PIXELBUF_MODULE \ PS2IO_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index be68904d18..b486497692 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -199,6 +199,9 @@ CFLAGS += -DCIRCUITPY_GNSS=$(CIRCUITPY_GNSS) CIRCUITPY_I2CPERIPHERAL ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_I2CPERIPHERAL=$(CIRCUITPY_I2CPERIPHERAL) +CIRCUITPY_IMAGECAPTURE ?= 0 +CFLAGS += -DCIRCUITPY_IMAGECAPTURE=$(CIRCUITPY_IMAGECAPTURE) + CIRCUITPY_IPADDRESS ?= $(CIRCUITPY_WIFI) CFLAGS += -DCIRCUITPY_IPADDRESS=$(CIRCUITPY_IPADDRESS) @@ -226,12 +229,12 @@ CFLAGS += -DCIRCUITPY_NEOPIXEL_WRITE=$(CIRCUITPY_NEOPIXEL_WRITE) CIRCUITPY_NVM ?= 1 CFLAGS += -DCIRCUITPY_NVM=$(CIRCUITPY_NVM) +CIRCUITPY_ONEWIREIO ?= $(CIRCUITPY_BUSIO) +CFLAGS += -DCIRCUITPY_ONEWIREIO=$(CIRCUITPY_ONEWIREIO) + CIRCUITPY_OS ?= 1 CFLAGS += -DCIRCUITPY_OS=$(CIRCUITPY_OS) -CIRCUITPY_IMAGECAPTURE ?= 0 -CFLAGS += -DCIRCUITPY_IMAGECAPTURE=$(CIRCUITPY_IMAGECAPTURE) - CIRCUITPY_PEW ?= 0 CFLAGS += -DCIRCUITPY_PEW=$(CIRCUITPY_PEW) diff --git a/shared-bindings/bitbangio/OneWire.c b/shared-bindings/bitbangio/OneWire.c deleted file mode 100644 index 15cf833242..0000000000 --- a/shared-bindings/bitbangio/OneWire.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * This file is part of the Micro Python 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 - -#include "lib/utils/context_manager_helpers.h" -#include "py/objproperty.h" -#include "py/runtime.h" -#include "py/runtime0.h" -#include "shared-bindings/microcontroller/Pin.h" -#include "shared-bindings/bitbangio/OneWire.h" -#include "shared-bindings/util.h" - -//| class OneWire: -//| """Lowest-level of the Maxim OneWire protocol -//| -//| :class:`~bitbangio.OneWire` implements the timing-sensitive foundation of -//| the Maxim (formerly Dallas Semi) OneWire protocol. -//| -//| Protocol definition is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/126""" -//| -//| def __init__(self, pin: microcontroller.Pin) -> None: -//| -//| """Create a OneWire object associated with the given pin. The object -//| implements the lowest level timing-sensitive bits of the protocol. -//| -//| :param ~microcontroller.Pin pin: Pin to read pulses from. -//| -//| Read a short series of pulses:: -//| -//| import bitbangio -//| import board -//| -//| onewire = bitbangio.OneWire(board.D7) -//| onewire.reset() -//| onewire.write_bit(True) -//| onewire.write_bit(False) -//| print(onewire.read_bit())""" -//| ... -//| -STATIC mp_obj_t bitbangio_onewire_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_pin }; - static const mp_arg_t allowed_args[] = { - { MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, - }; - 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); - - const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj); - - bitbangio_onewire_obj_t *self = m_new_obj(bitbangio_onewire_obj_t); - self->base.type = &bitbangio_onewire_type; - - shared_module_bitbangio_onewire_construct(self, pin); - return MP_OBJ_FROM_PTR(self); -} - -//| def deinit(self) -> None: -//| """Deinitialize the OneWire bus and release any hardware resources for reuse.""" -//| ... -//| -STATIC mp_obj_t bitbangio_onewire_deinit(mp_obj_t self_in) { - bitbangio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); - shared_module_bitbangio_onewire_deinit(self); - return mp_const_none; -} -STATIC MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_onewire_deinit_obj, bitbangio_onewire_deinit); - -STATIC void check_for_deinit(bitbangio_onewire_obj_t *self) { - if (shared_module_bitbangio_onewire_deinited(self)) { - raise_deinited_error(); - } -} - -//| def __enter__(self) -> OneWire: -//| """No-op used by Context Managers.""" -//| ... -//| -// Provided by context manager helper. - -//| def __exit__(self) -> None: -//| """Automatically deinitializes the hardware when exiting a context. See -//| :ref:`lifetime-and-contextmanagers` for more info.""" -//| ... -//| -STATIC mp_obj_t bitbangio_onewire_obj___exit__(size_t n_args, const mp_obj_t *args) { - (void)n_args; - shared_module_bitbangio_onewire_deinit(args[0]); - return mp_const_none; -} -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitbangio_onewire___exit___obj, 4, 4, bitbangio_onewire_obj___exit__); - -//| def reset(self) -> bool: -//| """Reset the OneWire bus""" -//| ... -//| -STATIC mp_obj_t bitbangio_onewire_obj_reset(mp_obj_t self_in) { - bitbangio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); - check_for_deinit(self); - - return mp_obj_new_bool(shared_module_bitbangio_onewire_reset(self)); -} -MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_onewire_reset_obj, bitbangio_onewire_obj_reset); - -//| def read_bit(self) -> bool: -//| """Read in a bit -//| -//| :returns: bit state read -//| :rtype: bool""" -//| ... -//| -STATIC mp_obj_t bitbangio_onewire_obj_read_bit(mp_obj_t self_in) { - bitbangio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); - check_for_deinit(self); - - return mp_obj_new_bool(shared_module_bitbangio_onewire_read_bit(self)); -} -MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_onewire_read_bit_obj, bitbangio_onewire_obj_read_bit); - -//| def write_bit(self, value: bool) -> None: -//| """Write out a bit based on value.""" -//| ... -//| -STATIC mp_obj_t bitbangio_onewire_obj_write_bit(mp_obj_t self_in, mp_obj_t bool_obj) { - bitbangio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); - check_for_deinit(self); - - shared_module_bitbangio_onewire_write_bit(self, mp_obj_is_true(bool_obj)); - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_2(bitbangio_onewire_write_bit_obj, bitbangio_onewire_obj_write_bit); - -STATIC const mp_rom_map_elem_t bitbangio_onewire_locals_dict_table[] = { - // Methods - { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&bitbangio_onewire_deinit_obj) }, - { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) }, - { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&bitbangio_onewire___exit___obj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&bitbangio_onewire_reset_obj) }, - { MP_ROM_QSTR(MP_QSTR_read_bit), MP_ROM_PTR(&bitbangio_onewire_read_bit_obj) }, - { MP_ROM_QSTR(MP_QSTR_write_bit), MP_ROM_PTR(&bitbangio_onewire_write_bit_obj) }, -}; -STATIC MP_DEFINE_CONST_DICT(bitbangio_onewire_locals_dict, bitbangio_onewire_locals_dict_table); - -const mp_obj_type_t bitbangio_onewire_type = { - { &mp_type_type }, - .name = MP_QSTR_OneWire, - .make_new = bitbangio_onewire_make_new, - .locals_dict = (mp_obj_dict_t *)&bitbangio_onewire_locals_dict, -}; diff --git a/shared-bindings/bitbangio/__init__.c b/shared-bindings/bitbangio/__init__.c index 81e9d91a37..a8d9f5e615 100644 --- a/shared-bindings/bitbangio/__init__.c +++ b/shared-bindings/bitbangio/__init__.c @@ -34,7 +34,7 @@ #include "shared-bindings/bitbangio/__init__.h" #include "shared-bindings/bitbangio/I2C.h" -#include "shared-bindings/bitbangio/OneWire.h" +#include "shared-bindings/onewireio/OneWire.h" #include "shared-bindings/bitbangio/SPI.h" #include "py/runtime.h" @@ -72,7 +72,7 @@ STATIC const mp_rom_map_elem_t bitbangio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitbangio) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&bitbangio_i2c_type) }, - { MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&bitbangio_onewire_type) }, + { MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&bitbangio_spi_type) }, }; diff --git a/shared-bindings/busio/OneWire.h b/shared-bindings/busio/OneWire.h deleted file mode 100644 index a270bab5c9..0000000000 --- a/shared-bindings/busio/OneWire.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of the Micro Python 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. - */ - -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_SHARED_BINDINGS_BUSIO_ONEWIRE_H - -#include "common-hal/microcontroller/Pin.h" -#include "common-hal/busio/OneWire.h" - -extern const mp_obj_type_t busio_onewire_type; - -extern void common_hal_busio_onewire_construct(busio_onewire_obj_t *self, - const mcu_pin_obj_t *pin); -extern void common_hal_busio_onewire_deinit(busio_onewire_obj_t *self); -extern bool common_hal_busio_onewire_deinited(busio_onewire_obj_t *self); -extern bool common_hal_busio_onewire_reset(busio_onewire_obj_t *self); -extern bool common_hal_busio_onewire_read_bit(busio_onewire_obj_t *self); -extern void common_hal_busio_onewire_write_bit(busio_onewire_obj_t *self, bool bit); - -#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BUSIO_ONEWIRE_H diff --git a/shared-bindings/busio/__init__.c b/shared-bindings/busio/__init__.c index e7df331c12..2cde3d62b3 100644 --- a/shared-bindings/busio/__init__.c +++ b/shared-bindings/busio/__init__.c @@ -32,9 +32,9 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/busio/__init__.h" #include "shared-bindings/busio/I2C.h" -#include "shared-bindings/busio/OneWire.h" #include "shared-bindings/busio/SPI.h" #include "shared-bindings/busio/UART.h" +#include "shared-bindings/onewireio/OneWire.h" #include "py/runtime.h" @@ -73,7 +73,7 @@ STATIC const mp_rom_map_elem_t busio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_busio) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&busio_i2c_type) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&busio_spi_type) }, - { MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&busio_onewire_type) }, + { MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&busio_uart_type) }, }; diff --git a/shared-bindings/busio/OneWire.c b/shared-bindings/onewireio/OneWire.c similarity index 60% rename from shared-bindings/busio/OneWire.c rename to shared-bindings/onewireio/OneWire.c index 026e1ee968..dd628884dd 100644 --- a/shared-bindings/busio/OneWire.c +++ b/shared-bindings/onewireio/OneWire.c @@ -31,7 +31,7 @@ #include "py/runtime.h" #include "py/runtime0.h" #include "shared-bindings/microcontroller/Pin.h" -#include "shared-bindings/busio/OneWire.h" +#include "shared-bindings/onewireio/OneWire.h" #include "shared-bindings/util.h" //| class OneWire: @@ -51,17 +51,17 @@ //| //| Read a short series of pulses:: //| -//| import busio +//| import onewireio //| import board //| -//| onewire = busio.OneWire(board.D7) +//| onewire = onewireio.OneWire(board.D7) //| onewire.reset() //| onewire.write_bit(True) //| onewire.write_bit(False) //| print(onewire.read_bit())""" //| ... //| -STATIC mp_obj_t busio_onewire_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +STATIC mp_obj_t onewireio_onewire_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_pin }; static const mp_arg_t allowed_args[] = { { MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, @@ -70,10 +70,10 @@ STATIC mp_obj_t busio_onewire_make_new(const mp_obj_type_t *type, size_t n_args, mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj); - busio_onewire_obj_t *self = m_new_obj(busio_onewire_obj_t); - self->base.type = &busio_onewire_type; + onewireio_onewire_obj_t *self = m_new_obj(onewireio_onewire_obj_t); + self->base.type = &onewireio_onewire_type; - common_hal_busio_onewire_construct(self, pin); + common_hal_onewireio_onewire_construct(self, pin); return MP_OBJ_FROM_PTR(self); } @@ -81,15 +81,15 @@ STATIC mp_obj_t busio_onewire_make_new(const mp_obj_type_t *type, size_t n_args, //| """Deinitialize the OneWire bus and release any hardware resources for reuse.""" //| ... //| -STATIC mp_obj_t busio_onewire_deinit(mp_obj_t self_in) { - busio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); - common_hal_busio_onewire_deinit(self); +STATIC mp_obj_t onewireio_onewire_deinit(mp_obj_t self_in) { + onewireio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); + common_hal_onewireio_onewire_deinit(self); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(busio_onewire_deinit_obj, busio_onewire_deinit); +STATIC MP_DEFINE_CONST_FUN_OBJ_1(onewireio_onewire_deinit_obj, onewireio_onewire_deinit); -STATIC void check_for_deinit(busio_onewire_obj_t *self) { - if (common_hal_busio_onewire_deinited(self)) { +STATIC void check_for_deinit(onewireio_onewire_obj_t *self) { + if (common_hal_onewireio_onewire_deinited(self)) { raise_deinited_error(); } } @@ -105,12 +105,12 @@ STATIC void check_for_deinit(busio_onewire_obj_t *self) { //| :ref:`lifetime-and-contextmanagers` for more info.""" //| ... //| -STATIC mp_obj_t busio_onewire_obj___exit__(size_t n_args, const mp_obj_t *args) { +STATIC mp_obj_t onewireio_onewire_obj___exit__(size_t n_args, const mp_obj_t *args) { (void)n_args; - common_hal_busio_onewire_deinit(args[0]); + common_hal_onewireio_onewire_deinit(args[0]); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_onewire___exit___obj, 4, 4, busio_onewire_obj___exit__); +STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(onewireio_onewire___exit___obj, 4, 4, onewireio_onewire_obj___exit__); //| def reset(self) -> bool: //| """Reset the OneWire bus and read presence @@ -119,13 +119,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_onewire___exit___obj, 4, 4, bus //| :rtype: bool""" //| ... //| -STATIC mp_obj_t busio_onewire_obj_reset(mp_obj_t self_in) { - busio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t onewireio_onewire_obj_reset(mp_obj_t self_in) { + onewireio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); check_for_deinit(self); - return mp_obj_new_bool(common_hal_busio_onewire_reset(self)); + return mp_obj_new_bool(common_hal_onewireio_onewire_reset(self)); } -MP_DEFINE_CONST_FUN_OBJ_1(busio_onewire_reset_obj, busio_onewire_obj_reset); +MP_DEFINE_CONST_FUN_OBJ_1(onewireio_onewire_reset_obj, onewireio_onewire_obj_reset); //| def read_bit(self) -> bool: //| """Read in a bit @@ -134,41 +134,41 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_onewire_reset_obj, busio_onewire_obj_reset); //| :rtype: bool""" //| ... //| -STATIC mp_obj_t busio_onewire_obj_read_bit(mp_obj_t self_in) { - busio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t onewireio_onewire_obj_read_bit(mp_obj_t self_in) { + onewireio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); check_for_deinit(self); - return mp_obj_new_bool(common_hal_busio_onewire_read_bit(self)); + return mp_obj_new_bool(common_hal_onewireio_onewire_read_bit(self)); } -MP_DEFINE_CONST_FUN_OBJ_1(busio_onewire_read_bit_obj, busio_onewire_obj_read_bit); +MP_DEFINE_CONST_FUN_OBJ_1(onewireio_onewire_read_bit_obj, onewireio_onewire_obj_read_bit); //| def write_bit(self, value: bool) -> None: //| """Write out a bit based on value.""" //| ... //| -STATIC mp_obj_t busio_onewire_obj_write_bit(mp_obj_t self_in, mp_obj_t bool_obj) { - busio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t onewireio_onewire_obj_write_bit(mp_obj_t self_in, mp_obj_t bool_obj) { + onewireio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in); check_for_deinit(self); - common_hal_busio_onewire_write_bit(self, mp_obj_is_true(bool_obj)); + common_hal_onewireio_onewire_write_bit(self, mp_obj_is_true(bool_obj)); return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_2(busio_onewire_write_bit_obj, busio_onewire_obj_write_bit); +MP_DEFINE_CONST_FUN_OBJ_2(onewireio_onewire_write_bit_obj, onewireio_onewire_obj_write_bit); -STATIC const mp_rom_map_elem_t busio_onewire_locals_dict_table[] = { +STATIC const mp_rom_map_elem_t onewireio_onewire_locals_dict_table[] = { // Methods - { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&busio_onewire_deinit_obj) }, + { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&onewireio_onewire_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) }, - { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&busio_onewire___exit___obj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&busio_onewire_reset_obj) }, - { MP_ROM_QSTR(MP_QSTR_read_bit), MP_ROM_PTR(&busio_onewire_read_bit_obj) }, - { MP_ROM_QSTR(MP_QSTR_write_bit), MP_ROM_PTR(&busio_onewire_write_bit_obj) }, + { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&onewireio_onewire___exit___obj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&onewireio_onewire_reset_obj) }, + { MP_ROM_QSTR(MP_QSTR_read_bit), MP_ROM_PTR(&onewireio_onewire_read_bit_obj) }, + { MP_ROM_QSTR(MP_QSTR_write_bit), MP_ROM_PTR(&onewireio_onewire_write_bit_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(busio_onewire_locals_dict, busio_onewire_locals_dict_table); +STATIC MP_DEFINE_CONST_DICT(onewireio_onewire_locals_dict, onewireio_onewire_locals_dict_table); -const mp_obj_type_t busio_onewire_type = { +const mp_obj_type_t onewireio_onewire_type = { { &mp_type_type }, .name = MP_QSTR_OneWire, - .make_new = busio_onewire_make_new, - .locals_dict = (mp_obj_dict_t *)&busio_onewire_locals_dict, + .make_new = onewireio_onewire_make_new, + .locals_dict = (mp_obj_dict_t *)&onewireio_onewire_locals_dict, }; diff --git a/shared-bindings/bitbangio/OneWire.h b/shared-bindings/onewireio/OneWire.h similarity index 63% rename from shared-bindings/bitbangio/OneWire.h rename to shared-bindings/onewireio/OneWire.h index 0dbc975122..c6d0fd6ebb 100644 --- a/shared-bindings/bitbangio/OneWire.h +++ b/shared-bindings/onewireio/OneWire.h @@ -24,20 +24,20 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BITBANGIO_ONEWIRE_H -#define MICROPY_INCLUDED_SHARED_BINDINGS_BITBANGIO_ONEWIRE_H +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_ONEWIREIO_ONEWIRE_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_ONEWIREIO_ONEWIRE_H #include "common-hal/microcontroller/Pin.h" -#include "shared-module/bitbangio/OneWire.h" +#include "shared-module/onewireio/OneWire.h" -extern const mp_obj_type_t bitbangio_onewire_type; +extern const mp_obj_type_t onewireio_onewire_type; -extern void shared_module_bitbangio_onewire_construct(bitbangio_onewire_obj_t *self, +extern void common_hal_onewireio_onewire_construct(onewireio_onewire_obj_t *self, const mcu_pin_obj_t *pin); -extern void shared_module_bitbangio_onewire_deinit(bitbangio_onewire_obj_t *self); -extern bool shared_module_bitbangio_onewire_deinited(bitbangio_onewire_obj_t *self); -extern bool shared_module_bitbangio_onewire_reset(bitbangio_onewire_obj_t *self); -extern bool shared_module_bitbangio_onewire_read_bit(bitbangio_onewire_obj_t *self); -extern void shared_module_bitbangio_onewire_write_bit(bitbangio_onewire_obj_t *self, bool bit); +extern void common_hal_onewireio_onewire_deinit(onewireio_onewire_obj_t *self); +extern bool common_hal_onewireio_onewire_deinited(onewireio_onewire_obj_t *self); +extern bool common_hal_onewireio_onewire_reset(onewireio_onewire_obj_t *self); +extern bool common_hal_onewireio_onewire_read_bit(onewireio_onewire_obj_t *self); +extern void common_hal_onewireio_onewire_write_bit(onewireio_onewire_obj_t *self, bool bit); -#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BITBANGIO_ONEWIRE_H +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_ONEWIREIO_ONEWIRE_H diff --git a/shared-module/busio/OneWire.h b/shared-bindings/onewireio/__init__.c similarity index 61% rename from shared-module/busio/OneWire.h rename to shared-bindings/onewireio/__init__.c index 5d80bab17c..4074891be9 100644 --- a/shared-module/busio/OneWire.h +++ b/shared-bindings/onewireio/__init__.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2016 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 @@ -24,16 +24,28 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_SHARED_MODULE_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_ATMEL_SAMD_SHARED_MODULE_BUSIO_ONEWIRE_H - -#include "shared-module/bitbangio/OneWire.h" +#include #include "py/obj.h" +#include "py/runtime.h" -typedef struct { - mp_obj_base_t base; - bitbangio_onewire_obj_t bitbang; -} busio_onewire_obj_t; +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/onewireio/__init__.h" +#include "shared-bindings/onewireio/OneWire.h" -#endif // MICROPY_INCLUDED_ATMEL_SAMD_SHARED_MODULE_BUSIO_ONEWIRE_H +#include "py/runtime.h" + +//| """Low-level bit primitives for """ +//| + +STATIC const mp_rom_map_elem_t onewireio_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_onewireio) }, + { MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(onewireio_module_globals, onewireio_module_globals_table); + +const mp_obj_module_t onewireio_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)&onewireio_module_globals, +}; diff --git a/ports/nrf/common-hal/busio/OneWire.h b/shared-bindings/onewireio/__init__.h similarity index 84% rename from ports/nrf/common-hal/busio/OneWire.h rename to shared-bindings/onewireio/__init__.h index 821cc64c1e..25384f6a7b 100644 --- a/ports/nrf/common-hal/busio/OneWire.h +++ b/shared-bindings/onewireio/__init__.h @@ -24,10 +24,11 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_NRF_COMMON_HAL_BUSIO_ONEWIRE_H +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_ONEWIREIO___INIT___H +#define MICROPY_INCLUDED_SHARED_BINDINGS_ONEWIREIO___INIT___H -// Use bitbangio. -#include "shared-module/busio/OneWire.h" +#include "py/obj.h" -#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BUSIO_ONEWIRE_H +// Nothing now. + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_ONEWIREIO___INIT___H diff --git a/shared-module/busio/OneWire.c b/shared-module/busio/OneWire.c deleted file mode 100644 index 80c55c7b2b..0000000000 --- a/shared-module/busio/OneWire.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of the Micro Python 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. - */ - -// Wraps the bitbangio implementation of OneWire for use in busio. -#include "common-hal/microcontroller/Pin.h" -#include "shared-bindings/bitbangio/OneWire.h" -#include "shared-module/busio/OneWire.h" - -void common_hal_busio_onewire_construct(busio_onewire_obj_t *self, - const mcu_pin_obj_t *pin) { - shared_module_bitbangio_onewire_construct(&self->bitbang, pin); -} - -bool common_hal_busio_onewire_deinited(busio_onewire_obj_t *self) { - return shared_module_bitbangio_onewire_deinited(&self->bitbang); -} - -void common_hal_busio_onewire_deinit(busio_onewire_obj_t *self) { - if (common_hal_busio_onewire_deinited(self)) { - return; - } - shared_module_bitbangio_onewire_deinit(&self->bitbang); -} - -bool common_hal_busio_onewire_reset(busio_onewire_obj_t *self) { - return shared_module_bitbangio_onewire_reset(&self->bitbang); -} - -bool common_hal_busio_onewire_read_bit(busio_onewire_obj_t *self) { - return shared_module_bitbangio_onewire_read_bit(&self->bitbang); -} - -void common_hal_busio_onewire_write_bit(busio_onewire_obj_t *self, - bool bit) { - shared_module_bitbangio_onewire_write_bit(&self->bitbang, bit); -} diff --git a/shared-module/bitbangio/OneWire.c b/shared-module/onewireio/OneWire.c similarity index 85% rename from shared-module/bitbangio/OneWire.c rename to shared-module/onewireio/OneWire.c index 8a73817f37..aeb4dcb00d 100644 --- a/shared-module/bitbangio/OneWire.c +++ b/shared-module/onewireio/OneWire.c @@ -25,24 +25,24 @@ */ #include "common-hal/microcontroller/Pin.h" -#include "shared-bindings/bitbangio/OneWire.h" +#include "shared-bindings/onewireio/OneWire.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/digitalio/DigitalInOut.h" // Durations are taken from here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/126 -void shared_module_bitbangio_onewire_construct(bitbangio_onewire_obj_t *self, +void common_hal_onewireio_onewire_construct(onewireio_onewire_obj_t *self, const mcu_pin_obj_t *pin) { self->pin.base.type = &digitalio_digitalinout_type; common_hal_digitalio_digitalinout_construct(&self->pin, pin); } -bool shared_module_bitbangio_onewire_deinited(bitbangio_onewire_obj_t *self) { +bool common_hal_onewireio_onewire_deinited(onewireio_onewire_obj_t *self) { return common_hal_digitalio_digitalinout_deinited(&self->pin); } -void shared_module_bitbangio_onewire_deinit(bitbangio_onewire_obj_t *self) { - if (shared_module_bitbangio_onewire_deinited(self)) { +void common_hal_onewireio_onewire_deinit(onewireio_onewire_obj_t *self) { + if (common_hal_onewireio_onewire_deinited(self)) { return; } common_hal_digitalio_digitalinout_deinit(&self->pin); @@ -51,7 +51,7 @@ void shared_module_bitbangio_onewire_deinit(bitbangio_onewire_obj_t *self) { // We use common_hal_mcu_delay_us(). It should not be dependent on interrupts // to do accurate timekeeping, since we disable interrupts during the delays below. -bool shared_module_bitbangio_onewire_reset(bitbangio_onewire_obj_t *self) { +bool common_hal_onewireio_onewire_reset(onewireio_onewire_obj_t *self) { common_hal_mcu_disable_interrupts(); common_hal_digitalio_digitalinout_switch_to_output(&self->pin, false, DRIVE_MODE_OPEN_DRAIN); common_hal_mcu_delay_us(480); @@ -63,7 +63,7 @@ bool shared_module_bitbangio_onewire_reset(bitbangio_onewire_obj_t *self) { return value; } -bool shared_module_bitbangio_onewire_read_bit(bitbangio_onewire_obj_t *self) { +bool common_hal_onewireio_onewire_read_bit(onewireio_onewire_obj_t *self) { common_hal_mcu_disable_interrupts(); common_hal_digitalio_digitalinout_switch_to_output(&self->pin, false, DRIVE_MODE_OPEN_DRAIN); common_hal_mcu_delay_us(6); @@ -78,7 +78,7 @@ bool shared_module_bitbangio_onewire_read_bit(bitbangio_onewire_obj_t *self) { return value; } -void shared_module_bitbangio_onewire_write_bit(bitbangio_onewire_obj_t *self, +void common_hal_onewireio_onewire_write_bit(onewireio_onewire_obj_t *self, bool bit) { common_hal_mcu_disable_interrupts(); common_hal_digitalio_digitalinout_switch_to_output(&self->pin, false, DRIVE_MODE_OPEN_DRAIN); diff --git a/shared-module/bitbangio/OneWire.h b/shared-module/onewireio/OneWire.h similarity index 86% rename from shared-module/bitbangio/OneWire.h rename to shared-module/onewireio/OneWire.h index bc4cb2096f..594478f861 100644 --- a/shared-module/bitbangio/OneWire.h +++ b/shared-module/onewireio/OneWire.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_SHARED_MODULE_BITBANGIO_ONEWIRE_H -#define MICROPY_INCLUDED_SHARED_MODULE_BITBANGIO_ONEWIRE_H +#ifndef MICROPY_INCLUDED_SHARED_MODULE_ONEWIREIO_ONEWIRE_H +#define MICROPY_INCLUDED_SHARED_MODULE_ONEWIREIO_ONEWIRE_H #include "common-hal/digitalio/DigitalInOut.h" @@ -34,6 +34,6 @@ typedef struct { mp_obj_base_t base; digitalio_digitalinout_obj_t pin; -} bitbangio_onewire_obj_t; +} onewireio_onewire_obj_t; -#endif // MICROPY_INCLUDED_SHARED_MODULE_BITBANGIO_ONEWIRE_H +#endif // MICROPY_INCLUDED_SHARED_MODULE_ONEWIREIO_ONEWIRE_H diff --git a/ports/stm/common-hal/busio/OneWire.h b/shared-module/onewireio/__init__.c similarity index 83% rename from ports/stm/common-hal/busio/OneWire.h rename to shared-module/onewireio/__init__.c index 0099593f03..674343c533 100644 --- a/ports/stm/common-hal/busio/OneWire.h +++ b/shared-module/onewireio/__init__.c @@ -24,10 +24,4 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_STM32_COMMON_HAL_BUSIO_ONEWIRE_H -#define MICROPY_INCLUDED_STM32_COMMON_HAL_BUSIO_ONEWIRE_H - -// Use bitbangio. -#include "shared-module/busio/OneWire.h" - -#endif // MICROPY_INCLUDED_STM32F_COMMON_HAL_BUSIO_ONEWIRE_H +// Nothing now. From a89f1c806fef876267f774565a5c46c9655a7ae5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 12 Aug 2021 12:50:38 -0500 Subject: [PATCH 143/418] Update Display.c --- shared-bindings/displayio/Display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 3509c7626a..f5df146455 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -237,7 +237,7 @@ MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show //| hopefully help getting caught up. //| //| If the time since the last successful refresh is below the minimum frame rate, then an -//| exception will be raised. Set ``minimum_frames_per_second`` to 0 to disable. +//| exception will be raised. The default ``minimum_frames_per_second`` of 0 disables this behavior. //| //| When auto refresh is off, ``display.refresh()`` or ``display.refresh(target_frames_per_second=None)`` //| will update the display immediately. From 7e55905d95abeb782ad9afb876bd1f4c40c75a07 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 12 Aug 2021 11:15:04 -0700 Subject: [PATCH 144/418] Fix up onewireio docs and other notes Not all of the notes were marked correctly. --- shared-bindings/_bleio/Adapter.c | 4 ++-- shared-bindings/canio/__init__.c | 2 +- shared-bindings/keypad/EventQueue.c | 2 +- shared-bindings/onewireio/OneWire.c | 14 +++++--------- shared-bindings/onewireio/__init__.c | 4 +++- shared-bindings/traceback/__init__.c | 4 ++-- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index 8262830aee..c126ee79f2 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -197,10 +197,10 @@ const mp_obj_property_t bleio_adapter_name_obj = { //| """Starts advertising until `stop_advertising` is called or if connectable, another device //| connects to us. //| -//| .. warning: If data is longer than 31 bytes, then this will automatically advertise as an +//| .. warning:: If data is longer than 31 bytes, then this will automatically advertise as an //| extended advertisement that older BLE 4.x clients won't be able to scan for. //| -//| .. note: If you set ``anonymous=True``, then a timeout must be specified. If no timeout is +//| .. note:: If you set ``anonymous=True``, then a timeout must be specified. If no timeout is //| specified, then the maximum allowed timeout will be selected automatically. //| //| :param ~_typing.ReadableBuffer data: advertising data packet bytes diff --git a/shared-bindings/canio/__init__.c b/shared-bindings/canio/__init__.c index d9863e8a21..7f367ee791 100644 --- a/shared-bindings/canio/__init__.c +++ b/shared-bindings/canio/__init__.c @@ -80,7 +80,7 @@ MAKE_ENUM_VALUE(canio_bus_state_type, bus_state, BUS_OFF, BUS_STATE_OFF); //| ERROR_WARNING: object //| """The bus is in the normal (active) state, but a moderate number of errors have occurred recently. //| -//| NOTE: Not all implementations may use ERROR_WARNING. Do not rely on seeing ERROR_WARNING before ERROR_PASSIVE.""" +//| .. note:: Not all implementations may use ``ERROR_WARNING``. Do not rely on seeing ``ERROR_WARNING`` before ``ERROR_PASSIVE``.""" //| //| ERROR_PASSIVE: object //| """The bus is in the passive state due to the number of errors that have occurred recently. diff --git a/shared-bindings/keypad/EventQueue.c b/shared-bindings/keypad/EventQueue.c index 15cc027b8c..2cb449551b 100644 --- a/shared-bindings/keypad/EventQueue.c +++ b/shared-bindings/keypad/EventQueue.c @@ -68,7 +68,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(keypad_eventqueue_get_obj, keypad_eventqueue_get); //| Note that the queue size is limited; see ``max_events`` in the constructor of //| a scanner such as `Keys` or `KeyMatrix`. //| -//| :return ``True`` if an event was available and stored, ``False`` if not. +//| :return: ``True`` if an event was available and stored, ``False`` if not. //| :rtype: bool //| """ //| ... diff --git a/shared-bindings/onewireio/OneWire.c b/shared-bindings/onewireio/OneWire.c index dd628884dd..406b421fd1 100644 --- a/shared-bindings/onewireio/OneWire.c +++ b/shared-bindings/onewireio/OneWire.c @@ -35,20 +35,16 @@ #include "shared-bindings/util.h" //| class OneWire: -//| """Lowest-level of the Maxim OneWire protocol""" -//| //| def __init__(self, pin: microcontroller.Pin) -> None: -//| """(formerly Dallas Semi) OneWire protocol. +//| """Create a OneWire object associated with the given pin. //| -//| Protocol definition is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/126 -//| -//| .. class:: OneWire(pin) -//| -//| Create a OneWire object associated with the given pin. The object -//| implements the lowest level timing-sensitive bits of the protocol. +//| The object implements the lowest level timing-sensitive bits of the protocol. //| //| :param ~microcontroller.Pin pin: Pin connected to the OneWire bus //| +//| .. note:: The OneWire class is available on `busio` and `bitbangio` in CircuitPython +//| 7.x for backwards compatibility but will be removed in CircuitPython 8.0.0. +//| //| Read a short series of pulses:: //| //| import onewireio diff --git a/shared-bindings/onewireio/__init__.c b/shared-bindings/onewireio/__init__.c index 4074891be9..81baa99fab 100644 --- a/shared-bindings/onewireio/__init__.c +++ b/shared-bindings/onewireio/__init__.c @@ -35,7 +35,9 @@ #include "py/runtime.h" -//| """Low-level bit primitives for """ +//| """Low-level bit primitives for Maxim (formerly Dallas Semi) one-wire protocol. +//| +//| Protocol definition is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/126""" //| STATIC const mp_rom_map_elem_t onewireio_module_globals_table[] = { diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index dc5be20a88..c12175f89b 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -73,7 +73,7 @@ STATIC void traceback_exception_common(mp_print_t *print, mp_obj_t value, mp_obj //| these lines are concatenated and printed, exactly the same text is //| printed as does print_exception(). //| -//| .. note: Setting `chain` will have no effect as chained exceptions are not yet implemented. +//| .. note:: Setting ``chain`` will have no effect as chained exceptions are not yet implemented. //| //| :param Type[BaseException] etype: This is ignored and inferred from the type of ``value``. //| :param BaseException value: The exception. Must be an instance of `BaseException`. @@ -112,7 +112,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(traceback_format_exception_obj, 3, traceback_f //| //| """Prints exception information and stack trace entries. //| -//| .. note: Setting `chain` will have no effect as chained exceptions are not yet implemented. +//| .. note:: Setting ``chain`` will have no effect as chained exceptions are not yet implemented. //| //| :param Type[BaseException] etype: This is ignored and inferred from the type of ``value``. //| :param BaseException value: The exception. Must be an instance of `BaseException`. From a36b930eadc37368461182df1d1ca5a1a6bcc874 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 11 Aug 2021 11:48:35 -0500 Subject: [PATCH 145/418] check uncrustify version --- tools/codeformat.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/codeformat.py b/tools/codeformat.py index 32d4eedbf0..863c27fdf5 100644 --- a/tools/codeformat.py +++ b/tools/codeformat.py @@ -119,6 +119,15 @@ C_EXTS = ( ) PY_EXTS = (".py",) + +def check_uncrustify_version(): + version = subprocess.check_output( + ["uncrustify", "--version"], encoding="utf-8", errors="replace" + ) + if version < "Uncrustify-0.71": + raise SystemExit(f"codeformat.py requires Uncrustify 0.71 or newer, got {version}") + + # Transform a filename argument relative to the current directory into one # relative to the TOP directory, which is what we need when checking against # path_rx. @@ -218,6 +227,7 @@ def main(): # Format C files with uncrustify. if format_c: + check_uncrustify_version() command = ["uncrustify", "-c", UNCRUSTIFY_CFG, "-lC", "--no-backup"] if not args.v: command.append("-q") From 6f72b02d3e41a1876c3b66631c64d2b96701c3dd Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Thu, 12 Aug 2021 11:43:27 +0000 Subject: [PATCH 146/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1015 of 1015 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 53c3ae381e..93e8b702c6 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-10 02:41+0000\n" +"PO-Revision-Date: 2021-08-13 12:33+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -509,7 +509,7 @@ msgstr "" #: ports/raspberrypi/audio_dma.c msgid "Audio conversion not implemented" -msgstr "" +msgstr "A conversão de áudio ainda não foi implementada" #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" @@ -1257,7 +1257,7 @@ msgstr "Criptografia insuficiente" #: ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" -msgstr "" +msgstr "O buffer interno de áudio é muito pequeno" #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" From 780d158d400a45b8547f2580c60391820212787b Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Wed, 11 Aug 2021 20:01:06 +0000 Subject: [PATCH 147/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1015 of 1015 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 612121de2d..72de1cd329 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-10 02:41+0000\n" +"PO-Revision-Date: 2021-08-13 12:33+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -503,7 +503,7 @@ msgstr "Försök till heap-allokering när den virtuella maskinen inte är igån #: ports/raspberrypi/audio_dma.c msgid "Audio conversion not implemented" -msgstr "" +msgstr "Ljudkonvertering inte implementerad" #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" @@ -1242,7 +1242,7 @@ msgstr "Otillräcklig kryptering" #: ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" -msgstr "" +msgstr "Intern ljudbuffert för liten" #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" From c1e164e1ffc40c521f6c7464c5f10f10e737fa03 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Fri, 13 Aug 2021 09:52:51 -0500 Subject: [PATCH 148/418] rename to boundary_fill and clean up comments --- shared-bindings/bitmaptools/__init__.c | 14 +++--- shared-bindings/bitmaptools/__init__.h | 2 +- shared-module/bitmaptools/__init__.c | 67 ++++---------------------- 3 files changed, 18 insertions(+), 65 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index a7e0103a96..32822fc0a3 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -297,7 +297,7 @@ STATIC mp_obj_t bitmaptools_obj_fill_region(size_t n_args, const mp_obj_t *pos_a MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_fill_region_obj, 0, bitmaptools_obj_fill_region); //| -//| def paint_fill( +//| def boundary_fill( //| dest_bitmap: displayio.Bitmap, //| x: int, y: int //| value: int, background_value: int) -> None: @@ -308,13 +308,13 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_fill_region_obj, 0, bitmaptools_obj_fill_ //| :param bitmap dest_bitmap: Destination bitmap that will be written into //| :param int x: x-pixel position of the first pixel to check and fill if needed //| :param int y: y-pixel position of the first pixel to check and fill if needed -//| :param int value: Bitmap palette index that will be written into the rectangular -//| fill region in the destination bitmap""" +//| :param int value: Bitmap palette index that will be written into the +//| enclosed area in the destination bitmap""" //| :param int background_value: Bitmap palette index that will filled with the //| value color in the enclosed area in the destination bitmap""" //| ... //| -STATIC mp_obj_t bitmaptools_obj_paint_fill(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +STATIC mp_obj_t bitmaptools_obj_boundary_fill(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum {ARG_dest_bitmap, ARG_x, ARG_y, ARG_value, ARG_background_value}; static const mp_arg_t allowed_args[] = { @@ -346,12 +346,12 @@ STATIC mp_obj_t bitmaptools_obj_paint_fill(size_t n_args, const mp_obj_t *pos_ar int16_t y = args[ARG_y].u_int; - common_hal_bitmaptools_paint_fill(destination, x, y, value, background_value); + common_hal_bitmaptools_boundary_fill(destination, x, y, value, background_value); return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_paint_fill_obj, 0, bitmaptools_obj_paint_fill); +MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_boundary_fill_obj, 0, bitmaptools_obj_boundary_fill); // requires all 6 arguments //| @@ -576,7 +576,7 @@ STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_rotozoom), MP_ROM_PTR(&bitmaptools_rotozoom_obj) }, { MP_ROM_QSTR(MP_QSTR_arrayblit), MP_ROM_PTR(&bitmaptools_arrayblit_obj) }, { MP_ROM_QSTR(MP_QSTR_fill_region), MP_ROM_PTR(&bitmaptools_fill_region_obj) }, - { MP_ROM_QSTR(MP_QSTR_paint_fill), MP_ROM_PTR(&bitmaptools_paint_fill_obj) }, + { MP_ROM_QSTR(MP_QSTR_boundary_fill), MP_ROM_PTR(&bitmaptools_boundary_fill_obj) }, { MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&bitmaptools_draw_line_obj) }, }; STATIC MP_DEFINE_CONST_DICT(bitmaptools_module_globals, bitmaptools_module_globals_table); diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index 94cf7e60c4..8e22235e77 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -46,7 +46,7 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, int16_t x2, int16_t y2, uint32_t value); -void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, +void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, int16_t x, int16_t y, uint32_t value, uint32_t background_value); diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index bd3a4b4d8f..ae00c68b46 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -253,90 +253,57 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, } } -void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, +void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, int16_t x, int16_t y, uint32_t value, uint32_t background_value) { - /*def _boundaryFill4(self, px, py, fc, bc): # px & py = x, y coord to start fill, fc = fill color, bc = background color - fillArea = [[px, py]] - - while len(fillArea) > 0: - x, y = fillArea.pop() - - if self._bitmap[x, y] != bc: - continue - self._bitmap[x, y] = fc - fillArea.append((x + 1, y)) - fillArea.append((x - 1, y)) - fillArea.append((x, y + 1)) - fillArea.append((x, y - 1))*/ - + // the list of points that we'll check mp_obj_t fill_area = mp_obj_new_list(0, NULL); + + // first point is the one user passed in mp_obj_t point[] = { mp_obj_new_int(x), mp_obj_new_int(y) }; mp_obj_list_append( fill_area, mp_obj_new_tuple(2, point) ); - //mp_obj_list_t *point; - //mp_obj_list_append(point, x); - //mp_obj_list_append(point, y); - mp_obj_t *fill_points; size_t list_length = 0; mp_obj_list_get(fill_area, &list_length, &fill_points); - //mp_printf(&mp_plat_print, "\nLen bfore loop: %d", list_length); + mp_obj_t current_point; uint32_t current_point_color_value; size_t tuple_len = 0; mp_obj_t *tuple_items; - + // while there are still points to check while (list_length > 0){ mp_obj_list_get(fill_area, &list_length, &fill_points); - //mp_printf(&mp_plat_print, "\nLen begin loop: %d\n", list_length); current_point = mp_obj_list_pop(fill_area, 0); - - - //mp_obj_print(current_point, PRINT_STR); mp_obj_tuple_get(current_point, &tuple_len, &tuple_items); current_point_color_value = common_hal_displayio_bitmap_get_pixel( destination, mp_obj_get_int(tuple_items[0]), mp_obj_get_int(tuple_items[1])); - //mp_printf(&mp_plat_print, "%d\n", current_point_color_value); - + // if the current point is not background color ignore it if(current_point_color_value != background_value){ mp_obj_list_get(fill_area, &list_length, &fill_points); continue; } - - + // fill the current point with fill color displayio_bitmap_write_pixel( destination, mp_obj_get_int(tuple_items[0]), mp_obj_get_int(tuple_items[1]), value); - - //mp_obj_t above_point[] = { mp_obj_new_int(tuple_items[0]), mp_obj_new_int(tuple_items[1])-1 }; - //mp_printf(&mp_plat_print,"math:\n"); - //mp_printf(&mp_plat_print, "%d\n", mp_obj_get_int(tuple_items[0])); - //mp_printf(&mp_plat_print, "%d\n", mp_obj_get_int(tuple_items[0])+1); - //int16_t above_int = mp_obj_get_int(tuple_items[0])+1; - //mp_printf(&mp_plat_print, "%d\n", above_int); - //int16_t *above = &above_int; - //mp_printf(&mp_plat_print, "%d\n", above); - + // add all 4 surrounding points to the list to check mp_obj_t above_point[] = { tuple_items[0], MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1])-1)}; - - //mp_printf(&mp_plat_print,"above_point:\n"); - //mp_obj_print(above_point, PRINT_STR); mp_obj_list_append( fill_area, mp_obj_new_tuple(2, above_point)); @@ -363,26 +330,12 @@ void common_hal_bitmaptools_paint_fill(displayio_bitmap_t *destination, mp_obj_new_tuple(2, below_point)); mp_obj_list_get(fill_area, &list_length, &fill_points); - //mp_printf(&mp_plat_print, "\nLen end loop: %d\n", list_length); } + // set dirty the area so displayio will draw displayio_area_t area = { 0, 0, destination->width, destination->height }; displayio_bitmap_set_dirty_area(destination, &area); - //mp_obj_print(fill_area, PRINT_STR); - //mp_obj_print(current_point[0], PRINT_STR); - - /* - mp_printf(&mp_plat_print, "\nLen: %d", list_length); - size_t tuple_len = 0; - mp_obj_t *tuple_items; - mp_obj_tuple_get(current_point[0], &tuple_len, &tuple_items); - - //mp_obj_print(mp_obj_get_int(tuple_items[0])+1, PRINT_STR); - - mp_printf(&mp_plat_print, "\n%d", mp_obj_get_int(tuple_items[0])+1); - */ - } void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, From ec8b31e7b4988a68b83f64a22bcb59801a71e841 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Fri, 13 Aug 2021 10:13:38 -0500 Subject: [PATCH 149/418] code format and translations --- locale/circuitpython.pot | 9 +++++++++ shared-module/bitmaptools/__init__.c | 26 +++++++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 03e15c6db2..96d1a210f4 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -2566,6 +2566,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -3917,6 +3921,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4358,6 +4363,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index ae00c68b46..43bb53a500 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -263,9 +263,9 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, // first point is the one user passed in mp_obj_t point[] = { mp_obj_new_int(x), mp_obj_new_int(y) }; mp_obj_list_append( - fill_area, - mp_obj_new_tuple(2, point) - ); + fill_area, + mp_obj_new_tuple(2, point) + ); mp_obj_t *fill_points; size_t list_length = 0; @@ -278,7 +278,7 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, mp_obj_t *tuple_items; // while there are still points to check - while (list_length > 0){ + while (list_length > 0) { mp_obj_list_get(fill_area, &list_length, &fill_points); current_point = mp_obj_list_pop(fill_area, 0); mp_obj_tuple_get(current_point, &tuple_len, &tuple_items); @@ -288,7 +288,7 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, mp_obj_get_int(tuple_items[1])); // if the current point is not background color ignore it - if(current_point_color_value != background_value){ + if (current_point_color_value != background_value) { mp_obj_list_get(fill_area, &list_length, &fill_points); continue; } @@ -303,28 +303,32 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, // add all 4 surrounding points to the list to check mp_obj_t above_point[] = { tuple_items[0], - MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1])-1)}; + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1]) - 1) + }; mp_obj_list_append( fill_area, mp_obj_new_tuple(2, above_point)); mp_obj_t left_point[] = { - MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0])-1), - tuple_items[1]}; + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0]) - 1), + tuple_items[1] + }; mp_obj_list_append( fill_area, mp_obj_new_tuple(2, left_point)); mp_obj_t right_point[] = { - MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0])+1), - tuple_items[1]}; + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0]) + 1), + tuple_items[1] + }; mp_obj_list_append( fill_area, mp_obj_new_tuple(2, right_point)); mp_obj_t below_point[] = { tuple_items[0], - MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1])+1)}; + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1]) + 1) + }; mp_obj_list_append( fill_area, mp_obj_new_tuple(2, below_point)); From 4d8494f1cd05c18774544296cb78f2fd0944c750 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Fri, 13 Aug 2021 10:42:21 -0500 Subject: [PATCH 150/418] fix stubs --- shared-bindings/bitmaptools/__init__.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 32822fc0a3..e566168879 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -299,7 +299,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_fill_region_obj, 0, bitmaptools_obj_fill_ //| //| def boundary_fill( //| dest_bitmap: displayio.Bitmap, -//| x: int, y: int +//| x: int, y: int, //| value: int, background_value: int) -> None: //| """Draws the color value into the destination bitmap enclosed //| area of pixels of the background_value color. Like "Paint Bucket" @@ -309,7 +309,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_fill_region_obj, 0, bitmaptools_obj_fill_ //| :param int x: x-pixel position of the first pixel to check and fill if needed //| :param int y: y-pixel position of the first pixel to check and fill if needed //| :param int value: Bitmap palette index that will be written into the -//| enclosed area in the destination bitmap""" +//| enclosed area in the destination bitmap //| :param int background_value: Bitmap palette index that will filled with the //| value color in the enclosed area in the destination bitmap""" //| ... From 69d995aa4d4c73b018b34643d7d3ca66d60735ae Mon Sep 17 00:00:00 2001 From: "Ryan A. Pavlik" Date: Fri, 13 Aug 2021 10:57:09 -0500 Subject: [PATCH 151/418] Update README.rst Fix typo in URL text: the actual link was fine. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9a16c001df..52a48b2b3d 100644 --- a/README.rst +++ b/README.rst @@ -21,7 +21,7 @@ besides a text editor (we recommend `Mu `_ for beginners.) Starting with CircuitPython 7.0.0, some boards may only be connectable over Bluetooth Low Energy (BLE). Those boards provide serial and file access over BLE instead of USB using open protocols. (Some boards may use both USB and BLE.) BLE access can be done from a variety of apps including -`code.circuitpythonn.org `_. +`code.circuitpython.org `_. CircuitPython features unified Python core APIs and a growing list of 300+ device libraries and drivers that work with it. These libraries also work on single board computers with regular From fdf49a4b2fb8d13c36fa2409b1ae669ac8413fce Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 13 Aug 2021 11:30:09 -0700 Subject: [PATCH 152/418] Increase tx power for BLE workflow pairing --- supervisor/shared/bluetooth/bluetooth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supervisor/shared/bluetooth/bluetooth.c b/supervisor/shared/bluetooth/bluetooth.c index 7762a5655d..9b1a775f53 100644 --- a/supervisor/shared/bluetooth/bluetooth.c +++ b/supervisor/shared/bluetooth/bluetooth.c @@ -56,7 +56,7 @@ // This standard advertisement advertises the CircuitPython editing service and a CIRCUITPY short name. const uint8_t public_advertising_data[] = { 0x02, 0x01, 0x06, // 0-2 Flags - 0x02, 0x0a, 0xd8, // 3-5 TX power level -40 + 0x02, 0x0a, 0xec, // 3-5 TX power level -20 #if CIRCUITPY_BLE_FILE_SERVICE 0x03, 0x02, 0xbb, 0xfe, // 6 - 9 Incomplete service list (File Transfer service) #endif @@ -121,7 +121,7 @@ STATIC void supervisor_bluetooth_start_advertising(void) { // Advertise with less power when doing so publicly to reduce who can hear us. This will make it // harder for someone with bad intentions to pair from a distance. if (!bonded) { - tx_power = -40; + tx_power = -20; adv = public_advertising_data; adv_len = sizeof(public_advertising_data); scan_response = circuitpython_scan_response_data; From 49dcdef5125d7fa6601d2a3c895ff09582ebf8e0 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 13 Aug 2021 11:32:26 -0700 Subject: [PATCH 153/418] Fix copy pasta --- py/circuitpy_mpconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index aff54f51e5..d0a65a6a7a 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -583,7 +583,7 @@ extern const struct _mp_obj_module_t neopixel_write_module; extern const struct _mp_obj_module_t nvm_module; #endif -#if CIRCUITPY_OS +#if CIRCUITPY_ONEWIREIO extern const struct _mp_obj_module_t onewireio_module; #define ONEWIREIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_onewireio), (mp_obj_t)&onewireio_module }, #else From cd20e3d398b61ddf9b63a41776a7c64440d97a5b Mon Sep 17 00:00:00 2001 From: codetyphon Date: Sat, 14 Aug 2021 20:26:20 +0800 Subject: [PATCH 154/418] add ai_thinker_esp_12k --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d6d752756..dc708840d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -528,6 +528,7 @@ jobs: - "unexpectedmaker_feathers2" - "unexpectedmaker_feathers2_prerelease" - "unexpectedmaker_tinys2" + - "ai_thinker_esp_12k" steps: - name: Set up Python 3.8 From 221d66c60389cd4b23d2c55103f6f5e530f5d6c9 Mon Sep 17 00:00:00 2001 From: codetyphon Date: Sat, 14 Aug 2021 20:27:51 +0800 Subject: [PATCH 155/418] Create board.c --- ports/esp32s2/ai_thinker_esp_12k/board.c | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 ports/esp32s2/ai_thinker_esp_12k/board.c diff --git a/ports/esp32s2/ai_thinker_esp_12k/board.c b/ports/esp32s2/ai_thinker_esp_12k/board.c new file mode 100644 index 0000000000..e40b6335bc --- /dev/null +++ b/ports/esp32s2/ai_thinker_esp_12k/board.c @@ -0,0 +1,52 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} From c577d3b6a492eccc5ec8b2555cfb496960bccc0f Mon Sep 17 00:00:00 2001 From: codetyphon Date: Sat, 14 Aug 2021 20:29:33 +0800 Subject: [PATCH 156/418] add ai_thinker_esp_12k --- .../ai_thinker_esp_12k/mpconfigboard.h | 40 ++++++++++++++++ .../ai_thinker_esp_12k/mpconfigboard.mk | 17 +++++++ ports/esp32s2/ai_thinker_esp_12k/pins.c | 48 +++++++++++++++++++ ports/esp32s2/ai_thinker_esp_12k/sdkconfig | 33 +++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.h create mode 100644 ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk create mode 100644 ports/esp32s2/ai_thinker_esp_12k/pins.c create mode 100644 ports/esp32s2/ai_thinker_esp_12k/sdkconfig diff --git a/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.h b/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.h new file mode 100644 index 0000000000..cb2e3d2bc1 --- /dev/null +++ b/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.h @@ -0,0 +1,40 @@ +/* + * 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. + */ + +// Micropython setup + +// Same setup as the Saola board but with no Neopixel on board + +#define MICROPY_HW_BOARD_NAME "NodeMCU-32-S2 w/ESP-12K 08" +#define MICROPY_HW_MCU_NAME "ESP-12K 08" + +// #define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk b/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk new file mode 100644 index 0000000000..a333fe477f --- /dev/null +++ b/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x612B +USB_PID = 0x80A7 +USB_PRODUCT = "NodeMCU-32-S2 w/ESP-12K 08" +USB_MANUFACTURER = "Ai-Thinker" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover \ No newline at end of file diff --git a/ports/esp32s2/ai_thinker_esp_12k/pins.c b/ports/esp32s2/ai_thinker_esp_12k/pins.c new file mode 100644 index 0000000000..a8ca8ba3ed --- /dev/null +++ b/ports/esp32s2/ai_thinker_esp_12k/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/ai_thinker_esp_12k/sdkconfig b/ports/esp32s2/ai_thinker_esp_12k/sdkconfig new file mode 100644 index 0000000000..1a86435efc --- /dev/null +++ b/ports/esp32s2/ai_thinker_esp_12k/sdkconfig @@ -0,0 +1,33 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +CONFIG_SPIRAM_SIZE=4194304 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config From 605236505a058b931324b8e3cc557b6bd469a64a Mon Sep 17 00:00:00 2001 From: codetyphon Date: Sat, 14 Aug 2021 23:27:58 +0800 Subject: [PATCH 157/418] alphabetical order --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc708840d1..3d9bfb925b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -506,6 +506,7 @@ jobs: - "adafruit_metro_esp32s2" - "artisense_rd00" - "atmegazero_esp32s2" + - "ai_thinker_esp_12k" - "crumpspace_crumps2" - "electroniccats_bastwifi" - "espressif_kaluga_1" @@ -528,7 +529,6 @@ jobs: - "unexpectedmaker_feathers2" - "unexpectedmaker_feathers2_prerelease" - "unexpectedmaker_tinys2" - - "ai_thinker_esp_12k" steps: - name: Set up Python 3.8 From 8945d17aa2dbadd4251ef138cee85f3bc04b2847 Mon Sep 17 00:00:00 2001 From: codetyphon Date: Sat, 14 Aug 2021 23:32:40 +0800 Subject: [PATCH 158/418] Update mpconfigboard.mk --- ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk b/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk index a333fe477f..997e9ebe76 100644 --- a/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk +++ b/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk @@ -14,4 +14,4 @@ CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=4MB -CIRCUITPY_MODULE=wrover \ No newline at end of file +CIRCUITPY_MODULE=wrover From 4f8ff12afafb77982d30d8161de4a325ec6636b8 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 28 Jul 2021 10:31:47 -0400 Subject: [PATCH 159/418] wip --- locale/circuitpython.pot | 21 ++-- py/argcheck.c | 2 +- shared-bindings/usb_hid/Device.c | 185 ++++++++++++++++++++----------- shared-bindings/usb_hid/Device.h | 6 +- shared-module/usb_hid/Device.c | 115 +++++++++++-------- shared-module/usb_hid/Device.h | 15 ++- shared-module/usb_hid/__init__.c | 123 +++++++++++--------- shared-module/usb_hid/__init__.h | 2 +- 8 files changed, 285 insertions(+), 184 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 03e15c6db2..a87bd419b9 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -103,14 +103,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -127,10 +119,6 @@ msgstr "" msgid "%q must be >= 1" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -168,6 +156,10 @@ msgstr "" msgid "%q() takes %d positional arguments but %d were given" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1518,6 +1510,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" diff --git a/py/argcheck.c b/py/argcheck.c index 0d14c5eff2..ae779a1faa 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -197,7 +197,7 @@ mp_float_t mp_arg_validate_obj_float_non_negative(mp_obj_t float_in, mp_float_t size_t mp_arg_validate_length_with_name(mp_int_t i, size_t length, qstr arg_name, qstr length_name) { if (i != (mp_int_t)length) { - mp_raise_ValueError_varg(translate("%q length must be %q"), MP_QSTR_pressed, MP_QSTR_num_keys); + mp_raise_ValueError_varg(translate("%q length must be %q"), arg_name, length_name); } return (size_t)i; } diff --git a/shared-bindings/usb_hid/Device.c b/shared-bindings/usb_hid/Device.c index 64803f8e13..25377dffed 100644 --- a/shared-bindings/usb_hid/Device.c +++ b/shared-bindings/usb_hid/Device.c @@ -31,7 +31,7 @@ //| class Device: //| """HID Device specification""" //| -//| def __init__(self, *, descriptor: ReadableBuffer, usage_page: int, usage: int, in_report_length: int, out_report_length: int = 0, report_id_index: Optional[int]) -> None: +//| def __init__(self, *, descriptor: ReadableBuffer, usage_page: int, usage: int, in_report_lengths: Sequence[int], out_report_lengths: Sequence[int]) -> None: //| """Create a description of a USB HID device. The actual device is created when you //| pass a `Device` to `usb_hid.enable()`. //| @@ -39,38 +39,45 @@ //| not verified for correctness; it is up to you to make sure it is not malformed. //| :param int usage_page: The Usage Page value from the descriptor. Must match what is in the descriptor. //| :param int usage: The Usage value from the descriptor. Must match what is in the descriptor. -//| :param int in_report_length: Size in bytes of the HID report sent to the host. -//| "In" is with respect to the host. -//| :param int out_report_length: Size in bytes of the HID report received from the host. -//| "Out" is with respect to the host. If no reports are expected, use 0. -//| :param int report_id_index: position of byte in descriptor that contains the Report ID. -//| A Report ID will be assigned when the device is created. If there is no -//| Report ID, use ``None``. +//| :param int report_ids: Sequence of report ids used by the descriptor. +//| :param int in_report_lengths: Sequence of sizes in bytes of the HIDs report sent to the host. +//| The sizes are in order of the ``report_ids``. +//| "IN" is with respect to the host. +//| :param int out_report_lengths: Size in bytes of the HID report received from the host. +//| The sizes are in order of the ``report_ids``. +//| "OUT" is with respect to the host. +//| +//| ``report_ids``, ``in_report_lengths``, and ``out_report_lengths`` must all be the same length. //| """ //| ... //| //| KEYBOARD: Device -//| """Standard keyboard device supporting keycodes 0x00-0xDD, modifiers 0xE-0xE7, and five LED indicators.""" +//| """Standard keyboard device supporting keycodes 0x00-0xDD, modifiers 0xE-0xE7, and five LED indicators. +//| Uses Report ID 1 for its IN and OUT reports. +//| """ //| //| MOUSE: Device //| """Standard mouse device supporting five mouse buttons, X and Y relative movements from -127 to 127 -//| in each report, and a relative mouse wheel change from -127 to 127 in each report.""" +//| in each report, and a relative mouse wheel change from -127 to 127 in each report. +//| Uses Report ID 2 for its IN reports. +//| """ //| //| CONSUMER_CONTROL: Device -//| """Consumer Control device supporting sent values from 1-652, with no rollover.""" +//| """Consumer Control device supporting sent values from 1-652, with no rollover. +//| Uses Report ID 3 for its IN reports.""" //| STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { usb_hid_device_obj_t *self = m_new_obj(usb_hid_device_obj_t); self->base.type = &usb_hid_device_type; - enum { ARG_report_descriptor, ARG_usage_page, ARG_usage, ARG_in_report_length, ARG_out_report_length, ARG_report_id_index }; + enum { ARG_report_descriptor, ARG_usage_page, ARG_usage, ARG_report_ids, ARG_in_report_lengths, ARG_out_report_lengths }; static const mp_arg_t allowed_args[] = { { MP_QSTR_report_descriptor, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_usage_page, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, { MP_QSTR_usage, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, - { MP_QSTR_in_report_length, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, - { MP_QSTR_out_report_length, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0 } }, - { MP_QSTR_report_id_index, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = mp_const_none } }, + { MP_QSTR_report_ids, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_in_report_lengths, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_out_report_lengths, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -81,76 +88,128 @@ STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args mp_obj_t descriptor = mp_obj_new_bytearray(descriptor_bufinfo.len, descriptor_bufinfo.buf); const mp_int_t usage_page_arg = args[ARG_usage_page].u_int; - if (usage_page_arg <= 0 || usage_page_arg > 255) { - mp_raise_ValueError_varg(translate("%q must be 1-255"), MP_QSTR_usage_page); - } + mp_arg_validate_int_range(usage_page_arg, 1, 255, MP_QSTR_usage_page); const uint8_t usage_page = usage_page_arg; const mp_int_t usage_arg = args[ARG_usage].u_int; - if (usage_arg <= 0 || usage_arg > 255) { - mp_raise_ValueError_varg(translate("%q must be 1-255"), MP_QSTR_usage); - } + mp_arg_validate_int_range(usage_arg, 1, 255, MP_QSTR_usage_page); const uint8_t usage = usage_arg; - const mp_int_t in_report_length_arg = args[ARG_in_report_length].u_int; - if (in_report_length_arg <= 0 || in_report_length_arg > 255) { - mp_raise_ValueError_varg(translate("%q must be 1-255"), MP_QSTR_in_report_length); - } - const uint8_t in_report_length = in_report_length_arg; + mp_obj_t report_ids = args[ARG_report_ids].u_obj; + mp_obj_t in_report_lengths = args[ARG_in_report_lengths].u_obj; + mp_obj_t out_report_lengths = args[ARG_out_report_lengths].u_obj; - const mp_int_t out_report_length_arg = args[ARG_out_report_length].u_int; - if (out_report_length_arg < 0 || out_report_length_arg > 255) { - mp_raise_ValueError_varg(translate("%q must be 0-255"), MP_QSTR_out_report_length); + size_t report_ids_count = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(report_ids)); + if (MP_OBJ_SMALL_INT_VALUE(mp_obj_len(in_report_lengths)) != report_ids_count || + MP_OBJ_SMALL_INT_VALUE(mp_obj_len(out_report_lengths)) != report_ids_count) { + mp_raise_ValueError_varg(translate("%q, %q, and %q must all be the same length"), + MP_QSTR_report_ids, MP_QSTR_in_report_lengths, MP_QSTR_out_report_lengths); } - const uint8_t out_report_length = out_report_length_arg; - const mp_obj_t report_id_index_arg = args[ARG_report_id_index].u_obj; - uint8_t report_id_index = 0; - if (report_id_index_arg != mp_const_none) { - const mp_int_t report_id_index_int = mp_obj_int_get_checked(report_id_index_arg); - if (report_id_index_int <= 0 || (uint32_t)report_id_index_int >= descriptor_bufinfo.len) { - mp_raise_ValueError_varg(translate("%q must be None or between 1 and len(report_descriptor)-1"), - MP_QSTR_report_id_index); - } - report_id_index = report_id_index_int; + uint8_t report_ids_array[report_ids_count]; + uint8_t in_report_lengths_array[report_ids_count]; + uint8_t out_report_lengths_array[report_ids_count]; + + // Validate the ids and lengths are all integers in range. + for (size_t i = 0; i < report_ids_count; i++) { + mp_obj_t i_obj = MP_OBJ_NEW_SMALL_INT(i); + + report_ids_array[i] = (uint8_t)mp_arg_validate_int_range( + // It's not the actual argument that's out of range, but its elements. + // But the error message is close enough. + MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(report_ids, i_obj, MP_OBJ_SENTINEL)), + 1, 255, MP_QSTR_report_ids); + + in_report_lengths_array[i] = (uint8_t)mp_arg_validate_int_range( + MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(in_report_lengths_array, i_obj, MP_OBJ_SENTINEL)), + 0, 255, MP_QSTR_in_report_lengths); + + out_report_lengths_array[i] = (uint8_t)mp_arg_validate_int_range( + MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(out_report_lengths_array, i_obj, MP_OBJ_SENTINEL)), + 0, 255, MP_QSTR_out_report_lengths); } common_hal_usb_hid_device_construct( - self, descriptor, usage_page, usage, in_report_length, out_report_length, report_id_index); + self, descriptor, usage_page, usage, report_ids_count, report_ids_array, in_report_lengths_array, out_report_lengths_array); return (mp_obj_t)self; } -//| def send_report(self, buf: ReadableBuffer) -> None: -//| """Send a HID report.""" +//| def send_report(self, buf: ReadableBuffer, report_id: Optional[int] = None) -> None: +//| """Send an HID report. +//| """ //| ... //| -STATIC mp_obj_t usb_hid_device_send_report(mp_obj_t self_in, mp_obj_t buffer) { - usb_hid_device_obj_t *self = MP_OBJ_TO_PTR(self_in); +STATIC mp_obj_t usb_hid_device_send_report(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + usb_hid_device_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); + + enum { ARG_buf, ARG_report_id }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_buf, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_report_id, MP_ARG_OBJ, {.u_obj = mp_const_none} }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); mp_buffer_info_t bufinfo; - mp_get_buffer_raise(buffer, &bufinfo, MP_BUFFER_READ); + mp_get_buffer_raise(args[ARG_buf].u_obj, &bufinfo, MP_BUFFER_READ); - common_hal_usb_hid_device_send_report(self, ((uint8_t *)bufinfo.buf), bufinfo.len); + uint8_t report_id = 0; + if (args[ARG_report_id].u_obj != mp_const_none) { + const mp_int_t report_id_arg = mp_obj_int_get_checked(args[ARG_report_id].u_obj); + report_id = mp_arg_validate_int_range(report_id_arg, 1, 255, MP_QSTR_report_id); + } + + common_hal_usb_hid_device_send_report(self, ((uint8_t *)bufinfo.buf), bufinfo.len, report_id); return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_2(usb_hid_device_send_report_obj, usb_hid_device_send_report); +MP_DEFINE_CONST_FUN_OBJ_KW(usb_hid_device_send_report_obj, 2, usb_hid_device_send_report); + +//| def get_last_received_report(self, report_id: Optional[int] = None) -> bytes: +//| """Get the last received HID OUT report for the given report ID. +//| The report ID may be omitted if there is no report ID, or only one report ID. +//| Return `None` if nothing received. +//| """ +//| ... +//| +STATIC mp_obj_t usb_hid_device_get_last_received_report(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + usb_hid_device_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); + + enum { ARG_report_id }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_report_id, MP_ARG_OBJ, {.u_obj = mp_const_none} }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + uint8_t report_id = 0; + if (args[ARG_report_id].u_obj != mp_const_none) { + report_id = mp_obj_int_get_checked(args[ARG_report_id].u_obj); + } + + return common_hal_usb_hid_device_get_last_received_report(self, report_id); +} +MP_DEFINE_CONST_FUN_OBJ_KW(usb_hid_device_get_last_received_report_obj, 1, usb_hid_device_get_last_received_report); //| last_received_report: bytes -//| """The HID OUT report as a `bytes`. (read-only). `None` if nothing received.""" +//| """The HID OUT report as a `bytes`. (read-only). `None` if nothing received. +//| Same as `get_last_received_report()` with no argument. //| -STATIC mp_obj_t usb_hid_device_obj_get_last_received_report(mp_obj_t self_in) { +//| Deprecated: will be removed in CircutPython 8.0.0. Use `get_last_received_report()` instead. +//| """ +//| +STATIC mp_obj_t usb_hid_device_obj_get_last_received_report_property(mp_obj_t self_in) { usb_hid_device_obj_t *self = MP_OBJ_TO_PTR(self_in); - if (self->out_report_buffer == 0) { - return mp_const_none; - } - return mp_obj_new_bytes(self->out_report_buffer, self->out_report_length); + + return common_hal_usb_hid_device_get_last_received_report(self, 0); } -MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_last_received_report_obj, usb_hid_device_obj_get_last_received_report); +MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_last_received_report_property_obj, usb_hid_device_obj_get_last_received_report_property); const mp_obj_property_t usb_hid_device_last_received_report_obj = { .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&usb_hid_device_get_last_received_report_obj, + .proxy = {(mp_obj_t)&usb_hid_device_get_last_received_report_property_obj, MP_ROM_NONE, MP_ROM_NONE}, }; @@ -192,13 +251,15 @@ const mp_obj_property_t usb_hid_device_usage_obj = { }; STATIC const mp_rom_map_elem_t usb_hid_device_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_send_report), MP_ROM_PTR(&usb_hid_device_send_report_obj) }, - { MP_ROM_QSTR(MP_QSTR_last_received_report), MP_ROM_PTR(&usb_hid_device_last_received_report_obj) }, - { MP_ROM_QSTR(MP_QSTR_usage_page), MP_ROM_PTR(&usb_hid_device_usage_page_obj) }, - { MP_ROM_QSTR(MP_QSTR_usage), MP_ROM_PTR(&usb_hid_device_usage_obj) }, - { MP_ROM_QSTR(MP_QSTR_KEYBOARD), MP_ROM_PTR(&usb_hid_device_keyboard_obj) }, - { MP_ROM_QSTR(MP_QSTR_MOUSE), MP_ROM_PTR(&usb_hid_device_mouse_obj) }, - { MP_ROM_QSTR(MP_QSTR_CONSUMER_CONTROL), MP_ROM_PTR(&usb_hid_device_consumer_control_obj) }, + { MP_ROM_QSTR(MP_QSTR_send_report), MP_ROM_PTR(&usb_hid_device_send_report_obj) }, + { MP_ROM_QSTR(MP_QSTR_get_last_received_report), MP_ROM_PTR(&usb_hid_device_get_last_received_report_obj) }, + { MP_ROM_QSTR(MP_QSTR_last_received_report), MP_ROM_PTR(&usb_hid_device_last_received_report_obj) }, + { MP_ROM_QSTR(MP_QSTR_usage_page), MP_ROM_PTR(&usb_hid_device_usage_page_obj) }, + { MP_ROM_QSTR(MP_QSTR_usage), MP_ROM_PTR(&usb_hid_device_usage_obj) }, + + { MP_ROM_QSTR(MP_QSTR_KEYBOARD), MP_ROM_PTR(&usb_hid_device_keyboard_obj) }, + { MP_ROM_QSTR(MP_QSTR_MOUSE), MP_ROM_PTR(&usb_hid_device_mouse_obj) }, + { MP_ROM_QSTR(MP_QSTR_CONSUMER_CONTROL), MP_ROM_PTR(&usb_hid_device_consumer_control_obj) }, }; STATIC MP_DEFINE_CONST_DICT(usb_hid_device_locals_dict, usb_hid_device_locals_dict_table); diff --git a/shared-bindings/usb_hid/Device.h b/shared-bindings/usb_hid/Device.h index c1af92fd4f..d6069c370e 100644 --- a/shared-bindings/usb_hid/Device.h +++ b/shared-bindings/usb_hid/Device.h @@ -33,9 +33,11 @@ extern const mp_obj_type_t usb_hid_device_type; -void common_hal_usb_hid_device_construct(usb_hid_device_obj_t *self, mp_obj_t descriptor, uint8_t usage_page, uint8_t usage, uint8_t in_report_length, uint8_t out_report_length, uint8_t report_id_index); -void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t *report, uint8_t len); +void common_hal_usb_hid_device_construct(usb_hid_device_obj_t *self, mp_obj_t report_descriptor, uint8_t usage_page, uint8_t usage, size_t report_ids_count,uint8_t *report_ids, uint8_t *in_report_lengths, uint8_t *out_report_lengths); +void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t *report, uint8_t len, uint8_t report_id); +mp_obj_t common_hal_usb_hid_device_get_last_received_report(usb_hid_device_obj_t *self, uint8_t report_id); uint8_t common_hal_usb_hid_device_get_usage_page(usb_hid_device_obj_t *self); uint8_t common_hal_usb_hid_device_get_usage(usb_hid_device_obj_t *self); +bool common_hal_usb_hid_device_valid_report_id(usb_hid_device_obj_t *self, uint8_t report_id); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_USB_HID_DEVICE_H diff --git a/shared-module/usb_hid/Device.c b/shared-module/usb_hid/Device.c index ad64070448..9690f86586 100644 --- a/shared-module/usb_hid/Device.c +++ b/shared-module/usb_hid/Device.c @@ -39,8 +39,7 @@ static const uint8_t keyboard_report_descriptor[] = { 0x05, 0x01, // 0,1 Usage Page (Generic Desktop Ctrls) 0x09, 0x06, // 2,3 Usage (Keyboard) 0xA1, 0x01, // 4,5 Collection (Application) - 0x85, 0xFF, // 6,7 Report ID [SET AT RUNTIME] -#define KEYBOARD_REPORT_ID_INDEX (7) + 0x85, 0x01, // 6,7 Report ID (1) 0x05, 0x07, // Usage Page (Kbrd/Keypad) 0x19, 0xE0, // Usage Minimum (0xE0) 0x29, 0xE7, // Usage Maximum (0xE7) @@ -78,10 +77,10 @@ const usb_hid_device_obj_t usb_hid_device_keyboard_obj = { .report_descriptor_length = sizeof(keyboard_report_descriptor), .usage_page = 0x01, .usage = 0x06, - .in_report_length = 8, - .out_report_length = 1, - .report_id_index = KEYBOARD_REPORT_ID_INDEX, - + .num_report_ids = 1, + .report_ids = { 0x01, }, + .in_report_lengths = { 8, 0, 0, 0, }, + .out_report_lengths = { 1, }, }; static const uint8_t mouse_report_descriptor[] = { @@ -90,8 +89,7 @@ static const uint8_t mouse_report_descriptor[] = { 0xA1, 0x01, // 4,5 Collection (Application) 0x09, 0x01, // 6,7 Usage (Pointer) 0xA1, 0x00, // 8,9 Collection (Physical) - 0x85, 0xFF, // 10, 11 Report ID [SET AT RUNTIME] -#define MOUSE_REPORT_ID_INDEX (11) + 0x85, 0x02, // 10, 11 Report ID (2) 0x05, 0x09, // Usage Page (Button) 0x19, 0x01, // Usage Minimum (0x01) 0x29, 0x05, // Usage Maximum (0x05) @@ -129,17 +127,17 @@ const usb_hid_device_obj_t usb_hid_device_mouse_obj = { .report_descriptor_length = sizeof(mouse_report_descriptor), .usage_page = 0x01, .usage = 0x02, - .in_report_length = 4, - .out_report_length = 0, - .report_id_index = MOUSE_REPORT_ID_INDEX, + .num_report_ids = 1, + .report_ids = { 0x02, }, + .in_report_lengths = { 4, 0, 0, 0, }, + .out_report_lengths = { 0, }, }; static const uint8_t consumer_control_report_descriptor[] = { 0x05, 0x0C, // 0,1 Usage Page (Consumer) 0x09, 0x01, // 2,3 Usage (Consumer Control) 0xA1, 0x01, // 4,5 Collection (Application) - 0x85, 0xFF, // 6,7 Report ID [SET AT RUNTIME] -#define CONSUMER_CONTROL_REPORT_ID_INDEX (7) + 0x85, 0x03, // 6,7 Report ID (3) 0x75, 0x10, // Report Size (16) 0x95, 0x01, // Report Count (1) 0x15, 0x01, // Logical Minimum (1) @@ -158,15 +156,29 @@ const usb_hid_device_obj_t usb_hid_device_consumer_control_obj = { .report_descriptor_length = sizeof(consumer_control_report_descriptor), .usage_page = 0x0C, .usage = 0x01, - .in_report_length = 2, - .out_report_length = 0, - .report_id_index = CONSUMER_CONTROL_REPORT_ID_INDEX, + .num_report_ids = 1, + .report_ids = { 0x03 }, + .in_report_lengths = { 2, 0, 0, 0 }, + .out_report_lengths = { 0 }, }; -void common_hal_usb_hid_device_construct(usb_hid_device_obj_t *self, mp_obj_t report_descriptor, uint8_t usage_page, uint8_t usage, uint8_t in_report_length, uint8_t out_report_length, uint8_t report_id_index) { - // report buffer pointers are NULL at start, and are created when USB is initialized. +bool common_hal_usb_hid_device_valid_report_id(usb_hid_device_obj_t *self, uint8_t report_id) { + for (size_t i = 0; i < self->num_report_ids; i++) { + if (report_id == self->report_ids[i]) { + return true; + } + } + return false; +} +void common_hal_usb_hid_device_construct(usb_hid_device_obj_t *self, mp_obj_t report_descriptor, uint8_t usage_page, uint8_t usage, size_t num_report_ids, uint8_t *report_ids, uint8_t *in_report_lengths, uint8_t *out_report_lengths) { + if (num_report_ids > MAX_REPORT_IDS_PER_DESCRIPTOR) { + mp_raise_ValueError_varg(translate("More than %d report ids not supported"), + MAX_REPORT_IDS_PER_DESCRIPTOR); + } + + // report buffer pointers are NULL at start, and are created when USB is initialized. mp_buffer_info_t bufinfo; mp_get_buffer_raise(report_descriptor, &bufinfo, MP_BUFFER_READ); self->report_descriptor_length = bufinfo.len; @@ -179,9 +191,10 @@ void common_hal_usb_hid_device_construct(usb_hid_device_obj_t *self, mp_obj_t re self->usage_page = usage_page; self->usage = usage; - self->in_report_length = in_report_length; - self->out_report_length = out_report_length; - self->report_id_index = report_id_index; + self->num_report_ids = num_report_ids; + memcpy(self->report_ids, report_ids, num_report_ids); + memcpy(self->in_report_lengths, in_report_lengths, num_report_ids); + memcpy(self->out_report_lengths, out_report_lengths, num_report_ids); } uint8_t common_hal_usb_hid_device_get_usage_page(usb_hid_device_obj_t *self) { @@ -192,7 +205,7 @@ uint8_t common_hal_usb_hid_device_get_usage(usb_hid_device_obj_t *self) { return self->usage; } -void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t *report, uint8_t len) { +void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t *report, uint8_t len, uint8_t report_id) { if (len != self->in_report_length) { mp_raise_ValueError_varg(translate("Buffer incorrect size. Should be %d bytes."), self->in_report_length); } @@ -207,25 +220,24 @@ void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t * mp_raise_msg(&mp_type_OSError, translate("USB busy")); } - memcpy(self->in_report_buffer, report, len); - - if (!tud_hid_report(self->report_id, self->in_report_buffer, len)) { + if (!tud_hid_report(report_id, report, len)) { mp_raise_msg(&mp_type_OSError, translate("USB error")); } } void usb_hid_device_create_report_buffers(usb_hid_device_obj_t *self) { - if (self->in_report_length > 0) { - self->in_report_buffer = gc_alloc(self->in_report_length, false, true /*long-lived*/); - } - if (self->out_report_length > 0) { - self->out_report_buffer = gc_alloc(self->out_report_length, false, true /*long-lived*/); + for (size_t i = 0; i < self->num_report_ids; count++) { + if (self->out_report_length > 0) { + self->out_report_buffers[i] = self->out_report_lengths[i] > 0 + ? gc_alloc(self->out_report_length, false, true /*long-lived*/) + : NULL; + } } } -// Callbacks invoked when receive Get_Report request through control endpoint +// Callbacks invoked when we received Get_Report request through control endpoint uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t *buffer, uint16_t reqlen) { (void)itf; // only support Input Report @@ -234,24 +246,33 @@ uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t } // fill buffer with current report - memcpy(buffer, usb_hid_get_device_with_report_id(report_id)->in_report_buffer, reqlen); - return reqlen; -} -// Callbacks invoked when receive Set_Report request through control endpoint -void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize) { - (void)itf; - if (report_type == HID_REPORT_TYPE_INVALID) { - report_id = buffer[0]; - buffer++; - bufsize--; - } else if (report_type != HID_REPORT_TYPE_OUTPUT) { - return; + usb_hid_device_obj_t *hid_device; + size_t id_idx; + // Find device with this report id, and get the report id index. + if (usb_hid_get_device_with_report_id(report_id, &hid_device, &id_idx)) { + memcpy(buffer, hid_device->in_report_buffers[id_idx], reqlen); + return reqlen; } - usb_hid_device_obj_t *hid_device = usb_hid_get_device_with_report_id(report_id); +// Callbacks invoked when we received Set_Report request through control endpoint + void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize) { + (void)itf; + if (report_type == HID_REPORT_TYPE_INVALID) { + report_id = buffer[0]; + buffer++; + bufsize--; + } else if (report_type != HID_REPORT_TYPE_OUTPUT) { + return; + } - if (hid_device && hid_device->out_report_length >= bufsize) { - memcpy(hid_device->out_report_buffer, buffer, bufsize); + usb_hid_device_obj_t *hid_device; + size_t id_idx; + // Find device with this report id, and get the report id index. + if (usb_hid_get_device_with_report_id(report_id, &hid_device, &id_idx)) { + // If a report of the correct size has been read, save it in the proper OUT report buffer. + if (hid_device && hid_device->out_report_lengths[id_idx] >= bufsize) { + memcpy(hid_device->out_report_buffers[id_idx], buffer, bufsize); + } + } } -} diff --git a/shared-module/usb_hid/Device.h b/shared-module/usb_hid/Device.h index db3d8ecf65..cc185d3272 100644 --- a/shared-module/usb_hid/Device.h +++ b/shared-module/usb_hid/Device.h @@ -32,19 +32,22 @@ #include "py/obj.h" +// The most complicated one currently know of is the head and eye tracker, which requires 5: +// https://usb.org/sites/default/files/hutrr74_-_usage_page_for_head_and_eye_trackers_0.pdf +#define MAX_REPORT_IDS_PER_DESCRIPTOR (6) + typedef struct { mp_obj_base_t base; // Python buffer object whose contents are the descriptor. const uint8_t *report_descriptor; - uint8_t *in_report_buffer; - uint8_t *out_report_buffer; - uint16_t report_id_index; + uint8_t report_ids[MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t in_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t out_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t *out_report_buffers[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint16_t report_descriptor_length; uint8_t usage_page; uint8_t usage; - uint8_t report_id; - uint8_t in_report_length; - uint8_t out_report_length; + uint8_t num_report_ids; } usb_hid_device_obj_t; extern const usb_hid_device_obj_t usb_hid_device_keyboard_obj; diff --git a/shared-module/usb_hid/__init__.c b/shared-module/usb_hid/__init__.c index 81a62c8eb3..6f903bb657 100644 --- a/shared-module/usb_hid/__init__.c +++ b/shared-module/usb_hid/__init__.c @@ -215,74 +215,91 @@ void usb_hid_build_report_descriptor(uint8_t *report_descriptor_space, size_t re for (mp_int_t i = 0; i < num_hid_devices; i++) { usb_hid_device_obj_t *device = &hid_devices[i]; // Copy the report descriptor for this device. - if (num_hid_devices == 1) { - // There's only one device, so it shouldn't have a report ID. + if (num_hid_devices == 1 && device->num_report_ids == 1) { + // There's only one device, with one report id, so remove it. // Copy the descriptor, but splice out the report id indicator and value (2 bytes). - memcpy(report_descriptor_start, device->report_descriptor, device->report_id_index - 1); - report_descriptor_start += device->report_id_index - 1; - memcpy(report_descriptor_start, device->report_descriptor + device->report_id_index + 1, - device->report_descriptor_length - device->report_id_index - 1); - } else { - // Copy the whole descriptor and fill in the report id. - memcpy(report_descriptor_start, device->report_descriptor, device->report_descriptor_length); - report_descriptor_start[device->report_id_index] = i + 1; + size_t report_id_idx = 0; + for (report_id_idx = 0; report_id_idx < device->report_descriptor_length; report_id_idx++) { + if (report_descriptor_start[report_id_idx] == 0x85) { + break; + } + } + if (report_id_idx < device->report_descriptor_length) { - // Remember the report id that was assigned. - device->report_id = i + 1; - // Advance to the next free chunk for the next report descriptor.x - report_descriptor_start += device->report_descriptor_length; + memcpy(report_descriptor_start, device->report_descriptor, device->report_id_index - 1); + report_descriptor_start += device->report_id_index - 1; + memcpy(report_descriptor_start, device->report_descriptor + device->report_id_index + 1, + device->report_descriptor_length - device->report_id_index - 1); + } else { + // Copy the whole descriptor and fill in the report id. + memcpy(report_descriptor_start, device->report_descriptor, device->report_descriptor_length); + report_descriptor_start[device->report_id_index] = i + 1; + + // Remember the report id that was assigned. + device->report_id = i + 1; + + // Advance to the next free chunk for the next report descriptor.x + report_descriptor_start += device->report_descriptor_length; + } + // Clear the heap pointer to the bytes of the descriptor. + // We don't need it any more and it will get lost when the heap goes away. + device->report_descriptor = NULL; } - // Clear the heap pointer to the bytes of the descriptor. - // We don't need it any more and it will get lost when the heap goes away. - device->report_descriptor = NULL; } -} // Call this after the heap and VM are finished. -void usb_hid_save_report_descriptor(uint8_t *report_descriptor_space, size_t report_descriptor_length) { - if (!usb_hid_enabled()) { - return; + void usb_hid_save_report_descriptor(uint8_t *report_descriptor_space, size_t report_descriptor_length) { + if (!usb_hid_enabled()) { + return; + } + + // Allocate storage that persists across VMs to hold the combined report descriptor. + // and to remember the device details. + + // Copy the descriptor from the temporary area to a supervisor storage allocation that + // will leave between VM instantiations. + hid_report_descriptor_allocation = + allocate_memory(align32_size(report_descriptor_length), + /*high_address*/ false, /*movable*/ false); + memcpy((uint8_t *)hid_report_descriptor_allocation->ptr, report_descriptor_space, report_descriptor_length); } - // Allocate storage that persists across VMs to hold the combined report descriptor. - // and to remember the device details. + void usb_hid_gc_collect(void) { + gc_collect_ptr(hid_devices_tuple); - // Copy the descriptor from the temporary area to a supervisor storage allocation that - // will leave between VM instantiations. - hid_report_descriptor_allocation = - allocate_memory(align32_size(report_descriptor_length), - /*high_address*/ false, /*movable*/ false); - memcpy((uint8_t *)hid_report_descriptor_allocation->ptr, report_descriptor_space, report_descriptor_length); -} + // Mark possible heap pointers in the static device list as in use. + for (mp_int_t device_idx = 0; i < num_hid_devices; i++) { -void usb_hid_gc_collect(void) { - gc_collect_ptr(hid_devices_tuple); + // Cast away the const for .report_descriptor. It could be in flash or on the heap. + // Constant report descriptors must be const so that they are used directly from flash + // and not copied into RAM. + gc_collect_ptr((void *)hid_devices[device_idx].report_descriptor); - // Mark possible heap pointers in the static device list as in use. - for (mp_int_t i = 0; i < num_hid_devices; i++) { - // Cast away the const for .report_descriptor. It could be in flash or on the heap. - // Constant report descriptors must be const so that they are used directly from flash - // and not copied into RAM. - gc_collect_ptr((void *)hid_devices[i].report_descriptor); - gc_collect_ptr(hid_devices[i].in_report_buffer); - gc_collect_ptr(hid_devices[i].out_report_buffer); - } -} - -usb_hid_device_obj_t *usb_hid_get_device_with_report_id(uint8_t report_id) { - for (uint8_t i = 0; i < num_hid_devices; i++) { - usb_hid_device_obj_t *device = &hid_devices[i]; - if (device->report_id == report_id) { - return &hid_devices[i]; + // Collect all the OUT report buffers for this device. + for (size_t id_idx = 0; id_idx < hid_devices[device_idx].report_ids_count; id_idx++) { + gc_collect_ptr(hid_devices[i].out_report_buffers[id_idx]); + } } } - return NULL; -} + + bool usb_hid_get_device_with_report_id(uint8_t report_id, usb_hid_device_obj_t **device_out, size_t *id_idx_out) { + for (uint8_t device_idx = 0; device_idx < num_hid_devices; device_idx++) { + usb_hid_device_obj_t *device = &hid_devices[device_idx]; + for (size_t id_idx = 0; id_idx < device->report_ids_count; id_idx++) { + if (device->report_ids[id_idx] == report_id) { + *device_out = device; + *id_idx_out = id_idx; + return true; + } + } + } + return false; + } // Invoked when GET HID REPORT DESCRIPTOR is received. // Application return pointer to descriptor // Descriptor contents must exist long enough for transfer to complete -uint8_t const *tud_hid_descriptor_report_cb(uint8_t itf) { - return (uint8_t *)hid_report_descriptor_allocation->ptr; -} + uint8_t const *tud_hid_descriptor_report_cb(uint8_t itf) { + return (uint8_t *)hid_report_descriptor_allocation->ptr; + } diff --git a/shared-module/usb_hid/__init__.h b/shared-module/usb_hid/__init__.h index 5069effd3d..6d85b50e9f 100644 --- a/shared-module/usb_hid/__init__.h +++ b/shared-module/usb_hid/__init__.h @@ -44,7 +44,7 @@ size_t usb_hid_report_descriptor_length(void); void usb_hid_build_report_descriptor(uint8_t *report_descriptor_space, size_t report_descriptor_length); void usb_hid_save_report_descriptor(uint8_t *report_descriptor_space, size_t report_descriptor_length); -usb_hid_device_obj_t *usb_hid_get_device_with_report_id(uint8_t report_id); +bool usb_hid_get_device_with_report_id(uint8_t report_id, usb_hid_device_obj_t **device_out, size_t *id_idx_out); void usb_hid_gc_collect(void); From 3dc2b4c2d34ba30e78a50e1e2c6512d3716a3b88 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 13 Aug 2021 21:51:52 -0400 Subject: [PATCH 160/418] at least original functionality with new API --- locale/circuitpython.pot | 6 +- shared-bindings/usb_hid/Device.c | 49 +++++++----- shared-bindings/usb_hid/Device.h | 2 +- shared-bindings/usb_hid/__init__.c | 2 +- shared-module/usb_hid/Device.c | 97 ++++++++++++++-------- shared-module/usb_hid/Device.h | 4 +- shared-module/usb_hid/__init__.c | 124 ++++++++++++----------------- 7 files changed, 152 insertions(+), 132 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index a87bd419b9..6114dcfaea 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -91,6 +91,10 @@ msgstr "" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "" @@ -1226,7 +1230,7 @@ msgstr "" msgid "Internal error #%d" msgstr "" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "" diff --git a/shared-bindings/usb_hid/Device.c b/shared-bindings/usb_hid/Device.c index 25377dffed..718df73241 100644 --- a/shared-bindings/usb_hid/Device.c +++ b/shared-bindings/usb_hid/Device.c @@ -31,7 +31,7 @@ //| class Device: //| """HID Device specification""" //| -//| def __init__(self, *, descriptor: ReadableBuffer, usage_page: int, usage: int, in_report_lengths: Sequence[int], out_report_lengths: Sequence[int]) -> None: +//| def __init__(self, *, descriptor: ReadableBuffer, usage_page: int, usage: int, report_ids: Sequence[int], in_report_lengths: Sequence[int], out_report_lengths: Sequence[int]) -> None: //| """Create a description of a USB HID device. The actual device is created when you //| pass a `Device` to `usb_hid.enable()`. //| @@ -40,6 +40,7 @@ //| :param int usage_page: The Usage Page value from the descriptor. Must match what is in the descriptor. //| :param int usage: The Usage value from the descriptor. Must match what is in the descriptor. //| :param int report_ids: Sequence of report ids used by the descriptor. +//| If the ``report_descriptor`` does not have a report ID, use 0. //| :param int in_report_lengths: Sequence of sizes in bytes of the HIDs report sent to the host. //| The sizes are in order of the ``report_ids``. //| "IN" is with respect to the host. @@ -59,12 +60,12 @@ //| MOUSE: Device //| """Standard mouse device supporting five mouse buttons, X and Y relative movements from -127 to 127 //| in each report, and a relative mouse wheel change from -127 to 127 in each report. -//| Uses Report ID 2 for its IN reports. +//| Uses Report ID 2 for its IN report. //| """ //| //| CONSUMER_CONTROL: Device //| """Consumer Control device supporting sent values from 1-652, with no rollover. -//| Uses Report ID 3 for its IN reports.""" +//| Uses Report ID 3 for its IN report.""" //| STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { @@ -100,8 +101,12 @@ STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args mp_obj_t out_report_lengths = args[ARG_out_report_lengths].u_obj; size_t report_ids_count = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(report_ids)); - if (MP_OBJ_SMALL_INT_VALUE(mp_obj_len(in_report_lengths)) != report_ids_count || - MP_OBJ_SMALL_INT_VALUE(mp_obj_len(out_report_lengths)) != report_ids_count) { + if (report_ids_count < 1) { + mp_raise_ValueError_varg(translate("%q length must be >= 1"), MP_QSTR_report_ids); + } + + if ((size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(in_report_lengths)) != report_ids_count || + (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(out_report_lengths)) != report_ids_count) { mp_raise_ValueError_varg(translate("%q, %q, and %q must all be the same length"), MP_QSTR_report_ids, MP_QSTR_in_report_lengths, MP_QSTR_out_report_lengths); } @@ -136,7 +141,9 @@ STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args //| def send_report(self, buf: ReadableBuffer, report_id: Optional[int] = None) -> None: -//| """Send an HID report. +//| """Send an HID report. If the device descriptor specifies zero or one report id's, +//| you can supply `None` (the default) as the value of ``report_id``. +//| Otherwise you must specify which report id to use when sending the report. //| """ //| ... //| @@ -155,11 +162,12 @@ STATIC mp_obj_t usb_hid_device_send_report(size_t n_args, const mp_obj_t *pos_ar mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[ARG_buf].u_obj, &bufinfo, MP_BUFFER_READ); - uint8_t report_id = 0; + // -1 asks common_hal to determine the report id if possible. + mp_int_t report_id_arg = -1; if (args[ARG_report_id].u_obj != mp_const_none) { - const mp_int_t report_id_arg = mp_obj_int_get_checked(args[ARG_report_id].u_obj); - report_id = mp_arg_validate_int_range(report_id_arg, 1, 255, MP_QSTR_report_id); + report_id_arg = mp_obj_int_get_checked(args[ARG_report_id].u_obj); } + const uint8_t report_id = common_hal_usb_hid_device_validate_report_id(self, report_id_arg); common_hal_usb_hid_device_send_report(self, ((uint8_t *)bufinfo.buf), bufinfo.len, report_id); return mp_const_none; @@ -167,10 +175,10 @@ STATIC mp_obj_t usb_hid_device_send_report(size_t n_args, const mp_obj_t *pos_ar MP_DEFINE_CONST_FUN_OBJ_KW(usb_hid_device_send_report_obj, 2, usb_hid_device_send_report); //| def get_last_received_report(self, report_id: Optional[int] = None) -> bytes: -//| """Get the last received HID OUT report for the given report ID. -//| The report ID may be omitted if there is no report ID, or only one report ID. -//| Return `None` if nothing received. -//| """ +//| """Get the last received HID OUT report for the given report ID. +//| The report ID may be omitted if there is no report ID, or only one report ID. +//| Return `None` if nothing received. +//| """ //| ... //| STATIC mp_obj_t usb_hid_device_get_last_received_report(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { @@ -184,17 +192,18 @@ STATIC mp_obj_t usb_hid_device_get_last_received_report(size_t n_args, const mp_ mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - uint8_t report_id = 0; + mp_int_t report_id_arg = -1; if (args[ARG_report_id].u_obj != mp_const_none) { - report_id = mp_obj_int_get_checked(args[ARG_report_id].u_obj); + report_id_arg = mp_obj_int_get_checked(args[ARG_report_id].u_obj); } + const uint8_t report_id = common_hal_usb_hid_device_validate_report_id(self, report_id_arg); return common_hal_usb_hid_device_get_last_received_report(self, report_id); } MP_DEFINE_CONST_FUN_OBJ_KW(usb_hid_device_get_last_received_report_obj, 1, usb_hid_device_get_last_received_report); //| last_received_report: bytes -//| """The HID OUT report as a `bytes`. (read-only). `None` if nothing received. +//| """The HID OUT report as a `bytes` (read-only). `None` if nothing received. //| Same as `get_last_received_report()` with no argument. //| //| Deprecated: will be removed in CircutPython 8.0.0. Use `get_last_received_report()` instead. @@ -203,7 +212,9 @@ MP_DEFINE_CONST_FUN_OBJ_KW(usb_hid_device_get_last_received_report_obj, 1, usb_h STATIC mp_obj_t usb_hid_device_obj_get_last_received_report_property(mp_obj_t self_in) { usb_hid_device_obj_t *self = MP_OBJ_TO_PTR(self_in); - return common_hal_usb_hid_device_get_last_received_report(self, 0); + // Get the sole report_id, if there is one. + const uint8_t report_id = common_hal_usb_hid_device_validate_report_id(self, -1); + return common_hal_usb_hid_device_get_last_received_report(self, report_id); } MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_last_received_report_property_obj, usb_hid_device_obj_get_last_received_report_property); @@ -215,7 +226,7 @@ const mp_obj_property_t usb_hid_device_last_received_report_obj = { }; //| usage_page: int -//| """The usage page of the device as an `int`. Can be thought of a category. (read-only)""" +//| """The device usage page identifier, which designates a category of device. (read-only)""" //| STATIC mp_obj_t usb_hid_device_obj_get_usage_page(mp_obj_t self_in) { usb_hid_device_obj_t *self = MP_OBJ_TO_PTR(self_in); @@ -231,7 +242,7 @@ const mp_obj_property_t usb_hid_device_usage_page_obj = { }; //| usage: int -//| """The functionality of the device as an int. (read-only) +//| """The device usage identifier, which designates a specific kind of device. (read-only) //| //| For example, Keyboard is 0x06 within the generic desktop usage page 0x01. //| Mouse is 0x02 within the same usage page.""" diff --git a/shared-bindings/usb_hid/Device.h b/shared-bindings/usb_hid/Device.h index d6069c370e..a5e94c4d52 100644 --- a/shared-bindings/usb_hid/Device.h +++ b/shared-bindings/usb_hid/Device.h @@ -38,6 +38,6 @@ void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t * mp_obj_t common_hal_usb_hid_device_get_last_received_report(usb_hid_device_obj_t *self, uint8_t report_id); uint8_t common_hal_usb_hid_device_get_usage_page(usb_hid_device_obj_t *self); uint8_t common_hal_usb_hid_device_get_usage(usb_hid_device_obj_t *self); -bool common_hal_usb_hid_device_valid_report_id(usb_hid_device_obj_t *self, uint8_t report_id); +uint8_t common_hal_usb_hid_device_validate_report_id(usb_hid_device_obj_t *self, mp_int_t report_id); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_USB_HID_DEVICE_H diff --git a/shared-bindings/usb_hid/__init__.c b/shared-bindings/usb_hid/__init__.c index f5a7c1cf72..1c8a45e4ea 100644 --- a/shared-bindings/usb_hid/__init__.c +++ b/shared-bindings/usb_hid/__init__.c @@ -71,7 +71,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(usb_hid_disable_obj, usb_hid_disable); //| //| If you enable too many devices at once, you will run out of USB endpoints. //| The number of available endpoints varies by microcontroller. -//| CircuitPython will go into safe mode after running boot.py to inform you if +//| CircuitPython will go into safe mode after running ``boot.py`` to inform you if //| not enough endpoints are available. //| """ //| ... diff --git a/shared-module/usb_hid/Device.c b/shared-module/usb_hid/Device.c index 9690f86586..db92bd1c32 100644 --- a/shared-module/usb_hid/Device.c +++ b/shared-module/usb_hid/Device.c @@ -79,7 +79,7 @@ const usb_hid_device_obj_t usb_hid_device_keyboard_obj = { .usage = 0x06, .num_report_ids = 1, .report_ids = { 0x01, }, - .in_report_lengths = { 8, 0, 0, 0, }, + .in_report_lengths = { 8, 0, 0, 0, 0, 0, }, .out_report_lengths = { 1, }, }; @@ -129,7 +129,7 @@ const usb_hid_device_obj_t usb_hid_device_mouse_obj = { .usage = 0x02, .num_report_ids = 1, .report_ids = { 0x02, }, - .in_report_lengths = { 4, 0, 0, 0, }, + .in_report_lengths = { 4, 0, 0, 0, 0, 0, }, .out_report_lengths = { 0, }, }; @@ -158,18 +158,30 @@ const usb_hid_device_obj_t usb_hid_device_consumer_control_obj = { .usage = 0x01, .num_report_ids = 1, .report_ids = { 0x03 }, - .in_report_lengths = { 2, 0, 0, 0 }, - .out_report_lengths = { 0 }, + .in_report_lengths = { 2, 0, 0, 0, 0, 0, }, + .out_report_lengths = { 0, }, }; - -bool common_hal_usb_hid_device_valid_report_id(usb_hid_device_obj_t *self, uint8_t report_id) { +STATIC size_t get_report_id_idx(usb_hid_device_obj_t *self, size_t report_id) { for (size_t i = 0; i < self->num_report_ids; i++) { if (report_id == self->report_ids[i]) { - return true; + return i; } } - return false; + return MAX_REPORT_IDS_PER_DESCRIPTOR; +} + +// See if report_id is used by this device. If it is -1, then return the sole report id used by this device, +// which might be 0 if no report_id was supplied. +uint8_t common_hal_usb_hid_device_validate_report_id(usb_hid_device_obj_t *self, mp_int_t report_id_arg) { + if (report_id_arg == -1 && self->num_report_ids == 1) { + return self->report_ids[0]; + } + if (!(report_id_arg >= 0 && + get_report_id_idx(self, (size_t)report_id_arg) < MAX_REPORT_IDS_PER_DESCRIPTOR)) { + mp_raise_ValueError_varg(translate("Invalid %q"), MP_QSTR_report_id); + } + return (uint8_t)report_id_arg; } void common_hal_usb_hid_device_construct(usb_hid_device_obj_t *self, mp_obj_t report_descriptor, uint8_t usage_page, uint8_t usage, size_t num_report_ids, uint8_t *report_ids, uint8_t *in_report_lengths, uint8_t *out_report_lengths) { @@ -183,7 +195,7 @@ void common_hal_usb_hid_device_construct(usb_hid_device_obj_t *self, mp_obj_t re mp_get_buffer_raise(report_descriptor, &bufinfo, MP_BUFFER_READ); self->report_descriptor_length = bufinfo.len; - // Copy the raw the descriptor bytes into a heap obj. We don't keep the Python descriptor object. + // Copy the raw descriptor bytes into a heap obj. We don't keep the Python descriptor object. uint8_t *descriptor_bytes = gc_alloc(bufinfo.len, false, false); memcpy(descriptor_bytes, bufinfo.buf, bufinfo.len); @@ -206,8 +218,12 @@ uint8_t common_hal_usb_hid_device_get_usage(usb_hid_device_obj_t *self) { } void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t *report, uint8_t len, uint8_t report_id) { - if (len != self->in_report_length) { - mp_raise_ValueError_varg(translate("Buffer incorrect size. Should be %d bytes."), self->in_report_length); + // report_id and len have already been validated for this device. + size_t id_idx = get_report_id_idx(self, report_id); + + if (len != self->in_report_lengths[id_idx]) { + mp_raise_ValueError_varg(translate("Buffer incorrect size. Should be %d bytes."), + self->in_report_lengths[id_idx]); } // Wait until interface is ready, timeout = 2 seconds @@ -225,14 +241,25 @@ void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t * } } +mp_obj_t common_hal_usb_hid_device_get_last_received_report(usb_hid_device_obj_t *self, uint8_t report_id) { + // report_id has already been validated for this deveice. + size_t id_idx = get_report_id_idx(self, report_id); + return mp_obj_new_bytes(self->out_report_buffers[id_idx], self->out_report_lengths[id_idx]); +} void usb_hid_device_create_report_buffers(usb_hid_device_obj_t *self) { - for (size_t i = 0; i < self->num_report_ids; count++) { - if (self->out_report_length > 0) { - self->out_report_buffers[i] = self->out_report_lengths[i] > 0 - ? gc_alloc(self->out_report_length, false, true /*long-lived*/) - : NULL; - } + for (size_t i = 0; i < self->num_report_ids; i++) { + // The IN buffers are used only for tud_hid_get_report_cb(), + // which is an unusual case. Normally we can just pass the data directly with tud_hid_report(). + self->in_report_buffers[i] = + self->in_report_lengths[i] > 0 + ? gc_alloc(self->in_report_lengths[i], false, true /*long-lived*/) + : NULL; + + self->out_report_buffers[i] = + self->out_report_lengths[i] > 0 + ? gc_alloc(self->out_report_lengths[i], false, true /*long-lived*/) + : NULL; } } @@ -254,25 +281,27 @@ uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t memcpy(buffer, hid_device->in_report_buffers[id_idx], reqlen); return reqlen; } + return 0; +} // Callbacks invoked when we received Set_Report request through control endpoint - void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize) { - (void)itf; - if (report_type == HID_REPORT_TYPE_INVALID) { - report_id = buffer[0]; - buffer++; - bufsize--; - } else if (report_type != HID_REPORT_TYPE_OUTPUT) { - return; - } +void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize) { + (void)itf; + if (report_type == HID_REPORT_TYPE_INVALID) { + report_id = buffer[0]; + buffer++; + bufsize--; + } else if (report_type != HID_REPORT_TYPE_OUTPUT) { + return; + } - usb_hid_device_obj_t *hid_device; - size_t id_idx; - // Find device with this report id, and get the report id index. - if (usb_hid_get_device_with_report_id(report_id, &hid_device, &id_idx)) { - // If a report of the correct size has been read, save it in the proper OUT report buffer. - if (hid_device && hid_device->out_report_lengths[id_idx] >= bufsize) { - memcpy(hid_device->out_report_buffers[id_idx], buffer, bufsize); - } + usb_hid_device_obj_t *hid_device; + size_t id_idx; + // Find device with this report id, and get the report id index. + if (usb_hid_get_device_with_report_id(report_id, &hid_device, &id_idx)) { + // If a report of the correct size has been read, save it in the proper OUT report buffer. + if (hid_device && hid_device->out_report_lengths[id_idx] >= bufsize) { + memcpy(hid_device->out_report_buffers[id_idx], buffer, bufsize); } } +} diff --git a/shared-module/usb_hid/Device.h b/shared-module/usb_hid/Device.h index cc185d3272..4bdd51d104 100644 --- a/shared-module/usb_hid/Device.h +++ b/shared-module/usb_hid/Device.h @@ -32,7 +32,8 @@ #include "py/obj.h" -// The most complicated one currently know of is the head and eye tracker, which requires 5: +// The most complicated device currently known of is the head and eye tracker, which requires 5 +// report ids. // https://usb.org/sites/default/files/hutrr74_-_usage_page_for_head_and_eye_trackers_0.pdf #define MAX_REPORT_IDS_PER_DESCRIPTOR (6) @@ -43,6 +44,7 @@ typedef struct { uint8_t report_ids[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint8_t in_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint8_t out_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t *in_report_buffers[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint8_t *out_report_buffers[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint16_t report_descriptor_length; uint8_t usage_page; diff --git a/shared-module/usb_hid/__init__.c b/shared-module/usb_hid/__init__.c index 6f903bb657..2be9a646d6 100644 --- a/shared-module/usb_hid/__init__.c +++ b/shared-module/usb_hid/__init__.c @@ -197,10 +197,6 @@ size_t usb_hid_report_descriptor_length(void) { total_hid_report_descriptor_length += hid_devices[i].report_descriptor_length; } - // Don't need space for a report id if there's only one device. - if (num_hid_devices == 1) { - total_hid_report_descriptor_length -= 2; - } return total_hid_report_descriptor_length; } @@ -215,91 +211,69 @@ void usb_hid_build_report_descriptor(uint8_t *report_descriptor_space, size_t re for (mp_int_t i = 0; i < num_hid_devices; i++) { usb_hid_device_obj_t *device = &hid_devices[i]; // Copy the report descriptor for this device. - if (num_hid_devices == 1 && device->num_report_ids == 1) { - // There's only one device, with one report id, so remove it. - // Copy the descriptor, but splice out the report id indicator and value (2 bytes). - size_t report_id_idx = 0; - for (report_id_idx = 0; report_id_idx < device->report_descriptor_length; report_id_idx++) { - if (report_descriptor_start[report_id_idx] == 0x85) { - break; - } - } - if (report_id_idx < device->report_descriptor_length) { + memcpy(report_descriptor_start, device->report_descriptor, device->report_descriptor_length); + // Advance to the next free chunk for the next report descriptor.x + report_descriptor_start += device->report_descriptor_length; - memcpy(report_descriptor_start, device->report_descriptor, device->report_id_index - 1); - report_descriptor_start += device->report_id_index - 1; - memcpy(report_descriptor_start, device->report_descriptor + device->report_id_index + 1, - device->report_descriptor_length - device->report_id_index - 1); - } else { - // Copy the whole descriptor and fill in the report id. - memcpy(report_descriptor_start, device->report_descriptor, device->report_descriptor_length); - report_descriptor_start[device->report_id_index] = i + 1; - - // Remember the report id that was assigned. - device->report_id = i + 1; - - // Advance to the next free chunk for the next report descriptor.x - report_descriptor_start += device->report_descriptor_length; - } - // Clear the heap pointer to the bytes of the descriptor. - // We don't need it any more and it will get lost when the heap goes away. - device->report_descriptor = NULL; - } + // Clear the heap pointer to the bytes of the descriptor. + // We don't need it any more and it will get lost when the heap goes away. + device->report_descriptor = NULL; } +} // Call this after the heap and VM are finished. - void usb_hid_save_report_descriptor(uint8_t *report_descriptor_space, size_t report_descriptor_length) { - if (!usb_hid_enabled()) { - return; - } - - // Allocate storage that persists across VMs to hold the combined report descriptor. - // and to remember the device details. - - // Copy the descriptor from the temporary area to a supervisor storage allocation that - // will leave between VM instantiations. - hid_report_descriptor_allocation = - allocate_memory(align32_size(report_descriptor_length), - /*high_address*/ false, /*movable*/ false); - memcpy((uint8_t *)hid_report_descriptor_allocation->ptr, report_descriptor_space, report_descriptor_length); +void usb_hid_save_report_descriptor(uint8_t *report_descriptor_space, size_t report_descriptor_length) { + if (!usb_hid_enabled()) { + return; } - void usb_hid_gc_collect(void) { - gc_collect_ptr(hid_devices_tuple); + // Allocate storage that persists across VMs to hold the combined report descriptor. + // and to remember the device details. - // Mark possible heap pointers in the static device list as in use. - for (mp_int_t device_idx = 0; i < num_hid_devices; i++) { + // Copy the descriptor from the temporary area to a supervisor storage allocation that + // will leave between VM instantiations. + hid_report_descriptor_allocation = + allocate_memory(align32_size(report_descriptor_length), + /*high_address*/ false, /*movable*/ false); + memcpy((uint8_t *)hid_report_descriptor_allocation->ptr, report_descriptor_space, report_descriptor_length); +} - // Cast away the const for .report_descriptor. It could be in flash or on the heap. - // Constant report descriptors must be const so that they are used directly from flash - // and not copied into RAM. - gc_collect_ptr((void *)hid_devices[device_idx].report_descriptor); +void usb_hid_gc_collect(void) { + gc_collect_ptr(hid_devices_tuple); - // Collect all the OUT report buffers for this device. - for (size_t id_idx = 0; id_idx < hid_devices[device_idx].report_ids_count; id_idx++) { - gc_collect_ptr(hid_devices[i].out_report_buffers[id_idx]); + // Mark possible heap pointers in the static device list as in use. + for (mp_int_t device_idx = 0; device_idx < num_hid_devices; device_idx++) { + + // Cast away the const for .report_descriptor. It could be in flash or on the heap. + // Constant report descriptors must be const so that they are used directly from flash + // and not copied into RAM. + gc_collect_ptr((void *)hid_devices[device_idx].report_descriptor); + + // Collect all the OUT report buffers for this device. + for (size_t id_idx = 0; id_idx < hid_devices[device_idx].num_report_ids; id_idx++) { + gc_collect_ptr(hid_devices[id_idx].out_report_buffers[id_idx]); + } + } +} + +bool usb_hid_get_device_with_report_id(uint8_t report_id, usb_hid_device_obj_t **device_out, size_t *id_idx_out) { + for (uint8_t device_idx = 0; device_idx < num_hid_devices; device_idx++) { + usb_hid_device_obj_t *device = &hid_devices[device_idx]; + for (size_t id_idx = 0; id_idx < device->num_report_ids; id_idx++) { + if (device->report_ids[id_idx] == report_id) { + *device_out = device; + *id_idx_out = id_idx; + return true; } } } - - bool usb_hid_get_device_with_report_id(uint8_t report_id, usb_hid_device_obj_t **device_out, size_t *id_idx_out) { - for (uint8_t device_idx = 0; device_idx < num_hid_devices; device_idx++) { - usb_hid_device_obj_t *device = &hid_devices[device_idx]; - for (size_t id_idx = 0; id_idx < device->report_ids_count; id_idx++) { - if (device->report_ids[id_idx] == report_id) { - *device_out = device; - *id_idx_out = id_idx; - return true; - } - } - } - return false; - } + return false; +} // Invoked when GET HID REPORT DESCRIPTOR is received. // Application return pointer to descriptor // Descriptor contents must exist long enough for transfer to complete - uint8_t const *tud_hid_descriptor_report_cb(uint8_t itf) { - return (uint8_t *)hid_report_descriptor_allocation->ptr; - } +uint8_t const *tud_hid_descriptor_report_cb(uint8_t itf) { + return (uint8_t *)hid_report_descriptor_allocation->ptr; +} From f37e1d7bf59d76929a77d4f11918599c6501fc56 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 14 Aug 2021 17:36:05 -0400 Subject: [PATCH 161/418] squeeze a couple of boards --- ports/atmel-samd/boards/blm_badge/mpconfigboard.mk | 1 + ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk | 4 +++- shared-module/usb_hid/Device.h | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/atmel-samd/boards/blm_badge/mpconfigboard.mk b/ports/atmel-samd/boards/blm_badge/mpconfigboard.mk index 8ba3ae94c3..a85a17890c 100644 --- a/ports/atmel-samd/boards/blm_badge/mpconfigboard.mk +++ b/ports/atmel-samd/boards/blm_badge/mpconfigboard.mk @@ -14,6 +14,7 @@ CIRCUITPY_AUDIOIO = 1 CIRCUITPY_AUDIOBUSIO = 1 # Pins for I2SOut are not available. CIRCUITPY_AUDIOBUSIO_I2SOUT = 0 +CIRCUITPY_BUSIO_SPI = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 diff --git a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk index 94a255529f..4687ce32a0 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk @@ -10,4 +10,6 @@ INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 -CIRCUITPY_GETPASS = 0 +# There are many pin definitions on this board; it doesn't quite fit on very large translations. +# So remove what might be least likely module to be used. +CIRCUITPY_RAINBOWIO = 0 diff --git a/shared-module/usb_hid/Device.h b/shared-module/usb_hid/Device.h index 4bdd51d104..a3c523acd5 100644 --- a/shared-module/usb_hid/Device.h +++ b/shared-module/usb_hid/Device.h @@ -41,12 +41,12 @@ typedef struct { mp_obj_base_t base; // Python buffer object whose contents are the descriptor. const uint8_t *report_descriptor; - uint8_t report_ids[MAX_REPORT_IDS_PER_DESCRIPTOR]; - uint8_t in_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; - uint8_t out_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint8_t *in_report_buffers[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint8_t *out_report_buffers[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint16_t report_descriptor_length; + uint8_t report_ids[MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t in_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t out_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; uint8_t usage_page; uint8_t usage; uint8_t num_report_ids; From e29346b79afd181a610ff94e8c1bd75b51f277fe Mon Sep 17 00:00:00 2001 From: codetyphon Date: Sun, 15 Aug 2021 10:18:40 +0800 Subject: [PATCH 162/418] ai_thinker_esp_12k_nodemcu --- .github/workflows/build.yml | 2 +- .../board.c | 0 .../mpconfigboard.h | 4 ++-- .../mpconfigboard.mk | 2 +- .../{ai_thinker_esp_12k => ai_thinker_esp_12k_nodemcu}/pins.c | 0 .../sdkconfig | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename ports/esp32s2/{ai_thinker_esp_12k => ai_thinker_esp_12k_nodemcu}/board.c (100%) rename ports/esp32s2/{ai_thinker_esp_12k => ai_thinker_esp_12k_nodemcu}/mpconfigboard.h (93%) rename ports/esp32s2/{ai_thinker_esp_12k => ai_thinker_esp_12k_nodemcu}/mpconfigboard.mk (89%) rename ports/esp32s2/{ai_thinker_esp_12k => ai_thinker_esp_12k_nodemcu}/pins.c (100%) rename ports/esp32s2/{ai_thinker_esp_12k => ai_thinker_esp_12k_nodemcu}/sdkconfig (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d9bfb925b..2777e2e24a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -504,9 +504,9 @@ jobs: - "adafruit_funhouse" - "adafruit_magtag_2.9_grayscale" - "adafruit_metro_esp32s2" + - "ai_thinker_esp_12k_nodemcu" - "artisense_rd00" - "atmegazero_esp32s2" - - "ai_thinker_esp_12k" - "crumpspace_crumps2" - "electroniccats_bastwifi" - "espressif_kaluga_1" diff --git a/ports/esp32s2/ai_thinker_esp_12k/board.c b/ports/esp32s2/ai_thinker_esp_12k_nodemcu/board.c similarity index 100% rename from ports/esp32s2/ai_thinker_esp_12k/board.c rename to ports/esp32s2/ai_thinker_esp_12k_nodemcu/board.c diff --git a/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.h b/ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.h similarity index 93% rename from ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.h rename to ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.h index cb2e3d2bc1..90029273c4 100644 --- a/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.h +++ b/ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.h @@ -28,8 +28,8 @@ // Same setup as the Saola board but with no Neopixel on board -#define MICROPY_HW_BOARD_NAME "NodeMCU-32-S2 w/ESP-12K 08" -#define MICROPY_HW_MCU_NAME "ESP-12K 08" +#define MICROPY_HW_BOARD_NAME "ESP 12k NodeMCU" +#define MICROPY_HW_MCU_NAME "ESP-12K" // #define MICROPY_HW_NEOPIXEL (&pin_GPIO18) diff --git a/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk b/ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk similarity index 89% rename from ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk rename to ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk index 997e9ebe76..08baf474ee 100644 --- a/ports/esp32s2/ai_thinker_esp_12k/mpconfigboard.mk +++ b/ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x612B USB_PID = 0x80A7 -USB_PRODUCT = "NodeMCU-32-S2 w/ESP-12K 08" +USB_PRODUCT = "ESP 12k NodeMCU" USB_MANUFACTURER = "Ai-Thinker" INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/esp32s2/ai_thinker_esp_12k/pins.c b/ports/esp32s2/ai_thinker_esp_12k_nodemcu/pins.c similarity index 100% rename from ports/esp32s2/ai_thinker_esp_12k/pins.c rename to ports/esp32s2/ai_thinker_esp_12k_nodemcu/pins.c diff --git a/ports/esp32s2/ai_thinker_esp_12k/sdkconfig b/ports/esp32s2/ai_thinker_esp_12k_nodemcu/sdkconfig similarity index 100% rename from ports/esp32s2/ai_thinker_esp_12k/sdkconfig rename to ports/esp32s2/ai_thinker_esp_12k_nodemcu/sdkconfig From 7a48fc05b407f0046d2b17c0471a5152cf0d1575 Mon Sep 17 00:00:00 2001 From: codetyphon Date: Sun, 15 Aug 2021 13:29:42 +0800 Subject: [PATCH 163/418] fix ai-tinker-esp-12k path --- ports/esp32s2/{ => boards}/ai_thinker_esp_12k_nodemcu/board.c | 0 .../{ => boards}/ai_thinker_esp_12k_nodemcu/mpconfigboard.h | 0 .../{ => boards}/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk | 0 ports/esp32s2/{ => boards}/ai_thinker_esp_12k_nodemcu/pins.c | 0 ports/esp32s2/{ => boards}/ai_thinker_esp_12k_nodemcu/sdkconfig | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename ports/esp32s2/{ => boards}/ai_thinker_esp_12k_nodemcu/board.c (100%) rename ports/esp32s2/{ => boards}/ai_thinker_esp_12k_nodemcu/mpconfigboard.h (100%) rename ports/esp32s2/{ => boards}/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk (100%) rename ports/esp32s2/{ => boards}/ai_thinker_esp_12k_nodemcu/pins.c (100%) rename ports/esp32s2/{ => boards}/ai_thinker_esp_12k_nodemcu/sdkconfig (100%) diff --git a/ports/esp32s2/ai_thinker_esp_12k_nodemcu/board.c b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/board.c similarity index 100% rename from ports/esp32s2/ai_thinker_esp_12k_nodemcu/board.c rename to ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/board.c diff --git a/ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.h b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h similarity index 100% rename from ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.h rename to ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h diff --git a/ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk rename to ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk diff --git a/ports/esp32s2/ai_thinker_esp_12k_nodemcu/pins.c b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c similarity index 100% rename from ports/esp32s2/ai_thinker_esp_12k_nodemcu/pins.c rename to ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c diff --git a/ports/esp32s2/ai_thinker_esp_12k_nodemcu/sdkconfig b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/sdkconfig similarity index 100% rename from ports/esp32s2/ai_thinker_esp_12k_nodemcu/sdkconfig rename to ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/sdkconfig From 27563936ed8aa7fb2c261a50434a54f5414ee1a1 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Sun, 15 Aug 2021 11:11:11 +0530 Subject: [PATCH 164/418] fix crash on raise of reload exception --- py/mpstate.h | 2 ++ py/runtime.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/py/mpstate.h b/py/mpstate.h index 9f7d72a686..38f1f5188d 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -146,6 +146,8 @@ typedef struct _mp_state_vm_t { // exception object of type ReloadException mp_obj_exception_t mp_reload_exception; + // traceback object to store traceback + mp_obj_traceback_t mp_reload_traceback; // dictionary with loaded modules (may be exposed as sys.modules) mp_obj_dict_t mp_loaded_modules_dict; diff --git a/py/runtime.c b/py/runtime.c index 4d4fc3592b..55f26021ab 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -86,7 +86,8 @@ void mp_init(void) { MP_STATE_VM(mp_reload_exception).base.type = &mp_type_ReloadException; MP_STATE_VM(mp_reload_exception).args = (mp_obj_tuple_t *)&mp_const_empty_tuple_obj; - MP_STATE_VM(mp_reload_exception).traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; + MP_STATE_VM(mp_reload_exception).traceback = &MP_STATE_VM(mp_reload_traceback); + *MP_STATE_VM(mp_reload_exception).traceback = mp_const_empty_traceback_obj; // call port specific initialization if any #ifdef MICROPY_PORT_INIT_FUNC From fd8fe6f013823b862f86ed5f0205826c61f91382 Mon Sep 17 00:00:00 2001 From: codetyphon Date: Sun, 15 Aug 2021 20:39:53 +0800 Subject: [PATCH 165/418] Update ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h Co-authored-by: Dan Halbert --- ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h index 90029273c4..1af2d2420c 100644 --- a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +++ b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h @@ -29,7 +29,7 @@ // Same setup as the Saola board but with no Neopixel on board #define MICROPY_HW_BOARD_NAME "ESP 12k NodeMCU" -#define MICROPY_HW_MCU_NAME "ESP-12K" +#define MICROPY_HW_MCU_NAME "ESP32S2" // #define MICROPY_HW_NEOPIXEL (&pin_GPIO18) From 08f43d676663fb3a7710160f458f3b6e8d6c4335 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Sun, 15 Aug 2021 14:31:58 -0500 Subject: [PATCH 166/418] Fix number of chars in default font to make it valid bdf. --- tools/fonts/ter-u12n.bdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fonts/ter-u12n.bdf b/tools/fonts/ter-u12n.bdf index 815f47a792..4fba3cc718 100644 --- a/tools/fonts/ter-u12n.bdf +++ b/tools/fonts/ter-u12n.bdf @@ -24,7 +24,7 @@ FONT_ASCENT 10 FONT_DESCENT 2 DEFAULT_CHAR 65533 ENDPROPERTIES -CHARS 1326 +CHARS 1327 STARTCHAR char0 ENCODING 0 SWIDTH 500 0 From 2ebeeb5daf2d43e82db8ef74e39874b82ddbac01 Mon Sep 17 00:00:00 2001 From: Seth Kerr Date: Fri, 13 Aug 2021 18:48:40 -0600 Subject: [PATCH 167/418] add ODT PixelWing ESP32S2 --- .../boards/odt-pixelwing-esp32-s2/board.c | 46 +++++++++++++++++++ .../odt-pixelwing-esp32-s2/mpconfigboard.h | 41 +++++++++++++++++ .../odt-pixelwing-esp32-s2/mpconfigboard.mk | 17 +++++++ .../boards/odt-pixelwing-esp32-s2/pins.c | 15 ++++++ .../boards/odt-pixelwing-esp32-s2/sdkconfig | 39 ++++++++++++++++ 5 files changed, 158 insertions(+) create mode 100644 ports/esp32s2/boards/odt-pixelwing-esp32-s2/board.c create mode 100644 ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.h create mode 100644 ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/odt-pixelwing-esp32-s2/pins.c create mode 100644 ports/esp32s2/boards/odt-pixelwing-esp32-s2/sdkconfig diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/board.c b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/board.c new file mode 100644 index 0000000000..5abd1ce1b3 --- /dev/null +++ b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/board.c @@ -0,0 +1,46 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.h b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.h new file mode 100644 index 0000000000..46d1084d19 --- /dev/null +++ b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.h @@ -0,0 +1,41 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Oak Dev Tech PixelWing ESP32S2" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO45) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO34) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.mk b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.mk new file mode 100644 index 0000000000..c3880b6ae9 --- /dev/null +++ b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x1209 +USB_PID = 0x4DF0 +USB_PRODUCT = "Pixelwing ESP32S2" +USB_MANUFACTURER = "Oak Dev Tech" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/pins.c b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/pins.c new file mode 100644 index 0000000000..9396b536f3 --- /dev/null +++ b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/pins.c @@ -0,0 +1,15 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_GPIO33) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_GPIO34) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/sdkconfig b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/sdkconfig new file mode 100644 index 0000000000..f67a257854 --- /dev/null +++ b/ports/esp32s2/boards/odt-pixelwing-esp32-s2/sdkconfig @@ -0,0 +1,39 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="PixelWing-ESP32S2" +# end of LWIP From 3b491ac0f33f1225e3c6228f7479483ee8ba4b8f Mon Sep 17 00:00:00 2001 From: Seth Kerr Date: Sun, 15 Aug 2021 13:38:26 -0600 Subject: [PATCH 168/418] ran pre-commit locally --- .github/workflows/build.yml | 1 + locale/circuitpython.pot | 5 ++- .../board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../pins.c | 0 .../sdkconfig | 0 .../raspberrypi/boards/odt-bread-2040/board.c | 40 +++++++++++++++++ .../boards/odt-bread-2040/mpconfigboard.h | 2 + .../boards/odt-bread-2040/mpconfigboard.mk | 11 +++++ .../odt-bread-2040/pico-sdk-configboard.h | 1 + .../raspberrypi/boards/odt-bread-2040/pins.c | 43 +++++++++++++++++++ 12 files changed, 102 insertions(+), 1 deletion(-) rename ports/esp32s2/boards/{odt-pixelwing-esp32-s2 => odt_pixelwing_esp32_s2}/board.c (100%) rename ports/esp32s2/boards/{odt-pixelwing-esp32-s2 => odt_pixelwing_esp32_s2}/mpconfigboard.h (100%) rename ports/esp32s2/boards/{odt-pixelwing-esp32-s2 => odt_pixelwing_esp32_s2}/mpconfigboard.mk (100%) rename ports/esp32s2/boards/{odt-pixelwing-esp32-s2 => odt_pixelwing_esp32_s2}/pins.c (100%) rename ports/esp32s2/boards/{odt-pixelwing-esp32-s2 => odt_pixelwing_esp32_s2}/sdkconfig (100%) create mode 100644 ports/raspberrypi/boards/odt-bread-2040/board.c create mode 100644 ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/odt-bread-2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/odt-bread-2040/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2777e2e24a..a29a702d87 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -524,6 +524,7 @@ jobs: - "morpheans_morphesp-240" - "muselab_nanoesp32_s2_wroom" - "muselab_nanoesp32_s2_wrover" + - "odt_pixelwing_esp32_s2" - "targett_module_clip_wroom" - "targett_module_clip_wrover" - "unexpectedmaker_feathers2" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 03e15c6db2..dc9806c26c 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1388,7 +1388,8 @@ msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "" @@ -3917,8 +3918,10 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/board.c b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/board.c similarity index 100% rename from ports/esp32s2/boards/odt-pixelwing-esp32-s2/board.c rename to ports/esp32s2/boards/odt_pixelwing_esp32_s2/board.c diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.h b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.h rename to ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.mk b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/odt-pixelwing-esp32-s2/mpconfigboard.mk rename to ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/pins.c b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c similarity index 100% rename from ports/esp32s2/boards/odt-pixelwing-esp32-s2/pins.c rename to ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c diff --git a/ports/esp32s2/boards/odt-pixelwing-esp32-s2/sdkconfig b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/sdkconfig similarity index 100% rename from ports/esp32s2/boards/odt-pixelwing-esp32-s2/sdkconfig rename to ports/esp32s2/boards/odt_pixelwing_esp32_s2/sdkconfig diff --git a/ports/raspberrypi/boards/odt-bread-2040/board.c b/ports/raspberrypi/boards/odt-bread-2040/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/odt-bread-2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.h b/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.h new file mode 100644 index 0000000000..49bb1677d6 --- /dev/null +++ b/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.h @@ -0,0 +1,2 @@ +#define MICROPY_HW_BOARD_NAME "Oak Development Technologies" +#define MICROPY_HW_MCU_NAME "rp2040" diff --git a/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.mk b/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.mk new file mode 100644 index 0000000000..9874929cee --- /dev/null +++ b/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1209 +USB_PID = 0x4DF1 +USB_PRODUCT = "Bread 2040" +USB_MANUFACTURER = "Oak Dev Tech" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/odt-bread-2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/odt-bread-2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/odt-bread-2040/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/odt-bread-2040/pins.c b/ports/raspberrypi/boards/odt-bread-2040/pins.c new file mode 100644 index 0000000000..72d575db76 --- /dev/null +++ b/ports/raspberrypi/boards/odt-bread-2040/pins.c @@ -0,0 +1,43 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_26), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_28), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 201883dcc1eed68698fe426287d7242b0ada5429 Mon Sep 17 00:00:00 2001 From: Seth Kerr Date: Sun, 15 Aug 2021 13:53:59 -0600 Subject: [PATCH 169/418] removed bread 2040 from commit --- .../raspberrypi/boards/odt-bread-2040/board.c | 40 ----------------- .../boards/odt-bread-2040/mpconfigboard.h | 2 - .../boards/odt-bread-2040/mpconfigboard.mk | 11 ----- .../odt-bread-2040/pico-sdk-configboard.h | 1 - .../raspberrypi/boards/odt-bread-2040/pins.c | 43 ------------------- 5 files changed, 97 deletions(-) delete mode 100644 ports/raspberrypi/boards/odt-bread-2040/board.c delete mode 100644 ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.h delete mode 100644 ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.mk delete mode 100644 ports/raspberrypi/boards/odt-bread-2040/pico-sdk-configboard.h delete mode 100644 ports/raspberrypi/boards/odt-bread-2040/pins.c diff --git a/ports/raspberrypi/boards/odt-bread-2040/board.c b/ports/raspberrypi/boards/odt-bread-2040/board.c deleted file mode 100644 index de6e424ed9..0000000000 --- a/ports/raspberrypi/boards/odt-bread-2040/board.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "supervisor/board.h" - -void board_init(void) { -} - -bool board_requests_safe_mode(void) { - return false; -} - -void reset_board(void) { -} - -void board_deinit(void) { -} diff --git a/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.h b/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.h deleted file mode 100644 index 49bb1677d6..0000000000 --- a/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.h +++ /dev/null @@ -1,2 +0,0 @@ -#define MICROPY_HW_BOARD_NAME "Oak Development Technologies" -#define MICROPY_HW_MCU_NAME "rp2040" diff --git a/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.mk b/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.mk deleted file mode 100644 index 9874929cee..0000000000 --- a/ports/raspberrypi/boards/odt-bread-2040/mpconfigboard.mk +++ /dev/null @@ -1,11 +0,0 @@ -USB_VID = 0x1209 -USB_PID = 0x4DF1 -USB_PRODUCT = "Bread 2040" -USB_MANUFACTURER = "Oak Dev Tech" - -CHIP_VARIANT = RP2040 -CHIP_FAMILY = rp2 - -EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" - -CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/odt-bread-2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/odt-bread-2040/pico-sdk-configboard.h deleted file mode 100644 index 36da55d457..0000000000 --- a/ports/raspberrypi/boards/odt-bread-2040/pico-sdk-configboard.h +++ /dev/null @@ -1 +0,0 @@ -// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/odt-bread-2040/pins.c b/ports/raspberrypi/boards/odt-bread-2040/pins.c deleted file mode 100644 index 72d575db76..0000000000 --- a/ports/raspberrypi/boards/odt-bread-2040/pins.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "shared-bindings/board/__init__.h" - -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_0), MP_ROM_PTR(&pin_GPIO0) }, - { MP_ROM_QSTR(MP_QSTR_1), MP_ROM_PTR(&pin_GPIO1) }, - { MP_ROM_QSTR(MP_QSTR_2), MP_ROM_PTR(&pin_GPIO2) }, - { MP_ROM_QSTR(MP_QSTR_3), MP_ROM_PTR(&pin_GPIO3) }, - { MP_ROM_QSTR(MP_QSTR_4), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_5), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_6), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_7), MP_ROM_PTR(&pin_GPIO7) }, - { MP_ROM_QSTR(MP_QSTR_8), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_9), MP_ROM_PTR(&pin_GPIO9) }, - { MP_ROM_QSTR(MP_QSTR_10), MP_ROM_PTR(&pin_GPIO10) }, - { MP_ROM_QSTR(MP_QSTR_11), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_12), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_13), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_14), MP_ROM_PTR(&pin_GPIO14) }, - { MP_ROM_QSTR(MP_QSTR_15), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_16), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_17), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_18), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_19), MP_ROM_PTR(&pin_GPIO19) }, - { MP_ROM_QSTR(MP_QSTR_20), MP_ROM_PTR(&pin_GPIO20) }, - { MP_ROM_QSTR(MP_QSTR_21), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_22), MP_ROM_PTR(&pin_GPIO22) }, - { MP_ROM_QSTR(MP_QSTR_23), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_24), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_25), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_26), MP_ROM_PTR(&pin_GPIO26) }, - - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_27), MP_ROM_PTR(&pin_GPIO27) }, - - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_28), MP_ROM_PTR(&pin_GPIO28) }, - - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, - - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, - -}; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 8058736338ad67be5abbb9d7dbb099450e1ad1c9 Mon Sep 17 00:00:00 2001 From: Seth Kerr Date: Sun, 15 Aug 2021 14:07:08 -0600 Subject: [PATCH 170/418] temporary new circuitpython.pot file --- locale/circuitpython.pot | 4447 -------------------------------------- 1 file changed, 4447 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index dc9806c26c..e69de29bb2 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1,4447 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: main.c -msgid "" -"\n" -"Code done running.\n" -msgstr "" - -#: main.c -msgid "" -"\n" -"Code stopped by auto-reload.\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "" -"\n" -"Please file an issue with the contents of your CIRCUITPY drive at \n" -"https://github.com/adafruit/circuitpython/issues\n" -msgstr "" - -#: py/obj.c -msgid " File \"%q\"" -msgstr "" - -#: py/obj.c -msgid " File \"%q\", line %d" -msgstr "" - -#: py/builtinhelp.c -msgid " is of type %q\n" -msgstr "" - -#: main.c -msgid " not found.\n" -msgstr "" - -#: main.c -msgid " output:\n" -msgstr "" - -#: py/objstr.c -#, c-format -msgid "%%c requires int or char" -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -#, c-format -msgid "" -"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" -msgstr "" - -#: ports/atmel-samd/common-hal/sdioio/SDCard.c -msgid "%q failure: %d" -msgstr "" - -#: shared-bindings/microcontroller/Pin.c -msgid "%q in use" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/raspberrypi/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c -#: py/objstrunicode.c -msgid "%q index out of range" -msgstr "" - -#: py/obj.c -msgid "%q indices must be integers, not %s" -msgstr "" - -#: py/argcheck.c -msgid "%q length must be %q" -msgstr "" - -#: shared-bindings/vectorio/Polygon.c -msgid "%q list must be a list" -msgstr "" - -#: py/argcheck.c -msgid "%q must <= %d" -msgstr "" - -#: py/argcheck.c -msgid "%q must be %d-%d" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - -#: py/argcheck.c -msgid "%q must be >= %d" -msgstr "" - -#: py/argcheck.c shared-bindings/memorymonitor/AllocationAlarm.c -msgid "%q must be >= 0" -msgstr "" - -#: shared-bindings/_bleio/CharacteristicBuffer.c -#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c -#: shared-bindings/displayio/Shape.c -#: shared-bindings/memorymonitor/AllocationAlarm.c -#: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c -msgid "%q must be >= 1" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - -#: py/argcheck.c -msgid "%q must be a string" -msgstr "" - -#: shared-module/vectorio/Polygon.c -msgid "%q must be a tuple of length 2" -msgstr "" - -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c -msgid "%q must be between %d and %d" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/UART.c -msgid "%q must be power of 2" -msgstr "" - -#: py/argcheck.c -msgid "%q must of type %q" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#: shared-bindings/canio/Match.c -msgid "%q out of range" -msgstr "" - -#: ports/atmel-samd/common-hal/microcontroller/Pin.c -msgid "%q pin invalid" -msgstr "" - -#: shared-bindings/fontio/BuiltinFont.c -msgid "%q should be an int" -msgstr "" - -#: py/bc.c py/objnamedtuple.c -msgid "%q() takes %d positional arguments but %d were given" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -#, c-format -msgid "%s error 0x%x" -msgstr "" - -#: py/argcheck.c -msgid "'%q' argument required" -msgstr "" - -#: py/proto.c -msgid "'%q' object does not support '%q'" -msgstr "" - -#: py/runtime.c -msgid "'%q' object is not an iterator" -msgstr "" - -#: py/objtype.c py/runtime.c -msgid "'%q' object is not callable" -msgstr "" - -#: py/runtime.c -msgid "'%q' object is not iterable" -msgstr "" - -#: py/emitinlinethumb.c py/emitinlinextensa.c -#, c-format -msgid "'%s' expects a label" -msgstr "" - -#: py/emitinlinethumb.c py/emitinlinextensa.c -#, c-format -msgid "'%s' expects a register" -msgstr "" - -#: py/emitinlinethumb.c -#, c-format -msgid "'%s' expects a special register" -msgstr "" - -#: py/emitinlinethumb.c -#, c-format -msgid "'%s' expects an FPU register" -msgstr "" - -#: py/emitinlinethumb.c -#, c-format -msgid "'%s' expects an address of the form [a, b]" -msgstr "" - -#: py/emitinlinethumb.c py/emitinlinextensa.c -#, c-format -msgid "'%s' expects an integer" -msgstr "" - -#: py/emitinlinethumb.c -#, c-format -msgid "'%s' expects at most r%d" -msgstr "" - -#: py/emitinlinethumb.c -#, c-format -msgid "'%s' expects {r0, r1, ...}" -msgstr "" - -#: py/emitinlinextensa.c -#, c-format -msgid "'%s' integer %d isn't within range %d..%d" -msgstr "" - -#: py/emitinlinethumb.c -#, c-format -msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object doesn't support item assignment" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object doesn't support item deletion" -msgstr "" - -#: py/runtime.c -msgid "'%s' object has no attribute '%q'" -msgstr "" - -#: py/obj.c -#, c-format -msgid "'%s' object isn't subscriptable" -msgstr "" - -#: py/objstr.c -msgid "'=' alignment not allowed in string format specifier" -msgstr "" - -#: shared-module/struct/__init__.c -msgid "'S' and 'O' are not supported format types" -msgstr "" - -#: py/compile.c -msgid "'align' requires 1 argument" -msgstr "" - -#: py/compile.c -msgid "'await' outside function" -msgstr "" - -#: py/compile.c -msgid "'await', 'async for' or 'async with' outside async function" -msgstr "" - -#: py/compile.c -msgid "'break' outside loop" -msgstr "" - -#: py/compile.c -msgid "'continue' outside loop" -msgstr "" - -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "" - -#: py/compile.c -msgid "'data' requires at least 2 arguments" -msgstr "" - -#: py/compile.c -msgid "'data' requires integer arguments" -msgstr "" - -#: py/compile.c -msgid "'label' requires 1 argument" -msgstr "" - -#: py/compile.c -msgid "'return' outside function" -msgstr "" - -#: py/compile.c -msgid "'yield from' inside async function" -msgstr "" - -#: py/compile.c -msgid "'yield' outside function" -msgstr "" - -#: shared-module/vectorio/VectorShape.c -msgid "(x,y) integers required" -msgstr "" - -#: py/compile.c -msgid "*x must be assignment target" -msgstr "" - -#: py/obj.c -msgid ", in %q\n" -msgstr "" - -#: py/objcomplex.c -msgid "0.0 to a complex power" -msgstr "" - -#: py/modbuiltins.c -msgid "3-arg pow() not supported" -msgstr "" - -#: shared-module/msgpack/__init__.c -msgid "64 bit types" -msgstr "" - -#: ports/atmel-samd/common-hal/countio/Counter.c -#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c -msgid "A hardware interrupt channel is already in use" -msgstr "" - -#: ports/esp32s2/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - -#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c -#, c-format -msgid "Address must be %d bytes long" -msgstr "" - -#: shared-bindings/_bleio/Address.c -msgid "Address type out of range" -msgstr "" - -#: ports/esp32s2/common-hal/canio/CAN.c -msgid "All CAN peripherals are in use" -msgstr "" - -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c -msgid "All I2C peripherals are in use" -msgstr "" - -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c -msgid "All PCNT units in use" -msgstr "" - -#: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c -#: ports/stm/common-hal/canio/Listener.c -msgid "All RX FIFOs in use" -msgstr "" - -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c -msgid "All SPI peripherals are in use" -msgstr "" - -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c -msgid "All UART peripherals are in use" -msgstr "" - -#: shared-bindings/pwmio/PWMOut.c -msgid "All channels in use" -msgstr "" - -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -msgid "All event channels in use" -msgstr "" - -#: ports/raspberrypi/common-hal/pulseio/PulseIn.c -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "All state machines in use" -msgstr "" - -#: ports/atmel-samd/audio_dma.c -msgid "All sync event channels in use" -msgstr "" - -#: shared-bindings/pwmio/PWMOut.c -msgid "All timers for this pin are in use" -msgstr "" - -#: ports/atmel-samd/common-hal/_pew/PewPew.c -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c -#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c -#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c -#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c -#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c -msgid "All timers in use" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "Already advertising." -msgstr "" - -#: ports/atmel-samd/common-hal/canio/Listener.c -msgid "Already have all-matches listener" -msgstr "" - -#: shared-module/memorymonitor/AllocationAlarm.c -#: shared-module/memorymonitor/AllocationSize.c -msgid "Already running" -msgstr "" - -#: ports/esp32s2/common-hal/wifi/Radio.c -msgid "Already scanning for wifi networks" -msgstr "" - -#: ports/cxd56/common-hal/analogio/AnalogIn.c -msgid "AnalogIn not supported on given pin" -msgstr "" - -#: ports/cxd56/common-hal/analogio/AnalogOut.c -#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c -#: ports/nrf/common-hal/analogio/AnalogOut.c -#: ports/raspberrypi/common-hal/analogio/AnalogOut.c -msgid "AnalogOut functionality not supported" -msgstr "" - -#: shared-bindings/analogio/AnalogOut.c -msgid "AnalogOut is only 16 bits. Value must be less than 65536." -msgstr "" - -#: ports/atmel-samd/common-hal/analogio/AnalogOut.c -msgid "AnalogOut not supported on given pin" -msgstr "" - -#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c -msgid "Another PWMAudioOut is already active" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseOut.c -#: ports/cxd56/common-hal/pulseio/PulseOut.c -msgid "Another send is already active" -msgstr "" - -#: shared-bindings/pulseio/PulseOut.c -msgid "Array must contain halfwords (type 'H')" -msgstr "" - -#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c -msgid "Array values should be single bytes." -msgstr "" - -#: shared-bindings/microcontroller/Pin.c -msgid "At most %d %q may be specified (not %d)" -msgstr "" - -#: shared-module/memorymonitor/AllocationAlarm.c -#, c-format -msgid "Attempt to allocate %d blocks" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when VM not running." -msgstr "" - -#: ports/raspberrypi/audio_dma.c -msgid "Audio conversion not implemented" -msgstr "" - -#: shared-bindings/wifi/Radio.c -msgid "AuthMode.OPEN is not used with password" -msgstr "" - -#: shared-bindings/wifi/Radio.c -msgid "Authentication failure" -msgstr "" - -#: main.c -msgid "Auto-reload is off.\n" -msgstr "" - -#: main.c -msgid "" -"Auto-reload is on. Simply save files over USB to run them or enter REPL to " -"disable.\n" -msgstr "" - -#: ports/esp32s2/common-hal/canio/CAN.c -msgid "Baudrate not supported by peripheral" -msgstr "" - -#: shared-module/displayio/Display.c -#: shared-module/framebufferio/FramebufferDisplay.c -msgid "Below minimum frame rate" -msgstr "" - -#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c -msgid "Bit clock and word select must be sequential pins" -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c -msgid "Bit clock and word select must share a clock unit" -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -#, c-format -msgid "Bit depth must be from 1 to 6 inclusive, not %d" -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "Bit depth must be multiple of 8." -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Both RX and TX required for flow control" -msgstr "" - -#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c -msgid "Both pins must support hardware interrupts" -msgstr "" - -#: shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/rgbmatrix/RGBMatrix.c -msgid "Brightness must be 0-1.0" -msgstr "" - -#: shared-bindings/supervisor/__init__.c -msgid "Brightness must be between 0 and 255" -msgstr "" - -#: shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Brightness not adjustable" -msgstr "" - -#: shared-bindings/_bleio/UUID.c -#, c-format -msgid "Buffer + offset too small %d %d %d" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Buffer elements must be 4 bytes long or less" -msgstr "" - -#: shared-module/usb_hid/Device.c -#, c-format -msgid "Buffer incorrect size. Should be %d bytes." -msgstr "" - -#: shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is not a bytearray." -msgstr "" - -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "" - -#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c -#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c -#, c-format -msgid "Buffer length %d too big. It must be less than %d" -msgstr "" - -#: ports/atmel-samd/common-hal/sdioio/SDCard.c -#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c -msgid "Buffer length must be a multiple of 512" -msgstr "" - -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Buffer must be a multiple of 512 bytes" -msgstr "" - -#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c -msgid "Buffer must be at least length 1" -msgstr "" - -#: shared-bindings/_bleio/PacketBuffer.c -#, c-format -msgid "Buffer too short by %d bytes" -msgstr "" - -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c -#, c-format -msgid "Bus pin %d is already in use" -msgstr "" - -#: shared-bindings/_bleio/UUID.c -msgid "Byte buffer must be 16 bytes." -msgstr "" - -#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c -msgid "Bytes must be between 0 and 255." -msgstr "" - -#: shared-bindings/aesio/aes.c -msgid "CBC blocks must be multiples of 16 bytes" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "CRC or checksum was invalid" -msgstr "" - -#: py/objtype.c -msgid "Call super().__init__() before accessing native object." -msgstr "" - -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c -msgid "Can only alarm on RTC IO from deep sleep." -msgstr "" - -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c -msgid "Can only alarm on one low pin while others alarm high from deep sleep." -msgstr "" - -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c -msgid "Can only alarm on two low pins from deep sleep." -msgstr "" - -#: ports/nrf/common-hal/_bleio/Characteristic.c -msgid "Can't set CCCD on local Characteristic" -msgstr "" - -#: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c -#: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c -msgid "Cannot change USB devices now" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "Cannot create a new Adapter; use _bleio.adapter;" -msgstr "" - -#: shared-bindings/displayio/Bitmap.c -#: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c -msgid "Cannot delete values" -msgstr "" - -#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c -#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c -#: ports/nrf/common-hal/digitalio/DigitalInOut.c -#: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c -msgid "Cannot get pull while in output mode" -msgstr "" - -#: ports/nrf/common-hal/microcontroller/Processor.c -msgid "Cannot get temperature" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "Cannot have scan responses for extended, connectable advertisements." -msgstr "" - -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -msgid "Cannot output both channels on the same pin" -msgstr "" - -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c -msgid "Cannot pull on input-only pin." -msgstr "" - -#: shared-module/bitbangio/SPI.c -msgid "Cannot read without MISO pin." -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "Cannot record to a file" -msgstr "" - -#: shared-module/storage/__init__.c -msgid "Cannot remount '/' when visible via USB." -msgstr "" - -#: ports/atmel-samd/common-hal/microcontroller/__init__.c -#: ports/cxd56/common-hal/microcontroller/__init__.c -#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c -msgid "Cannot reset into bootloader because no bootloader is present." -msgstr "" - -#: ports/esp32s2/common-hal/socketpool/Socket.c -msgid "Cannot set socket options" -msgstr "" - -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Cannot set value when direction is input." -msgstr "" - -#: ports/esp32s2/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Cannot specify RTS or CTS in RS485 mode" -msgstr "" - -#: py/objslice.c -msgid "Cannot subclass slice" -msgstr "" - -#: shared-module/bitbangio/SPI.c -msgid "Cannot transfer without MOSI and MISO pins." -msgstr "" - -#: shared-bindings/pwmio/PWMOut.c -msgid "Cannot vary frequency on a timer that is already in use" -msgstr "" - -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c -#: ports/nrf/common-hal/alarm/pin/PinAlarm.c -msgid "Cannot wake on pin edge. Only level." -msgstr "" - -#: shared-module/bitbangio/SPI.c -msgid "Cannot write without MOSI pin." -msgstr "" - -#: shared-bindings/_bleio/CharacteristicBuffer.c -msgid "CharacteristicBuffer writing not provided" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython core code crashed hard. Whoops!\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap." -msgstr "" - -#: shared-module/bitbangio/SPI.c -msgid "Clock pin init failed." -msgstr "" - -#: shared-module/bitbangio/I2C.c -msgid "Clock stretch too long" -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c -msgid "Clock unit in use" -msgstr "" - -#: shared-bindings/_pew/PewPew.c -msgid "Column entry must be digitalio.DigitalInOut" -msgstr "" - -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c -msgid "Command must be an int between 0 and 255" -msgstr "" - -#: shared-bindings/_bleio/Connection.c -msgid "" -"Connection has been disconnected and can no longer be used. Create a new " -"connection." -msgstr "" - -#: py/persistentcode.c -msgid "Corrupt .mpy file" -msgstr "" - -#: ports/cxd56/common-hal/camera/Camera.c -msgid "Could not initialize Camera" -msgstr "" - -#: ports/cxd56/common-hal/gnss/GNSS.c -msgid "Could not initialize GNSS" -msgstr "" - -#: ports/cxd56/common-hal/sdioio/SDCard.c -msgid "Could not initialize SDCard" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c -msgid "Could not initialize UART" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not re-init channel" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not re-init timer" -msgstr "" - -#: ports/stm/common-hal/pwmio/PWMOut.c -msgid "Could not restart PWM" -msgstr "" - -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -msgid "Could not retrieve clock" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "Could not set address" -msgstr "" - -#: shared-bindings/pwmio/PWMOut.c -msgid "Could not start PWM" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Could not start interrupt, RX busy" -msgstr "" - -#: shared-module/audiomp3/MP3Decoder.c -msgid "Couldn't allocate decoder" -msgstr "" - -#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c -#: shared-module/audiomp3/MP3Decoder.c -msgid "Couldn't allocate first buffer" -msgstr "" - -#: shared-module/audiomp3/MP3Decoder.c -msgid "Couldn't allocate input buffer" -msgstr "" - -#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c -#: shared-module/audiomp3/MP3Decoder.c -msgid "Couldn't allocate second buffer" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler." -msgstr "" - -#: ports/stm/common-hal/analogio/AnalogOut.c -msgid "DAC Channel Init Error" -msgstr "" - -#: ports/stm/common-hal/analogio/AnalogOut.c -msgid "DAC Device Init Error" -msgstr "" - -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -msgid "DAC already in use" -msgstr "" - -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -msgid "Data 0 pin must be byte aligned" -msgstr "" - -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -msgid "Data 0 pin must be byte aligned." -msgstr "" - -#: shared-module/audiocore/WaveFile.c -msgid "Data chunk must follow fmt chunk" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "Data not supported with directed advertising" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "Data too large for advertisement packet" -msgstr "" - -#: ports/stm/common-hal/alarm/pin/PinAlarm.c -msgid "Deep sleep pins must use a rising edge with pulldown" -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "Destination capacity is smaller than destination_length." -msgstr "" - -#: ports/nrf/common-hal/audiobusio/I2SOut.c -msgid "Device in use" -msgstr "" - -#: ports/cxd56/common-hal/digitalio/DigitalInOut.c -msgid "DigitalInOut not supported on given pin" -msgstr "" - -#: shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Display must have a 16 bit colorspace." -msgstr "" - -#: shared-bindings/displayio/Display.c -#: shared-bindings/displayio/EPaperDisplay.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Display rotation must be in 90 degree increments" -msgstr "" - -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Drive mode not used when direction is input." -msgstr "" - -#: shared-bindings/aesio/aes.c -msgid "ECB only operates on 16 bytes at a time" -msgstr "" - -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c -msgid "ESP-IDF memory allocation failed" -msgstr "" - -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/atmel-samd/common-hal/ps2io/Ps2.c -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -msgid "EXTINT channel already in use" -msgstr "" - -#: shared-module/synthio/MidiTrack.c -#, c-format -msgid "Error in MIDI stream at position %d" -msgstr "" - -#: extmod/modure.c -msgid "Error in regex" -msgstr "" - -#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c -msgid "Error: Failure to bind" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c py/enum.c -#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c -#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c -#: shared-bindings/neopixel_write/__init__.c -#: shared-bindings/terminalio/Terminal.c -msgid "Expected a %q" -msgstr "" - -#: shared-bindings/_bleio/CharacteristicBuffer.c -#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c -msgid "Expected a Characteristic" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "Expected a DigitalInOut" -msgstr "" - -#: shared-bindings/_bleio/Characteristic.c -msgid "Expected a Service" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "Expected a UART" -msgstr "" - -#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -#: shared-bindings/_bleio/Service.c -msgid "Expected a UUID" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "Expected an Address" -msgstr "" - -#: shared-bindings/alarm/__init__.c -msgid "Expected an alarm" -msgstr "" - -#: shared-module/adafruit_pixelbuf/PixelBuf.c -#, c-format -msgid "Expected tuple of length %d, got %d" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "Extended advertisements with scan response not supported." -msgstr "" - -#: extmod/ulab/code/numpy/fft/fft_tools.c -msgid "FFT is defined for ndarrays only" -msgstr "" - -#: extmod/ulab/code/numpy/fft/fft_tools.c -msgid "FFT is implemented for linear arrays only" -msgstr "" - -#: ports/esp32s2/common-hal/ssl/SSLSocket.c -msgid "Failed SSL handshake" -msgstr "" - -#: shared-bindings/ps2io/Ps2.c -msgid "Failed sending command." -msgstr "" - -#: ports/nrf/sd_mutex.c -#, c-format -msgid "Failed to acquire mutex, err 0x%04x" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c -msgid "Failed to allocate RX buffer" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/UART.c -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/raspberrypi/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c -#, c-format -msgid "Failed to allocate RX buffer of %d bytes" -msgstr "" - -#: ports/esp32s2/common-hal/wifi/__init__.c -msgid "Failed to allocate Wifi memory" -msgstr "" - -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c -msgid "Failed to allocate wifi scan memory" -msgstr "" - -#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c -msgid "Failed to buffer the sample" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "Failed to connect: internal error" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "Failed to connect: timeout" -msgstr "" - -#: ports/esp32s2/common-hal/wifi/__init__.c -msgid "Failed to init wifi" -msgstr "" - -#: shared-module/audiomp3/MP3Decoder.c -msgid "Failed to parse MP3 file" -msgstr "" - -#: ports/nrf/sd_mutex.c -#, c-format -msgid "Failed to release mutex, err 0x%04x" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "Failed to write internal flash." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "Fatal error." -msgstr "" - -#: py/moduerrno.c -msgid "File exists" -msgstr "" - -#: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c -#: ports/stm/common-hal/canio/Listener.c -msgid "Filters too complex" -msgstr "" - -#: ports/esp32s2/common-hal/dualbank/__init__.c -msgid "Firmware image is invalid" -msgstr "" - -#: ports/cxd56/common-hal/camera/Camera.c -msgid "Format not supported" -msgstr "" - -#: shared-module/framebufferio/FramebufferDisplay.c -#, c-format -msgid "Framebuffer requires %d bytes" -msgstr "" - -#: shared-bindings/pwmio/PWMOut.c -msgid "Frequency must match existing PWMOut using this timer" -msgstr "" - -#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c -#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c -msgid "Function requires lock" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Generic Failure" -msgstr "" - -#: shared-bindings/displayio/Display.c -#: shared-bindings/displayio/EPaperDisplay.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Group already used" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Hardware busy, try alternative pins" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "Hardware in use, try alternative pins" -msgstr "" - -#: shared-bindings/wifi/Radio.c -msgid "Hostname must be between 1 and 253 characters" -msgstr "" - -#: extmod/vfs_posix_file.c py/objstringio.c -msgid "I/O operation on closed file" -msgstr "" - -#: ports/stm/common-hal/busio/I2C.c -msgid "I2C Init Error" -msgstr "" - -#: ports/raspberrypi/common-hal/busio/I2C.c -msgid "I2C peripheral in use" -msgstr "" - -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - -#: shared-bindings/aesio/aes.c -#, c-format -msgid "IV must be %d bytes long" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "In-buffer elements must be <= 4 bytes long" -msgstr "" - -#: py/persistentcode.c -msgid "" -"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" -"mpy-update for more info." -msgstr "" - -#: shared-bindings/_pew/PewPew.c -msgid "Incorrect buffer size" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Init program size invalid" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "Initial set pin direction conflicts with initial out pin direction" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "Initial set pin state conflicts with initial out pin state" -msgstr "" - -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - -#: shared-bindings/bitops/__init__.c -#, c-format -msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -msgid "Input taking too long" -msgstr "" - -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c -msgid "Input/output error" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Instruction %d shifts in more bits than pin count" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Instruction %d shifts out more bits than pin count" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Instruction %d uses extra pin" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Instruction %d waits on input outside of count" -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -msgid "Insufficient authentication" -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -msgid "Insufficient encryption" -msgstr "" - -#: ports/raspberrypi/audio_dma.c -msgid "Internal audio buffer too small" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Internal define error" -msgstr "" - -#: shared-module/rgbmatrix/RGBMatrix.c -#, c-format -msgid "Internal error #%d" -msgstr "" - -#: shared-bindings/sdioio/SDCard.c -msgid "Invalid %q" -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c -#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c -#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "Invalid %q pin" -msgstr "" - -#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c -#: ports/stm/common-hal/sdioio/SDCard.c -msgid "Invalid %q pin selection" -msgstr "" - -#: ports/stm/common-hal/analogio/AnalogIn.c -msgid "Invalid ADC Unit value" -msgstr "" - -#: ports/esp32s2/common-hal/wifi/Radio.c -msgid "Invalid AuthMode" -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -msgid "Invalid BLE parameter" -msgstr "" - -#: shared-module/displayio/OnDiskBitmap.c -msgid "Invalid BMP file" -msgstr "" - -#: shared-bindings/wifi/Radio.c -msgid "Invalid BSSID" -msgstr "" - -#: ports/esp32s2/common-hal/analogio/AnalogOut.c -#: ports/stm/common-hal/analogio/AnalogOut.c -msgid "Invalid DAC pin supplied" -msgstr "" - -#: shared-bindings/synthio/__init__.c -msgid "Invalid MIDI file" -msgstr "" - -#: ports/atmel-samd/common-hal/pwmio/PWMOut.c -#: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c -#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c -#: ports/nrf/common-hal/pwmio/PWMOut.c -#: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c -msgid "Invalid PWM frequency" -msgstr "" - -#: ports/esp32s2/common-hal/analogio/AnalogIn.c -msgid "Invalid Pin" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c -msgid "Invalid argument" -msgstr "" - -#: shared-module/displayio/Bitmap.c -msgid "Invalid bits per value" -msgstr "" - -#: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid buffer size" -msgstr "" - -#: shared-bindings/adafruit_pixelbuf/PixelBuf.c -msgid "Invalid byteorder string" -msgstr "" - -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -msgid "Invalid capture period. Valid range: 1 - 500" -msgstr "" - -#: shared-bindings/audiomixer/Mixer.c -msgid "Invalid channel count" -msgstr "" - -#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format -msgid "Invalid data_count %d" -msgstr "" - -#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format -msgid "Invalid data_pins[%d]" -msgstr "" - -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Invalid direction." -msgstr "" - -#: shared-module/audiocore/WaveFile.c -msgid "Invalid file" -msgstr "" - -#: shared-module/audiocore/WaveFile.c -msgid "Invalid format chunk size" -msgstr "" - -#: ports/esp32s2/common-hal/busio/I2C.c -msgid "Invalid frequency" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "Invalid memory access." -msgstr "" - -#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c -msgid "Invalid number of bits" -msgstr "" - -#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c -#: shared-bindings/displayio/FourWire.c -msgid "Invalid phase" -msgstr "" - -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -#: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c -#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c -#: shared-module/rgbmatrix/RGBMatrix.c -msgid "Invalid pin" -msgstr "" - -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -msgid "Invalid pin for left channel" -msgstr "" - -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -msgid "Invalid pin for right channel" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/I2C.c -#: ports/atmel-samd/common-hal/busio/SPI.c -#: ports/atmel-samd/common-hal/busio/UART.c -#: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c -#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c -#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c -#: ports/mimxrt10xx/common-hal/busio/I2C.c -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c -#: ports/raspberrypi/common-hal/busio/I2C.c -#: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c -#: shared-bindings/busio/UART.c -msgid "Invalid pins" -msgstr "" - -#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c -#: shared-bindings/displayio/FourWire.c -msgid "Invalid polarity" -msgstr "" - -#: shared-bindings/_bleio/Characteristic.c -msgid "Invalid properties" -msgstr "" - -#: shared-bindings/microcontroller/__init__.c -msgid "Invalid run mode." -msgstr "" - -#: shared-module/_bleio/Attribute.c -msgid "Invalid security_mode" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Invalid size" -msgstr "" - -#: ports/esp32s2/common-hal/ssl/SSLContext.c -msgid "Invalid socket for TLS" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Invalid state" -msgstr "" - -#: shared-bindings/audiomixer/Mixer.c -msgid "Invalid voice" -msgstr "" - -#: shared-bindings/audiomixer/Mixer.c -msgid "Invalid voice count" -msgstr "" - -#: shared-module/audiocore/WaveFile.c -msgid "Invalid wave file" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "Invalid word/bit length" -msgstr "" - -#: shared-bindings/aesio/aes.c -msgid "Key must be 16, 24, or 32 bytes long" -msgstr "" - -#: py/compile.c -msgid "LHS of keyword arg must be an id" -msgstr "" - -#: shared-module/displayio/Group.c -msgid "Layer already in a group." -msgstr "" - -#: shared-module/displayio/Group.c -msgid "Layer must be a Group or TileGrid subclass." -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "MAC address was invalid" -msgstr "" - -#: shared-module/bitbangio/SPI.c -msgid "MISO pin init failed." -msgstr "" - -#: shared-module/bitbangio/SPI.c -msgid "MOSI pin init failed." -msgstr "" - -#: shared-module/displayio/Shape.c -#, c-format -msgid "Maximum x value when mirrored is %d" -msgstr "" - -#: shared-bindings/canio/Message.c -msgid "Messages limited to 8 bytes" -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "Microphone startup delay must be in range 0.0 to 1.0" -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c -msgid "Missing MISO or MOSI Pin" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing first_in_pin. Instruction %d reads pin(s)" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing first_in_pin. Instruction %d waits based on pin" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing first_out_pin. Instruction %d writes pin(s)" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing first_set_pin. Instruction %d sets pin(s)" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format -msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" - -#: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c -msgid "Must be a %q subclass." -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c -msgid "Must provide MISO or MOSI pin" -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -#, c-format -msgid "Must use a multiple of 6 rgb pins, not %d" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "NLR jump failed. Likely memory corruption." -msgstr "" - -#: ports/esp32s2/common-hal/nvm/ByteArray.c -msgid "NVS Error" -msgstr "" - -#: py/qstr.c -msgid "Name too long" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Characteristic.c -msgid "No CCCD for this Characteristic" -msgstr "" - -#: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/stm/common-hal/analogio/AnalogOut.c -msgid "No DAC on chip" -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c -#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c -msgid "No DMA channel found" -msgstr "" - -#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c -msgid "No DMA pacing timer found" -msgstr "" - -#: shared-module/adafruit_bus_device/I2CDevice.c -#, c-format -msgid "No I2C device at address: %x" -msgstr "" - -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c -msgid "No MISO Pin" -msgstr "" - -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c -msgid "No MOSI Pin" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No RX pin" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "No TX pin" -msgstr "" - -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "No available clocks" -msgstr "" - -#: shared-bindings/_bleio/PacketBuffer.c -msgid "No connection: length cannot be determined" -msgstr "" - -#: shared-bindings/board/__init__.c -msgid "No default %q bus" -msgstr "" - -#: ports/atmel-samd/common-hal/touchio/TouchIn.c -msgid "No free GCLKs" -msgstr "" - -#: shared-bindings/os/__init__.c -msgid "No hardware random available" -msgstr "" - -#: ports/atmel-samd/common-hal/ps2io/Ps2.c -msgid "No hardware support on clk pin" -msgstr "" - -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -msgid "No hardware support on pin" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "No in in program" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "No in or out in program" -msgstr "" - -#: shared-bindings/aesio/aes.c -msgid "No key was specified" -msgstr "" - -#: shared-bindings/time/__init__.c -msgid "No long integer support" -msgstr "" - -#: shared-module/usb_hid/__init__.c -#, c-format -msgid "No more than %d HID devices allowed" -msgstr "" - -#: shared-bindings/wifi/Radio.c -msgid "No network with that ssid" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "No out in program" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c -#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c -#: ports/raspberrypi/common-hal/busio/I2C.c -msgid "No pull up found on SDA or SCL; check your wiring" -msgstr "" - -#: shared-module/touchio/TouchIn.c -msgid "No pulldown on pin; 1Mohm recommended" -msgstr "" - -#: py/moduerrno.c -msgid "No space left on device" -msgstr "" - -#: py/moduerrno.c -msgid "No such file/directory" -msgstr "" - -#: shared-module/rgbmatrix/RGBMatrix.c -msgid "No timer available" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "Nordic system firmware failure assertion." -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -msgid "Nordic system firmware out of memory" -msgstr "" - -#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c -msgid "Not a valid IP string" -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -#: shared-bindings/_bleio/CharacteristicBuffer.c -msgid "Not connected" -msgstr "" - -#: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c -#: shared-bindings/audiopwmio/PWMAudioOut.c -msgid "Not playing" -msgstr "" - -#: shared-bindings/_bleio/__init__.c -msgid "Not settable" -msgstr "" - -#: shared-bindings/util.c -msgid "" -"Object has been deinitialized and can no longer be used. Create a new object." -msgstr "" - -#: ports/nrf/common-hal/busio/UART.c -msgid "Odd parity is not supported" -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c -#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c -msgid "Only 8 or 16 bit mono with " -msgstr "" - -#: ports/esp32s2/common-hal/wifi/__init__.c -msgid "Only IPv4 addresses supported" -msgstr "" - -#: ports/esp32s2/common-hal/socketpool/SocketPool.c -msgid "Only IPv4 sockets supported" -msgstr "" - -#: shared-module/displayio/OnDiskBitmap.c -#, c-format -msgid "" -"Only Windows format, uncompressed BMP supported: given header size is %d" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "Only connectable advertisements can be directed" -msgstr "" - -#: ports/stm/common-hal/alarm/pin/PinAlarm.c -msgid "Only edge detection is available on this hardware" -msgstr "" - -#: shared-bindings/ipaddress/__init__.c -msgid "Only int or string supported for ip" -msgstr "" - -#: shared-module/displayio/OnDiskBitmap.c -#, c-format -msgid "" -"Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " -"%d bpp given" -msgstr "" - -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -msgid "Only one TouchAlarm can be set in deep sleep." -msgstr "" - -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c -#: ports/nrf/common-hal/alarm/time/TimeAlarm.c -#: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c -#: ports/stm/common-hal/alarm/time/TimeAlarm.c -msgid "Only one alarm.time alarm can be set." -msgstr "" - -#: shared-module/displayio/ColorConverter.c -msgid "Only one color can be transparent at a time" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Operation or feature not supported" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Operation timed out" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Out of memory" -msgstr "" - -#: ports/esp32s2/common-hal/socketpool/SocketPool.c -msgid "Out of sockets" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Out-buffer elements must be <= 4 bytes long" -msgstr "" - -#: shared-bindings/bitops/__init__.c -#, c-format -msgid "Output buffer must be at least %d bytes" -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "Oversample must be multiple of 8." -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "PDMIn not available" -msgstr "" - -#: shared-bindings/pwmio/PWMOut.c -msgid "" -"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" -msgstr "" - -#: shared-bindings/pwmio/PWMOut.c -msgid "" -"PWM frequency not writable when variable_frequency is False on construction." -msgstr "" - -#: ports/raspberrypi/common-hal/countio/Counter.c -msgid "PWM slice already in use" -msgstr "" - -#: ports/raspberrypi/common-hal/countio/Counter.c -msgid "PWM slice channel A already in use" -msgstr "" - -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "" - -#: ports/esp32s2/common-hal/audiobusio/__init__.c -msgid "Peripheral in use" -msgstr "" - -#: py/moduerrno.c -msgid "Permission denied" -msgstr "" - -#: ports/stm/common-hal/alarm/pin/PinAlarm.c -msgid "Pin cannot wake from Deep Sleep" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Pin count must be at least 1" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "Pin count too large" -msgstr "" - -#: ports/atmel-samd/common-hal/analogio/AnalogIn.c -#: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c -#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c -#: ports/nrf/common-hal/analogio/AnalogIn.c -#: ports/raspberrypi/common-hal/analogio/AnalogIn.c -#: ports/stm/common-hal/analogio/AnalogIn.c -msgid "Pin does not have ADC capabilities" -msgstr "" - -#: ports/stm/common-hal/alarm/pin/PinAlarm.c -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin interrupt already in use" -msgstr "" - -#: shared-bindings/adafruit_bus_device/SPIDevice.c -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Pin is input only" -msgstr "" - -#: ports/raspberrypi/common-hal/countio/Counter.c -msgid "Pin must be on PWM Channel B" -msgstr "" - -#: ports/atmel-samd/common-hal/countio/Counter.c -msgid "Pin must support hardware interrupts" -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -#, c-format -msgid "" -"Pinout uses %d bytes per element, which consumes more than the ideal %d " -"bytes. If this cannot be avoided, pass allow_inefficient=True to the " -"constructor" -msgstr "" - -#: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c -#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c -msgid "Pins must be sequential" -msgstr "" - -#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c -msgid "Pins must share PWM slice" -msgstr "" - -#: py/builtinhelp.c -msgid "Plus any modules on the filesystem\n" -msgstr "" - -#: shared-module/vectorio/Polygon.c -msgid "Polygon needs at least 3 points" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "Prefix buffer must be on the heap" -msgstr "" - -#: main.c -msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" -msgstr "" - -#: main.c -msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "Program does IN without loading ISR" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "Program does OUT without loading OSR" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Program must contain at least one 16-bit instruction." -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Program size invalid" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Program too large" -msgstr "" - -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Pull not used when direction is output." -msgstr "" - -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - -#: ports/stm/common-hal/os/__init__.c -msgid "RNG DeInit Error" -msgstr "" - -#: ports/stm/common-hal/os/__init__.c -msgid "RNG Init Error" -msgstr "" - -#: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c -msgid "RS485 Not yet supported on this device" -msgstr "" - -#: ports/esp32s2/common-hal/busio/UART.c -#: ports/mimxrt10xx/common-hal/busio/UART.c -msgid "RS485 inversion specified when not in RS485 mode" -msgstr "" - -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c -#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c -#: ports/raspberrypi/common-hal/rtc/RTC.c -msgid "RTC calibration is not supported on this board" -msgstr "" - -#: shared-bindings/alarm/time/TimeAlarm.c shared-bindings/time/__init__.c -msgid "RTC is not supported on this board" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/stm/common-hal/busio/UART.c -msgid "RTS/CTS/RS485 Not yet supported on this device" -msgstr "" - -#: ports/stm/common-hal/os/__init__.c -msgid "Random number generation error" -msgstr "" - -#: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c -msgid "Read-only" -msgstr "" - -#: extmod/vfs_fat.c py/moduerrno.c -msgid "Read-only filesystem" -msgstr "" - -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Received response was invalid" -msgstr "" - -#: shared-bindings/displayio/EPaperDisplay.c -msgid "Refresh too soon" -msgstr "" - -#: shared-bindings/canio/RemoteTransmissionRequest.c -msgid "RemoteTransmissionRequests limited to 8 bytes" -msgstr "" - -#: shared-bindings/aesio/aes.c -msgid "Requested AES mode is unsupported" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Requested resource not found" -msgstr "" - -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -msgid "Right channel unsupported" -msgstr "" - -#: shared-bindings/_pew/PewPew.c -msgid "Row entry must be digitalio.DigitalInOut" -msgstr "" - -#: main.c -msgid "Running in safe mode! Not running saved code.\n" -msgstr "" - -#: shared-module/sdcardio/SDCard.c -msgid "SD card CSD format not supported" -msgstr "" - -#: ports/stm/common-hal/sdioio/SDCard.c -#, c-format -msgid "SDIO GetCardInfo Error %d" -msgstr "" - -#: ports/stm/common-hal/sdioio/SDCard.c -#, c-format -msgid "SDIO Init Error %d" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c -msgid "SPI Init Error" -msgstr "" - -#: ports/stm/common-hal/busio/SPI.c -msgid "SPI Re-initialization error" -msgstr "" - -#: ports/esp32s2/common-hal/busio/SPI.c -msgid "SPI configuration failed" -msgstr "" - -#: ports/raspberrypi/common-hal/busio/SPI.c -msgid "SPI peripheral in use" -msgstr "" - -#: shared-bindings/audiomixer/Mixer.c -msgid "Sample rate must be positive" -msgstr "" - -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -#, c-format -msgid "Sample rate too high. It must be less than %d" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "Scan already in progess. Stop with stop_scan." -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c -#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c -msgid "Serializer in use" -msgstr "" - -#: shared-bindings/ssl/SSLContext.c -msgid "Server side context cannot have hostname" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Set pin count must be between 1 and 5" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "Side set pin count must be between 1 and 5" -msgstr "" - -#: ports/cxd56/common-hal/camera/Camera.c -msgid "Size not supported" -msgstr "" - -#: ports/raspberrypi/common-hal/alarm/SleepMemory.c -msgid "Sleep Memory not available" -msgstr "" - -#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c -msgid "Slice and value different lengths." -msgstr "" - -#: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c -#: shared-bindings/displayio/TileGrid.c -#: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c -msgid "Slices not supported" -msgstr "" - -#: ports/esp32s2/common-hal/socketpool/SocketPool.c -msgid "SocketPool can only be used with wifi.radio" -msgstr "" - -#: shared-bindings/aesio/aes.c -msgid "Source and destination buffers must be the same length" -msgstr "" - -#: extmod/modure.c -msgid "Splitting with sub-captures" -msgstr "" - -#: shared-bindings/supervisor/__init__.c -msgid "Stack size must be at least 256" -msgstr "" - -#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c -msgid "Stereo left must be on PWM channel A" -msgstr "" - -#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c -msgid "Stereo right must be on PWM channel B" -msgstr "" - -#: shared-bindings/multiterminal/__init__.c -msgid "Stream missing readinto() or write() method." -msgstr "" - -#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c -msgid "Supply at least one UART pin" -msgstr "" - -#: shared-bindings/alarm/time/TimeAlarm.c -msgid "Supply one of monotonic_time or epoch_time" -msgstr "" - -#: shared-bindings/gnss/GNSS.c -msgid "System entry must be gnss.SatelliteSystem" -msgstr "" - -#: ports/stm/common-hal/microcontroller/Processor.c -msgid "Temperature read timed out" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "" -"The CircuitPython heap was corrupted because the stack was too small.\n" -"Increase the stack size if you know how. If not:" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "" -"The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode." -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "" -"The microcontroller's power dipped. Make sure your power supply provides\n" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY)." -msgstr "" - -#: shared-module/audiomixer/MixerVoice.c -msgid "The sample's bits_per_sample does not match the mixer's" -msgstr "" - -#: shared-module/audiomixer/MixerVoice.c -msgid "The sample's channel count does not match the mixer's" -msgstr "" - -#: shared-module/audiomixer/MixerVoice.c -msgid "The sample's sample rate does not match the mixer's" -msgstr "" - -#: shared-module/audiomixer/MixerVoice.c -msgid "The sample's signedness does not match the mixer's" -msgstr "" - -#: shared-bindings/displayio/TileGrid.c -msgid "Tile height must exactly divide bitmap height" -msgstr "" - -#: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c -msgid "Tile index out of bounds" -msgstr "" - -#: shared-bindings/displayio/TileGrid.c -msgid "Tile value out of bounds" -msgstr "" - -#: shared-bindings/displayio/TileGrid.c -msgid "Tile width must exactly divide bitmap width" -msgstr "" - -#: shared-bindings/alarm/time/TimeAlarm.c -msgid "Time is in the past." -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -#, c-format -msgid "Timeout is too long: Maximum timeout length is %d seconds" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c -#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c -msgid "Too many channels in sample." -msgstr "" - -#: shared-module/displayio/__init__.c -msgid "Too many display busses" -msgstr "" - -#: shared-module/displayio/__init__.c -msgid "Too many displays" -msgstr "" - -#: ports/nrf/common-hal/_bleio/PacketBuffer.c -msgid "Total data to write is larger than %q" -msgstr "" - -#: ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.c -#: ports/stm/common-hal/alarm/touch/TouchAlarm.c -msgid "Touch alarms not available" -msgstr "" - -#: py/obj.c -msgid "Traceback (most recent call last):\n" -msgstr "" - -#: shared-bindings/time/__init__.c -msgid "Tuple or struct_time argument required" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "UART Buffer allocation error" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "UART De-init error" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "UART Init Error" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "UART Re-init error" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "UART write error" -msgstr "" - -#: shared-module/usb_hid/Device.c -msgid "USB busy" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "USB devices need more endpoints than are available." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "USB devices specify too many interface names." -msgstr "" - -#: shared-module/usb_hid/Device.c -msgid "USB error" -msgstr "" - -#: shared-bindings/_bleio/UUID.c -msgid "UUID integer value must be 0-0xffff" -msgstr "" - -#: shared-bindings/_bleio/UUID.c -msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" -msgstr "" - -#: shared-bindings/_bleio/UUID.c -msgid "UUID value is not str, int or byte buffer" -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c -#: ports/atmel-samd/common-hal/audioio/AudioOut.c -#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c -#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c -msgid "Unable to allocate buffers for signed conversion" -msgstr "" - -#: ports/esp32s2/common-hal/busio/I2C.c -msgid "Unable to create lock" -msgstr "" - -#: shared-module/displayio/I2CDisplay.c -#, c-format -msgid "Unable to find I2C Display at %x" -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c -#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c -msgid "Unable to find free GCLK" -msgstr "" - -#: py/parse.c -msgid "Unable to init parser" -msgstr "" - -#: shared-module/displayio/OnDiskBitmap.c -msgid "Unable to read color palette data" -msgstr "" - -#: shared-bindings/nvm/ByteArray.c -msgid "Unable to write to nvm." -msgstr "" - -#: shared-bindings/alarm/SleepMemory.c -msgid "Unable to write to sleep_memory." -msgstr "" - -#: ports/nrf/common-hal/_bleio/UUID.c -msgid "Unexpected nrfx uuid type" -msgstr "" - -#: ports/esp32s2/common-hal/ssl/SSLSocket.c -#, c-format -msgid "Unhandled ESP TLS error %d %d %x %d" -msgstr "" - -#: shared-bindings/wifi/Radio.c -#, c-format -msgid "Unknown failure %d" -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -#, c-format -msgid "Unknown gatt error: 0x%04x" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "Unknown reason." -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -#, c-format -msgid "Unknown security error: 0x%04x" -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -#, c-format -msgid "Unknown system firmware error: %04x" -msgstr "" - -#: shared-bindings/adafruit_pixelbuf/PixelBuf.c -#, c-format -msgid "Unmatched number of items on RHS (expected %d, got %d)." -msgstr "" - -#: ports/nrf/common-hal/_bleio/__init__.c -msgid "" -"Unspecified issue. Can be that the pairing prompt on the other device was " -"declined or ignored." -msgstr "" - -#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c -#: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c -msgid "Unsupported baudrate" -msgstr "" - -#: shared-module/displayio/display_core.c -msgid "Unsupported display bus type" -msgstr "" - -#: shared-module/audiocore/WaveFile.c -msgid "Unsupported format" -msgstr "" - -#: py/moduerrno.c -msgid "Unsupported operation" -msgstr "" - -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - -#: ports/esp32s2/common-hal/dualbank/__init__.c -msgid "Update Failed" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Characteristic.c -#: ports/nrf/common-hal/_bleio/Descriptor.c -msgid "Value length != required fixed length" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Characteristic.c -#: ports/nrf/common-hal/_bleio/Descriptor.c -msgid "Value length > max_length" -msgstr "" - -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c -msgid "Version was invalid" -msgstr "" - -#: ports/stm/common-hal/microcontroller/Processor.c -msgid "Voltage read timed out" -msgstr "" - -#: main.c -msgid "WARNING: Your code filename has two extensions\n" -msgstr "" - -#: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.timeout must be greater than 0" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "Watchdog timer expired." -msgstr "" - -#: py/builtinhelp.c -#, c-format -msgid "" -"Welcome to Adafruit CircuitPython %s!\n" -"\n" -"Please visit learn.adafruit.com/category/circuitpython for project guides.\n" -"\n" -"To list built-in modules please do `help(\"modules\")`.\n" -msgstr "" - -#: shared-bindings/wifi/Radio.c -msgid "WiFi password must be between 8 and 63 characters" -msgstr "" - -#: main.c -msgid "Woken up by alarm.\n" -msgstr "" - -#: ports/nrf/common-hal/_bleio/PacketBuffer.c -msgid "Writes not supported on Characteristic" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "You are in safe mode because:\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "" -"You pressed the reset button during boot. Press again to exit safe mode." -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "You requested starting safe mode by " -msgstr "" - -#: py/objtype.c -msgid "__init__() should return None" -msgstr "" - -#: py/objtype.c -msgid "__init__() should return None, not '%q'" -msgstr "" - -#: py/objobject.c -msgid "__new__ arg must be a user-type" -msgstr "" - -#: extmod/modubinascii.c extmod/moduhashlib.c py/objarray.c -msgid "a bytes-like object is required" -msgstr "" - -#: lib/embed/abort_.c -msgid "abort() called" -msgstr "" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "address out of bounds" -msgstr "" - -#: shared-bindings/i2cperipheral/I2CPeripheral.c -msgid "addresses is empty" -msgstr "" - -#: py/compile.c -msgid "annotation must be an identifier" -msgstr "" - -#: py/modbuiltins.c -msgid "arg is an empty sequence" -msgstr "" - -#: py/objobject.c -msgid "arg must be user-type" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "argsort argument must be an ndarray" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "argsort is not implemented for flattened arrays" -msgstr "" - -#: py/runtime.c shared-bindings/supervisor/__init__.c -msgid "argument has wrong type" -msgstr "" - -#: py/compile.c -msgid "argument name reused" -msgstr "" - -#: py/argcheck.c shared-bindings/_stage/__init__.c -#: shared-bindings/digitalio/DigitalInOut.c -msgid "argument num/types mismatch" -msgstr "" - -#: py/runtime.c -msgid "argument should be a '%q' not a '%q'" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c -msgid "arguments must be ndarrays" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "array and index length must be equal" -msgstr "" - -#: py/objarray.c shared-bindings/alarm/SleepMemory.c -#: shared-bindings/nvm/ByteArray.c -msgid "array/bytes required on right side" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "attempt to get (arg)min/(arg)max of empty sequence" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "attempt to get argmin/argmax of an empty sequence" -msgstr "" - -#: py/objstr.c -msgid "attributes not supported yet" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "axis is out of bounds" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -msgid "axis must be None, or an integer" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "axis too long" -msgstr "" - -#: py/builtinevex.c -msgid "bad compile mode" -msgstr "" - -#: py/objstr.c -msgid "bad conversion specifier" -msgstr "" - -#: py/objstr.c -msgid "bad format string" -msgstr "" - -#: py/binary.c py/objarray.c -msgid "bad typecode" -msgstr "" - -#: py/emitnative.c -msgid "binary op %q not implemented" -msgstr "" - -#: extmod/modurandom.c -msgid "bits must be 32 or less" -msgstr "" - -#: shared-bindings/busio/UART.c -msgid "bits must be in range 5 to 9" -msgstr "" - -#: shared-bindings/audiomixer/Mixer.c -msgid "bits_per_sample must be 8 or 16" -msgstr "" - -#: py/emitinlinethumb.c -msgid "branch not in range" -msgstr "" - -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c -msgid "buffer is smaller than requested size" -msgstr "" - -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c -msgid "buffer size must be a multiple of element size" -msgstr "" - -#: shared-module/struct/__init__.c -msgid "buffer size must match format" -msgstr "" - -#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c -msgid "buffer slices must be of equal length" -msgstr "" - -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c -msgid "buffer too small" -msgstr "" - -#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c -msgid "buffer too small for requested bytes" -msgstr "" - -#: shared-bindings/_pew/PewPew.c -msgid "buttons must be digitalio.DigitalInOut" -msgstr "" - -#: shared-bindings/adafruit_pixelbuf/PixelBuf.c -msgid "byteorder is not a string" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c -msgid "bytes > 8 bits not supported" -msgstr "" - -#: py/objarray.c -msgid "bytes length not a multiple of item size" -msgstr "" - -#: py/objstr.c -msgid "bytes value out of range" -msgstr "" - -#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c -msgid "calibration is out of range" -msgstr "" - -#: ports/atmel-samd/bindings/samd/Clock.c -msgid "calibration is read only" -msgstr "" - -#: ports/atmel-samd/common-hal/rtc/RTC.c -msgid "calibration value out of range +/-127" -msgstr "" - -#: py/emitinlinethumb.c -msgid "can only have up to 4 parameters to Thumb assembly" -msgstr "" - -#: py/emitinlinextensa.c -msgid "can only have up to 4 parameters to Xtensa assembly" -msgstr "" - -#: py/objtype.c -msgid "can't add special method to already-subclassed class" -msgstr "" - -#: py/compile.c -msgid "can't assign to expression" -msgstr "" - -#: extmod/moduasyncio.c -msgid "can't cancel self" -msgstr "" - -#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c -#: shared-module/adafruit_pixelbuf/PixelBuf.c -msgid "can't convert %q to %q" -msgstr "" - -#: py/runtime.c -msgid "can't convert %q to int" -msgstr "" - -#: py/obj.c -#, c-format -msgid "can't convert %s to complex" -msgstr "" - -#: py/objstr.c -msgid "can't convert '%q' object to %q implicitly" -msgstr "" - -#: py/obj.c -msgid "can't convert to %q" -msgstr "" - -#: py/obj.c -msgid "can't convert to complex" -msgstr "" - -#: py/runtime.c -msgid "can't convert to int" -msgstr "" - -#: py/objstr.c -msgid "can't convert to str implicitly" -msgstr "" - -#: py/compile.c -msgid "can't declare nonlocal in outer code" -msgstr "" - -#: py/compile.c -msgid "can't delete expression" -msgstr "" - -#: py/emitnative.c -msgid "can't do binary op between '%q' and '%q'" -msgstr "" - -#: py/objcomplex.c -msgid "can't do truncated division of a complex number" -msgstr "" - -#: py/compile.c -msgid "can't have multiple **x" -msgstr "" - -#: py/compile.c -msgid "can't have multiple *x" -msgstr "" - -#: py/emitnative.c -msgid "can't implicitly convert '%q' to 'bool'" -msgstr "" - -#: py/emitnative.c -msgid "can't load from '%q'" -msgstr "" - -#: py/emitnative.c -msgid "can't load with '%q' index" -msgstr "" - -#: py/objgenerator.c -msgid "can't send non-None value to a just-started generator" -msgstr "" - -#: shared-module/sdcardio/SDCard.c -msgid "can't set 512 block size" -msgstr "" - -#: py/objnamedtuple.c -msgid "can't set attribute" -msgstr "" - -#: py/emitnative.c -msgid "can't store '%q'" -msgstr "" - -#: py/emitnative.c -msgid "can't store to '%q'" -msgstr "" - -#: py/emitnative.c -msgid "can't store with '%q' index" -msgstr "" - -#: py/objstr.c -msgid "" -"can't switch from automatic field numbering to manual field specification" -msgstr "" - -#: py/objstr.c -msgid "" -"can't switch from manual field specification to automatic field numbering" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "cannot assign new shape" -msgstr "" - -#: extmod/ulab/code/ndarray_operators.c -msgid "cannot cast output with casting rule" -msgstr "" - -#: py/objtype.c -msgid "cannot create '%q' instances" -msgstr "" - -#: py/objtype.c -msgid "cannot create instance" -msgstr "" - -#: py/runtime.c -msgid "cannot import name %q" -msgstr "" - -#: py/builtinimport.c -msgid "cannot perform relative import" -msgstr "" - -#: extmod/moductypes.c -msgid "cannot unambiguously get sizeof scalar" -msgstr "" - -#: py/emitnative.c -msgid "casting" -msgstr "" - -#: shared-bindings/_stage/Text.c -msgid "chars buffer too small" -msgstr "" - -#: py/modbuiltins.c -msgid "chr() arg not in range(0x110000)" -msgstr "" - -#: py/modbuiltins.c -msgid "chr() arg not in range(256)" -msgstr "" - -#: shared-module/vectorio/Circle.c -msgid "circle can only be registered in one parent" -msgstr "" - -#: shared-bindings/bitmaptools/__init__.c -msgid "clip point must be (x,y) tuple" -msgstr "" - -#: shared-bindings/msgpack/ExtType.c -msgid "code outside range 0~127" -msgstr "" - -#: shared-bindings/displayio/Palette.c -msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" -msgstr "" - -#: shared-bindings/displayio/Palette.c -msgid "color buffer must be a buffer, tuple, list, or int" -msgstr "" - -#: shared-bindings/displayio/Palette.c -msgid "color buffer must be a bytearray or array of type 'b' or 'B'" -msgstr "" - -#: shared-bindings/displayio/Palette.c -msgid "color must be between 0x000000 and 0xffffff" -msgstr "" - -#: shared-bindings/displayio/ColorConverter.c -msgid "color should be an int" -msgstr "" - -#: py/emitnative.c -msgid "comparison of int and uint" -msgstr "" - -#: py/objcomplex.c -msgid "complex division by zero" -msgstr "" - -#: py/objfloat.c py/parsenum.c -msgid "complex values not supported" -msgstr "" - -#: extmod/moduzlib.c -msgid "compression header" -msgstr "" - -#: py/parse.c -msgid "constant must be an integer" -msgstr "" - -#: py/emitnative.c -msgid "conversion to object" -msgstr "" - -#: extmod/ulab/code/numpy/filter.c -msgid "convolve arguments must be linear arrays" -msgstr "" - -#: extmod/ulab/code/numpy/filter.c -msgid "convolve arguments must be ndarrays" -msgstr "" - -#: extmod/ulab/code/numpy/filter.c -msgid "convolve arguments must not be empty" -msgstr "" - -#: extmod/ulab/code/numpy/poly.c -msgid "could not invert Vandermonde matrix" -msgstr "" - -#: shared-module/sdcardio/SDCard.c -msgid "couldn't determine SD card version" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "cross is defined for 1D arrays of length 3" -msgstr "" - -#: extmod/ulab/code/scipy/optimize/optimize.c -msgid "data must be iterable" -msgstr "" - -#: extmod/ulab/code/scipy/optimize/optimize.c -msgid "data must be of equal length" -msgstr "" - -#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format -msgid "data pin #%d in use" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "data type not understood" -msgstr "" - -#: py/parsenum.c -msgid "decimal numbers not supported" -msgstr "" - -#: py/compile.c -msgid "default 'except' must be last" -msgstr "" - -#: shared-bindings/msgpack/__init__.c -msgid "default is not a function" -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "" -"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "destination buffer must be an array of type 'H' for bit_depth = 16" -msgstr "" - -#: shared-bindings/audiobusio/PDMIn.c -msgid "destination_length must be an int >= 0" -msgstr "" - -#: py/objdict.c -msgid "dict update sequence has wrong length" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "diff argument must be an ndarray" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "differentiation order out of range" -msgstr "" - -#: extmod/ulab/code/numpy/transform.c -msgid "dimensions do not match" -msgstr "" - -#: py/emitnative.c -msgid "div/mod not implemented for uint" -msgstr "" - -#: py/objfloat.c py/objint_mpz.c -msgid "divide by zero" -msgstr "" - -#: py/modmath.c py/objint_longlong.c py/runtime.c -#: shared-bindings/math/__init__.c -msgid "division by zero" -msgstr "" - -#: py/objdeque.c -msgid "empty" -msgstr "" - -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c -msgid "empty heap" -msgstr "" - -#: py/objstr.c -msgid "empty separator" -msgstr "" - -#: shared-bindings/random/__init__.c -msgid "empty sequence" -msgstr "" - -#: py/objstr.c -msgid "end of format while looking for conversion specifier" -msgstr "" - -#: shared-bindings/displayio/Shape.c -msgid "end_x should be an int" -msgstr "" - -#: shared-bindings/alarm/time/TimeAlarm.c -msgid "epoch_time not supported on this board" -msgstr "" - -#: ports/nrf/common-hal/busio/UART.c -#, c-format -msgid "error = 0x%08lX" -msgstr "" - -#: py/runtime.c -msgid "exceptions must derive from BaseException" -msgstr "" - -#: shared-bindings/canio/CAN.c -msgid "expected '%q' but got '%q'" -msgstr "" - -#: shared-bindings/canio/CAN.c -msgid "expected '%q' or '%q' but got '%q'" -msgstr "" - -#: py/objstr.c -msgid "expected ':' after format specifier" -msgstr "" - -#: py/obj.c -msgid "expected tuple/list" -msgstr "" - -#: py/modthread.c -msgid "expecting a dict for keyword args" -msgstr "" - -#: py/compile.c -msgid "expecting an assembler instruction" -msgstr "" - -#: py/compile.c -msgid "expecting just a value for set" -msgstr "" - -#: py/compile.c -msgid "expecting key:value for dict" -msgstr "" - -#: shared-bindings/msgpack/__init__.c -msgid "ext_hook is not a function" -msgstr "" - -#: py/argcheck.c -msgid "extra keyword arguments given" -msgstr "" - -#: py/argcheck.c -msgid "extra positional arguments given" -msgstr "" - -#: py/parse.c -msgid "f-string expression part cannot include a '#'" -msgstr "" - -#: py/parse.c -msgid "f-string expression part cannot include a backslash" -msgstr "" - -#: py/parse.c -msgid "f-string: empty expression not allowed" -msgstr "" - -#: py/parse.c -msgid "f-string: expecting '}'" -msgstr "" - -#: py/parse.c -msgid "f-string: single '}' is not allowed" -msgstr "" - -#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c -#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c -msgid "file must be a file opened in byte mode" -msgstr "" - -#: shared-bindings/traceback/__init__.c -msgid "file write is not available" -msgstr "" - -#: shared-bindings/storage/__init__.c -msgid "filesystem must provide mount method" -msgstr "" - -#: extmod/ulab/code/numpy/vector.c -msgid "first argument must be a callable" -msgstr "" - -#: extmod/ulab/code/scipy/optimize/optimize.c -msgid "first argument must be a function" -msgstr "" - -#: extmod/ulab/code/ulab_create.c -msgid "first argument must be a tuple of ndarrays" -msgstr "" - -#: extmod/ulab/code/numpy/vector.c -msgid "first argument must be an ndarray" -msgstr "" - -#: py/objtype.c -msgid "first argument to super() must be type" -msgstr "" - -#: extmod/ulab/code/scipy/linalg/linalg.c -msgid "first two arguments must be ndarrays" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "flattening order must be either 'C', or 'F'" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "flip argument must be an ndarray" -msgstr "" - -#: py/objint.c -msgid "float too big" -msgstr "" - -#: py/nativeglue.c -msgid "float unsupported" -msgstr "" - -#: shared-bindings/_stage/Text.c -msgid "font must be 2048 bytes long" -msgstr "" - -#: py/objstr.c -msgid "format requires a dict" -msgstr "" - -#: py/objdeque.c -msgid "full" -msgstr "" - -#: py/argcheck.c -msgid "function doesn't take keyword arguments" -msgstr "" - -#: py/argcheck.c -#, c-format -msgid "function expected at most %d arguments, got %d" -msgstr "" - -#: py/bc.c py/objnamedtuple.c -msgid "function got multiple values for argument '%q'" -msgstr "" - -#: extmod/ulab/code/scipy/optimize/optimize.c -msgid "function has the same sign at the ends of interval" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "function is defined for ndarrays only" -msgstr "" - -#: py/argcheck.c -#, c-format -msgid "function missing %d required positional arguments" -msgstr "" - -#: py/bc.c -msgid "function missing keyword-only argument" -msgstr "" - -#: py/bc.c -msgid "function missing required keyword argument '%q'" -msgstr "" - -#: py/bc.c -#, c-format -msgid "function missing required positional argument #%d" -msgstr "" - -#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c -#, c-format -msgid "function takes %d positional arguments but %d were given" -msgstr "" - -#: shared-bindings/time/__init__.c -msgid "function takes exactly 9 arguments" -msgstr "" - -#: py/objgenerator.c -msgid "generator already executing" -msgstr "" - -#: py/objgenerator.c -msgid "generator ignored GeneratorExit" -msgstr "" - -#: py/objgenerator.c py/runtime.c -msgid "generator raised StopIteration" -msgstr "" - -#: shared-bindings/_stage/Layer.c -msgid "graphic must be 2048 bytes long" -msgstr "" - -#: extmod/moduhashlib.c -msgid "hash is final" -msgstr "" - -#: extmod/moduheapq.c -msgid "heap must be a list" -msgstr "" - -#: py/compile.c -msgid "identifier redefined as global" -msgstr "" - -#: py/compile.c -msgid "identifier redefined as nonlocal" -msgstr "" - -#: py/compile.c -msgid "import * not at module level" -msgstr "" - -#: py/persistentcode.c -msgid "incompatible native .mpy architecture" -msgstr "" - -#: py/objstr.c -msgid "incomplete format" -msgstr "" - -#: py/objstr.c -msgid "incomplete format key" -msgstr "" - -#: extmod/modubinascii.c -msgid "incorrect padding" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "index is out of bounds" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c -#: shared-bindings/bitmaptools/__init__.c -msgid "index out of range" -msgstr "" - -#: py/obj.c -msgid "indices must be integers" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "indices must be integers, slices, or Boolean lists" -msgstr "" - -#: extmod/ulab/code/scipy/optimize/optimize.c -msgid "initial values must be iterable" -msgstr "" - -#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "initial_value length is wrong" -msgstr "" - -#: py/compile.c -msgid "inline assembler must be a function" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "input and output shapes are not compatible" -msgstr "" - -#: extmod/ulab/code/ulab_create.c -msgid "input argument must be an integer, a tuple, or a list" -msgstr "" - -#: extmod/ulab/code/numpy/fft/fft_tools.c -msgid "input array length must be power of 2" -msgstr "" - -#: extmod/ulab/code/ulab_create.c -msgid "input arrays are not compatible" -msgstr "" - -#: extmod/ulab/code/numpy/poly.c -msgid "input data must be an iterable" -msgstr "" - -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "input matrix is asymmetric" -msgstr "" - -#: extmod/ulab/code/numpy/linalg/linalg.c -#: extmod/ulab/code/scipy/linalg/linalg.c -msgid "input matrix is singular" -msgstr "" - -#: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c -msgid "input must be a dense ndarray" -msgstr "" - -#: extmod/ulab/code/ulab_create.c -msgid "input must be a tensor of rank 2" -msgstr "" - -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c -msgid "input must be an ndarray" -msgstr "" - -#: extmod/ulab/code/scipy/signal/signal.c -msgid "input must be one-dimensional" -msgstr "" - -#: extmod/ulab/code/ulab_tools.c -msgid "input must be square matrix" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "input must be tuple, list, range, or ndarray" -msgstr "" - -#: extmod/ulab/code/numpy/poly.c -msgid "input vectors must be of equal length" -msgstr "" - -#: extmod/ulab/code/numpy/poly.c -msgid "inputs are not iterable" -msgstr "" - -#: py/parsenum.c -msgid "int() arg 2 must be >= 2 and <= 36" -msgstr "" - -#: py/objstr.c -msgid "integer required" -msgstr "" - -#: extmod/ulab/code/numpy/approx.c -msgid "interp is defined for 1D iterables of equal length" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -#, c-format -msgid "interval must be in range %s-%s" -msgstr "" - -#: py/compile.c -msgid "invalid architecture" -msgstr "" - -#: lib/netutils/netutils.c -msgid "invalid arguments" -msgstr "" - -#: shared-bindings/bitmaptools/__init__.c -#, c-format -msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" -msgstr "" - -#: shared-bindings/bitmaptools/__init__.c -#, c-format -msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "" - -#: shared-bindings/bitmaptools/__init__.c -#, c-format -msgid "invalid element_size %d, must be, 1, 2, or 4" -msgstr "" - -#: shared-bindings/traceback/__init__.c -msgid "invalid exception" -msgstr "" - -#: extmod/modframebuf.c -msgid "invalid format" -msgstr "" - -#: py/objstr.c -msgid "invalid format specifier" -msgstr "" - -#: shared-bindings/wifi/Radio.c -msgid "invalid hostname" -msgstr "" - -#: py/compile.c -msgid "invalid micropython decorator" -msgstr "" - -#: shared-bindings/random/__init__.c -msgid "invalid step" -msgstr "" - -#: py/compile.c py/parse.c -msgid "invalid syntax" -msgstr "" - -#: py/parsenum.c -msgid "invalid syntax for integer" -msgstr "" - -#: py/parsenum.c -#, c-format -msgid "invalid syntax for integer with base %d" -msgstr "" - -#: py/parsenum.c -msgid "invalid syntax for number" -msgstr "" - -#: py/objexcept.c shared-bindings/traceback/__init__.c -msgid "invalid traceback" -msgstr "" - -#: py/objtype.c -msgid "issubclass() arg 1 must be a class" -msgstr "" - -#: py/objtype.c -msgid "issubclass() arg 2 must be a class or a tuple of classes" -msgstr "" - -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "iterations did not converge" -msgstr "" - -#: py/objstr.c -msgid "join expects a list of str/bytes objects consistent with self object" -msgstr "" - -#: py/argcheck.c -msgid "keyword argument(s) not yet implemented - use normal args instead" -msgstr "" - -#: py/bc.c -msgid "keywords must be strings" -msgstr "" - -#: py/emitinlinethumb.c py/emitinlinextensa.c -msgid "label '%q' not defined" -msgstr "" - -#: py/compile.c -msgid "label redefined" -msgstr "" - -#: py/stream.c -msgid "length argument not allowed for this type" -msgstr "" - -#: shared-bindings/audiomixer/MixerVoice.c -msgid "level must be between 0 and 1" -msgstr "" - -#: py/objarray.c -msgid "lhs and rhs should be compatible" -msgstr "" - -#: py/emitnative.c -msgid "local '%q' has type '%q' but source is '%q'" -msgstr "" - -#: py/emitnative.c -msgid "local '%q' used before type known" -msgstr "" - -#: py/vm.c -msgid "local variable referenced before assignment" -msgstr "" - -#: py/objint.c -msgid "long int not supported in this build" -msgstr "" - -#: ports/esp32s2/common-hal/canio/CAN.c -msgid "loopback + silent mode not supported by peripheral" -msgstr "" - -#: py/parse.c -msgid "malformed f-string" -msgstr "" - -#: shared-bindings/_stage/Layer.c -msgid "map buffer too small" -msgstr "" - -#: py/modmath.c shared-bindings/math/__init__.c -msgid "math domain error" -msgstr "" - -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "matrix is not positive definite" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Characteristic.c -#: ports/nrf/common-hal/_bleio/Descriptor.c -#, c-format -msgid "max_length must be 0-%d when fixed_length is %s" -msgstr "" - -#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be >= 0" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "maximum number of dimensions is 4" -msgstr "" - -#: py/runtime.c -msgid "maximum recursion depth exceeded" -msgstr "" - -#: extmod/ulab/code/scipy/optimize/optimize.c -msgid "maxiter must be > 0" -msgstr "" - -#: extmod/ulab/code/scipy/optimize/optimize.c -msgid "maxiter should be > 0" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "median argument must be an ndarray" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "memory allocation failed, allocating %u bytes" -msgstr "" - -#: py/runtime.c -msgid "memory allocation failed, heap is locked" -msgstr "" - -#: py/objarray.c -msgid "memoryview: length is not a multiple of itemsize" -msgstr "" - -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "mode must be complete, or reduced" -msgstr "" - -#: py/builtinimport.c -msgid "module not found" -msgstr "" - -#: extmod/ulab/code/numpy/poly.c -msgid "more degrees of freedom than data points" -msgstr "" - -#: py/compile.c -msgid "multiple *x in assignment" -msgstr "" - -#: py/objtype.c -msgid "multiple bases have instance lay-out conflict" -msgstr "" - -#: py/objtype.c -msgid "multiple inheritance not supported" -msgstr "" - -#: py/emitnative.c -msgid "must raise an object" -msgstr "" - -#: py/modbuiltins.c -msgid "must use keyword argument for key function" -msgstr "" - -#: py/runtime.c -msgid "name '%q' is not defined" -msgstr "" - -#: py/runtime.c -msgid "name not defined" -msgstr "" - -#: py/asmthumb.c -msgid "native method too big" -msgstr "" - -#: py/emitnative.c -msgid "native yield" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "need more than %d values to unpack" -msgstr "" - -#: py/modmath.c -msgid "negative factorial" -msgstr "" - -#: py/objint_longlong.c py/objint_mpz.c py/runtime.c -msgid "negative power with no float support" -msgstr "" - -#: py/objint_mpz.c py/runtime.c -msgid "negative shift count" -msgstr "" - -#: shared-module/sdcardio/SDCard.c -msgid "no SD card" -msgstr "" - -#: py/vm.c -msgid "no active exception to reraise" -msgstr "" - -#: py/compile.c -msgid "no binding for nonlocal found" -msgstr "" - -#: shared-module/msgpack/__init__.c -msgid "no default packer" -msgstr "" - -#: extmod/modurandom.c -msgid "no default seed" -msgstr "" - -#: py/builtinimport.c -msgid "no module named '%q'" -msgstr "" - -#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c -msgid "no reset pin available" -msgstr "" - -#: shared-module/sdcardio/SDCard.c -msgid "no response from SD card" -msgstr "" - -#: py/objobject.c py/runtime.c -msgid "no such attribute" -msgstr "" - -#: shared-bindings/usb_hid/__init__.c -msgid "non-Device in %q" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Connection.c -msgid "non-UUID found in service_uuids_whitelist" -msgstr "" - -#: py/compile.c -msgid "non-default argument follows default argument" -msgstr "" - -#: extmod/modubinascii.c -msgid "non-hex digit found" -msgstr "" - -#: py/compile.c -msgid "non-keyword arg after */**" -msgstr "" - -#: py/compile.c -msgid "non-keyword arg after keyword arg" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "non-zero timeout must be > 0.01" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "non-zero timeout must be >= interval" -msgstr "" - -#: shared-bindings/_bleio/UUID.c -msgid "not a 128-bit UUID" -msgstr "" - -#: py/objstr.c -msgid "not all arguments converted during string formatting" -msgstr "" - -#: py/objstr.c -msgid "not enough arguments for format string" -msgstr "" - -#: extmod/ulab/code/ulab_create.c -msgid "number of points must be at least 2" -msgstr "" - -#: py/builtinhelp.c -msgid "object " -msgstr "" - -#: py/obj.c -#, c-format -msgid "object '%s' isn't a tuple or list" -msgstr "" - -#: py/obj.c -msgid "object doesn't support item assignment" -msgstr "" - -#: py/obj.c -msgid "object doesn't support item deletion" -msgstr "" - -#: py/obj.c -msgid "object has no len" -msgstr "" - -#: py/obj.c -msgid "object isn't subscriptable" -msgstr "" - -#: py/runtime.c -msgid "object not an iterator" -msgstr "" - -#: py/objtype.c py/runtime.c -msgid "object not callable" -msgstr "" - -#: py/sequence.c shared-bindings/displayio/Group.c -msgid "object not in sequence" -msgstr "" - -#: py/runtime.c -msgid "object not iterable" -msgstr "" - -#: py/obj.c -#, c-format -msgid "object of type '%s' has no len()" -msgstr "" - -#: py/obj.c -msgid "object with buffer protocol required" -msgstr "" - -#: extmod/modubinascii.c -msgid "odd-length string" -msgstr "" - -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c -msgid "offset is too large" -msgstr "" - -#: shared-bindings/dualbank/__init__.c -msgid "offset must be >= 0" -msgstr "" - -#: extmod/ulab/code/ulab_create.c -msgid "offset must be non-negative and no greater than buffer length" -msgstr "" - -#: py/objstr.c py/objstrunicode.c -msgid "offset out of bounds" -msgstr "" - -#: ports/nrf/common-hal/audiobusio/PDMIn.c -msgid "only bit_depth=16 is supported" -msgstr "" - -#: ports/nrf/common-hal/audiobusio/PDMIn.c -msgid "only sample_rate=16000 is supported" -msgstr "" - -#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c -#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c -msgid "only slices with step=1 (aka None) are supported" -msgstr "" - -#: py/vm.c -msgid "opcode" -msgstr "" - -#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare.c -#: extmod/ulab/code/numpy/vector.c -msgid "operands could not be broadcast together" -msgstr "" - -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "operation is defined for 2D arrays only" -msgstr "" - -#: extmod/ulab/code/numpy/linalg/linalg.c -msgid "operation is defined for ndarrays only" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "operation is implemented for 1D Boolean arrays only" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "operation is not implemented on ndarrays" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "operation is not supported for given type" -msgstr "" - -#: py/modbuiltins.c -msgid "ord expects a character" -msgstr "" - -#: py/modbuiltins.c -#, c-format -msgid "ord() expected a character, but string of length %d found" -msgstr "" - -#: extmod/ulab/code/utils/utils.c -msgid "out array is too small" -msgstr "" - -#: extmod/ulab/code/utils/utils.c -msgid "out must be a float dense array" -msgstr "" - -#: shared-bindings/displayio/Bitmap.c -msgid "out of range of source" -msgstr "" - -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c -msgid "out of range of target" -msgstr "" - -#: py/objint_mpz.c -msgid "overflow converting long int to machine word" -msgstr "" - -#: py/modstruct.c -#, c-format -msgid "pack expected %d items for packing (got %d)" -msgstr "" - -#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c -msgid "palette must be 32 bytes long" -msgstr "" - -#: shared-bindings/displayio/Palette.c -msgid "palette_index should be an int" -msgstr "" - -#: py/emitinlinextensa.c -msgid "parameters must be registers in sequence a2 to a5" -msgstr "" - -#: py/emitinlinethumb.c -msgid "parameters must be registers in sequence r0 to r3" -msgstr "" - -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c -msgid "pixel coordinates out of bounds" -msgstr "" - -#: shared-bindings/displayio/Bitmap.c -msgid "pixel value requires too many bits" -msgstr "" - -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - -#: shared-module/vectorio/Polygon.c -msgid "polygon can only be registered in one parent" -msgstr "" - -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -msgid "pop from an empty PulseIn" -msgstr "" - -#: ports/atmel-samd/common-hal/pulseio/PulseIn.c -#: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/nrf/common-hal/pulseio/PulseIn.c -#: ports/raspberrypi/common-hal/pulseio/PulseIn.c -#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c -#: shared-bindings/ps2io/Ps2.c -msgid "pop from empty %q" -msgstr "" - -#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c -msgid "port must be >= 0" -msgstr "" - -#: py/objint_mpz.c -msgid "pow() 3rd argument cannot be 0" -msgstr "" - -#: py/objint_mpz.c -msgid "pow() with 3 arguments requires integers" -msgstr "" - -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - -#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -msgid "pull masks conflict with direction masks" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "pull_threshold must be between 1 and 32" -msgstr "" - -#: ports/raspberrypi/bindings/rp2pio/StateMachine.c -msgid "push_threshold must be between 1 and 32" -msgstr "" - -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "" - -#: py/parse.c -msgid "raw f-strings are not implemented" -msgstr "" - -#: extmod/ulab/code/numpy/fft/fft_tools.c -msgid "real and imaginary parts must be of equal length" -msgstr "" - -#: py/builtinimport.c -msgid "relative import" -msgstr "" - -#: py/obj.c -#, c-format -msgid "requested length %d but object has length %d" -msgstr "" - -#: extmod/ulab/code/ndarray_operators.c -msgid "results cannot be cast to specified type" -msgstr "" - -#: py/compile.c -msgid "return annotation must be an identifier" -msgstr "" - -#: py/emitnative.c -msgid "return expected '%q' but got '%q'" -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -#, c-format -msgid "rgb_pins[%d] duplicates another pin assignment" -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -#, c-format -msgid "rgb_pins[%d] is not on the same port as clock" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "roll argument must be an ndarray" -msgstr "" - -#: py/objstr.c -msgid "rsplit(None,n)" -msgstr "" - -#: shared-bindings/audiocore/RawSample.c -msgid "" -"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " -"'B'" -msgstr "" - -#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c -#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c -msgid "sampling rate out of range" -msgstr "" - -#: py/modmicropython.c -msgid "schedule queue full" -msgstr "" - -#: lib/utils/pyexec.c py/builtinimport.c -msgid "script compilation not supported" -msgstr "" - -#: py/nativeglue.c -msgid "set unsupported" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "shape must be a tuple" -msgstr "" - -#: shared-module/msgpack/__init__.c -msgid "short read" -msgstr "" - -#: py/objstr.c -msgid "sign not allowed in string format specifier" -msgstr "" - -#: py/objstr.c -msgid "sign not allowed with integer format specifier 'c'" -msgstr "" - -#: py/objstr.c -msgid "single '}' encountered in format string" -msgstr "" - -#: extmod/ulab/code/ulab_tools.c -msgid "size is defined for ndarrays only" -msgstr "" - -#: shared-bindings/time/__init__.c -msgid "sleep length must be non-negative" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "slice step can't be zero" -msgstr "" - -#: py/objslice.c -msgid "slice step cannot be zero" -msgstr "" - -#: py/nativeglue.c -msgid "slice unsupported" -msgstr "" - -#: py/objint.c py/sequence.c -msgid "small int overflow" -msgstr "" - -#: main.c -msgid "soft reboot\n" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "sort argument must be an ndarray" -msgstr "" - -#: extmod/ulab/code/scipy/signal/signal.c -msgid "sos array must be of shape (n_section, 6)" -msgstr "" - -#: extmod/ulab/code/scipy/signal/signal.c -msgid "sos[:, 3] should be all ones" -msgstr "" - -#: extmod/ulab/code/scipy/signal/signal.c -msgid "sosfilt requires iterable arguments" -msgstr "" - -#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c -msgid "source palette too large" -msgstr "" - -#: py/objstr.c -msgid "start/end indices" -msgstr "" - -#: shared-bindings/displayio/Shape.c -msgid "start_x should be an int" -msgstr "" - -#: shared-bindings/random/__init__.c -msgid "step must be non-zero" -msgstr "" - -#: shared-bindings/busio/UART.c -msgid "stop must be 1 or 2" -msgstr "" - -#: shared-bindings/random/__init__.c -msgid "stop not reachable from start" -msgstr "" - -#: py/stream.c shared-bindings/getpass/__init__.c -msgid "stream operation not supported" -msgstr "" - -#: py/objstrunicode.c -msgid "string indices must be integers, not %q" -msgstr "" - -#: py/stream.c -msgid "string not supported; use bytes or bytearray" -msgstr "" - -#: extmod/moductypes.c -msgid "struct: can't index" -msgstr "" - -#: extmod/moductypes.c -msgid "struct: index out of range" -msgstr "" - -#: extmod/moductypes.c -msgid "struct: no fields" -msgstr "" - -#: py/objarray.c py/objstr.c -msgid "substring not found" -msgstr "" - -#: py/compile.c -msgid "super() can't find self" -msgstr "" - -#: extmod/modujson.c -msgid "syntax error in JSON" -msgstr "" - -#: extmod/moductypes.c -msgid "syntax error in uctypes descriptor" -msgstr "" - -#: shared-bindings/touchio/TouchIn.c -msgid "threshold must be in the range 0-65536" -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -msgid "tile must be greater than zero" -msgstr "" - -#: shared-bindings/time/__init__.c -msgid "time.struct_time() takes a 9-sequence" -msgstr "" - -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c -#: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "timeout duration exceeded the maximum supported value" -msgstr "" - -#: shared-bindings/busio/UART.c -msgid "timeout must be 0.0-100.0 seconds" -msgstr "" - -#: ports/nrf/common-hal/_bleio/Adapter.c -msgid "timeout must be < 655.35 secs" -msgstr "" - -#: shared-bindings/_bleio/CharacteristicBuffer.c -msgid "timeout must be >= 0.0" -msgstr "" - -#: shared-module/sdcardio/SDCard.c -msgid "timeout waiting for v1 card" -msgstr "" - -#: shared-module/sdcardio/SDCard.c -msgid "timeout waiting for v2 card" -msgstr "" - -#: shared-bindings/time/__init__.c -msgid "timestamp out of range for platform time_t" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "tobytes can be invoked for dense arrays only" -msgstr "" - -#: shared-module/struct/__init__.c -msgid "too many arguments provided with the given format" -msgstr "" - -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c -msgid "too many dimensions" -msgstr "" - -#: extmod/ulab/code/ndarray.c -msgid "too many indices" -msgstr "" - -#: py/asmthumb.c -msgid "too many locals for native method" -msgstr "" - -#: py/runtime.c -#, c-format -msgid "too many values to unpack (expected %d)" -msgstr "" - -#: extmod/ulab/code/numpy/approx.c -msgid "trapz is defined for 1D arrays of equal length" -msgstr "" - -#: extmod/ulab/code/numpy/approx.c -msgid "trapz is defined for 1D iterables" -msgstr "" - -#: py/obj.c -msgid "tuple/list has wrong length" -msgstr "" - -#: ports/esp32s2/common-hal/canio/CAN.c -#, c-format -msgid "twai_driver_install returned esp-idf error #%d" -msgstr "" - -#: ports/esp32s2/common-hal/canio/CAN.c -#, c-format -msgid "twai_start returned esp-idf error #%d" -msgstr "" - -#: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c -#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c -msgid "tx and rx cannot both be None" -msgstr "" - -#: py/objtype.c -msgid "type '%q' is not an acceptable base type" -msgstr "" - -#: py/objtype.c -msgid "type is not an acceptable base type" -msgstr "" - -#: py/runtime.c -msgid "type object '%q' has no attribute '%q'" -msgstr "" - -#: py/objgenerator.c -msgid "type object 'generator' has no attribute '__await__'" -msgstr "" - -#: py/objtype.c -msgid "type takes 1 or 3 arguments" -msgstr "" - -#: py/objint_longlong.c -msgid "ulonglong too large" -msgstr "" - -#: py/emitnative.c -msgid "unary op %q not implemented" -msgstr "" - -#: py/parse.c -msgid "unexpected indent" -msgstr "" - -#: py/bc.c -msgid "unexpected keyword argument" -msgstr "" - -#: py/bc.c py/objnamedtuple.c -msgid "unexpected keyword argument '%q'" -msgstr "" - -#: py/lexer.c -msgid "unicode name escapes" -msgstr "" - -#: py/parse.c -msgid "unindent does not match any outer indentation level" -msgstr "" - -#: py/objstr.c -#, c-format -msgid "unknown conversion specifier %c" -msgstr "" - -#: py/objstr.c -msgid "unknown format code '%c' for object of type '%q'" -msgstr "" - -#: py/compile.c -msgid "unknown type" -msgstr "" - -#: py/compile.c -msgid "unknown type '%q'" -msgstr "" - -#: py/objstr.c -msgid "unmatched '{' in format" -msgstr "" - -#: py/objtype.c py/runtime.c -msgid "unreadable attribute" -msgstr "" - -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c -msgid "unsupported %q type" -msgstr "" - -#: py/emitinlinethumb.c -#, c-format -msgid "unsupported Thumb instruction '%s' with %d arguments" -msgstr "" - -#: py/emitinlinextensa.c -#, c-format -msgid "unsupported Xtensa instruction '%s' with %d arguments" -msgstr "" - -#: py/objstr.c -#, c-format -msgid "unsupported format character '%c' (0x%x) at index %d" -msgstr "" - -#: py/runtime.c -msgid "unsupported type for %q: '%q'" -msgstr "" - -#: py/runtime.c -msgid "unsupported type for operator" -msgstr "" - -#: py/runtime.c -msgid "unsupported types for %q: '%q', '%q'" -msgstr "" - -#: py/objint.c -#, c-format -msgid "value must fit in %d byte(s)" -msgstr "" - -#: shared-bindings/displayio/Bitmap.c -msgid "value_count must be > 0" -msgstr "" - -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "watchdog timeout must be greater than 0" -msgstr "" - -#: shared-bindings/bitops/__init__.c -#, c-format -msgid "width must be from 2 to 8 (inclusive), not %d" -msgstr "" - -#: shared-bindings/rgbmatrix/RGBMatrix.c -msgid "width must be greater than zero" -msgstr "" - -#: ports/esp32s2/common-hal/wifi/Radio.c -msgid "wifi is not enabled" -msgstr "" - -#: shared-bindings/_bleio/Adapter.c -msgid "window must be <= interval" -msgstr "" - -#: extmod/ulab/code/numpy/numerical.c -msgid "wrong axis index" -msgstr "" - -#: extmod/ulab/code/ulab_create.c -msgid "wrong axis specified" -msgstr "" - -#: extmod/ulab/code/numpy/compare.c extmod/ulab/code/numpy/vector.c -msgid "wrong input type" -msgstr "" - -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c -msgid "wrong number of arguments" -msgstr "" - -#: py/runtime.c -msgid "wrong number of values to unpack" -msgstr "" - -#: extmod/ulab/code/numpy/vector.c -msgid "wrong output type" -msgstr "" - -#: shared-module/displayio/Shape.c -msgid "x value out of bounds" -msgstr "" - -#: ports/esp32s2/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - -#: shared-bindings/displayio/Shape.c -msgid "y should be an int" -msgstr "" - -#: shared-module/displayio/Shape.c -msgid "y value out of bounds" -msgstr "" - -#: py/objrange.c -msgid "zero step" -msgstr "" - -#: extmod/ulab/code/scipy/signal/signal.c -msgid "zi must be an ndarray" -msgstr "" - -#: extmod/ulab/code/scipy/signal/signal.c -msgid "zi must be of float type" -msgstr "" - -#: extmod/ulab/code/scipy/signal/signal.c -msgid "zi must be of shape (n_section, 2)" -msgstr "" From 4f52528a3ff01d1407b61381266c1f8541515ea2 Mon Sep 17 00:00:00 2001 From: Seth Kerr Date: Sun, 15 Aug 2021 14:08:39 -0600 Subject: [PATCH 171/418] replaced circuitpython.pot with text from adafruit main --- locale/circuitpython.pot | 4444 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 4444 insertions(+) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index e69de29bb2..03e15c6db2 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -0,0 +1,4444 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: main.c +msgid "" +"\n" +"Code done running.\n" +msgstr "" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: py/obj.c +msgid " File \"%q\"" +msgstr "" + +#: py/obj.c +msgid " File \"%q\", line %d" +msgstr "" + +#: py/builtinhelp.c +msgid " is of type %q\n" +msgstr "" + +#: main.c +msgid " not found.\n" +msgstr "" + +#: main.c +msgid " output:\n" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "%%c requires int or char" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "" +"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" +msgstr "" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +msgid "%q failure: %d" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q in use" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c +msgid "%q index out of range" +msgstr "" + +#: py/obj.c +msgid "%q indices must be integers, not %s" +msgstr "" + +#: py/argcheck.c +msgid "%q length must be %q" +msgstr "" + +#: shared-bindings/vectorio/Polygon.c +msgid "%q list must be a list" +msgstr "" + +#: py/argcheck.c +msgid "%q must <= %d" +msgstr "" + +#: py/argcheck.c +msgid "%q must be %d-%d" +msgstr "" + +#: shared-bindings/usb_hid/Device.c +msgid "%q must be 0-255" +msgstr "" + +#: shared-bindings/usb_hid/Device.c +msgid "%q must be 1-255" +msgstr "" + +#: py/argcheck.c +msgid "%q must be >= %d" +msgstr "" + +#: py/argcheck.c shared-bindings/memorymonitor/AllocationAlarm.c +msgid "%q must be >= 0" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/Shape.c +#: shared-bindings/memorymonitor/AllocationAlarm.c +#: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c +msgid "%q must be >= 1" +msgstr "" + +#: shared-bindings/usb_hid/Device.c +msgid "%q must be None or between 1 and len(report_descriptor)-1" +msgstr "" + +#: py/argcheck.c +msgid "%q must be a string" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "%q must be a tuple of length 2" +msgstr "" + +#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +msgid "%q must be between %d and %d" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +msgid "%q must be power of 2" +msgstr "" + +#: py/argcheck.c +msgid "%q must of type %q" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: shared-bindings/canio/Match.c +msgid "%q out of range" +msgstr "" + +#: ports/atmel-samd/common-hal/microcontroller/Pin.c +msgid "%q pin invalid" +msgstr "" + +#: shared-bindings/fontio/BuiltinFont.c +msgid "%q should be an int" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "%q() takes %d positional arguments but %d were given" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + +#: py/argcheck.c +msgid "'%q' argument required" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a label" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects a special register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an FPU register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an address of the form [a, b]" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects an integer" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects at most r%d" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects {r0, r1, ...}" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "'%s' integer %d isn't within range %d..%d" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" +msgstr "" + +#: py/obj.c +#, c-format +msgid "'%s' object doesn't support item assignment" +msgstr "" + +#: py/obj.c +#, c-format +msgid "'%s' object doesn't support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%s' object has no attribute '%q'" +msgstr "" + +#: py/obj.c +#, c-format +msgid "'%s' object isn't subscriptable" +msgstr "" + +#: py/objstr.c +msgid "'=' alignment not allowed in string format specifier" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "'S' and 'O' are not supported format types" +msgstr "" + +#: py/compile.c +msgid "'align' requires 1 argument" +msgstr "" + +#: py/compile.c +msgid "'await' outside function" +msgstr "" + +#: py/compile.c +msgid "'await', 'async for' or 'async with' outside async function" +msgstr "" + +#: py/compile.c +msgid "'break' outside loop" +msgstr "" + +#: py/compile.c +msgid "'continue' outside loop" +msgstr "" + +#: py/objgenerator.c +msgid "'coroutine' object is not an iterator" +msgstr "" + +#: py/compile.c +msgid "'data' requires at least 2 arguments" +msgstr "" + +#: py/compile.c +msgid "'data' requires integer arguments" +msgstr "" + +#: py/compile.c +msgid "'label' requires 1 argument" +msgstr "" + +#: py/compile.c +msgid "'return' outside function" +msgstr "" + +#: py/compile.c +msgid "'yield from' inside async function" +msgstr "" + +#: py/compile.c +msgid "'yield' outside function" +msgstr "" + +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + +#: py/compile.c +msgid "*x must be assignment target" +msgstr "" + +#: py/obj.c +msgid ", in %q\n" +msgstr "" + +#: py/objcomplex.c +msgid "0.0 to a complex power" +msgstr "" + +#: py/modbuiltins.c +msgid "3-arg pow() not supported" +msgstr "" + +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + +#: ports/atmel-samd/common-hal/countio/Counter.c +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "A hardware interrupt channel is already in use" +msgstr "" + +#: ports/esp32s2/common-hal/analogio/AnalogIn.c +msgid "ADC2 is being used by WiFi" +msgstr "" + +#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c +#, c-format +msgid "Address must be %d bytes long" +msgstr "" + +#: shared-bindings/_bleio/Address.c +msgid "Address type out of range" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + +#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +msgid "All I2C peripherals are in use" +msgstr "" + +#: ports/esp32s2/common-hal/countio/Counter.c +#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +msgid "All PCNT units in use" +msgstr "" + +#: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c +msgid "All RX FIFOs in use" +msgstr "" + +#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +msgid "All SPI peripherals are in use" +msgstr "" + +#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c +msgid "All UART peripherals are in use" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "All event channels in use" +msgstr "" + +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "All state machines in use" +msgstr "" + +#: ports/atmel-samd/audio_dma.c +msgid "All sync event channels in use" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "All timers for this pin are in use" +msgstr "" + +#: ports/atmel-samd/common-hal/_pew/PewPew.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c +msgid "All timers in use" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Already advertising." +msgstr "" + +#: ports/atmel-samd/common-hal/canio/Listener.c +msgid "Already have all-matches listener" +msgstr "" + +#: shared-module/memorymonitor/AllocationAlarm.c +#: shared-module/memorymonitor/AllocationSize.c +msgid "Already running" +msgstr "" + +#: ports/esp32s2/common-hal/wifi/Radio.c +msgid "Already scanning for wifi networks" +msgstr "" + +#: ports/cxd56/common-hal/analogio/AnalogIn.c +msgid "AnalogIn not supported on given pin" +msgstr "" + +#: ports/cxd56/common-hal/analogio/AnalogOut.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/analogio/AnalogOut.c +msgid "AnalogOut functionality not supported" +msgstr "" + +#: shared-bindings/analogio/AnalogOut.c +msgid "AnalogOut is only 16 bits. Value must be less than 65536." +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +msgid "AnalogOut not supported on given pin" +msgstr "" + +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +msgid "Another send is already active" +msgstr "" + +#: shared-bindings/pulseio/PulseOut.c +msgid "Array must contain halfwords (type 'H')" +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Array values should be single bytes." +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "At most %d %q may be specified (not %d)" +msgstr "" + +#: shared-module/memorymonitor/AllocationAlarm.c +#, c-format +msgid "Attempt to allocate %d blocks" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Attempted heap allocation when VM not running." +msgstr "" + +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "AuthMode.OPEN is not used with password" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Authentication failure" +msgstr "" + +#: main.c +msgid "Auto-reload is off.\n" +msgstr "" + +#: main.c +msgid "" +"Auto-reload is on. Simply save files over USB to run them or enter REPL to " +"disable.\n" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + +#: shared-module/displayio/Display.c +#: shared-module/framebufferio/FramebufferDisplay.c +msgid "Below minimum frame rate" +msgstr "" + +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +msgid "Bit clock and word select must be sequential pins" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Bit clock and word select must share a clock unit" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Bit depth must be from 1 to 6 inclusive, not %d" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Bit depth must be multiple of 8." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Both RX and TX required for flow control" +msgstr "" + +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "Both pins must support hardware interrupts" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "Brightness must be 0-1.0" +msgstr "" + +#: shared-bindings/supervisor/__init__.c +msgid "Brightness must be between 0 and 255" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Brightness not adjustable" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +#, c-format +msgid "Buffer + offset too small %d %d %d" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Buffer elements must be 4 bytes long or less" +msgstr "" + +#: shared-module/usb_hid/Device.c +#, c-format +msgid "Buffer incorrect size. Should be %d bytes." +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is not a bytearray." +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is too small" +msgstr "" + +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +#, c-format +msgid "Buffer length %d too big. It must be less than %d" +msgstr "" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c +msgid "Buffer length must be a multiple of 512" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c +msgid "Buffer must be at least length 1" +msgstr "" + +#: shared-bindings/_bleio/PacketBuffer.c +#, c-format +msgid "Buffer too short by %d bytes" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#, c-format +msgid "Bus pin %d is already in use" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "Byte buffer must be 16 bytes." +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Bytes must be between 0 and 255." +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "CBC blocks must be multiples of 16 bytes" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + +#: py/objtype.c +msgid "Call super().__init__() before accessing native object." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "Can't set CCCD on local Characteristic" +msgstr "" + +#: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c +#: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c +msgid "Cannot change USB devices now" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot create a new Adapter; use _bleio.adapter;" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Cannot delete values" +msgstr "" + +#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c +#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c +#: ports/nrf/common-hal/digitalio/DigitalInOut.c +#: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c +msgid "Cannot get pull while in output mode" +msgstr "" + +#: ports/nrf/common-hal/microcontroller/Processor.c +msgid "Cannot get temperature" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Cannot output both channels on the same pin" +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot read without MISO pin." +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Cannot record to a file" +msgstr "" + +#: shared-module/storage/__init__.c +msgid "Cannot remount '/' when visible via USB." +msgstr "" + +#: ports/atmel-samd/common-hal/microcontroller/__init__.c +#: ports/cxd56/common-hal/microcontroller/__init__.c +#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c +msgid "Cannot reset into bootloader because no bootloader is present." +msgstr "" + +#: ports/esp32s2/common-hal/socketpool/Socket.c +msgid "Cannot set socket options" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Cannot set value when direction is input." +msgstr "" + +#: ports/esp32s2/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Cannot specify RTS or CTS in RS485 mode" +msgstr "" + +#: py/objslice.c +msgid "Cannot subclass slice" +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot transfer without MOSI and MISO pins." +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Cannot vary frequency on a timer that is already in use" +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/nrf/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot write without MOSI pin." +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CircuitPython was unable to allocate the heap." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Clock pin init failed." +msgstr "" + +#: shared-module/bitbangio/I2C.c +msgid "Clock stretch too long" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Clock unit in use" +msgstr "" + +#: shared-bindings/_pew/PewPew.c +msgid "Column entry must be digitalio.DigitalInOut" +msgstr "" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/displayio/ParallelBus.c +msgid "Command must be an int between 0 and 255" +msgstr "" + +#: shared-bindings/_bleio/Connection.c +msgid "" +"Connection has been disconnected and can no longer be used. Create a new " +"connection." +msgstr "" + +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Could not initialize Camera" +msgstr "" + +#: ports/cxd56/common-hal/gnss/GNSS.c +msgid "Could not initialize GNSS" +msgstr "" + +#: ports/cxd56/common-hal/sdioio/SDCard.c +msgid "Could not initialize SDCard" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c +msgid "Could not initialize UART" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not re-init channel" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not re-init timer" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not restart PWM" +msgstr "" + +#: ports/esp32s2/common-hal/neopixel_write/__init__.c +msgid "Could not retrieve clock" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Could not start PWM" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "Could not start interrupt, RX busy" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate decoder" +msgstr "" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate first buffer" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate input buffer" +msgstr "" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate second buffer" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Crash into the HardFault_Handler." +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Channel Init Error" +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Device Init Error" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "DAC already in use" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c +#: ports/nrf/common-hal/displayio/ParallelBus.c +msgid "Data 0 pin must be byte aligned" +msgstr "" + +#: ports/esp32s2/common-hal/displayio/ParallelBus.c +msgid "Data 0 pin must be byte aligned." +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Data chunk must follow fmt chunk" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Data not supported with directed advertising" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Data too large for advertisement packet" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Destination capacity is smaller than destination_length." +msgstr "" + +#: ports/nrf/common-hal/audiobusio/I2SOut.c +msgid "Device in use" +msgstr "" + +#: ports/cxd56/common-hal/digitalio/DigitalInOut.c +msgid "DigitalInOut not supported on given pin" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display must have a 16 bit colorspace." +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display rotation must be in 90 degree increments" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Drive mode not used when direction is input." +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "ECB only operates on 16 bytes at a time" +msgstr "" + +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +msgid "ESP-IDF memory allocation failed" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +msgid "EXTINT channel already in use" +msgstr "" + +#: shared-module/synthio/MidiTrack.c +#, c-format +msgid "Error in MIDI stream at position %d" +msgstr "" + +#: extmod/modure.c +msgid "Error in regex" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "Error: Failure to bind" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c py/enum.c +#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c +#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c +#: shared-bindings/neopixel_write/__init__.c +#: shared-bindings/terminalio/Terminal.c +msgid "Expected a %q" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c +msgid "Expected a Characteristic" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Expected a DigitalInOut" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c +msgid "Expected a Service" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Expected a UART" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c +#: shared-bindings/_bleio/Service.c +msgid "Expected a UUID" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Expected an Address" +msgstr "" + +#: shared-bindings/alarm/__init__.c +msgid "Expected an alarm" +msgstr "" + +#: shared-module/adafruit_pixelbuf/PixelBuf.c +#, c-format +msgid "Expected tuple of length %d, got %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Extended advertisements with scan response not supported." +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "FFT is defined for ndarrays only" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "FFT is implemented for linear arrays only" +msgstr "" + +#: ports/esp32s2/common-hal/ssl/SSLSocket.c +msgid "Failed SSL handshake" +msgstr "" + +#: shared-bindings/ps2io/Ps2.c +msgid "Failed sending command." +msgstr "" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to acquire mutex, err 0x%04x" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c +msgid "Failed to allocate RX buffer" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c +#, c-format +msgid "Failed to allocate RX buffer of %d bytes" +msgstr "" + +#: ports/esp32s2/common-hal/wifi/__init__.c +msgid "Failed to allocate Wifi memory" +msgstr "" + +#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +msgid "Failed to allocate wifi scan memory" +msgstr "" + +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: internal error" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: timeout" +msgstr "" + +#: ports/esp32s2/common-hal/wifi/__init__.c +msgid "Failed to init wifi" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Failed to parse MP3 file" +msgstr "" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to release mutex, err 0x%04x" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + +#: py/moduerrno.c +msgid "File exists" +msgstr "" + +#: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c +msgid "Filters too complex" +msgstr "" + +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Format not supported" +msgstr "" + +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Frequency must match existing PWMOut using this timer" +msgstr "" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c +msgid "Function requires lock" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Group already used" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Hardware busy, try alternative pins" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Hardware in use, try alternative pins" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + +#: extmod/vfs_posix_file.c py/objstringio.c +msgid "I/O operation on closed file" +msgstr "" + +#: ports/stm/common-hal/busio/I2C.c +msgid "I2C Init Error" +msgstr "" + +#: ports/raspberrypi/common-hal/busio/I2C.c +msgid "I2C peripheral in use" +msgstr "" + +#: shared-bindings/audiobusio/I2SOut.c +msgid "I2SOut not available" +msgstr "" + +#: shared-bindings/aesio/aes.c +#, c-format +msgid "IV must be %d bytes long" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "In-buffer elements must be <= 4 bytes long" +msgstr "" + +#: py/persistentcode.c +msgid "" +"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" +"mpy-update for more info." +msgstr "" + +#: shared-bindings/_pew/PewPew.c +msgid "Incorrect buffer size" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Init program size invalid" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Initial set pin direction conflicts with initial out pin direction" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Initial set pin state conflicts with initial out pin state" +msgstr "" + +#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +msgid "Initialization failed due to lack of memory" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +msgid "Input taking too long" +msgstr "" + +#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +msgid "Input/output error" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d shifts in more bits than pin count" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d shifts out more bits than pin count" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d uses extra pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d waits on input outside of count" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient authentication" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient encryption" +msgstr "" + +#: ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "Internal define error" +msgstr "" + +#: shared-module/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Internal error #%d" +msgstr "" + +#: shared-bindings/sdioio/SDCard.c +msgid "Invalid %q" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Invalid %q pin" +msgstr "" + +#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Invalid ADC Unit value" +msgstr "" + +#: ports/esp32s2/common-hal/wifi/Radio.c +msgid "Invalid AuthMode" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Invalid BLE parameter" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Invalid BMP file" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Invalid BSSID" +msgstr "" + +#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "Invalid DAC pin supplied" +msgstr "" + +#: shared-bindings/synthio/__init__.c +msgid "Invalid MIDI file" +msgstr "" + +#: ports/atmel-samd/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c +msgid "Invalid PWM frequency" +msgstr "" + +#: ports/esp32s2/common-hal/analogio/AnalogIn.c +msgid "Invalid Pin" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid argument" +msgstr "" + +#: shared-module/displayio/Bitmap.c +msgid "Invalid bits per value" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "Invalid buffer size" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +msgid "Invalid byteorder string" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +msgid "Invalid capture period. Valid range: 1 - 500" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid channel count" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "Invalid data_count %d" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "Invalid data_pins[%d]" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Invalid direction." +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid file" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid format chunk size" +msgstr "" + +#: ports/esp32s2/common-hal/busio/I2C.c +msgid "Invalid frequency" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Invalid memory access." +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "Invalid number of bits" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid phase" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid pin" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for left channel" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for right channel" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/SPI.c +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c +#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c +#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/SPI.c +#: ports/raspberrypi/common-hal/busio/UART.c +msgid "Invalid pins" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid polarity" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c +msgid "Invalid properties" +msgstr "" + +#: shared-bindings/microcontroller/__init__.c +msgid "Invalid run mode." +msgstr "" + +#: shared-module/_bleio/Attribute.c +msgid "Invalid security_mode" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/common-hal/ssl/SSLContext.c +msgid "Invalid socket for TLS" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice count" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid wave file" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Invalid word/bit length" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Key must be 16, 24, or 32 bytes long" +msgstr "" + +#: py/compile.c +msgid "LHS of keyword arg must be an id" +msgstr "" + +#: shared-module/displayio/Group.c +msgid "Layer already in a group." +msgstr "" + +#: shared-module/displayio/Group.c +msgid "Layer must be a Group or TileGrid subclass." +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "MISO pin init failed." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "MOSI pin init failed." +msgstr "" + +#: shared-module/displayio/Shape.c +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + +#: shared-bindings/canio/Message.c +msgid "Messages limited to 8 bytes" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Microphone startup delay must be in range 0.0 to 1.0" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "Missing MISO or MOSI Pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d reads pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d waits based on pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_out_pin. Instruction %d writes pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_set_pin. Instruction %d sets pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + +#: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c +msgid "Must be a %q subclass." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c +msgid "Must provide MISO or MOSI pin" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Must use a multiple of 6 rgb pins, not %d" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + +#: ports/esp32s2/common-hal/nvm/ByteArray.c +msgid "NVS Error" +msgstr "" + +#: py/qstr.c +msgid "Name too long" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "No CCCD for this Characteristic" +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "No DAC on chip" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "No DMA channel found" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "No DMA pacing timer found" +msgstr "" + +#: shared-module/adafruit_bus_device/I2CDevice.c +#, c-format +msgid "No I2C device at address: %x" +msgstr "" + +#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/SPI.c +msgid "No MISO Pin" +msgstr "" + +#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/SPI.c +msgid "No MOSI Pin" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "No RX pin" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "No TX pin" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +msgid "No available clocks" +msgstr "" + +#: shared-bindings/_bleio/PacketBuffer.c +msgid "No connection: length cannot be determined" +msgstr "" + +#: shared-bindings/board/__init__.c +msgid "No default %q bus" +msgstr "" + +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +msgid "No free GCLKs" +msgstr "" + +#: shared-bindings/os/__init__.c +msgid "No hardware random available" +msgstr "" + +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +msgid "No hardware support on clk pin" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +msgid "No hardware support on pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No in in program" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No in or out in program" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "No key was specified" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "No long integer support" +msgstr "" + +#: shared-module/usb_hid/__init__.c +#, c-format +msgid "No more than %d HID devices allowed" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "No network with that ssid" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No out in program" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/I2C.c +msgid "No pull up found on SDA or SCL; check your wiring" +msgstr "" + +#: shared-module/touchio/TouchIn.c +msgid "No pulldown on pin; 1Mohm recommended" +msgstr "" + +#: py/moduerrno.c +msgid "No space left on device" +msgstr "" + +#: py/moduerrno.c +msgid "No such file/directory" +msgstr "" + +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "No timer available" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Nordic system firmware failure assertion." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic system firmware out of memory" +msgstr "" + +#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c +msgid "Not a valid IP string" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "Not connected" +msgstr "" + +#: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c +#: shared-bindings/audiopwmio/PWMAudioOut.c +msgid "Not playing" +msgstr "" + +#: shared-bindings/_bleio/__init__.c +msgid "Not settable" +msgstr "" + +#: shared-bindings/util.c +msgid "" +"Object has been deinitialized and can no longer be used. Create a new object." +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c +msgid "Odd parity is not supported" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c +msgid "Only 8 or 16 bit mono with " +msgstr "" + +#: ports/esp32s2/common-hal/wifi/__init__.c +msgid "Only IPv4 addresses supported" +msgstr "" + +#: ports/esp32s2/common-hal/socketpool/SocketPool.c +msgid "Only IPv4 sockets supported" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only Windows format, uncompressed BMP supported: given header size is %d" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Only connectable advertisements can be directed" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + +#: shared-bindings/ipaddress/__init__.c +msgid "Only int or string supported for ip" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " +"%d bpp given" +msgstr "" + +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c +msgid "Only one alarm.time alarm can be set." +msgstr "" + +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + +#: ports/esp32s2/common-hal/socketpool/SocketPool.c +msgid "Out of sockets" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Out-buffer elements must be <= 4 bytes long" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "Output buffer must be at least %d bytes" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Oversample must be multiple of 8." +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "" +"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "" +"PWM frequency not writable when variable_frequency is False on construction." +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "PWM slice already in use" +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "PWM slice channel A already in use" +msgstr "" + +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c +#: ports/stm/common-hal/displayio/ParallelBus.c +msgid "ParallelBus not yet supported" +msgstr "" + +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + +#: py/moduerrno.c +msgid "Permission denied" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Pin count must be at least 1" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Pin count too large" +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogIn.c +#: ports/cxd56/common-hal/analogio/AnalogIn.c +#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c +#: ports/nrf/common-hal/analogio/AnalogIn.c +#: ports/raspberrypi/common-hal/analogio/AnalogIn.c +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Pin does not have ADC capabilities" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + +#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pin is input only" +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "Pin must be on PWM Channel B" +msgstr "" + +#: ports/atmel-samd/common-hal/countio/Counter.c +msgid "Pin must support hardware interrupts" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "" +"Pinout uses %d bytes per element, which consumes more than the ideal %d " +"bytes. If this cannot be avoided, pass allow_inefficient=True to the " +"constructor" +msgstr "" + +#: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Pins must share PWM slice" +msgstr "" + +#: py/builtinhelp.c +msgid "Plus any modules on the filesystem\n" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "Polygon needs at least 3 points" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Prefix buffer must be on the heap" +msgstr "" + +#: main.c +msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" +msgstr "" + +#: main.c +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Program does IN without loading ISR" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Program does OUT without loading OSR" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program must contain at least one 16-bit instruction." +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program size invalid" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program too large" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pull not used when direction is output." +msgstr "" + +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "RAISE mode is not implemented" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG DeInit Error" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG Init Error" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c +msgid "RS485 Not yet supported on this device" +msgstr "" + +#: ports/esp32s2/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "RS485 inversion specified when not in RS485 mode" +msgstr "" + +#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c +#: ports/raspberrypi/common-hal/rtc/RTC.c +msgid "RTC calibration is not supported on this board" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c shared-bindings/time/__init__.c +msgid "RTC is not supported on this board" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "RTS/CTS/RS485 Not yet supported on this device" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "Random number generation error" +msgstr "" + +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Read-only" +msgstr "" + +#: extmod/vfs_fat.c py/moduerrno.c +msgid "Read-only filesystem" +msgstr "" + +#: shared-module/displayio/Bitmap.c +msgid "Read-only object" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + +#: shared-bindings/displayio/EPaperDisplay.c +msgid "Refresh too soon" +msgstr "" + +#: shared-bindings/canio/RemoteTransmissionRequest.c +msgid "RemoteTransmissionRequests limited to 8 bytes" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Requested AES mode is unsupported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Right channel unsupported" +msgstr "" + +#: shared-bindings/_pew/PewPew.c +msgid "Row entry must be digitalio.DigitalInOut" +msgstr "" + +#: main.c +msgid "Running in safe mode! Not running saved code.\n" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "SD card CSD format not supported" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Init Error" +msgstr "" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Re-initialization error" +msgstr "" + +#: ports/esp32s2/common-hal/busio/SPI.c +msgid "SPI configuration failed" +msgstr "" + +#: ports/raspberrypi/common-hal/busio/SPI.c +msgid "SPI peripheral in use" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Sample rate must be positive" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#, c-format +msgid "Sample rate too high. It must be less than %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Scan already in progess. Stop with stop_scan." +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Serializer in use" +msgstr "" + +#: shared-bindings/ssl/SSLContext.c +msgid "Server side context cannot have hostname" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Set pin count must be between 1 and 5" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Side set pin count must be between 1 and 5" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Size not supported" +msgstr "" + +#: ports/raspberrypi/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Slice and value different lengths." +msgstr "" + +#: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/TileGrid.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Slices not supported" +msgstr "" + +#: ports/esp32s2/common-hal/socketpool/SocketPool.c +msgid "SocketPool can only be used with wifi.radio" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Source and destination buffers must be the same length" +msgstr "" + +#: extmod/modure.c +msgid "Splitting with sub-captures" +msgstr "" + +#: shared-bindings/supervisor/__init__.c +msgid "Stack size must be at least 256" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Stereo left must be on PWM channel A" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Stereo right must be on PWM channel B" +msgstr "" + +#: shared-bindings/multiterminal/__init__.c +msgid "Stream missing readinto() or write() method." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Supply at least one UART pin" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "Supply one of monotonic_time or epoch_time" +msgstr "" + +#: shared-bindings/gnss/GNSS.c +msgid "System entry must be gnss.SatelliteSystem" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Temperature read timed out" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The CircuitPython heap was corrupted because the stack was too small.\n" +"Increase the stack size if you know how. If not:" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The `microcontroller` module was used to boot into safe mode. Press reset to " +"exit safe mode." +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The microcontroller's power dipped. Make sure your power supply provides\n" +"enough power for the whole circuit and press reset (after ejecting " +"CIRCUITPY)." +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's bits_per_sample does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's channel count does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's sample rate does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's signedness does not match the mixer's" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile height must exactly divide bitmap height" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c +msgid "Tile index out of bounds" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile value out of bounds" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile width must exactly divide bitmap width" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "Time is in the past." +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +#, c-format +msgid "Timeout is too long: Maximum timeout length is %d seconds" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "To exit, please reset the board without " +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +msgid "Too many channels in sample." +msgstr "" + +#: shared-module/displayio/__init__.c +msgid "Too many display busses" +msgstr "" + +#: shared-module/displayio/__init__.c +msgid "Too many displays" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Total data to write is larger than %q" +msgstr "" + +#: ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.c +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + +#: py/obj.c +msgid "Traceback (most recent call last):\n" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "Tuple or struct_time argument required" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Buffer allocation error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART De-init error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Init Error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Re-init error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART write error" +msgstr "" + +#: shared-module/usb_hid/Device.c +msgid "USB busy" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "USB devices need more endpoints than are available." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "USB devices specify too many interface names." +msgstr "" + +#: shared-module/usb_hid/Device.c +msgid "USB error" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID integer value must be 0-0xffff" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID value is not str, int or byte buffer" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Unable to allocate buffers for signed conversion" +msgstr "" + +#: ports/esp32s2/common-hal/busio/I2C.c +msgid "Unable to create lock" +msgstr "" + +#: shared-module/displayio/I2CDisplay.c +#, c-format +msgid "Unable to find I2C Display at %x" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Unable to find free GCLK" +msgstr "" + +#: py/parse.c +msgid "Unable to init parser" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Unable to read color palette data" +msgstr "" + +#: shared-bindings/nvm/ByteArray.c +msgid "Unable to write to nvm." +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c +msgid "Unable to write to sleep_memory." +msgstr "" + +#: ports/nrf/common-hal/_bleio/UUID.c +msgid "Unexpected nrfx uuid type" +msgstr "" + +#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#, c-format +msgid "Unhandled ESP TLS error %d %d %x %d" +msgstr "" + +#: shared-bindings/wifi/Radio.c +#, c-format +msgid "Unknown failure %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown gatt error: 0x%04x" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown security error: 0x%04x" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown system firmware error: %04x" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +#, c-format +msgid "Unmatched number of items on RHS (expected %d, got %d)." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "" +"Unspecified issue. Can be that the pairing prompt on the other device was " +"declined or ignored." +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c +#: ports/esp32s2/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c +msgid "Unsupported baudrate" +msgstr "" + +#: shared-module/displayio/display_core.c +msgid "Unsupported display bus type" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Unsupported format" +msgstr "" + +#: py/moduerrno.c +msgid "Unsupported operation" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Unsupported pull value." +msgstr "" + +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length != required fixed length" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length > max_length" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Voltage read timed out" +msgstr "" + +#: main.c +msgid "WARNING: Your code filename has two extensions\n" +msgstr "" + +#: ports/nrf/common-hal/watchdog/WatchDogTimer.c +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer is not currently running" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.timeout must be greater than 0" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Watchdog timer expired." +msgstr "" + +#: py/builtinhelp.c +#, c-format +msgid "" +"Welcome to Adafruit CircuitPython %s!\n" +"\n" +"Please visit learn.adafruit.com/category/circuitpython for project guides.\n" +"\n" +"To list built-in modules please do `help(\"modules\")`.\n" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "WiFi password must be between 8 and 63 characters" +msgstr "" + +#: main.c +msgid "Woken up by alarm.\n" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Writes not supported on Characteristic" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You requested starting safe mode by " +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None" +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None, not '%q'" +msgstr "" + +#: py/objobject.c +msgid "__new__ arg must be a user-type" +msgstr "" + +#: extmod/modubinascii.c extmod/moduhashlib.c py/objarray.c +msgid "a bytes-like object is required" +msgstr "" + +#: lib/embed/abort_.c +msgid "abort() called" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "address out of bounds" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "addresses is empty" +msgstr "" + +#: py/compile.c +msgid "annotation must be an identifier" +msgstr "" + +#: py/modbuiltins.c +msgid "arg is an empty sequence" +msgstr "" + +#: py/objobject.c +msgid "arg must be user-type" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "argsort is not implemented for flattened arrays" +msgstr "" + +#: py/runtime.c shared-bindings/supervisor/__init__.c +msgid "argument has wrong type" +msgstr "" + +#: py/compile.c +msgid "argument name reused" +msgstr "" + +#: py/argcheck.c shared-bindings/_stage/__init__.c +#: shared-bindings/digitalio/DigitalInOut.c +msgid "argument num/types mismatch" +msgstr "" + +#: py/runtime.c +msgid "argument should be a '%q' not a '%q'" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c +msgid "arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "array and index length must be equal" +msgstr "" + +#: py/objarray.c shared-bindings/alarm/SleepMemory.c +#: shared-bindings/nvm/ByteArray.c +msgid "array/bytes required on right side" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "attempt to get (arg)min/(arg)max of empty sequence" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "attempt to get argmin/argmax of an empty sequence" +msgstr "" + +#: py/objstr.c +msgid "attributes not supported yet" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "axis is out of bounds" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c +msgid "axis must be None, or an integer" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "axis too long" +msgstr "" + +#: py/builtinevex.c +msgid "bad compile mode" +msgstr "" + +#: py/objstr.c +msgid "bad conversion specifier" +msgstr "" + +#: py/objstr.c +msgid "bad format string" +msgstr "" + +#: py/binary.c py/objarray.c +msgid "bad typecode" +msgstr "" + +#: py/emitnative.c +msgid "binary op %q not implemented" +msgstr "" + +#: extmod/modurandom.c +msgid "bits must be 32 or less" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "bits must be in range 5 to 9" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "bits_per_sample must be 8 or 16" +msgstr "" + +#: py/emitinlinethumb.c +msgid "branch not in range" +msgstr "" + +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +msgid "buffer is smaller than requested size" +msgstr "" + +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +msgid "buffer size must be a multiple of element size" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "buffer size must match format" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "buffer slices must be of equal length" +msgstr "" + +#: py/modstruct.c shared-bindings/struct/__init__.c +#: shared-module/struct/__init__.c +msgid "buffer too small" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "buffer too small for requested bytes" +msgstr "" + +#: shared-bindings/_pew/PewPew.c +msgid "buttons must be digitalio.DigitalInOut" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +msgid "byteorder is not a string" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c +msgid "bytes > 8 bits not supported" +msgstr "" + +#: py/objarray.c +msgid "bytes length not a multiple of item size" +msgstr "" + +#: py/objstr.c +msgid "bytes value out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration is out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c +msgid "calibration is read only" +msgstr "" + +#: ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration value out of range +/-127" +msgstr "" + +#: py/emitinlinethumb.c +msgid "can only have up to 4 parameters to Thumb assembly" +msgstr "" + +#: py/emitinlinextensa.c +msgid "can only have up to 4 parameters to Xtensa assembly" +msgstr "" + +#: py/objtype.c +msgid "can't add special method to already-subclassed class" +msgstr "" + +#: py/compile.c +msgid "can't assign to expression" +msgstr "" + +#: extmod/moduasyncio.c +msgid "can't cancel self" +msgstr "" + +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/adafruit_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" + +#: py/runtime.c +msgid "can't convert %q to int" +msgstr "" + +#: py/obj.c +#, c-format +msgid "can't convert %s to complex" +msgstr "" + +#: py/objstr.c +msgid "can't convert '%q' object to %q implicitly" +msgstr "" + +#: py/obj.c +msgid "can't convert to %q" +msgstr "" + +#: py/obj.c +msgid "can't convert to complex" +msgstr "" + +#: py/runtime.c +msgid "can't convert to int" +msgstr "" + +#: py/objstr.c +msgid "can't convert to str implicitly" +msgstr "" + +#: py/compile.c +msgid "can't declare nonlocal in outer code" +msgstr "" + +#: py/compile.c +msgid "can't delete expression" +msgstr "" + +#: py/emitnative.c +msgid "can't do binary op between '%q' and '%q'" +msgstr "" + +#: py/objcomplex.c +msgid "can't do truncated division of a complex number" +msgstr "" + +#: py/compile.c +msgid "can't have multiple **x" +msgstr "" + +#: py/compile.c +msgid "can't have multiple *x" +msgstr "" + +#: py/emitnative.c +msgid "can't implicitly convert '%q' to 'bool'" +msgstr "" + +#: py/emitnative.c +msgid "can't load from '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't load with '%q' index" +msgstr "" + +#: py/objgenerator.c +msgid "can't send non-None value to a just-started generator" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "can't set 512 block size" +msgstr "" + +#: py/objnamedtuple.c +msgid "can't set attribute" +msgstr "" + +#: py/emitnative.c +msgid "can't store '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store to '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store with '%q' index" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from automatic field numbering to manual field specification" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from manual field specification to automatic field numbering" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot assign new shape" +msgstr "" + +#: extmod/ulab/code/ndarray_operators.c +msgid "cannot cast output with casting rule" +msgstr "" + +#: py/objtype.c +msgid "cannot create '%q' instances" +msgstr "" + +#: py/objtype.c +msgid "cannot create instance" +msgstr "" + +#: py/runtime.c +msgid "cannot import name %q" +msgstr "" + +#: py/builtinimport.c +msgid "cannot perform relative import" +msgstr "" + +#: extmod/moductypes.c +msgid "cannot unambiguously get sizeof scalar" +msgstr "" + +#: py/emitnative.c +msgid "casting" +msgstr "" + +#: shared-bindings/_stage/Text.c +msgid "chars buffer too small" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(0x110000)" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(256)" +msgstr "" + +#: shared-module/vectorio/Circle.c +msgid "circle can only be registered in one parent" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "clip point must be (x,y) tuple" +msgstr "" + +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a buffer, tuple, list, or int" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a bytearray or array of type 'b' or 'B'" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color must be between 0x000000 and 0xffffff" +msgstr "" + +#: shared-bindings/displayio/ColorConverter.c +msgid "color should be an int" +msgstr "" + +#: py/emitnative.c +msgid "comparison of int and uint" +msgstr "" + +#: py/objcomplex.c +msgid "complex division by zero" +msgstr "" + +#: py/objfloat.c py/parsenum.c +msgid "complex values not supported" +msgstr "" + +#: extmod/moduzlib.c +msgid "compression header" +msgstr "" + +#: py/parse.c +msgid "constant must be an integer" +msgstr "" + +#: py/emitnative.c +msgid "conversion to object" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "couldn't determine SD card version" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "cross is defined for 1D arrays of length 3" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "data must be iterable" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "data must be of equal length" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "data pin #%d in use" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + +#: py/parsenum.c +msgid "decimal numbers not supported" +msgstr "" + +#: py/compile.c +msgid "default 'except' must be last" +msgstr "" + +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "" +"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination buffer must be an array of type 'H' for bit_depth = 16" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination_length must be an int >= 0" +msgstr "" + +#: py/objdict.c +msgid "dict update sequence has wrong length" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "differentiation order out of range" +msgstr "" + +#: extmod/ulab/code/numpy/transform.c +msgid "dimensions do not match" +msgstr "" + +#: py/emitnative.c +msgid "div/mod not implemented for uint" +msgstr "" + +#: py/objfloat.c py/objint_mpz.c +msgid "divide by zero" +msgstr "" + +#: py/modmath.c py/objint_longlong.c py/runtime.c +#: shared-bindings/math/__init__.c +msgid "division by zero" +msgstr "" + +#: py/objdeque.c +msgid "empty" +msgstr "" + +#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +msgid "empty heap" +msgstr "" + +#: py/objstr.c +msgid "empty separator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "empty sequence" +msgstr "" + +#: py/objstr.c +msgid "end of format while looking for conversion specifier" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "end_x should be an int" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "epoch_time not supported on this board" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c +#, c-format +msgid "error = 0x%08lX" +msgstr "" + +#: py/runtime.c +msgid "exceptions must derive from BaseException" +msgstr "" + +#: shared-bindings/canio/CAN.c +msgid "expected '%q' but got '%q'" +msgstr "" + +#: shared-bindings/canio/CAN.c +msgid "expected '%q' or '%q' but got '%q'" +msgstr "" + +#: py/objstr.c +msgid "expected ':' after format specifier" +msgstr "" + +#: py/obj.c +msgid "expected tuple/list" +msgstr "" + +#: py/modthread.c +msgid "expecting a dict for keyword args" +msgstr "" + +#: py/compile.c +msgid "expecting an assembler instruction" +msgstr "" + +#: py/compile.c +msgid "expecting just a value for set" +msgstr "" + +#: py/compile.c +msgid "expecting key:value for dict" +msgstr "" + +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + +#: py/argcheck.c +msgid "extra keyword arguments given" +msgstr "" + +#: py/argcheck.c +msgid "extra positional arguments given" +msgstr "" + +#: py/parse.c +msgid "f-string expression part cannot include a '#'" +msgstr "" + +#: py/parse.c +msgid "f-string expression part cannot include a backslash" +msgstr "" + +#: py/parse.c +msgid "f-string: empty expression not allowed" +msgstr "" + +#: py/parse.c +msgid "f-string: expecting '}'" +msgstr "" + +#: py/parse.c +msgid "f-string: single '}' is not allowed" +msgstr "" + +#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c +#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c +msgid "file must be a file opened in byte mode" +msgstr "" + +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + +#: shared-bindings/storage/__init__.c +msgid "filesystem must provide mount method" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "first argument must be a callable" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "first argument must be a function" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "first argument must be a tuple of ndarrays" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "first argument must be an ndarray" +msgstr "" + +#: py/objtype.c +msgid "first argument to super() must be type" +msgstr "" + +#: extmod/ulab/code/scipy/linalg/linalg.c +msgid "first two arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + +#: py/objint.c +msgid "float too big" +msgstr "" + +#: py/nativeglue.c +msgid "float unsupported" +msgstr "" + +#: shared-bindings/_stage/Text.c +msgid "font must be 2048 bytes long" +msgstr "" + +#: py/objstr.c +msgid "format requires a dict" +msgstr "" + +#: py/objdeque.c +msgid "full" +msgstr "" + +#: py/argcheck.c +msgid "function doesn't take keyword arguments" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function expected at most %d arguments, got %d" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "function got multiple values for argument '%q'" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "function has the same sign at the ends of interval" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "function is defined for ndarrays only" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function missing %d required positional arguments" +msgstr "" + +#: py/bc.c +msgid "function missing keyword-only argument" +msgstr "" + +#: py/bc.c +msgid "function missing required keyword argument '%q'" +msgstr "" + +#: py/bc.c +#, c-format +msgid "function missing required positional argument #%d" +msgstr "" + +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c +#, c-format +msgid "function takes %d positional arguments but %d were given" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "function takes exactly 9 arguments" +msgstr "" + +#: py/objgenerator.c +msgid "generator already executing" +msgstr "" + +#: py/objgenerator.c +msgid "generator ignored GeneratorExit" +msgstr "" + +#: py/objgenerator.c py/runtime.c +msgid "generator raised StopIteration" +msgstr "" + +#: shared-bindings/_stage/Layer.c +msgid "graphic must be 2048 bytes long" +msgstr "" + +#: extmod/moduhashlib.c +msgid "hash is final" +msgstr "" + +#: extmod/moduheapq.c +msgid "heap must be a list" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as global" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as nonlocal" +msgstr "" + +#: py/compile.c +msgid "import * not at module level" +msgstr "" + +#: py/persistentcode.c +msgid "incompatible native .mpy architecture" +msgstr "" + +#: py/objstr.c +msgid "incomplete format" +msgstr "" + +#: py/objstr.c +msgid "incomplete format key" +msgstr "" + +#: extmod/modubinascii.c +msgid "incorrect padding" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c +#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c +msgid "index out of range" +msgstr "" + +#: py/obj.c +msgid "indices must be integers" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "initial values must be iterable" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c +msgid "initial_value length is wrong" +msgstr "" + +#: py/compile.c +msgid "inline assembler must be a function" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "input and output shapes are not compatible" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "input argument must be an integer, a tuple, or a list" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "input arrays are not compatible" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/scipy/linalg/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c +msgid "input must be a dense ndarray" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "input must be a tensor of rank 2" +msgstr "" + +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +msgid "input must be an ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "input must be one-dimensional" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "input vectors must be of equal length" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "inputs are not iterable" +msgstr "" + +#: py/parsenum.c +msgid "int() arg 2 must be >= 2 and <= 36" +msgstr "" + +#: py/objstr.c +msgid "integer required" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "interp is defined for 1D iterables of equal length" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +#, c-format +msgid "interval must be in range %s-%s" +msgstr "" + +#: py/compile.c +msgid "invalid architecture" +msgstr "" + +#: lib/netutils/netutils.c +msgid "invalid arguments" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + +#: extmod/modframebuf.c +msgid "invalid format" +msgstr "" + +#: py/objstr.c +msgid "invalid format specifier" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + +#: py/compile.c +msgid "invalid micropython decorator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "invalid step" +msgstr "" + +#: py/compile.c py/parse.c +msgid "invalid syntax" +msgstr "" + +#: py/parsenum.c +msgid "invalid syntax for integer" +msgstr "" + +#: py/parsenum.c +#, c-format +msgid "invalid syntax for integer with base %d" +msgstr "" + +#: py/parsenum.c +msgid "invalid syntax for number" +msgstr "" + +#: py/objexcept.c shared-bindings/traceback/__init__.c +msgid "invalid traceback" +msgstr "" + +#: py/objtype.c +msgid "issubclass() arg 1 must be a class" +msgstr "" + +#: py/objtype.c +msgid "issubclass() arg 2 must be a class or a tuple of classes" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "iterations did not converge" +msgstr "" + +#: py/objstr.c +msgid "join expects a list of str/bytes objects consistent with self object" +msgstr "" + +#: py/argcheck.c +msgid "keyword argument(s) not yet implemented - use normal args instead" +msgstr "" + +#: py/bc.c +msgid "keywords must be strings" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +msgid "label '%q' not defined" +msgstr "" + +#: py/compile.c +msgid "label redefined" +msgstr "" + +#: py/stream.c +msgid "length argument not allowed for this type" +msgstr "" + +#: shared-bindings/audiomixer/MixerVoice.c +msgid "level must be between 0 and 1" +msgstr "" + +#: py/objarray.c +msgid "lhs and rhs should be compatible" +msgstr "" + +#: py/emitnative.c +msgid "local '%q' has type '%q' but source is '%q'" +msgstr "" + +#: py/emitnative.c +msgid "local '%q' used before type known" +msgstr "" + +#: py/vm.c +msgid "local variable referenced before assignment" +msgstr "" + +#: py/objint.c +msgid "long int not supported in this build" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + +#: py/parse.c +msgid "malformed f-string" +msgstr "" + +#: shared-bindings/_stage/Layer.c +msgid "map buffer too small" +msgstr "" + +#: py/modmath.c shared-bindings/math/__init__.c +msgid "math domain error" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix is not positive definite" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +#, c-format +msgid "max_length must be 0-%d when fixed_length is %s" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c +msgid "max_length must be >= 0" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "maximum number of dimensions is 4" +msgstr "" + +#: py/runtime.c +msgid "maximum recursion depth exceeded" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "maxiter should be > 0" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "memory allocation failed, allocating %u bytes" +msgstr "" + +#: py/runtime.c +msgid "memory allocation failed, heap is locked" +msgstr "" + +#: py/objarray.c +msgid "memoryview: length is not a multiple of itemsize" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "mode must be complete, or reduced" +msgstr "" + +#: py/builtinimport.c +msgid "module not found" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + +#: py/compile.c +msgid "multiple *x in assignment" +msgstr "" + +#: py/objtype.c +msgid "multiple bases have instance lay-out conflict" +msgstr "" + +#: py/objtype.c +msgid "multiple inheritance not supported" +msgstr "" + +#: py/emitnative.c +msgid "must raise an object" +msgstr "" + +#: py/modbuiltins.c +msgid "must use keyword argument for key function" +msgstr "" + +#: py/runtime.c +msgid "name '%q' is not defined" +msgstr "" + +#: py/runtime.c +msgid "name not defined" +msgstr "" + +#: py/asmthumb.c +msgid "native method too big" +msgstr "" + +#: py/emitnative.c +msgid "native yield" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "need more than %d values to unpack" +msgstr "" + +#: py/modmath.c +msgid "negative factorial" +msgstr "" + +#: py/objint_longlong.c py/objint_mpz.c py/runtime.c +msgid "negative power with no float support" +msgstr "" + +#: py/objint_mpz.c py/runtime.c +msgid "negative shift count" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "no SD card" +msgstr "" + +#: py/vm.c +msgid "no active exception to reraise" +msgstr "" + +#: py/compile.c +msgid "no binding for nonlocal found" +msgstr "" + +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + +#: extmod/modurandom.c +msgid "no default seed" +msgstr "" + +#: py/builtinimport.c +msgid "no module named '%q'" +msgstr "" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/displayio/ParallelBus.c +msgid "no reset pin available" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "no response from SD card" +msgstr "" + +#: py/objobject.c py/runtime.c +msgid "no such attribute" +msgstr "" + +#: shared-bindings/usb_hid/__init__.c +msgid "non-Device in %q" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Connection.c +msgid "non-UUID found in service_uuids_whitelist" +msgstr "" + +#: py/compile.c +msgid "non-default argument follows default argument" +msgstr "" + +#: extmod/modubinascii.c +msgid "non-hex digit found" +msgstr "" + +#: py/compile.c +msgid "non-keyword arg after */**" +msgstr "" + +#: py/compile.c +msgid "non-keyword arg after keyword arg" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "not a 128-bit UUID" +msgstr "" + +#: py/objstr.c +msgid "not all arguments converted during string formatting" +msgstr "" + +#: py/objstr.c +msgid "not enough arguments for format string" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "number of points must be at least 2" +msgstr "" + +#: py/builtinhelp.c +msgid "object " +msgstr "" + +#: py/obj.c +#, c-format +msgid "object '%s' isn't a tuple or list" +msgstr "" + +#: py/obj.c +msgid "object doesn't support item assignment" +msgstr "" + +#: py/obj.c +msgid "object doesn't support item deletion" +msgstr "" + +#: py/obj.c +msgid "object has no len" +msgstr "" + +#: py/obj.c +msgid "object isn't subscriptable" +msgstr "" + +#: py/runtime.c +msgid "object not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "object not callable" +msgstr "" + +#: py/sequence.c shared-bindings/displayio/Group.c +msgid "object not in sequence" +msgstr "" + +#: py/runtime.c +msgid "object not iterable" +msgstr "" + +#: py/obj.c +#, c-format +msgid "object of type '%s' has no len()" +msgstr "" + +#: py/obj.c +msgid "object with buffer protocol required" +msgstr "" + +#: extmod/modubinascii.c +msgid "odd-length string" +msgstr "" + +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +msgid "offset is too large" +msgstr "" + +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "offset must be non-negative and no greater than buffer length" +msgstr "" + +#: py/objstr.c py/objstrunicode.c +msgid "offset out of bounds" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only bit_depth=16 is supported" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only sample_rate=16000 is supported" +msgstr "" + +#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "only slices with step=1 (aka None) are supported" +msgstr "" + +#: py/vm.c +msgid "opcode" +msgstr "" + +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare.c +#: extmod/ulab/code/numpy/vector.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "operation is defined for 2D arrays only" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "operation is defined for ndarrays only" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is implemented for 1D Boolean arrays only" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + +#: py/modbuiltins.c +msgid "ord expects a character" +msgstr "" + +#: py/modbuiltins.c +#, c-format +msgid "ord() expected a character, but string of length %d found" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "out of range of source" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "out of range of target" +msgstr "" + +#: py/objint_mpz.c +msgid "overflow converting long int to machine word" +msgstr "" + +#: py/modstruct.c +#, c-format +msgid "pack expected %d items for packing (got %d)" +msgstr "" + +#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c +msgid "palette must be 32 bytes long" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "palette_index should be an int" +msgstr "" + +#: py/emitinlinextensa.c +msgid "parameters must be registers in sequence a2 to a5" +msgstr "" + +#: py/emitinlinethumb.c +msgid "parameters must be registers in sequence r0 to r3" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "pixel coordinates out of bounds" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "pixel value requires too many bits" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "polygon can only be registered in one parent" +msgstr "" + +#: ports/esp32s2/common-hal/pulseio/PulseIn.c +msgid "pop from an empty PulseIn" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "port must be >= 0" +msgstr "" + +#: py/objint_mpz.c +msgid "pow() 3rd argument cannot be 0" +msgstr "" + +#: py/objint_mpz.c +msgid "pow() with 3 arguments requires integers" +msgstr "" + +#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h +#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +msgid "pressing boot button at start up.\n" +msgstr "" + +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "pressing both buttons at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "pressing the left button at start up\n" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "pull_threshold must be between 1 and 32" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "push_threshold must be between 1 and 32" +msgstr "" + +#: extmod/modutimeq.c +msgid "queue overflow" +msgstr "" + +#: py/parse.c +msgid "raw f-strings are not implemented" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + +#: py/builtinimport.c +msgid "relative import" +msgstr "" + +#: py/obj.c +#, c-format +msgid "requested length %d but object has length %d" +msgstr "" + +#: extmod/ulab/code/ndarray_operators.c +msgid "results cannot be cast to specified type" +msgstr "" + +#: py/compile.c +msgid "return annotation must be an identifier" +msgstr "" + +#: py/emitnative.c +msgid "return expected '%q' but got '%q'" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] duplicates another pin assignment" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] is not on the same port as clock" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "roll argument must be an ndarray" +msgstr "" + +#: py/objstr.c +msgid "rsplit(None,n)" +msgstr "" + +#: shared-bindings/audiocore/RawSample.c +msgid "" +"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " +"'B'" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c +msgid "sampling rate out of range" +msgstr "" + +#: py/modmicropython.c +msgid "schedule queue full" +msgstr "" + +#: lib/utils/pyexec.c py/builtinimport.c +msgid "script compilation not supported" +msgstr "" + +#: py/nativeglue.c +msgid "set unsupported" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "shape must be a tuple" +msgstr "" + +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + +#: py/objstr.c +msgid "sign not allowed in string format specifier" +msgstr "" + +#: py/objstr.c +msgid "sign not allowed with integer format specifier 'c'" +msgstr "" + +#: py/objstr.c +msgid "single '}' encountered in format string" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "size is defined for ndarrays only" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "sleep length must be non-negative" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + +#: py/objslice.c +msgid "slice step cannot be zero" +msgstr "" + +#: py/nativeglue.c +msgid "slice unsupported" +msgstr "" + +#: py/objint.c py/sequence.c +msgid "small int overflow" +msgstr "" + +#: main.c +msgid "soft reboot\n" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sos array must be of shape (n_section, 6)" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sos[:, 3] should be all ones" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sosfilt requires iterable arguments" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "source palette too large" +msgstr "" + +#: py/objstr.c +msgid "start/end indices" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "step must be non-zero" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "stop must be 1 or 2" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "stop not reachable from start" +msgstr "" + +#: py/stream.c shared-bindings/getpass/__init__.c +msgid "stream operation not supported" +msgstr "" + +#: py/objstrunicode.c +msgid "string indices must be integers, not %q" +msgstr "" + +#: py/stream.c +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: can't index" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: index out of range" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: no fields" +msgstr "" + +#: py/objarray.c py/objstr.c +msgid "substring not found" +msgstr "" + +#: py/compile.c +msgid "super() can't find self" +msgstr "" + +#: extmod/modujson.c +msgid "syntax error in JSON" +msgstr "" + +#: extmod/moductypes.c +msgid "syntax error in uctypes descriptor" +msgstr "" + +#: shared-bindings/touchio/TouchIn.c +msgid "threshold must be in the range 0-65536" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "tile must be greater than zero" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "time.struct_time() takes a 9-sequence" +msgstr "" + +#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/nrf/common-hal/watchdog/WatchDogTimer.c +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "timeout duration exceeded the maximum supported value" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "timeout must be 0.0-100.0 seconds" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "timeout must be >= 0.0" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v1 card" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v2 card" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "timestamp out of range for platform time_t" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "tobytes can be invoked for dense arrays only" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "too many arguments provided with the given format" +msgstr "" + +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + +#: py/asmthumb.c +msgid "too many locals for native method" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "too many values to unpack (expected %d)" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "trapz is defined for 1D arrays of equal length" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "trapz is defined for 1D iterables" +msgstr "" + +#: py/obj.c +msgid "tuple/list has wrong length" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c +msgid "tx and rx cannot both be None" +msgstr "" + +#: py/objtype.c +msgid "type '%q' is not an acceptable base type" +msgstr "" + +#: py/objtype.c +msgid "type is not an acceptable base type" +msgstr "" + +#: py/runtime.c +msgid "type object '%q' has no attribute '%q'" +msgstr "" + +#: py/objgenerator.c +msgid "type object 'generator' has no attribute '__await__'" +msgstr "" + +#: py/objtype.c +msgid "type takes 1 or 3 arguments" +msgstr "" + +#: py/objint_longlong.c +msgid "ulonglong too large" +msgstr "" + +#: py/emitnative.c +msgid "unary op %q not implemented" +msgstr "" + +#: py/parse.c +msgid "unexpected indent" +msgstr "" + +#: py/bc.c +msgid "unexpected keyword argument" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "unexpected keyword argument '%q'" +msgstr "" + +#: py/lexer.c +msgid "unicode name escapes" +msgstr "" + +#: py/parse.c +msgid "unindent does not match any outer indentation level" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "unknown conversion specifier %c" +msgstr "" + +#: py/objstr.c +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" + +#: py/compile.c +msgid "unknown type" +msgstr "" + +#: py/compile.c +msgid "unknown type '%q'" +msgstr "" + +#: py/objstr.c +msgid "unmatched '{' in format" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "unreadable attribute" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c +msgid "unsupported %q type" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "unsupported Thumb instruction '%s' with %d arguments" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "unsupported Xtensa instruction '%s' with %d arguments" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "unsupported format character '%c' (0x%x) at index %d" +msgstr "" + +#: py/runtime.c +msgid "unsupported type for %q: '%q'" +msgstr "" + +#: py/runtime.c +msgid "unsupported type for operator" +msgstr "" + +#: py/runtime.c +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" + +#: py/objint.c +#, c-format +msgid "value must fit in %d byte(s)" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "value_count must be > 0" +msgstr "" + +#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +msgid "watchdog not initialized" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "watchdog timeout must be greater than 0" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "width must be from 2 to 8 (inclusive), not %d" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "width must be greater than zero" +msgstr "" + +#: ports/esp32s2/common-hal/wifi/Radio.c +msgid "wifi is not enabled" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "window must be <= interval" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "wrong axis index" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "wrong axis specified" +msgstr "" + +#: extmod/ulab/code/numpy/compare.c extmod/ulab/code/numpy/vector.c +msgid "wrong input type" +msgstr "" + +#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +msgid "wrong number of arguments" +msgstr "" + +#: py/runtime.c +msgid "wrong number of values to unpack" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "wrong output type" +msgstr "" + +#: shared-module/displayio/Shape.c +msgid "x value out of bounds" +msgstr "" + +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "y should be an int" +msgstr "" + +#: shared-module/displayio/Shape.c +msgid "y value out of bounds" +msgstr "" + +#: py/objrange.c +msgid "zero step" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be an ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be of float type" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be of shape (n_section, 2)" +msgstr "" From 6f783060c296ad9787d4295d0d03c8c4c7771d44 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 15 Aug 2021 19:11:15 -0500 Subject: [PATCH 172/418] ignore points outside of bitmap --- shared-module/bitmaptools/__init__.c | 69 +++++++++++++++++----------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 43bb53a500..54489357ef 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -301,37 +301,50 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, value); // add all 4 surrounding points to the list to check - mp_obj_t above_point[] = { - tuple_items[0], - MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1]) - 1) - }; - mp_obj_list_append( - fill_area, - mp_obj_new_tuple(2, above_point)); - mp_obj_t left_point[] = { - MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0]) - 1), - tuple_items[1] - }; - mp_obj_list_append( - fill_area, - mp_obj_new_tuple(2, left_point)); + // ignore points outside of the bitmap + if (mp_obj_int_get_checked(tuple_items[1]) - 1 >= 0) { + mp_obj_t above_point[] = { + tuple_items[0], + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1]) - 1) + }; + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, above_point)); + } - mp_obj_t right_point[] = { - MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0]) + 1), - tuple_items[1] - }; - mp_obj_list_append( - fill_area, - mp_obj_new_tuple(2, right_point)); + // ignore points outside of the bitmap + if (mp_obj_int_get_checked(tuple_items[0]) - 1 >= 0) { + mp_obj_t left_point[] = { + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0]) - 1), + tuple_items[1] + }; + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, left_point)); + } - mp_obj_t below_point[] = { - tuple_items[0], - MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1]) + 1) - }; - mp_obj_list_append( - fill_area, - mp_obj_new_tuple(2, below_point)); + // ignore points outside of the bitmap + if (mp_obj_int_get_checked(tuple_items[0]) + 1 < destination->width) { + mp_obj_t right_point[] = { + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[0]) + 1), + tuple_items[1] + }; + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, right_point)); + } + + // ignore points outside of the bitmap + if (mp_obj_int_get_checked(tuple_items[1]) + 1 < destination->height) { + mp_obj_t below_point[] = { + tuple_items[0], + MP_OBJ_NEW_SMALL_INT(mp_obj_int_get_checked(tuple_items[1]) + 1) + }; + mp_obj_list_append( + fill_area, + mp_obj_new_tuple(2, below_point)); + } mp_obj_list_get(fill_area, &list_length, &fill_points); } From 029150ac3b075a8e936e6c722c6f63cf80594e2a Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 15 Aug 2021 19:46:20 -0500 Subject: [PATCH 173/418] validate initial point is in-bounds --- shared-bindings/bitmaptools/__init__.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index e566168879..761a94c4c9 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -345,6 +345,12 @@ STATIC mp_obj_t bitmaptools_obj_boundary_fill(size_t n_args, const mp_obj_t *pos int16_t x = args[ARG_x].u_int; int16_t y = args[ARG_y].u_int; + if (x < 0 || x >= destination->width) { + mp_raise_ValueError(translate("out of range of target")); + } + if (y < 0 || y >= destination->height) { + mp_raise_ValueError(translate("out of range of target")); + } common_hal_bitmaptools_boundary_fill(destination, x, y, value, background_value); From 6c0e983658512f18b57a7d665ffe16958ae7b978 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 15 Aug 2021 20:49:24 -0500 Subject: [PATCH 174/418] Make MICROPY_CPYTHON_COMPAT settable --- py/circuitpy_mpconfig.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index b8dbcd6de2..43f2726e51 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -188,7 +188,9 @@ typedef long mp_off_t; // Turning off FULL_BUILD removes some functionality to reduce flash size on tiny SAMD21s #define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD) +#ifndef MICROPY_CPYTHON_COMPAT #define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD) +#endif #define MICROPY_PY_BUILTINS_POW3 (CIRCUITPY_BUILTINS_POW3) #define MICROPY_COMP_FSTRING_LITERAL (MICROPY_CPYTHON_COMPAT) #define MICROPY_MODULE_WEAK_LINKS (0) From ccc371ed53d2d08c410102cf6f652e3f8cd38862 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 16 Aug 2021 08:50:31 -0500 Subject: [PATCH 175/418] Don't double-list modules that MP_REGISTER_MODULE Closes: #5154 --- py/circuitpy_mpconfig.h | 7 +------ py/objmodule.c | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index d0a65a6a7a..0001e9f7c9 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -635,12 +635,7 @@ extern const struct _mp_obj_module_t pwmio_module; #define PWMIO_MODULE #endif -#if CIRCUITPY_QRIO -extern const struct _mp_obj_module_t qrio_module; -#define QRIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_qrio), (mp_obj_t)&qrio_module }, -#else -#define QRIO_MODULE -#endif +// CIRCUITPY_QRIO uses MP_REGISTER_MODULE #if CIRCUITPY_RAINBOWIO extern const struct _mp_obj_module_t rainbowio_module; diff --git a/py/objmodule.c b/py/objmodule.c index 8fa36ab42e..ea10fb8ba2 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -161,9 +161,6 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = { { MP_ROM_QSTR(MP_QSTR_builtins), MP_ROM_PTR(&mp_module_builtins) }, { MP_ROM_QSTR(MP_QSTR_micropython), MP_ROM_PTR(&mp_module_micropython) }, - #if MICROPY_PY_ARRAY - { MP_ROM_QSTR(MP_QSTR_array), MP_ROM_PTR(&mp_module_array) }, - #endif #if MICROPY_PY_IO #if CIRCUITPY { MP_ROM_QSTR(MP_QSTR_io), MP_ROM_PTR(&mp_module_io) }, From 6bd8a1d6691867a59b2b798436e889379c21a137 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 16 Aug 2021 09:10:29 -0500 Subject: [PATCH 176/418] ensure bitmap type in argument --- shared-bindings/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 761a94c4c9..ccf4413453 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -327,7 +327,7 @@ STATIC mp_obj_t bitmaptools_obj_boundary_fill(size_t n_args, const mp_obj_t *pos mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - displayio_bitmap_t *destination = MP_OBJ_TO_PTR(args[ARG_dest_bitmap].u_obj); // the destination bitmap + displayio_bitmap_t *destination = MP_OBJ_TO_PTR(mp_arg_validate_type(args[ARG_dest_bitmap].u_obj, &displayio_bitmap_type, MP_QSTR_dest_bitmap)); // the destination bitmap uint32_t value, color_depth; value = args[ARG_value].u_int; From 5fb507c3ffbaa7891e7bcadab4387dd3df0d55a7 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Mon, 16 Aug 2021 16:31:31 +0100 Subject: [PATCH 177/418] Removed default UART SPI and I2C from Tiny2040 config --- ports/raspberrypi/boards/pimoroni_tiny2040/pins.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c b/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c index de79ee7320..1660de058e 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c @@ -31,9 +31,5 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, - - { 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); From 2255ab1486edf43e5eeabf86a9e5b06ccc73029d Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Mon, 16 Aug 2021 16:40:12 +0100 Subject: [PATCH 178/418] Removed unnecessary Micropy and Ignore defines --- .../pimoroni_keybow2040/mpconfigboard.h | 31 ---------------- .../pimoroni_picolipo_16mb/mpconfigboard.h | 5 --- .../pimoroni_picolipo_4mb/mpconfigboard.h | 5 --- .../pimoroni_picosystem/mpconfigboard.h | 35 ------------------- .../boards/pimoroni_tiny2040/mpconfigboard.h | 18 ---------- 5 files changed, 94 deletions(-) diff --git a/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.h index ecc127db68..0641aed52d 100644 --- a/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_keybow2040/mpconfigboard.h @@ -1,39 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni Keybow 2040" #define MICROPY_HW_MCU_NAME "rp2040" -#define MICROPY_HW_SW0 (&pin_GPIO21) -#define MICROPY_HW_SW1 (&pin_GPIO20) -#define MICROPY_HW_SW2 (&pin_GPIO19) -#define MICROPY_HW_SW3 (&pin_GPIO18) -#define MICROPY_HW_SW4 (&pin_GPIO17) -#define MICROPY_HW_SW5 (&pin_GPIO16) -#define MICROPY_HW_SW6 (&pin_GPIO15) -#define MICROPY_HW_SW7 (&pin_GPIO14) -#define MICROPY_HW_SW8 (&pin_GPIO13) -#define MICROPY_HW_SW9 (&pin_GPIO12) -#define MICROPY_HW_SW10 (&pin_GPIO11) -#define MICROPY_HW_SW11 (&pin_GPIO10) -#define MICROPY_HW_SW12 (&pin_GPIO9) -#define MICROPY_HW_SW13 (&pin_GPIO8) -#define MICROPY_HW_SW14 (&pin_GPIO7) -#define MICROPY_HW_SW15 (&pin_GPIO6) - -#define MICROPY_HW_USER_SW (&pin_GPIO23) - -#define MICROPY_HW_I2C_INT (&pin_GPIO3) - #define DEFAULT_I2C_BUS_SCL (&pin_GPIO5) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO4) #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) - -// These pins are unconnected -#define IGNORE_PIN_GPIO2 1 -#define IGNORE_PIN_GPIO22 1 -#define IGNORE_PIN_GPIO24 1 -#define IGNORE_PIN_GPIO25 1 -#define IGNORE_PIN_GPIO26 1 -#define IGNORE_PIN_GPIO27 1 -#define IGNORE_PIN_GPIO28 1 -#define IGNORE_PIN_GPIO29 1 diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/mpconfigboard.h index 4261b9e006..a8e5d4bb15 100644 --- a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/mpconfigboard.h @@ -1,10 +1,5 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni Pico LiPo (16MB)" #define MICROPY_HW_MCU_NAME "rp2040" -#define MICROPY_HW_VBUS_DETECT (&pin_GPIO24) -#define MICROPY_HW_BAT_SENSE (&pin_GPIO29) - -#define MICROPY_HW_USER_SW (&pin_GPIO23) - #define DEFAULT_I2C_BUS_SCL (&pin_GPIO5) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO4) diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/mpconfigboard.h index e34a05abf2..7241b3bd56 100644 --- a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/mpconfigboard.h @@ -1,10 +1,5 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni Pico LiPo (4MB)" #define MICROPY_HW_MCU_NAME "rp2040" -#define MICROPY_HW_VBUS_DETECT (&pin_GPIO24) -#define MICROPY_HW_BAT_SENSE (&pin_GPIO29) - -#define MICROPY_HW_USER_SW (&pin_GPIO23) - #define DEFAULT_I2C_BUS_SCL (&pin_GPIO5) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO4) diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.h index 97ea17376d..7c39848256 100644 --- a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.h @@ -1,48 +1,13 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni PicoSystem" #define MICROPY_HW_MCU_NAME "rp2040" -#define MICROPY_HW_VBUS_DETECT (&pin_GPIO2) - -#define MICROPY_HW_LCD_RESET (&pin_GPIO4) -#define MICROPY_HW_LCD_CS (&pin_GPIO5) -#define MICROPY_HW_LCD_SCLK (&pin_GPIO6) -#define MICROPY_HW_LCD_MOSI (&pin_GPIO7) -#define MICROPY_HW_LCD_VSYNC (&pin_GPIO8) -#define MICROPY_HW_LCD_DS (&pin_GPIO9) - -#define MICROPY_HW_AUDIO (&pin_GPIO11) -#define MICROPY_HW_BACKLIGHT (&pin_GPIO12) -#define MICROPY_HW_VBUS_DETECT (&pin_GPIO2) - #define CIRCUITPY_RGB_STATUS_INVERTED_PWM #define CIRCUITPY_RGB_STATUS_G (&pin_GPIO13) #define CIRCUITPY_RGB_STATUS_R (&pin_GPIO14) #define CIRCUITPY_RGB_STATUS_B (&pin_GPIO15) -#define MICROPY_HW_SW_Y (&pin_GPIO16) -#define MICROPY_HW_SW_X (&pin_GPIO17) -#define MICROPY_HW_SW_A (&pin_GPIO18) -#define MICROPY_HW_SW_B (&pin_GPIO19) - -#define MICROPY_HW_SW_DOWN (&pin_GPIO20) -#define MICROPY_HW_SW_RIGHT (&pin_GPIO21) -#define MICROPY_HW_SW_LEFT (&pin_GPIO22) -#define MICROPY_HW_SW_UP (&pin_GPIO23) - -#define MICROPY_HW_CHARGE_STAT (&pin_GPIO24) - -#define MICROPY_HW_BAT_SENSE (&pin_GPIO26) - #define DEFAULT_SPI_BUS_SCK (&pin_GPIO6) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7) #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) - -// These pins are unconnected -#define IGNORE_PIN_GPIO3 1 -#define IGNORE_PIN_GPIO10 1 -#define IGNORE_PIN_GPIO25 1 -#define IGNORE_PIN_GPIO27 1 -#define IGNORE_PIN_GPIO28 1 -#define IGNORE_PIN_GPIO29 1 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h index 29bde18060..4184f35a7a 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h @@ -5,21 +5,3 @@ #define CIRCUITPY_RGB_STATUS_R (&pin_GPIO18) #define CIRCUITPY_RGB_STATUS_G (&pin_GPIO19) #define CIRCUITPY_RGB_STATUS_B (&pin_GPIO20) - -#define MICROPY_HW_USER_SW (&pin_GPIO23) - -// These pins are unconnected -#define IGNORE_PIN_GPIO8 1 -#define IGNORE_PIN_GPIO9 1 -#define IGNORE_PIN_GPIO10 1 -#define IGNORE_PIN_GPIO11 1 -#define IGNORE_PIN_GPIO12 1 -#define IGNORE_PIN_GPIO13 1 -#define IGNORE_PIN_GPIO14 1 -#define IGNORE_PIN_GPIO15 1 -#define IGNORE_PIN_GPIO16 1 -#define IGNORE_PIN_GPIO17 1 -#define IGNORE_PIN_GPIO21 1 -#define IGNORE_PIN_GPIO22 1 -#define IGNORE_PIN_GPIO24 1 -#define IGNORE_PIN_GPIO25 1 From 1c4a6c3667ec1c2005c967b115ab9412336fe151 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Sun, 1 Aug 2021 14:01:40 +0530 Subject: [PATCH 179/418] atexit module refinements - add test for atexit module - add callback to gc collection - fix callback memory allocation - execute callback on both code and repl exit --- lib/utils/pyexec.c | 8 ------- main.c | 10 ++++++++ .../mpconfigboard.mk | 1 - py/circuitpy_mpconfig.mk | 2 +- shared-bindings/atexit/__init__.c | 10 +++++--- shared-module/atexit/__init__.c | 23 +++++++++++-------- shared-module/atexit/__init__.h | 1 + tests/circuitpython/atexit_test.py | 22 ++++++++++++++++++ 8 files changed, 54 insertions(+), 23 deletions(-) create mode 100644 tests/circuitpython/atexit_test.py diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index 0362729b09..2651189915 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -44,10 +44,6 @@ #include "lib/utils/pyexec.h" #include "genhdr/mpversion.h" -#if CIRCUITPY_ATEXIT -#include "shared-module/atexit/__init__.h" -#endif - pyexec_mode_kind_t pyexec_mode_kind = PYEXEC_MODE_FRIENDLY_REPL; int pyexec_system_exit = 0; @@ -131,10 +127,6 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input start = mp_hal_ticks_ms(); #endif mp_call_function_0(module_fun); - // execute exit handlers (if any). - #if CIRCUITPY_ATEXIT - shared_module_atexit_execute(); - #endif mp_hal_set_interrupt_char(-1); // disable interrupt mp_handle_pending(true); // handle any pending exceptions (and any callbacks) nlr_pop(); diff --git a/main.c b/main.c index 887b1c1d16..8216713901 100755 --- a/main.c +++ b/main.c @@ -217,6 +217,9 @@ STATIC bool maybe_run_list(const char * const * filenames, pyexec_result_t* exec decompress(compressed, decompressed); mp_hal_stdout_tx_str(decompressed); pyexec_file(filename, exec_result); + #if CIRCUITPY_ATEXIT + shared_module_atexit_execute(); + #endif return true; } @@ -766,6 +769,9 @@ STATIC int run_repl(void) { } else { exit_code = pyexec_friendly_repl(); } + #if CIRCUITPY_ATEXIT + shared_module_atexit_execute(); + #endif cleanup_after_vm(heap, MP_OBJ_SENTINEL); #if CIRCUITPY_STATUS_LED status_led_init(); @@ -881,6 +887,10 @@ void gc_collect(void) { common_hal_alarm_gc_collect(); #endif + #if CIRCUITPY_ATEXIT + atexit_gc_collect(); + #endif + #if CIRCUITPY_DISPLAYIO displayio_gc_collect(); #endif diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index a0bef7ada0..a617947f9c 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -20,7 +20,6 @@ CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 CIRCUITPY_USB_MIDI = 0 -CIRCUITPY_ATEXIT = 0 CIRCUITPY_PIXELBUF = 1 CIRCUITPY_BUSDEVICE = 1 diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 904ad0ed11..315d6ba52c 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -48,7 +48,7 @@ CFLAGS += -DCIRCUITPY_ALARM=$(CIRCUITPY_ALARM) CIRCUITPY_ANALOGIO ?= 1 CFLAGS += -DCIRCUITPY_ANALOGIO=$(CIRCUITPY_ANALOGIO) -CIRCUITPY_ATEXIT ?= 1 +CIRCUITPY_ATEXIT ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_ATEXIT=$(CIRCUITPY_ATEXIT) CIRCUITPY_AUDIOBUSIO ?= $(CIRCUITPY_FULL_BUILD) diff --git a/shared-bindings/atexit/__init__.c b/shared-bindings/atexit/__init__.c index 0f4ea26ee9..2d6faf9c72 100644 --- a/shared-bindings/atexit/__init__.c +++ b/shared-bindings/atexit/__init__.c @@ -31,6 +31,9 @@ //| This module defines functions to register and unregister cleanup functions. //| Functions thus registered are automatically executed upon normal vm termination. //| +//| These functions are run in the reverse order in which they were registered; +//| if you register ``A``, ``B``, and ``C``, they will be run in the order ``C``, ``B``, ``A``. +//| //| """ //| ... //| @@ -39,13 +42,14 @@ //| //| """Register func as a function to be executed at termination. //| -//| Any optional arguments that are to be passed to func must be passed as arguments to register(). +//| Any optional arguments that are to be passed to func must be passed as arguments to `register()`. //| It is possible to register the same function and arguments more than once. //| //| At normal program termination (for instance, if `sys.exit()` is called or the vm execution completes), -//| all functions registered are called in order of there registration. +//| all functions registered are called in last in, first out order. //| -//| If an exception is raised during execution of the exit handlers, a traceback is printed and the execution stops. +//| If an exception is raised during execution of the exit handler, +//| a traceback is printed (unless `SystemExit` is raised) and the execution stops. //| //| This function returns func, which makes it possible to use it as a decorator. //| diff --git a/shared-module/atexit/__init__.c b/shared-module/atexit/__init__.c index 7c55b13f67..01ebc49254 100644 --- a/shared-module/atexit/__init__.c +++ b/shared-module/atexit/__init__.c @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#include "py/gc.h" #include "py/runtime.h" #include "shared-module/atexit/__init__.h" @@ -32,8 +33,8 @@ typedef struct _atexit_callback_t { mp_obj_t func, *args; } atexit_callback_t; -size_t callback_len = 0; -atexit_callback_t *callback = NULL; +static size_t callback_len = 0; +static atexit_callback_t *callback = NULL; void atexit_reset(void) { callback_len = 0; @@ -41,6 +42,10 @@ void atexit_reset(void) { callback = NULL; } +void atexit_gc_collect(void) { + gc_collect_ptr(callback); +} + void shared_module_atexit_register(mp_obj_t *func, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { if (!mp_obj_is_callable(func)) { mp_raise_TypeError_varg(translate("'%q' object is not callable"), mp_obj_get_type_qstr(func)); @@ -50,24 +55,22 @@ void shared_module_atexit_register(mp_obj_t *func, size_t n_args, const mp_obj_t .n_pos = 0, .n_kw = 0, .func = func, - .args = ((n_args + n_kw_args) == 0) ? NULL : m_malloc((n_args + (2 * n_kw_args)) * sizeof(mp_obj_t), false) + .args = (n_args + n_kw_args) ? m_malloc((n_args + (n_kw_args * 2)) * sizeof(mp_obj_t), false) : NULL }; for (; cb.n_pos < n_args; cb.n_pos++) { cb.args[cb.n_pos] = pos_args[cb.n_pos]; } for (size_t i = cb.n_pos; cb.n_kw < n_kw_args; i++, cb.n_kw++) { - cb.args[i] = kw_args[cb.n_kw].table->key; - cb.args[i += 1] = kw_args[cb.n_kw].table->value; - } - if (!callback) { - callback = (atexit_callback_t *)m_realloc(callback, sizeof(cb)); + cb.args[i] = kw_args->table[cb.n_kw].key; + cb.args[i += 1] = kw_args->table[cb.n_kw].value; } + callback = (atexit_callback_t *)m_realloc(callback, (callback_len + 1) * sizeof(cb)); callback[callback_len++] = cb; } void shared_module_atexit_unregister(const mp_obj_t *func) { for (size_t i = 0; i < callback_len; i++) { - if (callback[i].func == func) { + if (callback[i].func == *func) { callback[i].n_pos = 0; callback[i].n_kw = 0; callback[i].func = mp_const_none; @@ -78,7 +81,7 @@ void shared_module_atexit_unregister(const mp_obj_t *func) { void shared_module_atexit_execute(void) { if (callback) { - for (size_t i = 0; i < callback_len; i++) { + for (size_t i = callback_len; i-- > 0;) { if (callback[i].func != mp_const_none) { mp_call_function_n_kw(callback[i].func, callback[i].n_pos, callback[i].n_kw, callback[i].args); } diff --git a/shared-module/atexit/__init__.h b/shared-module/atexit/__init__.h index 48cf0744db..d637a57008 100644 --- a/shared-module/atexit/__init__.h +++ b/shared-module/atexit/__init__.h @@ -30,6 +30,7 @@ #include "py/obj.h" extern void atexit_reset(void); +extern void atexit_gc_collect(void); extern void shared_module_atexit_register(mp_obj_t *func, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args); diff --git a/tests/circuitpython/atexit_test.py b/tests/circuitpython/atexit_test.py new file mode 100644 index 0000000000..b689f5a508 --- /dev/null +++ b/tests/circuitpython/atexit_test.py @@ -0,0 +1,22 @@ +# test atexit module + +try: + import atexit +except ImportError: + print("SKIP") + raise SystemExit + + +@atexit.register +def skip_at_exit(): + print("skip at exit") + + +@atexit.register +def do_at_exit(*args, **kwargs): + print("done at exit:", args, kwargs) + + +atexit.unregister(skip_at_exit) +atexit.register(do_at_exit, "ok", 1, arg="2", param=(3, 4)) +print("done before exit") From bdf8bc58ed2cc7b678573aceca850eb67fe0fa8d Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Mon, 16 Aug 2021 22:22:22 +0530 Subject: [PATCH 180/418] allow exception raise inside atexit callback --- lib/utils/pyexec.c | 94 +++++++++++++++++++++------------ lib/utils/pyexec.h | 4 ++ main.c | 8 ++- shared-module/atexit/__init__.c | 16 +++--- shared-module/atexit/__init__.h | 8 ++- 5 files changed, 85 insertions(+), 45 deletions(-) diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index 2651189915..6ffe5d70a7 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -44,6 +44,10 @@ #include "lib/utils/pyexec.h" #include "genhdr/mpversion.h" +#if CIRCUITPY_ATEXIT +#include "shared-module/atexit/__init__.h" +#endif + pyexec_mode_kind_t pyexec_mode_kind = PYEXEC_MODE_FRIENDLY_REPL; int pyexec_system_exit = 0; @@ -58,6 +62,7 @@ STATIC bool repl_display_debugging_info = 0; #define EXEC_FLAG_SOURCE_IS_VSTR (16) #define EXEC_FLAG_SOURCE_IS_FILENAME (32) #define EXEC_FLAG_SOURCE_IS_READER (64) +#define EXEC_FLAG_SOURCE_IS_ATEXIT (128) // parses, compiles and executes the code in the lexer // frees the lexer before returning @@ -81,44 +86,49 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input nlr.ret_val = NULL; if (nlr_push(&nlr) == 0) { mp_obj_t module_fun; - #if MICROPY_MODULE_FROZEN_MPY - if (exec_flags & EXEC_FLAG_SOURCE_IS_RAW_CODE) { - // source is a raw_code object, create the function - module_fun = mp_make_function_from_raw_code(source, MP_OBJ_NULL, MP_OBJ_NULL); - } else + #if CIRCUITPY_ATEXIT + if (!(exec_flags & EXEC_FLAG_SOURCE_IS_ATEXIT)) #endif { - #if MICROPY_ENABLE_COMPILER - mp_lexer_t *lex; - if (exec_flags & EXEC_FLAG_SOURCE_IS_VSTR) { - const vstr_t *vstr = source; - lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, vstr->buf, vstr->len, 0); - } else if (exec_flags & EXEC_FLAG_SOURCE_IS_READER) { - lex = mp_lexer_new(MP_QSTR__lt_stdin_gt_, *(mp_reader_t *)source); - } else if (exec_flags & EXEC_FLAG_SOURCE_IS_FILENAME) { - lex = mp_lexer_new_from_file(source); - } else { - lex = (mp_lexer_t *)source; - } - // source is a lexer, parse and compile the script - qstr source_name = lex->source_name; - if (input_kind == MP_PARSE_FILE_INPUT) { - mp_store_global(MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name)); - } - mp_parse_tree_t parse_tree = mp_parse(lex, input_kind); - module_fun = mp_compile(&parse_tree, source_name, exec_flags & EXEC_FLAG_IS_REPL); - // Clear the parse tree because it has a heap pointer we don't need anymore. - *((uint32_t volatile *)&parse_tree.chunk) = 0; - #else - mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("script compilation not supported")); + #if MICROPY_MODULE_FROZEN_MPY + if (exec_flags & EXEC_FLAG_SOURCE_IS_RAW_CODE) { + // source is a raw_code object, create the function + module_fun = mp_make_function_from_raw_code(source, MP_OBJ_NULL, MP_OBJ_NULL); + } else #endif - } + { + #if MICROPY_ENABLE_COMPILER + mp_lexer_t *lex; + if (exec_flags & EXEC_FLAG_SOURCE_IS_VSTR) { + const vstr_t *vstr = source; + lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, vstr->buf, vstr->len, 0); + } else if (exec_flags & EXEC_FLAG_SOURCE_IS_READER) { + lex = mp_lexer_new(MP_QSTR__lt_stdin_gt_, *(mp_reader_t *)source); + } else if (exec_flags & EXEC_FLAG_SOURCE_IS_FILENAME) { + lex = mp_lexer_new_from_file(source); + } else { + lex = (mp_lexer_t *)source; + } + // source is a lexer, parse and compile the script + qstr source_name = lex->source_name; + if (input_kind == MP_PARSE_FILE_INPUT) { + mp_store_global(MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name)); + } + mp_parse_tree_t parse_tree = mp_parse(lex, input_kind); + module_fun = mp_compile(&parse_tree, source_name, exec_flags & EXEC_FLAG_IS_REPL); + // Clear the parse tree because it has a heap pointer we don't need anymore. + *((uint32_t volatile *)&parse_tree.chunk) = 0; + #else + mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("script compilation not supported")); + #endif + } - // If the code was loaded from a file it's likely to be running for a while so we'll long - // live it and collect any garbage before running. - if (input_kind == MP_PARSE_FILE_INPUT) { - module_fun = make_obj_long_lived(module_fun, 6); - gc_collect(); + // If the code was loaded from a file it's likely to be running for a while so we'll long + // live it and collect any garbage before running. + if (input_kind == MP_PARSE_FILE_INPUT) { + module_fun = make_obj_long_lived(module_fun, 6); + gc_collect(); + } } // execute code @@ -126,7 +136,15 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input #if MICROPY_REPL_INFO start = mp_hal_ticks_ms(); #endif - mp_call_function_0(module_fun); + #if CIRCUITPY_ATEXIT + if (exec_flags & EXEC_FLAG_SOURCE_IS_ATEXIT) { + atexit_callback_t *callback = (atexit_callback_t *)source; + mp_call_function_n_kw(callback->func, callback->n_pos, callback->n_kw, callback->args); + } else + #endif + { + mp_call_function_0(module_fun); + } mp_hal_set_interrupt_char(-1); // disable interrupt mp_handle_pending(true); // handle any pending exceptions (and any callbacks) nlr_pop(); @@ -741,6 +759,12 @@ int pyexec_frozen_module(const char *name, pyexec_result_t *result) { } #endif +#if CIRCUITPY_ATEXIT +int pyexec_exit_handler(const void *source, pyexec_result_t *result) { + return parse_compile_execute(source, MP_PARSE_FILE_INPUT, EXEC_FLAG_SOURCE_IS_ATEXIT, result); +} +#endif + #if MICROPY_REPL_INFO mp_obj_t pyb_set_repl_info(mp_obj_t o_value) { repl_display_debugging_info = mp_obj_get_int(o_value); diff --git a/lib/utils/pyexec.h b/lib/utils/pyexec.h index 6f0252cfed..3d3c2d6c53 100644 --- a/lib/utils/pyexec.h +++ b/lib/utils/pyexec.h @@ -59,6 +59,10 @@ void pyexec_event_repl_init(void); int pyexec_event_repl_process_char(int c); extern uint8_t pyexec_repl_active; +#if CIRCUITPY_ATEXIT +int pyexec_exit_handler(const void *source, pyexec_result_t *result); +#endif + #if MICROPY_REPL_INFO mp_obj_t pyb_set_repl_info(mp_obj_t o_value); MP_DECLARE_CONST_FUN_OBJ_1(pyb_set_repl_info_obj); diff --git a/main.c b/main.c index 8216713901..74a706e063 100755 --- a/main.c +++ b/main.c @@ -218,7 +218,7 @@ STATIC bool maybe_run_list(const char * const * filenames, pyexec_result_t* exec mp_hal_stdout_tx_str(decompressed); pyexec_file(filename, exec_result); #if CIRCUITPY_ATEXIT - shared_module_atexit_execute(); + shared_module_atexit_execute(exec_result); #endif return true; } @@ -770,7 +770,11 @@ STATIC int run_repl(void) { exit_code = pyexec_friendly_repl(); } #if CIRCUITPY_ATEXIT - shared_module_atexit_execute(); + pyexec_result_t result; + shared_module_atexit_execute(&result); + if (result.return_code == PYEXEC_DEEP_SLEEP) { + exit_code = PYEXEC_DEEP_SLEEP; + } #endif cleanup_after_vm(heap, MP_OBJ_SENTINEL); #if CIRCUITPY_STATUS_LED diff --git a/shared-module/atexit/__init__.c b/shared-module/atexit/__init__.c index 01ebc49254..56271bbab8 100644 --- a/shared-module/atexit/__init__.c +++ b/shared-module/atexit/__init__.c @@ -28,11 +28,6 @@ #include "py/runtime.h" #include "shared-module/atexit/__init__.h" -typedef struct _atexit_callback_t { - size_t n_pos, n_kw; - mp_obj_t func, *args; -} atexit_callback_t; - static size_t callback_len = 0; static atexit_callback_t *callback = NULL; @@ -79,11 +74,18 @@ void shared_module_atexit_unregister(const mp_obj_t *func) { } } -void shared_module_atexit_execute(void) { +void shared_module_atexit_execute(pyexec_result_t *result) { if (callback) { for (size_t i = callback_len; i-- > 0;) { if (callback[i].func != mp_const_none) { - mp_call_function_n_kw(callback[i].func, callback[i].n_pos, callback[i].n_kw, callback[i].args); + if (result != NULL) { + pyexec_result_t res; + if (pyexec_exit_handler(&callback[i], &res) == PYEXEC_DEEP_SLEEP) { + *result = res; + } + } else { + pyexec_exit_handler(&callback[i], NULL); + } } } } diff --git a/shared-module/atexit/__init__.h b/shared-module/atexit/__init__.h index d637a57008..befccb3ea8 100644 --- a/shared-module/atexit/__init__.h +++ b/shared-module/atexit/__init__.h @@ -28,6 +28,12 @@ #define MICROPY_INCLUDED_SHARED_MODULE_ATEXIT___INIT___H #include "py/obj.h" +#include "lib/utils/pyexec.h" + +typedef struct _atexit_callback_t { + size_t n_pos, n_kw; + mp_obj_t func, *args; +} atexit_callback_t; extern void atexit_reset(void); extern void atexit_gc_collect(void); @@ -35,6 +41,6 @@ extern void atexit_gc_collect(void); extern void shared_module_atexit_register(mp_obj_t *func, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args); extern void shared_module_atexit_unregister(const mp_obj_t *func); -extern void shared_module_atexit_execute(void); +extern void shared_module_atexit_execute(pyexec_result_t *result); #endif // MICROPY_INCLUDED_SHARED_MODULE_ATEXIT___INIT___H From a77e26912183b8b4c4039fde13a92bc28cebe13c Mon Sep 17 00:00:00 2001 From: "Ryan A. Pavlik" Date: Mon, 16 Aug 2021 17:07:17 -0500 Subject: [PATCH 181/418] cp_sapling_m0_revb: board.UART not board.uart This is the only board that didn't match the all-uppercase convention for these UART (and more generally, these bus) entries. --- ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c b/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c index b88b6869ef..dcc410572b 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c @@ -49,6 +49,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 38f42818e9a01226cc62d4d1ba7bc4dc264ff5b8 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 16 Aug 2021 18:59:18 -0400 Subject: [PATCH 182/418] fix gc; update KEYBOARD report descriptor The default KEYBOARD report descriptor had a signed/unsigned error, and also could have allowed more keycodes. So I changed it, using the very vanilla descriptor from a very plain extremely common commercial keyboard, modifying it only have 5 LED's instead of 3, and added a report ID. --- shared-module/usb_hid/Device.c | 82 ++++++++++++++++---------------- shared-module/usb_hid/__init__.c | 3 +- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/shared-module/usb_hid/Device.c b/shared-module/usb_hid/Device.c index db92bd1c32..50fd93fa68 100644 --- a/shared-module/usb_hid/Device.c +++ b/shared-module/usb_hid/Device.c @@ -36,37 +36,39 @@ #include "tusb.h" static const uint8_t keyboard_report_descriptor[] = { - 0x05, 0x01, // 0,1 Usage Page (Generic Desktop Ctrls) - 0x09, 0x06, // 2,3 Usage (Keyboard) - 0xA1, 0x01, // 4,5 Collection (Application) - 0x85, 0x01, // 6,7 Report ID (1) - 0x05, 0x07, // Usage Page (Kbrd/Keypad) - 0x19, 0xE0, // Usage Minimum (0xE0) - 0x29, 0xE7, // Usage Maximum (0xE7) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x01, // Logical Maximum (1) - 0x75, 0x01, // Report Size (1) - 0x95, 0x08, // Report Count (8) - 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) - 0x81, 0x01, // Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) - 0x19, 0x00, // Usage Minimum (0x00) - 0x29, 0xDD, // Usage Maximum (0xDD) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0xDD, // Logical Maximum (-35) - 0x75, 0x08, // Report Size (8) - 0x95, 0x06, // Report Count (6) - 0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) - 0x05, 0x08, // Usage Page (LEDs) - 0x19, 0x01, // Usage Minimum (Num Lock) - 0x29, 0x05, // Usage Maximum (Kana) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x01, // Logical Maximum (1) - 0x75, 0x01, // Report Size (1) - 0x95, 0x05, // Report Count (5) - 0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile) - 0x95, 0x03, // Report Count (3) - 0x91, 0x01, // Output (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile) - 0xC0, // End Collection + 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) + 0x09, 0x06, // Usage (Keyboard) + 0xA1, 0x01, // Collection (Application) + 0x85, 0x01, // Report ID (1) + 0x05, 0x07, // Usage Page (Kbrd/Keypad) + 0x19, 0xE0, // Usage Minimum (0xE0) + 0x29, 0xE7, // Usage Maximum (0xE7) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x75, 0x01, // Report Size (1) + 0x95, 0x08, // Report Count (8) + 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) + 0x95, 0x01, // Report Count (1) + 0x75, 0x08, // Report Size (8) + 0x81, 0x01, // Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) + 0x95, 0x03, // Report Count (3) + 0x75, 0x01, // Report Size (1) + 0x05, 0x08, // Usage Page (LEDs) + 0x19, 0x01, // Usage Minimum (Num Lock) + 0x29, 0x05, // Usage Maximum (Kana) + 0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile) + 0x95, 0x01, // Report Count (1) + 0x75, 0x05, // Report Size (5) + 0x91, 0x01, // Output (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile) + 0x95, 0x06, // Report Count (6) + 0x75, 0x08, // Report Size (8) + 0x15, 0x00, // Logical Minimum (0) + 0x26, 0xFF, 0x00, // Logical Maximum (255) + 0x05, 0x07, // Usage Page (Kbrd/Keypad) + 0x19, 0x00, // Usage Minimum (0x00) + 0x2A, 0xFF, 0x00, // Usage Maximum (0xFF) + 0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) + 0xC0, // End Collection }; const usb_hid_device_obj_t usb_hid_device_keyboard_obj = { @@ -84,11 +86,11 @@ const usb_hid_device_obj_t usb_hid_device_keyboard_obj = { }; static const uint8_t mouse_report_descriptor[] = { - 0x05, 0x01, // 0,1 Usage Page (Generic Desktop Ctrls) - 0x09, 0x02, // 2,3 Usage (Mouse) - 0xA1, 0x01, // 4,5 Collection (Application) - 0x09, 0x01, // 6,7 Usage (Pointer) - 0xA1, 0x00, // 8,9 Collection (Physical) + 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) + 0x09, 0x02, // Usage (Mouse) + 0xA1, 0x01, // Collection (Application) + 0x09, 0x01, // Usage (Pointer) + 0xA1, 0x00, // Collection (Physical) 0x85, 0x02, // 10, 11 Report ID (2) 0x05, 0x09, // Usage Page (Button) 0x19, 0x01, // Usage Minimum (0x01) @@ -134,10 +136,10 @@ const usb_hid_device_obj_t usb_hid_device_mouse_obj = { }; static const uint8_t consumer_control_report_descriptor[] = { - 0x05, 0x0C, // 0,1 Usage Page (Consumer) - 0x09, 0x01, // 2,3 Usage (Consumer Control) - 0xA1, 0x01, // 4,5 Collection (Application) - 0x85, 0x03, // 6,7 Report ID (3) + 0x05, 0x0C, // Usage Page (Consumer) + 0x09, 0x01, // Usage (Consumer Control) + 0xA1, 0x01, // Collection (Application) + 0x85, 0x03, // Report ID (3) 0x75, 0x10, // Report Size (16) 0x95, 0x01, // Report Count (1) 0x15, 0x01, // Logical Minimum (1) diff --git a/shared-module/usb_hid/__init__.c b/shared-module/usb_hid/__init__.c index 2be9a646d6..e61d01cc16 100644 --- a/shared-module/usb_hid/__init__.c +++ b/shared-module/usb_hid/__init__.c @@ -250,8 +250,9 @@ void usb_hid_gc_collect(void) { // and not copied into RAM. gc_collect_ptr((void *)hid_devices[device_idx].report_descriptor); - // Collect all the OUT report buffers for this device. + // Collect all the report buffers for this device. for (size_t id_idx = 0; id_idx < hid_devices[device_idx].num_report_ids; id_idx++) { + gc_collect_ptr(hid_devices[id_idx].in_report_buffers[id_idx]); gc_collect_ptr(hid_devices[id_idx].out_report_buffers[id_idx]); } } From 6c763762d468308420aa51e61f881879a1e5f778 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Tue, 17 Aug 2021 10:10:10 +0530 Subject: [PATCH 183/418] restore sys.atexit() to prevent merge conflict --- ports/unix/main.c | 7 +++++++ py/modsys.c | 18 ++++++++++++++++++ py/mpconfig.h | 5 +++++ py/mpstate.h | 5 +++++ py/runtime.c | 4 ++++ 5 files changed, 39 insertions(+) diff --git a/ports/unix/main.c b/ports/unix/main.c index b69df90354..55bdc22082 100644 --- a/ports/unix/main.c +++ b/ports/unix/main.c @@ -690,6 +690,13 @@ MP_NOINLINE int main_(int argc, char **argv) { MP_STATE_THREAD(prof_trace_callback) = MP_OBJ_NULL; #endif + #if MICROPY_PY_SYS_ATEXIT + // Beware, the sys.settrace callback should be disabled before running sys.atexit. + if (mp_obj_is_callable(MP_STATE_VM(sys_exitfunc))) { + mp_call_function_0(MP_STATE_VM(sys_exitfunc)); + } + #endif + #if MICROPY_PY_MICROPYTHON_MEM_INFO if (mp_verbose_flag) { mp_micropython_mem_info(0, NULL); diff --git a/py/modsys.c b/py/modsys.c index 1e31a04d27..cbd1712920 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -166,6 +166,16 @@ STATIC mp_obj_t mp_sys_getsizeof(mp_obj_t obj) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_sys_getsizeof_obj, mp_sys_getsizeof); #endif +#if MICROPY_PY_SYS_ATEXIT +// atexit(callback): Callback is called when sys.exit is called. +STATIC mp_obj_t mp_sys_atexit(mp_obj_t obj) { + mp_obj_t old = MP_STATE_VM(sys_exitfunc); + MP_STATE_VM(sys_exitfunc) = obj; + return old; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_sys_atexit_obj, mp_sys_atexit); +#endif + #if MICROPY_PY_SYS_SETTRACE // settrace(tracefunc): Set the system’s trace function. STATIC mp_obj_t mp_sys_settrace(mp_obj_t obj) { @@ -227,6 +237,14 @@ STATIC const mp_rom_map_elem_t mp_module_sys_globals_table[] = { #if MICROPY_PY_SYS_GETSIZEOF { MP_ROM_QSTR(MP_QSTR_getsizeof), MP_ROM_PTR(&mp_sys_getsizeof_obj) }, #endif + + /* + * Extensions to CPython + */ + + #if MICROPY_PY_SYS_ATEXIT + { MP_ROM_QSTR(MP_QSTR_atexit), MP_ROM_PTR(&mp_sys_atexit_obj) }, + #endif }; STATIC MP_DEFINE_CONST_DICT(mp_module_sys_globals, mp_module_sys_globals_table); diff --git a/py/mpconfig.h b/py/mpconfig.h index 8419a50d5e..2cd2a0d356 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1311,6 +1311,11 @@ typedef double mp_float_t; #define MICROPY_PY_SYS_EXIT (1) #endif +// Whether to provide "sys.atexit" function (MicroPython extension) +#ifndef MICROPY_PY_SYS_ATEXIT +#define MICROPY_PY_SYS_ATEXIT (0) +#endif + // Whether to provide "sys.settrace" function #ifndef MICROPY_PY_SYS_SETTRACE #define MICROPY_PY_SYS_SETTRACE (0) diff --git a/py/mpstate.h b/py/mpstate.h index e868a773bf..423463109d 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -157,6 +157,11 @@ typedef struct _mp_state_vm_t { mp_obj_base_t *cur_exception; #endif + #if MICROPY_PY_SYS_ATEXIT + // exposed through sys.atexit function + mp_obj_t sys_exitfunc; + #endif + // dictionary for the __main__ module mp_obj_dict_t dict_main; diff --git a/py/runtime.c b/py/runtime.c index ba0d59dffa..ceb5e83b14 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -130,6 +130,10 @@ void mp_init(void) { sizeof(MP_STATE_VM(fs_user_mount)) - MICROPY_FATFS_NUM_PERSISTENT); #endif + #if MICROPY_PY_SYS_ATEXIT + MP_STATE_VM(sys_exitfunc) = mp_const_none; + #endif + #if MICROPY_PY_SYS_SETTRACE MP_STATE_THREAD(prof_trace_callback) = MP_OBJ_NULL; MP_STATE_THREAD(prof_callback_is_executing) = false; From 064e086570517cc38573636c6b6efdd21dc30cd9 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 17 Aug 2021 09:33:34 -0400 Subject: [PATCH 184/418] correct some status LED pin defns per #5161 --- ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h | 4 ++-- ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h | 2 +- ports/nrf/boards/particle_argon/mpconfigboard.h | 8 +++----- ports/nrf/boards/particle_boron/mpconfigboard.h | 8 +++----- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h index 40a7add36b..a040fe70e0 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h +++ b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h @@ -29,8 +29,8 @@ #define MICROPY_HW_BOARD_NAME "Adafruit FunHouse" #define MICROPY_HW_MCU_NAME "ESP32S2" -#define MICROPY_HW_APA_MOSI (&pin_GPIO14) -#define MICROPY_HW_APA_SCK (&pin_GPIO15) +#define MICROPY_HW_APA102_MOSI (&pin_GPIO14) +#define MICROPY_HW_APA102_SCK (&pin_GPIO15) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) diff --git a/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h b/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h index 47bcde7e93..421007542b 100644 --- a/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +++ b/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h @@ -28,7 +28,7 @@ #define MICROPY_HW_BOARD_NAME "microS2" #define MICROPY_HW_MCU_NAME "ESP32S2" -#define MICROPY_HW_LED (&pin_GPIO21) +#define MICROPY_HW_LED_STATUS (&pin_GPIO21) #define MICROPY_HW_BUTTON (&pin_GPIO0) #define MICROPY_HW_NEOPIXEL (&pin_GPIO33) diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.h b/ports/nrf/boards/particle_argon/mpconfigboard.h index a4952fc797..a858a20b05 100644 --- a/ports/nrf/boards/particle_argon/mpconfigboard.h +++ b/ports/nrf/boards/particle_argon/mpconfigboard.h @@ -30,11 +30,9 @@ #define MICROPY_HW_BOARD_NAME "Particle Argon" #define MICROPY_HW_MCU_NAME "nRF52840" -#define MICROPY_HW_LED_STATUS (&pin_P1_12) - -#define MICROPY_HW_RGB_LED_RED (&pin_P0_13) -#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) -#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) +#define CIRCUITPY_RGB_STATUS_R (&pin_P0_13) +#define CIRCUITPY_RGB_STATUS_G (&pin_P0_14) +#define CIRCUITPY_RGB_STATUS_B (&pin_P0_15) #if QSPI_FLASH_FILESYSTEM #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.h b/ports/nrf/boards/particle_boron/mpconfigboard.h index bab1b3d5cd..fd000d7376 100644 --- a/ports/nrf/boards/particle_boron/mpconfigboard.h +++ b/ports/nrf/boards/particle_boron/mpconfigboard.h @@ -30,11 +30,9 @@ #define MICROPY_HW_BOARD_NAME "Particle Boron" #define MICROPY_HW_MCU_NAME "nRF52840" -#define MICROPY_HW_LED_STATUS (&pin_P1_12) - -#define MICROPY_HW_RGB_LED_RED (&pin_P0_13) -#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) -#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) +#define CIRCUITPY_RGB_STATUS_R (&pin_P0_13) +#define CIRCUITPY_RGB_STATUS_G (&pin_P0_14) +#define CIRCUITPY_RGB_STATUS_B (&pin_P0_15) #if QSPI_FLASH_FILESYSTEM #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) From d67acb8a642aa7c361a8e2335c009e668840611f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 17 Aug 2021 10:00:19 -0500 Subject: [PATCH 185/418] MP3Decoder: Fix playback stopping issue Closes: #5164 --- shared-module/audiomp3/MP3Decoder.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/shared-module/audiomp3/MP3Decoder.c b/shared-module/audiomp3/MP3Decoder.c index 27c69f735b..cc755d7d2f 100644 --- a/shared-module/audiomp3/MP3Decoder.c +++ b/shared-module/audiomp3/MP3Decoder.c @@ -319,6 +319,7 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t * uint8_t **bufptr, uint32_t *buffer_length) { if (!self->inbuf) { + *buffer_length = 0; return GET_BUFFER_ERROR; } if (!single_channel_output) { @@ -342,6 +343,7 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t * mp3file_skip_id3v2(self); if (!mp3file_find_sync_word(self)) { + *buffer_length = 0; return self->eof ? GET_BUFFER_DONE : GET_BUFFER_ERROR; } int bytes_left = BYTES_LEFT(self); @@ -349,6 +351,11 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t * int err = MP3Decode(self->decoder, &inbuf, &bytes_left, buffer, 0); CONSUME(self, BYTES_LEFT(self) - bytes_left); + if (err) { + *buffer_length = 0; + return GET_BUFFER_DONE; + } + if (self->inbuf_offset >= 512) { background_callback_add( &self->inbuf_fill_cb, @@ -356,10 +363,6 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t * self); } - if (err) { - return GET_BUFFER_DONE; - } - return GET_BUFFER_MORE_DATA; } From a0c340f727fb7ed9a6bdf3fac28b4009a3a5d829 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 17 Aug 2021 11:26:43 -0400 Subject: [PATCH 186/418] Update ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h Co-authored-by: microDev <70126934+microDev1@users.noreply.github.com> --- ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h b/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h index 421007542b..b8d6707b7c 100644 --- a/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +++ b/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h @@ -28,8 +28,6 @@ #define MICROPY_HW_BOARD_NAME "microS2" #define MICROPY_HW_MCU_NAME "ESP32S2" -#define MICROPY_HW_LED_STATUS (&pin_GPIO21) -#define MICROPY_HW_BUTTON (&pin_GPIO0) #define MICROPY_HW_NEOPIXEL (&pin_GPIO33) // Default bus pins From 1bcf66ff8dc9fe377d38294be4805c558a0b9e15 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 17 Aug 2021 15:34:48 -0400 Subject: [PATCH 187/418] Check buffer existence in tud callbacks (addresses #5020) --- shared-module/usb_hid/Device.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/shared-module/usb_hid/Device.c b/shared-module/usb_hid/Device.c index 50fd93fa68..e864b08873 100644 --- a/shared-module/usb_hid/Device.c +++ b/shared-module/usb_hid/Device.c @@ -280,8 +280,11 @@ uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t size_t id_idx; // Find device with this report id, and get the report id index. if (usb_hid_get_device_with_report_id(report_id, &hid_device, &id_idx)) { - memcpy(buffer, hid_device->in_report_buffers[id_idx], reqlen); - return reqlen; + // Make sure buffer exists before trying to copy into it. + if (hid_device->in_report_buffers[id_idx]) { + memcpy(buffer, hid_device->in_report_buffers[id_idx], reqlen); + return reqlen; + } } return 0; } @@ -302,7 +305,9 @@ void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t rep // Find device with this report id, and get the report id index. if (usb_hid_get_device_with_report_id(report_id, &hid_device, &id_idx)) { // If a report of the correct size has been read, save it in the proper OUT report buffer. - if (hid_device && hid_device->out_report_lengths[id_idx] >= bufsize) { + if (hid_device && + hid_device->out_report_buffers[id_idx] && + hid_device->out_report_lengths[id_idx] >= bufsize) { memcpy(hid_device->out_report_buffers[id_idx], buffer, bufsize); } } From 5b86c2401c3836e551639f28a0d73b1416f7f71f Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 17 Aug 2021 23:14:37 +0200 Subject: [PATCH 188/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 27 ++++++++++++++------------- locale/cs.po | 27 ++++++++++++++------------- locale/de_DE.po | 36 +++++++++++++++++++++++------------- locale/el.po | 27 ++++++++++++++------------- locale/en_GB.po | 27 ++++++++++++++------------- locale/es.po | 36 +++++++++++++++++++++++------------- locale/fil.po | 27 ++++++++++++++------------- locale/fr.po | 33 ++++++++++++++++++++------------- locale/hi.po | 27 ++++++++++++++------------- locale/it_IT.po | 27 ++++++++++++++------------- locale/ja.po | 27 ++++++++++++++------------- locale/ko.po | 27 ++++++++++++++------------- locale/nl.po | 27 ++++++++++++++------------- locale/pl.po | 27 ++++++++++++++------------- locale/pt_BR.po | 36 +++++++++++++++++++++++------------- locale/sv.po | 36 +++++++++++++++++++++++------------- locale/zh_Latn_pinyin.po | 36 +++++++++++++++++++++++------------- 17 files changed, 289 insertions(+), 221 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 22518a63e0..a8bed96e72 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -98,6 +98,10 @@ msgstr "indeks %q harus bilangan bulat, bukan %s" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "daftar %q harus berupa daftar" @@ -110,14 +114,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -134,10 +130,6 @@ msgstr "%q harus >= 0" msgid "%q must be >= 1" msgstr "%q harus >= 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -175,6 +167,10 @@ msgstr "%q harus berupa int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() mengambil posisi argumen %d tapi %d yang diberikan" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1254,7 +1250,7 @@ msgstr "Kesalahan definisi internal" msgid "Internal error #%d" msgstr "Kesalahan internal #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "" @@ -1538,6 +1534,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Harus berupa subclass %q." diff --git a/locale/cs.po b/locale/cs.po index 450c75e205..2050a5c2d4 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -94,6 +94,10 @@ msgstr "Indexy %q musí být celá čísla, nikoli %s" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "Seznam %q musí být seznam" @@ -106,14 +110,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -130,10 +126,6 @@ msgstr "%q musí být >= 0" msgid "%q must be >= 1" msgstr "%q musí být > = 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -171,6 +163,10 @@ msgstr "%q by měl být int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() vyžaduje %d pozičních argumentů, ale %d jich bylo zadáno" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1237,7 +1233,7 @@ msgstr "" msgid "Internal error #%d" msgstr "" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "" @@ -1521,6 +1517,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 8f4de5386c..84674e9893 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -99,6 +99,10 @@ msgstr "%q Indizes müssen Integer sein, nicht %s" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "%q Liste muss eine Liste sein" @@ -111,14 +115,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "%q muss 0-255 sein" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "%q muss 1-255 sein" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -135,10 +131,6 @@ msgstr "%q muss >= 0 sein" msgid "%q must be >= 1" msgstr "%q muss >= 1 sein" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "%q muss None oder zwischen 1 und len(report_descriptor)-1 sein" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -177,6 +169,10 @@ msgid "%q() takes %d positional arguments but %d were given" msgstr "" "%q() nimmt %d Argumente ohne Schlüsselwort an, aber es wurden %d angegeben" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1254,7 +1250,7 @@ msgstr "Interner Definitionsfehler" msgid "Internal error #%d" msgstr "Interner Fehler #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "Ungültiger %q" @@ -1539,6 +1535,11 @@ msgstr "Fehlender first_set_pin. Instruktion %d setzt Pin(s)" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Muss eine %q Unterklasse sein." @@ -4522,6 +4523,15 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "%q must be 0-255" +#~ msgstr "%q muss 0-255 sein" + +#~ msgid "%q must be 1-255" +#~ msgstr "%q muss 1-255 sein" + +#~ msgid "%q must be None or between 1 and len(report_descriptor)-1" +#~ msgstr "%q muss None oder zwischen 1 und len(report_descriptor)-1 sein" + #~ msgid "no available NIC" #~ msgstr "kein verfügbares Netzwerkadapter (NIC)" diff --git a/locale/el.po b/locale/el.po index f011a09bb6..7ff51ae54d 100644 --- a/locale/el.po +++ b/locale/el.po @@ -91,6 +91,10 @@ msgstr "" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "" @@ -103,14 +107,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -127,10 +123,6 @@ msgstr "" msgid "%q must be >= 1" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -168,6 +160,10 @@ msgstr "" msgid "%q() takes %d positional arguments but %d were given" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1234,7 +1230,7 @@ msgstr "" msgid "Internal error #%d" msgstr "" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "" @@ -1518,6 +1514,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 3400421b2a..cbc6072e11 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -100,6 +100,10 @@ msgstr "" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "%q list must be a list" @@ -112,14 +116,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -136,10 +132,6 @@ msgstr "%q must be >= 0" msgid "%q must be >= 1" msgstr "%q must be >= 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -177,6 +169,10 @@ msgstr "%q should be an int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() takes %d positional arguments but %d were given" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1249,7 +1245,7 @@ msgstr "Internal define error" msgid "Internal error #%d" msgstr "Internal error #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "Invalid %q" @@ -1533,6 +1529,11 @@ msgstr "Missing first_set_pin. Instruction %d sets pin(s)" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Must be a %q subclass." diff --git a/locale/es.po b/locale/es.po index f53451c342..8af1070316 100644 --- a/locale/es.po +++ b/locale/es.po @@ -102,6 +102,10 @@ msgstr "%q indices deben ser enteros, no %s" msgid "%q length must be %q" msgstr "el tamaño de %q debe ser %q" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "%q lista debe ser una lista" @@ -114,14 +118,6 @@ msgstr "%q debe ser <= %d" msgid "%q must be %d-%d" msgstr "%q debe ser %d-%d" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "%q debe ser de 0-255" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "%q debe estar entre 1-255" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q debe ser >= %d" @@ -138,10 +134,6 @@ msgstr "%q debe ser >= 0" msgid "%q must be >= 1" msgstr "%q debe ser >= 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "%q debe ser None o entre 1 y len(report_descriptor)-1" - #: py/argcheck.c msgid "%q must be a string" msgstr "%q debe ser una cadena" @@ -179,6 +171,10 @@ msgstr "%q debe ser un int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() toma %d argumentos posicionales pero %d fueron dados" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1267,7 +1263,7 @@ msgstr "Error interno de definición" msgid "Internal error #%d" msgstr "Error interno #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "%q inválido" @@ -1555,6 +1551,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Debe de ser una subclase de %q." @@ -4535,6 +4536,15 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "%q must be 0-255" +#~ msgstr "%q debe ser de 0-255" + +#~ msgid "%q must be 1-255" +#~ msgstr "%q debe estar entre 1-255" + +#~ msgid "%q must be None or between 1 and len(report_descriptor)-1" +#~ msgstr "%q debe ser None o entre 1 y len(report_descriptor)-1" + #~ msgid "no available NIC" #~ msgstr "NIC no disponible" diff --git a/locale/fil.po b/locale/fil.po index 78d8f09ea3..3e6c89386d 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -90,6 +90,10 @@ msgstr "%q indeks ay dapat integers, hindi %s" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "" @@ -102,14 +106,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -127,10 +123,6 @@ msgstr "" msgid "%q must be >= 1" msgstr "aarehas na haba dapat ang buffer slices" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -170,6 +162,10 @@ msgid "%q() takes %d positional arguments but %d were given" msgstr "" "Ang %q() ay kumukuha ng %d positional arguments pero %d lang ang binigay" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1249,7 +1245,7 @@ msgstr "" msgid "Internal error #%d" msgstr "" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "" @@ -1533,6 +1529,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" diff --git a/locale/fr.po b/locale/fr.po index d1ed977567..b9b6c7b108 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -102,6 +102,10 @@ msgstr "les indices %q doivent être des entiers, pas %s" msgid "%q length must be %q" msgstr "La longueur de %q doit être de %q" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "La liste %q doit être une liste" @@ -114,14 +118,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "%q doit être compris entre 0 et 255" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "%q doit être compris entre 1 et 255" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -138,10 +134,6 @@ msgstr "%q doit être >= 0" msgid "%q must be >= 1" msgstr "%q doit être >= 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "%q doit être une chaîne de caractères" @@ -179,6 +171,10 @@ msgstr "%q doit être un chiffre entier (int)" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() prend %d paramètres positionnels mais %d ont été donnés" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1277,7 +1273,7 @@ msgstr "Erreur de définition interne" msgid "Internal error #%d" msgstr "Erreur interne #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "%q invalide" @@ -1563,6 +1559,11 @@ msgstr "first_set_pin manquant. L'instruction %d règle la/les broche(s)" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Doit être une sous-classe de %q." @@ -4546,6 +4547,12 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "%q must be 0-255" +#~ msgstr "%q doit être compris entre 0 et 255" + +#~ msgid "%q must be 1-255" +#~ msgstr "%q doit être compris entre 1 et 255" + #~ msgid "no available NIC" #~ msgstr "adapteur réseau non disponible" diff --git a/locale/hi.po b/locale/hi.po index 4ffcfe51ba..664e2c37ea 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -91,6 +91,10 @@ msgstr "" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "" @@ -103,14 +107,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -127,10 +123,6 @@ msgstr "" msgid "%q must be >= 1" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -168,6 +160,10 @@ msgstr "" msgid "%q() takes %d positional arguments but %d were given" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1234,7 +1230,7 @@ msgstr "" msgid "Internal error #%d" msgstr "" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "" @@ -1518,6 +1514,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index b4f8a1c19c..13082dc048 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -100,6 +100,10 @@ msgstr "gli indici %q devono essere interi, non %s" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "lista %q deve essere una lista" @@ -112,14 +116,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -137,10 +133,6 @@ msgstr "%q deve essere >= 0" msgid "%q must be >= 1" msgstr "slice del buffer devono essere della stessa lunghezza" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -178,6 +170,10 @@ msgstr "%q dovrebbe essere un int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() prende %d argomenti posizionali ma ne sono stati forniti %d" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1258,7 +1254,7 @@ msgstr "" msgid "Internal error #%d" msgstr "" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "" @@ -1546,6 +1542,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" diff --git a/locale/ja.po b/locale/ja.po index a51b48f55d..680adcf705 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -96,6 +96,10 @@ msgstr "" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "%q リストはリストでなければなりません" @@ -108,14 +112,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -132,10 +128,6 @@ msgstr "%qは0以上でなければなりません" msgid "%q must be >= 1" msgstr "%qは1以上でなければなりません" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -173,6 +165,10 @@ msgstr "%qはint型でなければなりません" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() は %d 個の位置引数を取りますが、%d 個与えられました" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1245,7 +1241,7 @@ msgstr "内部定義エラー" msgid "Internal error #%d" msgstr "内部エラー #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "不正な %q" @@ -1529,6 +1525,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "%q のサブクラスでなければなりません" diff --git a/locale/ko.po b/locale/ko.po index b3dbf6c3e4..87e4c0583f 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -92,6 +92,10 @@ msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "" @@ -104,14 +108,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -128,10 +124,6 @@ msgstr "" msgid "%q must be >= 1" msgstr "%q 는 >=1이어야합니다" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -169,6 +161,10 @@ msgstr "%q 는 정수(int) 여야합니다" msgid "%q() takes %d positional arguments but %d were given" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1237,7 +1233,7 @@ msgstr "" msgid "Internal error #%d" msgstr "" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "" @@ -1521,6 +1517,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 344b214289..735861fa82 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -94,6 +94,10 @@ msgstr "%q indexen moeten integers zijn, niet %s" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "%q lijst moet een lijst zijn" @@ -106,14 +110,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -130,10 +126,6 @@ msgstr "%q moet >= 0 zijn" msgid "%q must be >= 1" msgstr "%q moet >= 1 zijn" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -171,6 +163,10 @@ msgstr "%q moet een int zijn" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() verwacht %d positionele argumenten maar kreeg %d" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1246,7 +1242,7 @@ msgstr "Interne define fout" msgid "Internal error #%d" msgstr "Interne fout #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "Ongeldige %q" @@ -1530,6 +1526,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "%q moet een subklasse zijn." diff --git a/locale/pl.po b/locale/pl.po index 268e12f340..f7c46fa7e3 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -96,6 +96,10 @@ msgstr "%q indeks musi być liczbą całkowitą, a nie %s" msgid "%q length must be %q" msgstr "" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "" @@ -108,14 +112,6 @@ msgstr "" msgid "%q must be %d-%d" msgstr "" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -132,10 +128,6 @@ msgstr "%q musi być >= 0" msgid "%q must be >= 1" msgstr "%q musi być >= 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "" - #: py/argcheck.c msgid "%q must be a string" msgstr "" @@ -173,6 +165,10 @@ msgstr "%q powinno być typu int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() bierze %d argumentów pozycyjnych, lecz podano %d" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1245,7 +1241,7 @@ msgstr "" msgid "Internal error #%d" msgstr "Błąd wewnętrzny #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "Nieprawidłowe %q" @@ -1529,6 +1525,11 @@ msgstr "" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 93e8b702c6..33bd704e25 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -100,6 +100,10 @@ msgstr "Os índices %q devem ser inteiros, e não %s" msgid "%q length must be %q" msgstr "o comprimento %q deve ser %q" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "A lista %q deve ser uma lista" @@ -112,14 +116,6 @@ msgstr "o %q deve ser <= %d" msgid "%q must be %d-%d" msgstr "o %q deve ser %d-%d" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "%q deve ser entre 0-255" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "%q deve ser 1-255" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "o %q deve ser >= %d" @@ -136,10 +132,6 @@ msgstr "%q deve ser >= 0" msgid "%q must be >= 1" msgstr "%q deve ser >= 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "%q deve ser None ou entre 1 e len(report_descriptor)-1" - #: py/argcheck.c msgid "%q must be a string" msgstr "%q deve ser uma string" @@ -177,6 +169,10 @@ msgstr "%q deve ser um int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() recebe %d argumentos posicionais, porém %d foram informados" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1268,7 +1264,7 @@ msgstr "Erro interno de definição" msgid "Internal error #%d" msgstr "Erro interno #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "%q Inválido" @@ -1552,6 +1548,11 @@ msgstr "Faltando first_set_pin. A instrução %d define os pinos(s)" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "Falta o jmp_pin. A instrução %d salta no pino" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Deve ser uma subclasse %q." @@ -4545,6 +4546,15 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "%q must be 0-255" +#~ msgstr "%q deve ser entre 0-255" + +#~ msgid "%q must be 1-255" +#~ msgstr "%q deve ser 1-255" + +#~ msgid "%q must be None or between 1 and len(report_descriptor)-1" +#~ msgstr "%q deve ser None ou entre 1 e len(report_descriptor)-1" + #~ msgid "limit should be an int" #~ msgstr "o limite deve ser um inteiro" diff --git a/locale/sv.po b/locale/sv.po index 72de1cd329..82c9e1ac92 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -99,6 +99,10 @@ msgstr "Indexet %q måste vara ett heltal, inte %s" msgid "%q length must be %q" msgstr "längden på %q måste vara %q" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "%q-listan måste vara en lista" @@ -111,14 +115,6 @@ msgstr "%q måste vara <=%d" msgid "%q must be %d-%d" msgstr "%q måste vara %d-%d" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "%q måste vara 0-255" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "%q måste vara 1-255" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q måste vara >= %d" @@ -135,10 +131,6 @@ msgstr "%q måste vara >= 0" msgid "%q must be >= 1" msgstr "%q måste vara >= 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "%q måste vara None eller mellan 1 och len(report_descriptor)-1" - #: py/argcheck.c msgid "%q must be a string" msgstr "%q måste vara en sträng" @@ -176,6 +168,10 @@ msgstr "%q ska vara en int" msgid "%q() takes %d positional arguments but %d were given" msgstr "% q () tar% d positionsargument men% d gavs" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1253,7 +1249,7 @@ msgstr "Internt define-fel" msgid "Internal error #%d" msgstr "Internt fel #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "Ogiltig %q" @@ -1538,6 +1534,11 @@ msgstr "Saknad first_set_pin. Instruktion %d sätter pinnar" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "Saknar jmp_pin. Instruktion %d hoppar på pin" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Måste vara en %q-subklass." @@ -4504,6 +4505,15 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "%q must be 0-255" +#~ msgstr "%q måste vara 0-255" + +#~ msgid "%q must be 1-255" +#~ msgstr "%q måste vara 1-255" + +#~ msgid "%q must be None or between 1 and len(report_descriptor)-1" +#~ msgstr "%q måste vara None eller mellan 1 och len(report_descriptor)-1" + #~ msgid "limit should be an int" #~ msgstr "limit måste vara en int" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index a172375454..881c8969f2 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -101,6 +101,10 @@ msgstr "%q suǒyǐn bìxū shì zhěngshù, ér bùshì %s" msgid "%q length must be %q" msgstr "%q cháng dù bì xū wéi %q" +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "%q lièbiǎo bìxū shì lièbiǎo" @@ -113,14 +117,6 @@ msgstr "%q bì xū <= %d" msgid "%q must be %d-%d" msgstr "%q bì xū wéi %d-%d" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 0-255" -msgstr "%q bì xū wéi 0-255" - -#: shared-bindings/usb_hid/Device.c -msgid "%q must be 1-255" -msgstr "%q bì xū wéi 1-255" - #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q bì xū >= %d" @@ -137,10 +133,6 @@ msgstr "%q Bìxū > = 0" msgid "%q must be >= 1" msgstr "%q bìxū dàyú huò děngyú 1" -#: shared-bindings/usb_hid/Device.c -msgid "%q must be None or between 1 and len(report_descriptor)-1" -msgstr "%q bì xū wéi wú huò zài 1 hé len(report_descriptor)-1 zhī jiān" - #: py/argcheck.c msgid "%q must be a string" msgstr "%q bì xū shì yí gè zì fú chuàn" @@ -178,6 +170,10 @@ msgstr "%q yīnggāi shì yīgè int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() cǎiyòng %d wèizhì cānshù, dàn gěi chū %d" +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format msgid "%s error 0x%x" @@ -1256,7 +1252,7 @@ msgstr "Nèibù dìngyì cuòwù" msgid "Internal error #%d" msgstr "nèi bù cuò wù #%d" -#: shared-bindings/sdioio/SDCard.c +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c msgid "Invalid %q" msgstr "wú xiào %q" @@ -1541,6 +1537,11 @@ msgstr "quē shǎo dì yī zǔ yǐn jiǎo. zhǐ lìng %d shè zhì yǐn jiǎo" msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "" +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." msgstr "Bìxū shì %q zi lèi." @@ -4504,6 +4505,15 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "%q must be 0-255" +#~ msgstr "%q bì xū wéi 0-255" + +#~ msgid "%q must be 1-255" +#~ msgstr "%q bì xū wéi 1-255" + +#~ msgid "%q must be None or between 1 and len(report_descriptor)-1" +#~ msgstr "%q bì xū wéi wú huò zài 1 hé len(report_descriptor)-1 zhī jiān" + #~ msgid "no available NIC" #~ msgstr "méiyǒu kěyòng de NIC" From 168ed355b103cbeffbf632a861bde7b945eb5222 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Tue, 17 Aug 2021 17:55:26 -0500 Subject: [PATCH 189/418] Made check function generic --- locale/circuitpython.pot | 12 ++++++--- shared-bindings/keypad/KeyMatrix.c | 26 +++----------------- shared-bindings/keypad/Keys.c | 1 + shared-bindings/microcontroller/Pin.c | 35 +++++++++++++++++++++++++++ shared-bindings/microcontroller/Pin.h | 2 ++ 5 files changed, 50 insertions(+), 26 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 8fee3982a6..7e2794ee09 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -66,6 +66,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate objects" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "" @@ -1998,10 +2006,6 @@ msgstr "" msgid "Row entry must be digitalio.DigitalInOut" msgstr "" -#: shared-bindings/keypad/KeyMatrix.c -msgid "Row or Column pin duplicated" -msgstr "" - #: main.c msgid "Running in safe mode! Not running saved code.\n" msgstr "" diff --git a/shared-bindings/keypad/KeyMatrix.c b/shared-bindings/keypad/KeyMatrix.c index eb87d2bd22..8b87432074 100644 --- a/shared-bindings/keypad/KeyMatrix.c +++ b/shared-bindings/keypad/KeyMatrix.c @@ -90,6 +90,10 @@ STATIC mp_obj_t keypad_keymatrix_make_new(const mp_obj_type_t *type, size_t n_ar mcu_pin_obj_t *row_pins_array[num_row_pins]; mcu_pin_obj_t *column_pins_array[num_column_pins]; + validate_no_duplicate_pins(row_pins, MP_QSTR_row_pins); + validate_no_duplicate_pins(column_pins, MP_QSTR_column_pins); + validate_no_duplicate_pins_2(row_pins, column_pins, MP_QSTR_row_pins, MP_QSTR_column_pins); + for (size_t row = 0; row < num_row_pins; row++) { mcu_pin_obj_t *pin = validate_obj_is_free_pin(mp_obj_subscr(row_pins, MP_OBJ_NEW_SMALL_INT(row), MP_OBJ_SENTINEL)); @@ -102,28 +106,6 @@ STATIC mp_obj_t keypad_keymatrix_make_new(const mp_obj_type_t *type, size_t n_ar column_pins_array[column] = pin; } - for (size_t row = 0; row < num_row_pins; row++) { - for (size_t row2 = row + 1; row2 < num_row_pins; row2++) { - if (row_pins_array[row] == row_pins_array[row2]) { - mp_raise_ValueError(translate("Row or Column pin duplicated")); - } - } - - for (size_t column = 0; column < num_column_pins; column++) { - if (row_pins_array[row] == column_pins_array[column]) { - mp_raise_ValueError(translate("Row or Column pin duplicated")); - } - } - } - - for (size_t column = 0; column < num_column_pins; column++) { - for (size_t column2 = column + 1; column2 < num_column_pins; column2++) { - if (column_pins_array[column] == column_pins_array[column2]) { - mp_raise_ValueError(translate("Row or Column pin duplicated")); - } - } - } - common_hal_keypad_keymatrix_construct(self, num_row_pins, row_pins_array, num_column_pins, column_pins_array, args[ARG_columns_to_anodes].u_bool, interval, max_events); return MP_OBJ_FROM_PTR(self); } diff --git a/shared-bindings/keypad/Keys.c b/shared-bindings/keypad/Keys.c index d616bcff84..dc533a2e2b 100644 --- a/shared-bindings/keypad/Keys.c +++ b/shared-bindings/keypad/Keys.c @@ -78,6 +78,7 @@ STATIC mp_obj_t keypad_keys_make_new(const mp_obj_type_t *type, size_t n_args, c mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); mp_obj_t pins = args[ARG_pins].u_obj; + validate_no_duplicate_pins(pins, MP_QSTR_row_pins); // mp_obj_len() will be >= 0. const size_t num_pins = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(pins)); diff --git a/shared-bindings/microcontroller/Pin.c b/shared-bindings/microcontroller/Pin.c index acb1710f3d..9984669714 100644 --- a/shared-bindings/microcontroller/Pin.c +++ b/shared-bindings/microcontroller/Pin.c @@ -105,6 +105,41 @@ mcu_pin_obj_t *validate_obj_is_free_pin(mp_obj_t obj) { return pin; } +// Validate every element in the list is a unique pin +void validate_no_duplicate_pins(mp_obj_t seq, qstr arg_name) { + mp_int_t num_pins = MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq)); + + for (size_t pin_cnt = 0; pin_cnt < num_pins; pin_cnt++) { + mp_obj_t pin1_obj = mp_obj_subscr(seq, MP_OBJ_NEW_SMALL_INT(pin_cnt), MP_OBJ_SENTINEL); + mcu_pin_obj_t *pin1 = validate_obj_is_pin(pin1_obj); + + for (size_t pin_cnt_2 = pin_cnt + 1; pin_cnt_2 < num_pins; pin_cnt_2++) { + mp_obj_t pin2_obj = mp_obj_subscr(seq, MP_OBJ_NEW_SMALL_INT(pin_cnt_2), MP_OBJ_SENTINEL); + mcu_pin_obj_t *pin2 = validate_obj_is_pin(pin2_obj); + if (pin1 == pin2) { + mp_raise_TypeError_varg(translate("%q contains duplicate pins"), arg_name); + } + } + } +} + +void validate_no_duplicate_pins_2(mp_obj_t seq1, mp_obj_t seq2, qstr arg_name1, qstr arg_name2) { + const size_t num_pins_1 = MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq1)); + const size_t num_pins_2 = MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq2)); + + for (size_t pin_cnt_1 = 0; pin_cnt_1 < num_pins_1; pin_cnt_1++) { + mp_obj_t pin1_obj = mp_obj_subscr(seq1, MP_OBJ_NEW_SMALL_INT(pin_cnt_1), MP_OBJ_SENTINEL); + mcu_pin_obj_t *pin1 = validate_obj_is_pin(pin1_obj); + + for (size_t pin_cnt_2 = 0; pin_cnt_2 < num_pins_2; pin_cnt_2++) { + mp_obj_t pin2_obj = mp_obj_subscr(seq2, MP_OBJ_NEW_SMALL_INT(pin_cnt_2), MP_OBJ_SENTINEL); + if (pin1_obj == pin2_obj) { + mp_raise_TypeError_varg(translate("%q and %q contain duplicate objects"), arg_name1, arg_name2); + } + } + } +} + // Validate every element in the list to be a free pin. void validate_list_is_free_pins(qstr what, mcu_pin_obj_t **pins_out, mp_int_t max_pins, mp_obj_t seq, uint8_t *count_out) { mp_int_t len = MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq)); diff --git a/shared-bindings/microcontroller/Pin.h b/shared-bindings/microcontroller/Pin.h index 44019ff267..a8ac6eeb1c 100644 --- a/shared-bindings/microcontroller/Pin.h +++ b/shared-bindings/microcontroller/Pin.h @@ -37,6 +37,8 @@ mcu_pin_obj_t *validate_obj_is_pin(mp_obj_t obj); mcu_pin_obj_t *validate_obj_is_pin_or_none(mp_obj_t obj); mcu_pin_obj_t *validate_obj_is_free_pin(mp_obj_t obj); mcu_pin_obj_t *validate_obj_is_free_pin_or_none(mp_obj_t obj); +void validate_no_duplicate_pins(mp_obj_t seq, qstr arg_name); +void validate_no_duplicate_pins_2(mp_obj_t seq1, mp_obj_t seq2, qstr arg_name1, qstr arg_name2); void validate_list_is_free_pins(qstr what, mcu_pin_obj_t **pins_out, mp_int_t max_pins, mp_obj_t seq, uint8_t *count_out); void validate_pins(qstr what, uint8_t *pin_nos, mp_int_t max_pins, mp_obj_t seq, uint8_t *count_out); From e5dc7221765467b49970b2144f8485d91cad6c48 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Tue, 17 Aug 2021 19:16:26 -0500 Subject: [PATCH 190/418] Fix for int type and pin validation --- shared-bindings/microcontroller/Pin.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/shared-bindings/microcontroller/Pin.c b/shared-bindings/microcontroller/Pin.c index 9984669714..d709c669af 100644 --- a/shared-bindings/microcontroller/Pin.c +++ b/shared-bindings/microcontroller/Pin.c @@ -107,7 +107,7 @@ mcu_pin_obj_t *validate_obj_is_free_pin(mp_obj_t obj) { // Validate every element in the list is a unique pin void validate_no_duplicate_pins(mp_obj_t seq, qstr arg_name) { - mp_int_t num_pins = MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq)); + const size_t num_pins = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq)); for (size_t pin_cnt = 0; pin_cnt < num_pins; pin_cnt++) { mp_obj_t pin1_obj = mp_obj_subscr(seq, MP_OBJ_NEW_SMALL_INT(pin_cnt), MP_OBJ_SENTINEL); @@ -124,8 +124,8 @@ void validate_no_duplicate_pins(mp_obj_t seq, qstr arg_name) { } void validate_no_duplicate_pins_2(mp_obj_t seq1, mp_obj_t seq2, qstr arg_name1, qstr arg_name2) { - const size_t num_pins_1 = MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq1)); - const size_t num_pins_2 = MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq2)); + const size_t num_pins_1 = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq1)); + const size_t num_pins_2 = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq2)); for (size_t pin_cnt_1 = 0; pin_cnt_1 < num_pins_1; pin_cnt_1++) { mp_obj_t pin1_obj = mp_obj_subscr(seq1, MP_OBJ_NEW_SMALL_INT(pin_cnt_1), MP_OBJ_SENTINEL); @@ -133,7 +133,8 @@ void validate_no_duplicate_pins_2(mp_obj_t seq1, mp_obj_t seq2, qstr arg_name1, for (size_t pin_cnt_2 = 0; pin_cnt_2 < num_pins_2; pin_cnt_2++) { mp_obj_t pin2_obj = mp_obj_subscr(seq2, MP_OBJ_NEW_SMALL_INT(pin_cnt_2), MP_OBJ_SENTINEL); - if (pin1_obj == pin2_obj) { + mcu_pin_obj_t *pin2 = validate_obj_is_pin(pin2_obj); + if (pin1 == pin2) { mp_raise_TypeError_varg(translate("%q and %q contain duplicate objects"), arg_name1, arg_name2); } } From 11f1c42bb5b114acf3661d28c48521b309536fc3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 17 Aug 2021 17:41:59 -0700 Subject: [PATCH 191/418] Turn on unicode for FATFS This also tweaks the repr for unicode strings to only escape a few utf-8 code points. This makes emoji show in os.listdir() for example. Also, enable exfat support on full builds. Fixes #5146 --- lib/oofatfs/ff.c | 2 ++ lib/oofatfs/ffconf.h | 5 ++++- py/circuitpy_mpconfig.h | 3 +++ py/objstrunicode.c | 18 +++++++++++++----- tests/unicode/unicode_repr.py | 8 ++++++++ 5 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 tests/unicode/unicode_repr.py diff --git a/lib/oofatfs/ff.c b/lib/oofatfs/ff.c index 06743947e0..68c662c7a3 100644 --- a/lib/oofatfs/ff.c +++ b/lib/oofatfs/ff.c @@ -1175,6 +1175,7 @@ static DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x7FF break; } } + MP_FALLTHROUGH /* go to default */ #endif default: @@ -5518,6 +5519,7 @@ FRESULT f_mkfs ( } st = 1; /* Do not compress short run */ /* go to next case */ + MP_FALLTHROUGH case 1: ch = si++; /* Fill the short run */ if (--j == 0) st = 0; diff --git a/lib/oofatfs/ffconf.h b/lib/oofatfs/ffconf.h index 7072edf153..a4a55a0fa2 100644 --- a/lib/oofatfs/ffconf.h +++ b/lib/oofatfs/ffconf.h @@ -163,8 +163,11 @@ / memory for the working buffer, memory management functions, ff_memalloc() and / ff_memfree() in ffsystem.c, need to be added to the project. */ - +#ifdef MICROPY_FATFS_LFN_UNICODE +#define FF_LFN_UNICODE (MICROPY_FATFS_LFN_UNICODE) +#else #define FF_LFN_UNICODE 0 +#endif /* This option switches the character encoding on the API when LFN is enabled. / / 0: ANSI/OEM in current CP (TCHAR = char) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 4d7510eb7e..45580ab255 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -132,12 +132,15 @@ // // 1 = SFN/ANSI 437=LFN/U.S.(OEM) #define MICROPY_FATFS_ENABLE_LFN (1) +// Code page is ignored because unicode is enabled. // Don't use parens on the value below because it gets combined with a prefix in // the preprocessor. #define MICROPY_FATFS_LFN_CODE_PAGE 437 #define MICROPY_FATFS_USE_LABEL (1) #define MICROPY_FATFS_RPATH (2) #define MICROPY_FATFS_MULTI_PARTITION (1) +#define MICROPY_FATFS_EXFAT (CIRCUITPY_FULL_BUILD) +#define MICROPY_FATFS_LFN_UNICODE 2 // UTF-8 // Only enable this if you really need it. It allocates a byte cache of this size. // #define MICROPY_FATFS_MAX_SS (4096) diff --git a/py/objstrunicode.c b/py/objstrunicode.c index 47d695cf6a..eb79d54991 100644 --- a/py/objstrunicode.c +++ b/py/objstrunicode.c @@ -41,6 +41,13 @@ STATIC mp_obj_t mp_obj_new_str_iterator(mp_obj_t str, mp_obj_iter_buf_t *iter_bu /******************************************************************************/ /* str */ + +// These settings approximate CPython's printability. It is not +// exhaustive and may print "unprintable" characters. All ASCII control codes +// are escaped along with variable space widths and paragraph designators. +// Unlike CPython, we do not escape private use codes or reserved characters. +// We assume that the unicode is well formed. +// CPython policy is documented here: https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Objects/unicodectype.c#L147-L159 STATIC void uni_print_quoted(const mp_print_t *print, const byte *str_data, uint str_len) { // this escapes characters, but it will be very slow to print (calling print many times) bool has_single_quote = false; @@ -61,25 +68,26 @@ STATIC void uni_print_quoted(const mp_print_t *print, const byte *str_data, uint while (s < top) { unichar ch; ch = utf8_get_char(s); + const byte *start = s; s = utf8_next_char(s); if (ch == quote_char) { mp_printf(print, "\\%c", quote_char); } else if (ch == '\\') { mp_print_str(print, "\\\\"); - } else if (32 <= ch && ch <= 126) { - mp_printf(print, "%c", ch); } else if (ch == '\n') { mp_print_str(print, "\\n"); } else if (ch == '\r') { mp_print_str(print, "\\r"); } else if (ch == '\t') { mp_print_str(print, "\\t"); - } else if (ch < 0x100) { + } else if (ch <= 0x1f || (0x7f <= ch && ch <= 0xa0) || ch == 0xad) { mp_printf(print, "\\x%02x", ch); - } else if (ch < 0x10000) { + } else if ((0x2000 <= ch && ch <= 0x200f) || ch == 0x2028 || ch == 0x2029) { mp_printf(print, "\\u%04x", ch); } else { - mp_printf(print, "\\U%08x", ch); + // Print the full character out. + int width = s - start; + mp_print_strn(print, (const char *)start, width, 0, ' ', width); } } mp_printf(print, "%c", quote_char); diff --git a/tests/unicode/unicode_repr.py b/tests/unicode/unicode_repr.py new file mode 100644 index 0000000000..62485deb1d --- /dev/null +++ b/tests/unicode/unicode_repr.py @@ -0,0 +1,8 @@ +# ¥ is 1 byte wide +# Œ is 2 bytes wide +# 😅 is 4 bytes wide + +a = "hello¥Œ😅.txt\n\r\t'\"\\" + +print(a) +print(repr(a)) From 1d7e24484c33b36b1251ecde2b72e43b50e0d99f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 17 Aug 2021 18:18:46 -0700 Subject: [PATCH 192/418] Fix unicode test --- tests/unicode/unicode.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unicode/unicode.py b/tests/unicode/unicode.py index 072e049fde..8ac34ca282 100644 --- a/tests/unicode/unicode.py +++ b/tests/unicode/unicode.py @@ -19,8 +19,7 @@ print(enc, enc.decode() == s) # printing of unicode chars using repr # NOTE: for some characters (eg \u10ff) we differ to CPython -print(repr("a\uffff")) -print(repr("a\U0001ffff")) +print(repr("a\u2000")) # test invalid escape code try: From 3c4c663d36c20678f14b13c28b475eadd4d9d203 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 18 Aug 2021 10:46:22 -0400 Subject: [PATCH 193/418] update tinyusb --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tinyusb b/lib/tinyusb index 184f1b723f..3a248951e2 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 184f1b723fb811016063deccab9e81640e5c3e7f +Subproject commit 3a248951e2744ba89f5fb96eda85a971001115f0 From d02a4b9f71a757686d7273673afcb61632f9ee73 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Wed, 18 Aug 2021 10:16:44 -0500 Subject: [PATCH 194/418] Removed ulab to make space in blackpill with flash board --- .../boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk index e095d69403..9da7163743 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.mk @@ -16,3 +16,6 @@ MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F411_nofs.ld + +# Too big for the flash +CIRCUITPY_ULAB = 0 From 2b64318a57059b26defbaee66d26ccf344877695 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 18 Aug 2021 10:20:09 -0500 Subject: [PATCH 195/418] Update all implementations of common_hal_busio_spi_read to honor write_value (nrf, rp2040, and cxd56) .. as well as a misleading comment that said that read always output zeros. Closes: #3447 --- ports/cxd56/common-hal/busio/SPI.c | 3 ++- ports/nrf/common-hal/busio/SPI.c | 14 ++------------ ports/raspberrypi/common-hal/busio/SPI.c | 4 ++-- shared-bindings/busio/SPI.h | 2 +- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/ports/cxd56/common-hal/busio/SPI.c b/ports/cxd56/common-hal/busio/SPI.c index ff834f7f38..ea481e136d 100644 --- a/ports/cxd56/common-hal/busio/SPI.c +++ b/ports/cxd56/common-hal/busio/SPI.c @@ -132,7 +132,8 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self, const uint8_t *data, size } bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value) { - SPI_EXCHANGE(self->spi_dev, NULL, data, len); + memset(data, write_value, len); + SPI_EXCHANGE(self->spi_dev, data, data, len); return true; } diff --git a/ports/nrf/common-hal/busio/SPI.c b/ports/nrf/common-hal/busio/SPI.c index f606fe898f..55d1c967ac 100644 --- a/ports/nrf/common-hal/busio/SPI.c +++ b/ports/nrf/common-hal/busio/SPI.c @@ -269,18 +269,8 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self, const uint8_t *data, size } bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value) { - uint8_t *next_chunk = data; - - while (len > 0) { - size_t chunk_size = MIN(len, self->spim_peripheral->max_xfer_size); - const nrfx_spim_xfer_desc_t xfer = NRFX_SPIM_XFER_RX(next_chunk, chunk_size); - if (nrfx_spim_xfer(&self->spim_peripheral->spim, &xfer, 0) != NRFX_SUCCESS) { - return false; - } - next_chunk += chunk_size; - len -= chunk_size; - } - return true; + memset(data, write_value, len); + return common_hal_busio_spi_transfer(self, data, data, len); } bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_out, uint8_t *data_in, size_t len) { diff --git a/ports/raspberrypi/common-hal/busio/SPI.c b/ports/raspberrypi/common-hal/busio/SPI.c index ab295c4ff1..57af713b49 100644 --- a/ports/raspberrypi/common-hal/busio/SPI.c +++ b/ports/raspberrypi/common-hal/busio/SPI.c @@ -263,8 +263,8 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self, bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value) { - uint32_t data_out = write_value << 24 | write_value << 16 | write_value << 8 | write_value; - return _transfer(self, (const uint8_t *)&data_out, MIN(4, len), data, len); + memset(data, write_value, len); + return _transfer(self, data, len, data, len); } bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_out, uint8_t *data_in, size_t len) { diff --git a/shared-bindings/busio/SPI.h b/shared-bindings/busio/SPI.h index 67ca752bab..f4737da0c0 100644 --- a/shared-bindings/busio/SPI.h +++ b/shared-bindings/busio/SPI.h @@ -52,7 +52,7 @@ extern void common_hal_busio_spi_unlock(busio_spi_obj_t *self); // Writes out the given data. extern bool common_hal_busio_spi_write(busio_spi_obj_t *self, const uint8_t *data, size_t len); -// Reads in len bytes while outputting zeroes. +// Reads in len bytes while outputting the byte write_value. extern bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value); // Reads and write len bytes simultaneously. From e0ce5ff0452ccd7db78266b6c9fdb1356cb20625 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 18 Aug 2021 08:22:29 -0700 Subject: [PATCH 196/418] Fix some builds by disabling exfat --- ports/atmel-samd/mpconfigport.h | 2 ++ ports/nrf/boards/pca10100/mpconfigboard.h | 2 ++ ports/nrf/boards/simmel/mpconfigboard.h | 2 ++ ports/stm/boards/espruino_pico/mpconfigboard.h | 2 ++ py/circuitpy_mpconfig.h | 5 ++++- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 686bdcd294..a336d7812b 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -59,6 +59,8 @@ X(EISDIR) \ X(EINVAL) \ +#define MICROPY_FATFS_EXFAT 0 + #endif // SAMD21 //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/ports/nrf/boards/pca10100/mpconfigboard.h b/ports/nrf/boards/pca10100/mpconfigboard.h index 00c10fc255..561a3b7ab3 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.h +++ b/ports/nrf/boards/pca10100/mpconfigboard.h @@ -48,3 +48,5 @@ #define BLEIO_ATTR_TAB_SIZE (BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 2) #define SOFTDEVICE_RAM_SIZE (32 * 1024) + +#define MICROPY_FATFS_EXFAT 0 diff --git a/ports/nrf/boards/simmel/mpconfigboard.h b/ports/nrf/boards/simmel/mpconfigboard.h index 9361e8ef23..984d3df03c 100644 --- a/ports/nrf/boards/simmel/mpconfigboard.h +++ b/ports/nrf/boards/simmel/mpconfigboard.h @@ -57,3 +57,5 @@ #define BLEIO_ATTR_TAB_SIZE (BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 2) #define SOFTDEVICE_RAM_SIZE (32 * 1024) + +#define MICROPY_FATFS_EXFAT 0 diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.h b/ports/stm/boards/espruino_pico/mpconfigboard.h index 1623d57aa0..cd5cd23255 100644 --- a/ports/stm/boards/espruino_pico/mpconfigboard.h +++ b/ports/stm/boards/espruino_pico/mpconfigboard.h @@ -41,3 +41,5 @@ #define BOARD_HAS_LOW_SPEED_CRYSTAL (0) // #define BOARD_HAS_LOW_SPEED_CRYSTAL (1) // #define LSE_VALUE ((uint32_t)32768) + +#define MICROPY_FATFS_EXFAT 0 diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 45580ab255..49abf71d62 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -139,7 +139,6 @@ #define MICROPY_FATFS_USE_LABEL (1) #define MICROPY_FATFS_RPATH (2) #define MICROPY_FATFS_MULTI_PARTITION (1) -#define MICROPY_FATFS_EXFAT (CIRCUITPY_FULL_BUILD) #define MICROPY_FATFS_LFN_UNICODE 2 // UTF-8 // Only enable this if you really need it. It allocates a byte cache of this size. @@ -212,6 +211,10 @@ typedef long mp_off_t; #define MICROPY_PY_URE_MATCH_SPAN_START_END (CIRCUITPY_RE) #define MICROPY_PY_URE_SUB (CIRCUITPY_RE) +#ifndef MICROPY_FATFS_EXFAT +#define MICROPY_FATFS_EXFAT (CIRCUITPY_FULL_BUILD) +#endif + // LONGINT_IMPL_xxx are defined in the Makefile. // #ifdef LONGINT_IMPL_NONE From 0390f812be76770c77ecd6224ba2e2e0c839603e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 18 Aug 2021 08:55:52 -0700 Subject: [PATCH 197/418] Fix RP2040 I2C instance check --- ports/raspberrypi/common-hal/busio/I2C.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/raspberrypi/common-hal/busio/I2C.c b/ports/raspberrypi/common-hal/busio/I2C.c index a72675d6b6..96038b4241 100644 --- a/ports/raspberrypi/common-hal/busio/I2C.c +++ b/ports/raspberrypi/common-hal/busio/I2C.c @@ -59,9 +59,10 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, self->peripheral = NULL; // I2C pins have a regular pattern. SCL is always odd and SDA is even. They match up in pairs // so we can divide by two to get the instance. This pattern repeats. - if (scl->number % 2 == 1 && sda->number % 2 == 0 && scl->number / 2 == sda->number / 2) { - size_t instance = (scl->number / 2) % 2; - self->peripheral = i2c[instance]; + size_t scl_instance = (scl->number / 2) % 2; + size_t sda_instance = (sda->number / 2) % 2; + if (scl->number % 2 == 1 && sda->number % 2 == 0 && scl_instance == sda_instance) { + self->peripheral = i2c[sda_instance]; } if (self->peripheral == NULL) { mp_raise_ValueError(translate("Invalid pins")); From cabe96e188fd1eaedb2c829976cbe58f9e6f7a9c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 18 Aug 2021 11:35:06 -0500 Subject: [PATCH 198/418] canio: Run background tasks while waiting for message reception Closes: #5004 --- ports/atmel-samd/common-hal/canio/Listener.c | 7 +++++++ ports/stm/common-hal/canio/Listener.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/ports/atmel-samd/common-hal/canio/Listener.c b/ports/atmel-samd/common-hal/canio/Listener.c index adb3048496..ce09764757 100644 --- a/ports/atmel-samd/common-hal/canio/Listener.c +++ b/ports/atmel-samd/common-hal/canio/Listener.c @@ -30,6 +30,8 @@ #include "py/obj.h" #include "py/runtime.h" +#include "lib/utils/interrupt_char.h" + #include "common-hal/canio/__init__.h" #include "common-hal/canio/Listener.h" #include "shared-bindings/canio/Listener.h" @@ -356,6 +358,11 @@ mp_obj_t common_hal_canio_listener_receive(canio_listener_obj_t *self) { if (supervisor_ticks_ms64() > deadline) { return NULL; } + RUN_BACKGROUND_TASKS; + // Allow user to break out of a timeout with a KeyboardInterrupt. + if (mp_hal_is_interrupted()) { + return NULL; + } } while (!common_hal_canio_listener_in_waiting(self)); } int index = self->hw->RXFS.bit.F0GI; diff --git a/ports/stm/common-hal/canio/Listener.c b/ports/stm/common-hal/canio/Listener.c index 23634eba69..3aca0d067b 100644 --- a/ports/stm/common-hal/canio/Listener.c +++ b/ports/stm/common-hal/canio/Listener.c @@ -30,6 +30,8 @@ #include "py/obj.h" #include "py/runtime.h" +#include "lib/utils/interrupt_char.h" + #include "common-hal/canio/__init__.h" #include "common-hal/canio/Listener.h" #include "shared-bindings/canio/Listener.h" @@ -272,6 +274,11 @@ mp_obj_t common_hal_canio_listener_receive(canio_listener_obj_t *self) { if (supervisor_ticks_ms64() > deadline) { return NULL; } + RUN_BACKGROUND_TASKS; + // Allow user to break out of a timeout with a KeyboardInterrupt. + if ( mp_hal_is_interrupted() ) { + return NULL; + } } while (!common_hal_canio_listener_in_waiting(self)); } From ae923db06d50a7d5d74c82f3b5352afeeadb059e Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Wed, 18 Aug 2021 17:30:42 -0400 Subject: [PATCH 199/418] Add SPEAKER_ENABLE pin to MacroPad. --- ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c index f5ff3618c9..922057e972 100644 --- a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c @@ -17,7 +17,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + // SPEAKER_SHUTDOWN is deprecated and will be removed in a future release. { MP_ROM_QSTR(MP_QSTR_SPEAKER_SHUTDOWN), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER_ENABLE), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ENCODER_SWITCH), MP_ROM_PTR(&pin_GPIO0) }, From 41f34d1a273282af097d7767307b28a12d6445e5 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 17 Aug 2021 21:27:18 +0000 Subject: [PATCH 200/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1015 of 1015 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 82c9e1ac92..6f8287d0f2 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-13 12:33+0000\n" +"PO-Revision-Date: 2021-08-18 21:35+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -101,7 +101,7 @@ msgstr "längden på %q måste vara %q" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" -msgstr "" +msgstr "längden på %q måste vara >= 1" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -170,7 +170,7 @@ msgstr "% q () tar% d positionsargument men% d gavs" #: shared-bindings/usb_hid/Device.c msgid "%q, %q, and %q must all be the same length" -msgstr "" +msgstr "%q, %q och %q måste vara lika långa" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format @@ -1537,7 +1537,7 @@ msgstr "Saknar jmp_pin. Instruktion %d hoppar på pin" #: shared-module/usb_hid/Device.c #, c-format msgid "More than %d report ids not supported" -msgstr "" +msgstr "Fler än %d rapport-id stöds inte" #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." From 6ea136987ec85175ff762749e4828347e8b43de1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 19 Aug 2021 13:54:13 -0500 Subject: [PATCH 201/418] run codeformat --- ports/stm/common-hal/canio/Listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm/common-hal/canio/Listener.c b/ports/stm/common-hal/canio/Listener.c index 3aca0d067b..dc819180f9 100644 --- a/ports/stm/common-hal/canio/Listener.c +++ b/ports/stm/common-hal/canio/Listener.c @@ -276,7 +276,7 @@ mp_obj_t common_hal_canio_listener_receive(canio_listener_obj_t *self) { } RUN_BACKGROUND_TASKS; // Allow user to break out of a timeout with a KeyboardInterrupt. - if ( mp_hal_is_interrupted() ) { + if (mp_hal_is_interrupted()) { return NULL; } } while (!common_hal_canio_listener_in_waiting(self)); From 371f166de112d54f59be28a3e6d7a4f57a50a092 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 18 Aug 2021 11:35:06 -0500 Subject: [PATCH 202/418] canio: Run background tasks while waiting for message reception Closes: #5004 --- ports/esp32s2/common-hal/canio/Listener.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/esp32s2/common-hal/canio/Listener.c b/ports/esp32s2/common-hal/canio/Listener.c index 5e968f2393..8100261743 100644 --- a/ports/esp32s2/common-hal/canio/Listener.c +++ b/ports/esp32s2/common-hal/canio/Listener.c @@ -151,6 +151,11 @@ mp_obj_t common_hal_canio_listener_receive(canio_listener_obj_t *self) { if (supervisor_ticks_ms64() > deadline) { return NULL; } + RUN_BACKGROUND_TASKS; + // Allow user to break out of a timeout with a KeyboardInterrupt. + if (mp_hal_is_interrupted()) { + return NULL; + } } while (!common_hal_canio_listener_in_waiting(self)); } From 6abcac4ed6d2554fe4e0a88eeef95c3515ff8a05 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 19 Aug 2021 13:56:31 -0500 Subject: [PATCH 203/418] not needed on rp2040 --- ports/raspberrypi/common-hal/busio/SPI.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/common-hal/busio/SPI.c b/ports/raspberrypi/common-hal/busio/SPI.c index 57af713b49..ab295c4ff1 100644 --- a/ports/raspberrypi/common-hal/busio/SPI.c +++ b/ports/raspberrypi/common-hal/busio/SPI.c @@ -263,8 +263,8 @@ bool common_hal_busio_spi_write(busio_spi_obj_t *self, bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value) { - memset(data, write_value, len); - return _transfer(self, data, len, data, len); + uint32_t data_out = write_value << 24 | write_value << 16 | write_value << 8 | write_value; + return _transfer(self, (const uint8_t *)&data_out, MIN(4, len), data, len); } bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_out, uint8_t *data_in, size_t len) { From f1bbf406c41dae8b597b035c2f8aae84c78b5610 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 19 Aug 2021 14:01:14 -0500 Subject: [PATCH 204/418] remove a straggling QRIO_MODULE mention --- py/circuitpy_mpconfig.h | 1 - 1 file changed, 1 deletion(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 0001e9f7c9..35ac272599 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -923,7 +923,6 @@ extern const struct _mp_obj_module_t msgpack_module; PS2IO_MODULE \ PULSEIO_MODULE \ PWMIO_MODULE \ - QRIO_MODULE \ RAINBOWIO_MODULE \ RANDOM_MODULE \ RE_MODULE \ From d2860b58b06f02303a30a7ff505f3fae2c21ba25 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 19 Aug 2021 12:18:13 -0700 Subject: [PATCH 205/418] Check background pending before sleep There is a race between when we run background tasks and when we sleep. If an interrupt happens between the two, then we may delay executing the background task. On some ports we checked this for TinyUSB already. On iMX RT, we didn't which caused USB issues. This PR makes it more generic for all background tasks including USB. Fixes #5086 and maybe others. --- ports/atmel-samd/supervisor/port.c | 5 ++--- ports/esp32s2/supervisor/port.c | 5 ++++- ports/mimxrt10xx/Makefile | 4 +++- ports/mimxrt10xx/linking/common.ld | 1 - ports/mimxrt10xx/supervisor/port.c | 16 +++++++++++----- ports/nrf/supervisor/port.c | 19 ++++++++++++------- ports/raspberrypi/supervisor/port.c | 5 ++--- ports/stm/supervisor/port.c | 10 ++++++++-- shared-bindings/storage/__init__.c | 8 ++++++++ supervisor/background_callback.h | 6 ++++++ supervisor/shared/background_callback.c | 6 +++++- supervisor/shared/usb/usb.c | 2 +- 12 files changed, 62 insertions(+), 25 deletions(-) diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 4aa9daa3e9..3ced6efde6 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -80,12 +80,11 @@ #include "shared_timers.h" #include "reset.h" +#include "supervisor/background_callback.h" #include "supervisor/shared/safe_mode.h" #include "supervisor/shared/stack.h" #include "supervisor/shared/tick.h" -#include "tusb.h" - #if CIRCUITPY_GAMEPADSHIFT #include "shared-module/gamepadshift/__init__.h" #endif @@ -628,7 +627,7 @@ void port_idle_until_interrupt(void) { } #endif common_hal_mcu_disable_interrupts(); - if (!tud_task_event_ready() && sleep_ok && !_woken_up) { + if (!background_callback_pending() && sleep_ok && !_woken_up) { __DSB(); __WFI(); } diff --git a/ports/esp32s2/supervisor/port.c b/ports/esp32s2/supervisor/port.c index 1fca60a1c3..de6941ed70 100644 --- a/ports/esp32s2/supervisor/port.c +++ b/ports/esp32s2/supervisor/port.c @@ -48,6 +48,7 @@ #include "common-hal/watchdog/WatchDogTimer.h" #include "common-hal/socketpool/Socket.h" #include "common-hal/wifi/__init__.h" +#include "supervisor/background_callback.h" #include "supervisor/memory.h" #include "supervisor/shared/tick.h" #include "shared-bindings/rtc/__init__.h" @@ -329,7 +330,9 @@ void port_interrupt_after_ticks(uint32_t ticks) { // On the ESP we use FreeRTOS notifications instead of interrupts so this is a // bit of a misnomer. void port_idle_until_interrupt(void) { - xTaskNotifyWait(0x01, 0x01, NULL, portMAX_DELAY); + if (!background_callback_pending()) { + xTaskNotifyWait(0x01, 0x01, NULL, portMAX_DELAY); + } } // Wrap main in app_main that the IDF expects. diff --git a/ports/mimxrt10xx/Makefile b/ports/mimxrt10xx/Makefile index c112902639..310b5d6f31 100644 --- a/ports/mimxrt10xx/Makefile +++ b/ports/mimxrt10xx/Makefile @@ -81,11 +81,13 @@ CFLAGS += -Os -ftree-vrp -DNDEBUG -ffreestanding CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX -DCFG_TUD_MIDI_RX_BUFSIZE=512 -DCFG_TUD_CDC_RX_BUFSIZE=512 -DCFG_TUD_MIDI_TX_BUFSIZE=512 -DCFG_TUD_CDC_TX_BUFSIZE=512 -DCFG_TUD_MSC_BUFSIZE=1024 #Debugging/Optimization +# Never set -fno-inline because we use inline to move small functions into routines that must be +# in RAM. If inlining is disallowed, then we may end up calling a function in flash when we cannot. ifeq ($(DEBUG), 1) # You may want to disable -flto if it interferes with debugging. # CFLAGS += -flto -flto-partition=none # You may want to enable these flags to make setting breakpoints easier. - CFLAGS += -fno-inline -fno-ipa-sra + CFLAGS += -fno-ipa-sra else #CFLAGS += -flto -flto-partition=none endif diff --git a/ports/mimxrt10xx/linking/common.ld b/ports/mimxrt10xx/linking/common.ld index 720361aa0a..44e8d537c4 100644 --- a/ports/mimxrt10xx/linking/common.ld +++ b/ports/mimxrt10xx/linking/common.ld @@ -51,7 +51,6 @@ SECTIONS KEEP(* (.boot_hdr.dcd_data)) . = ALIGN(4); } > FLASH_IVT - image_vector_table = LOADADDR(.ivt); .text : { diff --git a/ports/mimxrt10xx/supervisor/port.c b/ports/mimxrt10xx/supervisor/port.c index e31dda173c..88a4ce5bb7 100644 --- a/ports/mimxrt10xx/supervisor/port.c +++ b/ports/mimxrt10xx/supervisor/port.c @@ -40,10 +40,11 @@ #include "common-hal/pwmio/PWMOut.h" #include "common-hal/rtc/RTC.h" #include "common-hal/busio/SPI.h" +#include "shared-bindings/microcontroller/__init__.h" #include "reset.h" -#include "tusb.h" +#include "supervisor/background_callback.h" #if CIRCUITPY_GAMEPADSHIFT #include "shared-module/gamepadshift/__init__.h" @@ -400,10 +401,15 @@ void port_idle_until_interrupt(void) { __set_FPSCR(__get_FPSCR() & ~(0x9f)); (void)__get_FPSCR(); } - NVIC_ClearPendingIRQ(SNVS_HP_WRAPPER_IRQn); - CLOCK_SetMode(kCLOCK_ModeWait); - __WFI(); - CLOCK_SetMode(kCLOCK_ModeRun); + + common_hal_mcu_disable_interrupts(); + if (!background_callback_pending()) { + NVIC_ClearPendingIRQ(SNVS_HP_WRAPPER_IRQn); + CLOCK_SetMode(kCLOCK_ModeWait); + __WFI(); + CLOCK_SetMode(kCLOCK_ModeRun); + } + common_hal_mcu_enable_interrupts(); } /** diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index 66b4bc9181..772fcde120 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -25,8 +25,10 @@ * THE SOFTWARE. */ -#include #include "supervisor/port.h" + +#include +#include "supervisor/background_callback.h" #include "supervisor/board.h" #include "nrfx/hal/nrf_clock.h" @@ -39,6 +41,8 @@ #include "nrf/power.h" #include "nrf/timers.h" +#include "nrf_nvic.h" + #include "common-hal/microcontroller/Pin.h" #include "common-hal/_bleio/__init__.h" #include "common-hal/analogio/AnalogIn.h" @@ -360,7 +364,12 @@ void port_idle_until_interrupt(void) { sd_softdevice_is_enabled(&sd_enabled); if (sd_enabled) { - sd_app_evt_wait(); + uint8_t is_nested_critical_region; + sd_nvic_critical_region_enter(&is_nested_critical_region); + if (!background_callback_pending()) { + sd_app_evt_wait(); + } + sd_nvic_critical_region_exit(is_nested_critical_region); } else { // Call wait for interrupt ourselves if the SD isn't enabled. // Note that `wfi` should be called with interrupts disabled, @@ -376,11 +385,7 @@ void port_idle_until_interrupt(void) { // function (whether or not SD is enabled) int nested = __get_PRIMASK(); __disable_irq(); - bool ok = true; - #if CIRCUITPY_USB - ok = !tud_task_event_ready(); - #endif - if (ok) { + if (!background_callback_pending()) { __DSB(); __WFI(); } diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 443cfc2715..ef35c22518 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -27,6 +27,7 @@ #include #include +#include "supervisor/background_callback.h" #include "supervisor/board.h" #include "supervisor/port.h" @@ -54,8 +55,6 @@ #include "src/common/pico_time/include/pico/time.h" #include "src/common/pico_binary_info/include/pico/binary_info.h" -#include "tusb.h" - #include "pico/bootrom.h" #include "hardware/watchdog.h" @@ -233,7 +232,7 @@ void port_interrupt_after_ticks(uint32_t ticks) { void port_idle_until_interrupt(void) { common_hal_mcu_disable_interrupts(); - if (!tud_task_event_ready()) { + if (!background_callback_pending()) { // asm volatile ("dsb 0xF":::"memory"); // __wfi(); } diff --git a/ports/stm/supervisor/port.c b/ports/stm/supervisor/port.c index b62fe9d24a..9dc6eeb870 100644 --- a/ports/stm/supervisor/port.c +++ b/ports/stm/supervisor/port.c @@ -26,11 +26,13 @@ */ #include -#include "supervisor/port.h" +#include "supervisor/background_callback.h" #include "supervisor/board.h" +#include "supervisor/port.h" #include "lib/timeutils/timeutils.h" #include "common-hal/microcontroller/Pin.h" +#include "shared-bindings/microcontroller/__init__.h" #ifdef CIRCUITPY_AUDIOPWMIO #include "common-hal/audiopwmio/PWMAudioOut.h" @@ -366,7 +368,11 @@ void port_idle_until_interrupt(void) { if (stm32_peripherals_rtc_alarm_triggered(PERIPHERALS_ALARM_A)) { return; } - __WFI(); + common_hal_mcu_disable_interrupts(); + if (!background_callback_pending()) { + __WFI(); + } + common_hal_mcu_enable_interrupts(); } // Required by __libc_init_array in startup code if we are compiling using diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c index f19aaa4396..4232b93bea 100644 --- a/shared-bindings/storage/__init__.c +++ b/shared-bindings/storage/__init__.c @@ -165,7 +165,11 @@ MP_DEFINE_CONST_FUN_OBJ_0(storage_erase_filesystem_obj, storage_erase_filesystem //| ... //| STATIC mp_obj_t storage_disable_usb_drive(void) { + #if CIRCUITPY_USB_MSC if (!common_hal_storage_disable_usb_drive()) { + #else + if (true) { + #endif mp_raise_RuntimeError(translate("Cannot change USB devices now")); } return mp_const_none; @@ -186,7 +190,11 @@ MP_DEFINE_CONST_FUN_OBJ_0(storage_disable_usb_drive_obj, storage_disable_usb_dri //| ... //| STATIC mp_obj_t storage_enable_usb_drive(void) { + #if CIRCUITPY_USB_MSC if (!common_hal_storage_enable_usb_drive()) { + #else + if (true) { + #endif mp_raise_RuntimeError(translate("Cannot change USB devices now")); } return mp_const_none; diff --git a/supervisor/background_callback.h b/supervisor/background_callback.h index 535dd656be..651ac020a6 100644 --- a/supervisor/background_callback.h +++ b/supervisor/background_callback.h @@ -27,6 +27,8 @@ #ifndef CIRCUITPY_INCLUDED_SUPERVISOR_BACKGROUND_CALLBACK_H #define CIRCUITPY_INCLUDED_SUPERVISOR_BACKGROUND_CALLBACK_H +#include + /** Background callbacks are a linked list of tasks to call in the background. * * Include a member of type `background_callback_t` inside an object @@ -69,6 +71,10 @@ void background_callback_add(background_callback_t *cb, background_callback_fun * whenever the list is non-empty */ void background_callback_run_all(void); +/* True when a background callback is pending. Helpful for checking background state when + * interrupts are disabled. */ +bool background_callback_pending(void); + /* During soft reset, remove all pending callbacks and clear the critical section flag */ void background_callback_reset(void); diff --git a/supervisor/shared/background_callback.c b/supervisor/shared/background_callback.c index 0dafb5398d..a59a6e85f5 100644 --- a/supervisor/shared/background_callback.c +++ b/supervisor/shared/background_callback.c @@ -67,9 +67,13 @@ void background_callback_add(background_callback_t *cb, background_callback_fun background_callback_add_core(cb); } +bool PLACE_IN_ITCM(background_callback_pending)(void) { + return callback_head != NULL; +} + static bool in_background_callback; void PLACE_IN_ITCM(background_callback_run_all)() { - if (!callback_head) { + if (!background_callback_pending()) { return; } CALLBACK_CRITICAL_BEGIN; diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index 9a276aa6cc..8333f662b5 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -91,7 +91,7 @@ void usb_init(void) { // Set up USB defaults before any USB changes are made in boot.py void usb_set_defaults(void) { - #if CIRCUITPY_STORAGE + #if CIRCUITPY_STORAGE && CIRCUITPY_USB_MSC storage_usb_set_defaults(); #endif From 1185228b90de130b6c4e5dfe254fb7ea4e9f1702 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Thu, 19 Aug 2021 15:18:19 -0400 Subject: [PATCH 206/418] Remove SPEAKER_SHUTDOWN pin. --- ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c index 922057e972..0f3d20c849 100644 --- a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c @@ -17,8 +17,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, - // SPEAKER_SHUTDOWN is deprecated and will be removed in a future release. - { MP_ROM_QSTR(MP_QSTR_SPEAKER_SHUTDOWN), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER_ENABLE), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO16) }, From 5c6e80a2bb4f1cf885d4c2dc5a9a39fd4ea7ccdf Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 19 Aug 2021 16:49:33 -0700 Subject: [PATCH 207/418] Shrink builds by defining advanced micropython API Also, ignore more pins on SAMD boards and disable EXFAT on others. --- .../boards/arduino_zero/mpconfigboard.h | 8 ++++++ .../boards/datum_distance/mpconfigboard.h | 21 ++++++++++++++ .../boards/datum_imu/mpconfigboard.h | 19 +++++++++++++ .../boards/datum_light/mpconfigboard.h | 21 ++++++++++++++ .../boards/datum_weather/mpconfigboard.h | 21 ++++++++++++++ .../feather_m0_adalogger/mpconfigboard.h | 18 ++++++++++++ .../boards/feather_m0_basic/mpconfigboard.h | 21 ++++++++++++++ .../boards/kicksat-sprite/mpconfigboard.h | 2 ++ .../boards/kicksat-sprite/mpconfigboard.mk | 1 + .../boards/sensebox_mcu/mpconfigboard.h | 4 +++ ports/atmel-samd/mpconfigport.h | 5 ++++ ports/stm/boards/pyb_nano_v2/mpconfigboard.h | 2 ++ .../mpconfigboard.h | 2 ++ .../stm32f411ve_discovery/mpconfigboard.h | 2 ++ .../boards/thunderpack_v11/mpconfigboard.h | 2 ++ py/circuitpy_mpconfig.h | 2 ++ py/modmicropython.c | 28 +++++++++---------- 17 files changed, 165 insertions(+), 14 deletions(-) diff --git a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h index 3cddc38546..7ee912e49a 100644 --- a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h @@ -19,3 +19,11 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Connected to a crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// SWD-only +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 diff --git a/ports/atmel-samd/boards/datum_distance/mpconfigboard.h b/ports/atmel-samd/boards/datum_distance/mpconfigboard.h index cd9be70fe3..789a47c5e1 100644 --- a/ports/atmel-samd/boards/datum_distance/mpconfigboard.h +++ b/ports/atmel-samd/boards/datum_distance/mpconfigboard.h @@ -19,3 +19,24 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Connected to a crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// Unconnected +// Schematic at: https://jandjstudios.io/assets/pdfs/datum-Distance.pdf +#define IGNORE_PIN_PA03 1 +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PA13 1 diff --git a/ports/atmel-samd/boards/datum_imu/mpconfigboard.h b/ports/atmel-samd/boards/datum_imu/mpconfigboard.h index 07a71e2e15..421ffaa5d4 100644 --- a/ports/atmel-samd/boards/datum_imu/mpconfigboard.h +++ b/ports/atmel-samd/boards/datum_imu/mpconfigboard.h @@ -19,3 +19,22 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Connected to a crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// Unconnected +// Schematic at: https://jandjstudios.io/assets/pdfs/datum-IMU.pdf +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PA13 1 diff --git a/ports/atmel-samd/boards/datum_light/mpconfigboard.h b/ports/atmel-samd/boards/datum_light/mpconfigboard.h index 6e531b6c74..7fd5f2efc9 100644 --- a/ports/atmel-samd/boards/datum_light/mpconfigboard.h +++ b/ports/atmel-samd/boards/datum_light/mpconfigboard.h @@ -19,3 +19,24 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Connected to a crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// Unconnected +// Schematic at: https://jandjstudios.io/assets/pdfs/datum-Light.pdf +#define IGNORE_PIN_PA03 1 +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PA13 1 diff --git a/ports/atmel-samd/boards/datum_weather/mpconfigboard.h b/ports/atmel-samd/boards/datum_weather/mpconfigboard.h index 5b06a14c8c..f12a5796b5 100644 --- a/ports/atmel-samd/boards/datum_weather/mpconfigboard.h +++ b/ports/atmel-samd/boards/datum_weather/mpconfigboard.h @@ -19,3 +19,24 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Connected to a crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// Unconnected +// Schematic at: https://jandjstudios.io/assets/pdfs/datum-Weather.pdf +#define IGNORE_PIN_PA03 1 +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB09 1 +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PB02 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PA13 1 diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h index 9be08fcf34..3dfefac545 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h @@ -17,3 +17,21 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Connected to a crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// Unconnected +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PA09 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PA28 1 + +// SWD-only +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 diff --git a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h index e80dbafa08..b8d81992f6 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h @@ -17,3 +17,24 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Connected to a crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// Unconnected +#define IGNORE_PIN_PB03 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PA06 1 +#define IGNORE_PIN_PA08 1 +#define IGNORE_PIN_PA09 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA21 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PA28 1 + +// SWD-only +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h index 7b73e4d6cf..eb7f1c62e3 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h @@ -19,3 +19,5 @@ #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +#define MICROPY_FATFS_EXFAT 0 diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk index c2c583022c..4d01e486dc 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk @@ -15,6 +15,7 @@ CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_GETPASS = 0 CIRCUITPY_KEYPAD = 0 CIRCUITPY_MSGPACK = 0 CIRCUITPY_PS2IO = 0 diff --git a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h index 9e3fa10df8..32a7134b09 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h +++ b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.h @@ -18,3 +18,7 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Connected to a crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index a336d7812b..6332c9d3fc 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -240,8 +240,13 @@ #include "peripherals/samd/dma.h" +#if CIRCUITPY_AUDIOCORE #define MICROPY_PORT_ROOT_POINTERS \ CIRCUITPY_COMMON_ROOT_POINTERS \ mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT]; +#else +#define MICROPY_PORT_ROOT_POINTERS \ + CIRCUITPY_COMMON_ROOT_POINTERS +#endif #endif // __INCLUDED_MPCONFIGPORT_H diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.h b/ports/stm/boards/pyb_nano_v2/mpconfigboard.h index 0960687d1e..f85d27d4b1 100644 --- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.h +++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.h @@ -47,3 +47,5 @@ #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000) #define AUTORESET_DELAY_MS (500) + +#define MICROPY_FATFS_EXFAT 0 diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.h b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.h index a7d56209c4..b86bdc1ee7 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.h +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/mpconfigboard.h @@ -50,3 +50,5 @@ #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000) #define AUTORESET_DELAY_MS (500) + +#define MICROPY_FATFS_EXFAT 0 diff --git a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.h b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.h index ec6e548339..3b2485b3ec 100644 --- a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.h +++ b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.h @@ -39,3 +39,5 @@ // The schematic has a 32k crystal that isn't fitted. Uncommented the line below if you add it. // #define BOARD_HAS_LOW_SPEED_CRYSTAL (1) // #define LSE_VALUE ((uint32_t)32000U) + +#define MICROPY_FATFS_EXFAT 0 diff --git a/ports/stm/boards/thunderpack_v11/mpconfigboard.h b/ports/stm/boards/thunderpack_v11/mpconfigboard.h index 9c3c116e51..9afbd3d033 100644 --- a/ports/stm/boards/thunderpack_v11/mpconfigboard.h +++ b/ports/stm/boards/thunderpack_v11/mpconfigboard.h @@ -51,3 +51,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_PB06) #define DEFAULT_I2C_BUS_SDA (&pin_PB07) + +#define MICROPY_FATFS_EXFAT 0 diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 49abf71d62..74af96019f 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -211,6 +211,8 @@ typedef long mp_off_t; #define MICROPY_PY_URE_MATCH_SPAN_START_END (CIRCUITPY_RE) #define MICROPY_PY_URE_SUB (CIRCUITPY_RE) +#define CIRCUITPY_MICROPYTHON_ADVANCED (CIRCUITPY_FULL_BUILD) + #ifndef MICROPY_FATFS_EXFAT #define MICROPY_FATFS_EXFAT (CIRCUITPY_FULL_BUILD) #endif diff --git a/py/modmicropython.c b/py/modmicropython.c index 8f61cd2979..0465a4eef8 100644 --- a/py/modmicropython.c +++ b/py/modmicropython.c @@ -37,7 +37,7 @@ // Various builtins specific to MicroPython runtime, // living in micropython module -#if MICROPY_ENABLE_COMPILER +#if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_ENABLE_COMPILER STATIC mp_obj_t mp_micropython_opt_level(size_t n_args, const mp_obj_t *args) { if (n_args == 0) { return MP_OBJ_NEW_SMALL_INT(MP_STATE_VM(mp_optimise_value)); @@ -49,7 +49,7 @@ STATIC mp_obj_t mp_micropython_opt_level(size_t n_args, const mp_obj_t *args) { STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_micropython_opt_level_obj, 0, 1, mp_micropython_opt_level); #endif -#if MICROPY_PY_MICROPYTHON_MEM_INFO +#if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_PY_MICROPYTHON_MEM_INFO #if MICROPY_MEM_STATS STATIC mp_obj_t mp_micropython_mem_total(void) { @@ -109,21 +109,21 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_micropython_qstr_info_obj, 0, 1, m #endif // MICROPY_PY_MICROPYTHON_MEM_INFO -#if MICROPY_PY_MICROPYTHON_STACK_USE +#if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_PY_MICROPYTHON_STACK_USE STATIC mp_obj_t mp_micropython_stack_use(void) { return MP_OBJ_NEW_SMALL_INT(mp_stack_usage()); } STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_micropython_stack_use_obj, mp_micropython_stack_use); #endif -#if MICROPY_ENABLE_PYSTACK +#if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_ENABLE_PYSTACK STATIC mp_obj_t mp_micropython_pystack_use(void) { return MP_OBJ_NEW_SMALL_INT(mp_pystack_usage()); } STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_micropython_pystack_use_obj, mp_micropython_pystack_use); #endif -#if MICROPY_ENABLE_GC +#if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_ENABLE_GC STATIC mp_obj_t mp_micropython_heap_lock(void) { gc_lock(); return mp_const_none; @@ -144,11 +144,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_micropython_heap_locked_obj, mp_micropython_ #endif #endif -#if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && (MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0) +#if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && (MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0) STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_alloc_emergency_exception_buf_obj, mp_alloc_emergency_exception_buf); #endif -#if MICROPY_KBD_EXCEPTION +#if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_KBD_EXCEPTION STATIC mp_obj_t mp_micropython_kbd_intr(mp_obj_t int_chr_in) { mp_hal_set_interrupt_char(mp_obj_get_int(int_chr_in)); return mp_const_none; @@ -169,10 +169,10 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mp_micropython_schedule_obj, mp_micropython_sch STATIC const mp_rom_map_elem_t mp_module_micropython_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_micropython) }, { MP_ROM_QSTR(MP_QSTR_const), MP_ROM_PTR(&mp_identity_obj) }, - #if MICROPY_ENABLE_COMPILER + #if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_ENABLE_COMPILER { MP_ROM_QSTR(MP_QSTR_opt_level), MP_ROM_PTR(&mp_micropython_opt_level_obj) }, #endif - #if MICROPY_PY_MICROPYTHON_MEM_INFO + #if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_PY_MICROPYTHON_MEM_INFO #if MICROPY_MEM_STATS { MP_ROM_QSTR(MP_QSTR_mem_total), MP_ROM_PTR(&mp_micropython_mem_total_obj) }, { MP_ROM_QSTR(MP_QSTR_mem_current), MP_ROM_PTR(&mp_micropython_mem_current_obj) }, @@ -181,23 +181,23 @@ STATIC const mp_rom_map_elem_t mp_module_micropython_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_mem_info), MP_ROM_PTR(&mp_micropython_mem_info_obj) }, { MP_ROM_QSTR(MP_QSTR_qstr_info), MP_ROM_PTR(&mp_micropython_qstr_info_obj) }, #endif - #if MICROPY_PY_MICROPYTHON_STACK_USE + #if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_PY_MICROPYTHON_STACK_USE { MP_ROM_QSTR(MP_QSTR_stack_use), MP_ROM_PTR(&mp_micropython_stack_use_obj) }, #endif - #if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && (MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0) + #if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && (MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0) { MP_ROM_QSTR(MP_QSTR_alloc_emergency_exception_buf), MP_ROM_PTR(&mp_alloc_emergency_exception_buf_obj) }, #endif - #if MICROPY_ENABLE_PYSTACK + #if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_ENABLE_PYSTACK { MP_ROM_QSTR(MP_QSTR_pystack_use), MP_ROM_PTR(&mp_micropython_pystack_use_obj) }, #endif - #if MICROPY_ENABLE_GC + #if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_ENABLE_GC { MP_ROM_QSTR(MP_QSTR_heap_lock), MP_ROM_PTR(&mp_micropython_heap_lock_obj) }, { MP_ROM_QSTR(MP_QSTR_heap_unlock), MP_ROM_PTR(&mp_micropython_heap_unlock_obj) }, #if MICROPY_PY_MICROPYTHON_HEAP_LOCKED { MP_ROM_QSTR(MP_QSTR_heap_locked), MP_ROM_PTR(&mp_micropython_heap_locked_obj) }, #endif #endif - #if MICROPY_KBD_EXCEPTION + #if CIRCUITPY_MICROPYTHON_ADVANCED && MICROPY_KBD_EXCEPTION { MP_ROM_QSTR(MP_QSTR_kbd_intr), MP_ROM_PTR(&mp_micropython_kbd_intr_obj) }, #endif #if MICROPY_ENABLE_SCHEDULER From 47db00f0af698e09ec6b0ba5db872c6fb14f1785 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 19 Aug 2021 20:03:49 -0500 Subject: [PATCH 208/418] Made error message clear and reduce calls --- locale/circuitpython.pot | 2 +- shared-bindings/keypad/KeyMatrix.c | 2 -- shared-bindings/microcontroller/Pin.c | 5 ++++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 7e2794ee09..ef03da9ebe 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -67,7 +67,7 @@ msgid "" msgstr "" #: shared-bindings/microcontroller/Pin.c -msgid "%q and %q contain duplicate objects" +msgid "%q and %q contain duplicate pins" msgstr "" #: shared-bindings/microcontroller/Pin.c diff --git a/shared-bindings/keypad/KeyMatrix.c b/shared-bindings/keypad/KeyMatrix.c index 8b87432074..dbb4ac6822 100644 --- a/shared-bindings/keypad/KeyMatrix.c +++ b/shared-bindings/keypad/KeyMatrix.c @@ -90,8 +90,6 @@ STATIC mp_obj_t keypad_keymatrix_make_new(const mp_obj_type_t *type, size_t n_ar mcu_pin_obj_t *row_pins_array[num_row_pins]; mcu_pin_obj_t *column_pins_array[num_column_pins]; - validate_no_duplicate_pins(row_pins, MP_QSTR_row_pins); - validate_no_duplicate_pins(column_pins, MP_QSTR_column_pins); validate_no_duplicate_pins_2(row_pins, column_pins, MP_QSTR_row_pins, MP_QSTR_column_pins); for (size_t row = 0; row < num_row_pins; row++) { diff --git a/shared-bindings/microcontroller/Pin.c b/shared-bindings/microcontroller/Pin.c index d709c669af..78c1c90f4d 100644 --- a/shared-bindings/microcontroller/Pin.c +++ b/shared-bindings/microcontroller/Pin.c @@ -127,6 +127,9 @@ void validate_no_duplicate_pins_2(mp_obj_t seq1, mp_obj_t seq2, qstr arg_name1, const size_t num_pins_1 = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq1)); const size_t num_pins_2 = (size_t)MP_OBJ_SMALL_INT_VALUE(mp_obj_len(seq2)); + validate_no_duplicate_pins(seq1, arg_name1); + validate_no_duplicate_pins(seq2, arg_name2); + for (size_t pin_cnt_1 = 0; pin_cnt_1 < num_pins_1; pin_cnt_1++) { mp_obj_t pin1_obj = mp_obj_subscr(seq1, MP_OBJ_NEW_SMALL_INT(pin_cnt_1), MP_OBJ_SENTINEL); mcu_pin_obj_t *pin1 = validate_obj_is_pin(pin1_obj); @@ -135,7 +138,7 @@ void validate_no_duplicate_pins_2(mp_obj_t seq1, mp_obj_t seq2, qstr arg_name1, mp_obj_t pin2_obj = mp_obj_subscr(seq2, MP_OBJ_NEW_SMALL_INT(pin_cnt_2), MP_OBJ_SENTINEL); mcu_pin_obj_t *pin2 = validate_obj_is_pin(pin2_obj); if (pin1 == pin2) { - mp_raise_TypeError_varg(translate("%q and %q contain duplicate objects"), arg_name1, arg_name2); + mp_raise_TypeError_varg(translate("%q and %q contain duplicate pins"), arg_name1, arg_name2); } } } From cb8c676dcf1b71a6cb5e0097dbc46feac1f25dd3 Mon Sep 17 00:00:00 2001 From: Boris Steinmetz Date: Thu, 19 Aug 2021 19:25:48 +0000 Subject: [PATCH 209/418] Translated using Weblate (German) Currently translated at 73.7% (749 of 1015 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/de/ --- locale/de_DE.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/de_DE.po b/locale/de_DE.po index 84674e9893..341db305ce 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-06-19 20:18+0000\n" -"Last-Translator: Zoltán Vörös \n" +"PO-Revision-Date: 2021-08-20 03:20+0000\n" +"Last-Translator: Boris Steinmetz \n" "Language: de_DE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.7\n" +"X-Generator: Weblate 4.8-dev\n" #: main.c msgid "" @@ -1952,7 +1952,7 @@ msgstr "" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Program too large" -msgstr "" +msgstr "Das Programm ist zu groß" #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." From 74a844d5250ae850cebd9f1fd324a41cb7105cc3 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 18 Aug 2021 23:55:06 +0000 Subject: [PATCH 210/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1015 of 1015 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 33bd704e25..9ad5745d51 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-13 12:33+0000\n" +"PO-Revision-Date: 2021-08-20 03:20+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -102,7 +102,7 @@ msgstr "o comprimento %q deve ser %q" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" -msgstr "" +msgstr "o comprimento %q deve ser >=1" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -171,7 +171,7 @@ msgstr "%q() recebe %d argumentos posicionais, porém %d foram informados" #: shared-bindings/usb_hid/Device.c msgid "%q, %q, and %q must all be the same length" -msgstr "" +msgstr "todos os %q, %q, e %q devem ter mesmo comprimento" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format @@ -1551,7 +1551,7 @@ msgstr "Falta o jmp_pin. A instrução %d salta no pino" #: shared-module/usb_hid/Device.c #, c-format msgid "More than %d report ids not supported" -msgstr "" +msgstr "Mais de %d reportam ids não compatíveis" #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." From b6cccc7f2816b665846a68ddfdd0cdee918d09ff Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 20 Aug 2021 05:20:18 +0200 Subject: [PATCH 211/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 8 ++++++++ locale/cs.po | 8 ++++++++ locale/de_DE.po | 8 ++++++++ locale/el.po | 8 ++++++++ locale/en_GB.po | 8 ++++++++ locale/es.po | 8 ++++++++ locale/fil.po | 8 ++++++++ locale/fr.po | 8 ++++++++ locale/hi.po | 8 ++++++++ locale/it_IT.po | 8 ++++++++ locale/ja.po | 8 ++++++++ locale/ko.po | 8 ++++++++ locale/nl.po | 8 ++++++++ locale/pl.po | 8 ++++++++ locale/pt_BR.po | 8 ++++++++ locale/sv.po | 8 ++++++++ locale/zh_Latn_pinyin.po | 8 ++++++++ 17 files changed, 136 insertions(+) diff --git a/locale/ID.po b/locale/ID.po index a8bed96e72..a6c465bd67 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -73,6 +73,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q gagal: %d" diff --git a/locale/cs.po b/locale/cs.po index 2050a5c2d4..61981f39f7 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -69,6 +69,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "Selhání %q: %d" diff --git a/locale/de_DE.po b/locale/de_DE.po index 341db305ce..515327b835 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -74,6 +74,14 @@ msgstr "" "%d Address Pins, %d rgb Pins und %d Tiles indiziert eine Höhe von %d, nicht " "%d" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q Fehler: %d" diff --git a/locale/el.po b/locale/el.po index 7ff51ae54d..f0380be3ba 100644 --- a/locale/el.po +++ b/locale/el.po @@ -66,6 +66,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index cbc6072e11..9c3945d3fc 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -75,6 +75,14 @@ msgid "" msgstr "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q failure: %d" diff --git a/locale/es.po b/locale/es.po index 8af1070316..13dde65160 100644 --- a/locale/es.po +++ b/locale/es.po @@ -77,6 +77,14 @@ msgstr "" "%d pines de dirección, %d pines rgb y %d tiles indican una altura de %d, y " "no de %d" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q fallo: %d" diff --git a/locale/fil.po b/locale/fil.po index 3e6c89386d..97555e49dc 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -65,6 +65,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index b9b6c7b108..839b074eb7 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -77,6 +77,14 @@ msgstr "" "%d broches d'adresse, %d broches RGB et %d pour tile indique une hauteur de " "%d, et non %d" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "Échec de %q : %d" diff --git a/locale/hi.po b/locale/hi.po index 664e2c37ea..1312959fef 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -66,6 +66,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 13082dc048..56d076408e 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -75,6 +75,14 @@ msgid "" msgstr "" "%d pin indirizzo, %d pin rgb e %d tessere indicano l'altezza di %d, non %d" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q fallito: %d" diff --git a/locale/ja.po b/locale/ja.po index 680adcf705..7794a7893e 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -71,6 +71,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q 失敗: %d" diff --git a/locale/ko.po b/locale/ko.po index 87e4c0583f..be62b5056f 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -67,6 +67,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 735861fa82..7abd583e44 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -69,6 +69,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q fout: %d" diff --git a/locale/pl.po b/locale/pl.po index f7c46fa7e3..e2cc657aa0 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -71,6 +71,14 @@ msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q niepowodzenie: %d" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 9ad5745d51..cbe83dbca3 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -75,6 +75,14 @@ msgstr "" "%d pinos de endereço, %d pinos rgb e %d blocos indicam uma altura com %d, " "não %d" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q falha: %d" diff --git a/locale/sv.po b/locale/sv.po index 6f8287d0f2..d6fe82e27d 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -74,6 +74,14 @@ msgid "" msgstr "" "%d adresspinnar, %d rgb-stift och %d brickor anger en höjd på %d, inte %d" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q-fel: %d" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 881c8969f2..789772e188 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -76,6 +76,14 @@ msgstr "" "%d de zhǐ yǐn jiǎo , %d rgb yǐn jiǎo hé %d qiē piàn biǎo shì %d de gāo dù, " "ér bù shì %d" +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" msgstr "%q Shībài: %d" From d79a9e0e69603f2d22114e23a80637e37e1652b0 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Fri, 20 Aug 2021 18:06:40 +0200 Subject: [PATCH 212/418] Fix linker error when ONEWIREIO = 0 This addendum to #5139 allows actually turning off onewireio. (Not currently used by any board.) --- shared-bindings/bitbangio/__init__.c | 2 ++ shared-bindings/busio/__init__.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/shared-bindings/bitbangio/__init__.c b/shared-bindings/bitbangio/__init__.c index a8d9f5e615..acf7f05e45 100644 --- a/shared-bindings/bitbangio/__init__.c +++ b/shared-bindings/bitbangio/__init__.c @@ -72,7 +72,9 @@ STATIC const mp_rom_map_elem_t bitbangio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitbangio) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&bitbangio_i2c_type) }, + #if CIRCUITPY_ONEWIREIO { MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) }, + #endif { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&bitbangio_spi_type) }, }; diff --git a/shared-bindings/busio/__init__.c b/shared-bindings/busio/__init__.c index 2cde3d62b3..38efd06bd9 100644 --- a/shared-bindings/busio/__init__.c +++ b/shared-bindings/busio/__init__.c @@ -73,7 +73,9 @@ STATIC const mp_rom_map_elem_t busio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_busio) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&busio_i2c_type) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&busio_spi_type) }, + #if CIRCUITPY_ONEWIREIO { MP_ROM_QSTR(MP_QSTR_OneWire), MP_ROM_PTR(&onewireio_onewire_type) }, + #endif { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&busio_uart_type) }, }; From 9f051ec7bf544864fdcb26e93238a472113c9247 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 20 Aug 2021 12:45:59 -0700 Subject: [PATCH 213/418] Fix usb calibrated SAMD21 builds --- ports/atmel-samd/supervisor/port.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 3ced6efde6..4b0775ea91 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -85,6 +85,8 @@ #include "supervisor/shared/stack.h" #include "supervisor/shared/tick.h" +#include "tusb.h" + #if CIRCUITPY_GAMEPADSHIFT #include "shared-module/gamepadshift/__init__.h" #endif From 490096a480c4c127495e10c1b152180d129e5aba Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 20 Aug 2021 12:53:07 -0700 Subject: [PATCH 214/418] Turn on advanced MP api for unix build --- ports/unix/mpconfigport.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h index 99da47f31b..0fe9f35d9e 100644 --- a/ports/unix/mpconfigport.h +++ b/ports/unix/mpconfigport.h @@ -60,6 +60,7 @@ #define MICROPY_MALLOC_USES_ALLOCATED_SIZE (1) #define MICROPY_MEM_STATS (1) #define MICROPY_DEBUG_PRINTERS (1) +#define CIRCUITPY_MICROPYTHON_ADVANCED (1) // Printing debug to stderr may give tests which // check stdout a chance to pass, etc. #define MICROPY_DEBUG_PRINTER (&mp_stderr_print) From 26d33658ead77388cdcd261d9ad2ad679bb5cdad Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 20 Aug 2021 14:05:40 -0500 Subject: [PATCH 215/418] samd: diagnose out of range I2C frequency The frequency divisor is limited to 255, which gives 48MHz/2/255 ~= 94.1kHz as the lowest speed. Without this change, values below this cut-off gave higher frequencies instead, which didn't appear to have any relation to the frequency value requested. Closes: #4883 --- ports/atmel-samd/common-hal/busio/I2C.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/atmel-samd/common-hal/busio/I2C.c b/ports/atmel-samd/common-hal/busio/I2C.c index d5a8f36f6a..39aa6c9e97 100644 --- a/ports/atmel-samd/common-hal/busio/I2C.c +++ b/ports/atmel-samd/common-hal/busio/I2C.c @@ -119,6 +119,13 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, // clkrate is always 0. baud_rate is in kHz. // Frequency must be set before the I2C device is enabled. + // The maximum frequency divisor gives a clock rate of around 48MHz/2/255 + // but set_baudrate does not diagnose this problem. (This is not the + // exact cutoff, but no frequency well under 100kHz is available) + if (frequency < 95000) { + mp_raise_ValueError(translate("Unsupported baudrate")); + } + if (i2c_m_sync_set_baudrate(&self->i2c_desc, 0, frequency / 1000) != ERR_NONE) { reset_pin_number(sda->number); reset_pin_number(scl->number); From 94b02059b84322d56a1bf48f398cf7c3e7338dc6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 20 Aug 2021 16:17:46 -0700 Subject: [PATCH 216/418] Use simple ' in French error message to save space --- locale/fr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/fr.po b/locale/fr.po index d1ed977567..18a2c433e4 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -262,7 +262,7 @@ msgstr "l'objet %s ne supporte pas l'assignation d'éléments" #: py/obj.c #, c-format msgid "'%s' object doesn't support item deletion" -msgstr "L’objet '%s' ne prend pas en charge la suppression d’éléments" +msgstr "L'objet '%s' ne prend pas en charge la suppression d'éléments" #: py/runtime.c msgid "'%s' object has no attribute '%q'" From 87cc159d760db9adfbb9ec958ed8ca2c45ad2b68 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Fri, 20 Aug 2021 05:01:49 +0000 Subject: [PATCH 217/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1017 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index cbe83dbca3..82ba868478 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-20 03:20+0000\n" +"PO-Revision-Date: 2021-08-21 08:36+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -77,11 +77,11 @@ msgstr "" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" -msgstr "" +msgstr "%q e %q contêm pinos duplicados" #: shared-bindings/microcontroller/Pin.c msgid "%q contains duplicate pins" -msgstr "" +msgstr "%q contém pinos duplicados" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" From dbc5607ecabc6e95a1d24671bc58e9d9cf336f37 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 20 Aug 2021 08:05:20 +0000 Subject: [PATCH 218/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1017 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index d6fe82e27d..a0084858e7 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-18 21:35+0000\n" +"PO-Revision-Date: 2021-08-21 08:36+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -72,15 +72,15 @@ msgstr "%%c kräver int eller char" msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" -"%d adresspinnar, %d rgb-stift och %d brickor anger en höjd på %d, inte %d" +"%d adresspinnar, %d rgb-pinnar och %d brickor anger en höjd på %d, inte %d" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" -msgstr "" +msgstr "%q och %q innehåller duplicerade pinnar" #: shared-bindings/microcontroller/Pin.c msgid "%q contains duplicate pins" -msgstr "" +msgstr "%q innehåller dubblettstift" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" From 16a0306e2902c2d4680dc92b90316e45f1aa80b5 Mon Sep 17 00:00:00 2001 From: James Carr Date: Sat, 21 Aug 2021 16:32:36 +0100 Subject: [PATCH 219/418] Remove the pixel_luma parameter from displayio_colorconverter_compute_tricolor (Closes #5194) Not tested, I don't currently have a three colour eInk screen to test with. --- shared-module/displayio/ColorConverter.c | 4 ++-- shared-module/displayio/ColorConverter.h | 2 +- shared-module/displayio/Palette.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index 4871ce81a0..be5b7d31a7 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -96,7 +96,7 @@ uint8_t displayio_colorconverter_compute_hue(uint32_t color_rgb888) { return hue; } -void displayio_colorconverter_compute_tricolor(const _displayio_colorspace_t *colorspace, uint8_t pixel_hue, uint8_t pixel_luma, uint32_t *color) { +void displayio_colorconverter_compute_tricolor(const _displayio_colorspace_t *colorspace, uint8_t pixel_hue, uint32_t *color) { int16_t hue_diff = colorspace->tricolor_hue - pixel_hue; if ((-10 <= hue_diff && hue_diff <= 10) || hue_diff <= -220 || hue_diff >= 220) { @@ -244,7 +244,7 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d return; } uint8_t pixel_hue = displayio_colorconverter_compute_hue(pixel); - displayio_colorconverter_compute_tricolor(colorspace, pixel_hue, luma, &output_color->pixel); + displayio_colorconverter_compute_tricolor(colorspace, pixel_hue, &output_color->pixel); return; } else if (colorspace->grayscale && colorspace->depth <= 8) { uint8_t luma = displayio_colorconverter_compute_luma(pixel); diff --git a/shared-module/displayio/ColorConverter.h b/shared-module/displayio/ColorConverter.h index d8805ed720..7e4e9819ac 100644 --- a/shared-module/displayio/ColorConverter.h +++ b/shared-module/displayio/ColorConverter.h @@ -51,6 +51,6 @@ uint16_t displayio_colorconverter_compute_rgb565(uint32_t color_rgb888); uint8_t displayio_colorconverter_compute_luma(uint32_t color_rgb888); uint8_t displayio_colorconverter_compute_chroma(uint32_t color_rgb888); uint8_t displayio_colorconverter_compute_hue(uint32_t color_rgb888); -void displayio_colorconverter_compute_tricolor(const _displayio_colorspace_t *colorspace, uint8_t pixel_hue, uint8_t pixel_luma, uint32_t *color); +void displayio_colorconverter_compute_tricolor(const _displayio_colorspace_t *colorspace, uint8_t pixel_hue, uint32_t *color); #endif // MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_COLORCONVERTER_H diff --git a/shared-module/displayio/Palette.c b/shared-module/displayio/Palette.c index 9b6374ac38..47cad11ea5 100644 --- a/shared-module/displayio/Palette.c +++ b/shared-module/displayio/Palette.c @@ -85,7 +85,7 @@ bool displayio_palette_get_color(displayio_palette_t *self, const _displayio_col return true; } uint8_t pixel_hue = self->colors[palette_index].hue; - displayio_colorconverter_compute_tricolor(colorspace, pixel_hue, luma, color); + displayio_colorconverter_compute_tricolor(colorspace, pixel_hue, color); } else if (colorspace->grayscale) { size_t bitmask = (1 << colorspace->depth) - 1; *color = (self->colors[palette_index].luma >> colorspace->grayscale_bit) & bitmask; From aeeba3904b45eaf8d088fc6e88584be128a339f8 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sat, 21 Aug 2021 11:08:25 -0500 Subject: [PATCH 220/418] changed argument names and make replaced_color_value argument optional --- shared-bindings/bitmaptools/__init__.c | 26 +++++++++++++------------- shared-bindings/bitmaptools/__init__.h | 2 +- shared-module/bitmaptools/__init__.c | 23 +++++++++++++++++++---- 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index ccf4413453..4956c61a1f 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -300,7 +300,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_fill_region_obj, 0, bitmaptools_obj_fill_ //| def boundary_fill( //| dest_bitmap: displayio.Bitmap, //| x: int, y: int, -//| value: int, background_value: int) -> None: +//| fill_color_value: int, replaced_color_value: int) -> None: //| """Draws the color value into the destination bitmap enclosed //| area of pixels of the background_value color. Like "Paint Bucket" //| fill tool. @@ -308,37 +308,37 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_fill_region_obj, 0, bitmaptools_obj_fill_ //| :param bitmap dest_bitmap: Destination bitmap that will be written into //| :param int x: x-pixel position of the first pixel to check and fill if needed //| :param int y: y-pixel position of the first pixel to check and fill if needed -//| :param int value: Bitmap palette index that will be written into the +//| :param int fill_color_value: Bitmap palette index that will be written into the //| enclosed area in the destination bitmap -//| :param int background_value: Bitmap palette index that will filled with the +//| :param int replaced_color_value: Bitmap palette index that will filled with the //| value color in the enclosed area in the destination bitmap""" //| ... //| STATIC mp_obj_t bitmaptools_obj_boundary_fill(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum {ARG_dest_bitmap, ARG_x, ARG_y, ARG_value, ARG_background_value}; + enum {ARG_dest_bitmap, ARG_x, ARG_y, ARG_fill_color_value, ARG_replaced_color_value}; static const mp_arg_t allowed_args[] = { {MP_QSTR_dest_bitmap, MP_ARG_REQUIRED | MP_ARG_OBJ}, {MP_QSTR_x, MP_ARG_REQUIRED | MP_ARG_INT}, {MP_QSTR_y, MP_ARG_REQUIRED | MP_ARG_INT}, - {MP_QSTR_value, MP_ARG_REQUIRED | MP_ARG_INT}, - {MP_QSTR_background_value, MP_ARG_REQUIRED | MP_ARG_INT}, + {MP_QSTR_fill_color_value, MP_ARG_REQUIRED | MP_ARG_INT}, + {MP_QSTR_replaced_color_value, MP_ARG_INT, {.u_int = INT_MAX} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); displayio_bitmap_t *destination = MP_OBJ_TO_PTR(mp_arg_validate_type(args[ARG_dest_bitmap].u_obj, &displayio_bitmap_type, MP_QSTR_dest_bitmap)); // the destination bitmap - uint32_t value, color_depth; - value = args[ARG_value].u_int; + uint32_t fill_color_value, color_depth; + fill_color_value = args[ARG_fill_color_value].u_int; color_depth = (1 << destination->bits_per_value); - if (color_depth <= value) { + if (color_depth <= fill_color_value) { mp_raise_ValueError(translate("value out of range of target")); } - uint32_t background_value; - background_value = args[ARG_background_value].u_int; - if (color_depth <= background_value) { + uint32_t replaced_color_value; + replaced_color_value = args[ARG_replaced_color_value].u_int; + if (replaced_color_value != INT_MAX && color_depth <= replaced_color_value) { mp_raise_ValueError(translate("background value out of range of target")); } @@ -352,7 +352,7 @@ STATIC mp_obj_t bitmaptools_obj_boundary_fill(size_t n_args, const mp_obj_t *pos mp_raise_ValueError(translate("out of range of target")); } - common_hal_bitmaptools_boundary_fill(destination, x, y, value, background_value); + common_hal_bitmaptools_boundary_fill(destination, x, y, fill_color_value, replaced_color_value); return mp_const_none; } diff --git a/shared-bindings/bitmaptools/__init__.h b/shared-bindings/bitmaptools/__init__.h index 8e22235e77..6415b20258 100644 --- a/shared-bindings/bitmaptools/__init__.h +++ b/shared-bindings/bitmaptools/__init__.h @@ -48,7 +48,7 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, int16_t x, int16_t y, - uint32_t value, uint32_t background_value); + uint32_t fill_color_value, uint32_t replaced_color_value); void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination, int16_t x0, int16_t y0, diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 54489357ef..fb7b5242cf 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -255,7 +255,14 @@ void common_hal_bitmaptools_fill_region(displayio_bitmap_t *destination, void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, int16_t x, int16_t y, - uint32_t value, uint32_t background_value) { + uint32_t fill_color_value, uint32_t replaced_color_value) { + + if (fill_color_value == replaced_color_value) { + // There is nothing to do + return; + } + + uint32_t current_point_color_value; // the list of points that we'll check mp_obj_t fill_area = mp_obj_new_list(0, NULL); @@ -267,12 +274,20 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, mp_obj_new_tuple(2, point) ); + if (replaced_color_value == INT_MAX) { + current_point_color_value = common_hal_displayio_bitmap_get_pixel( + destination, + mp_obj_get_int(point[0]), + mp_obj_get_int(point[1])); + replaced_color_value = (uint32_t)current_point_color_value; + } + mp_obj_t *fill_points; size_t list_length = 0; mp_obj_list_get(fill_area, &list_length, &fill_points); mp_obj_t current_point; - uint32_t current_point_color_value; + size_t tuple_len = 0; mp_obj_t *tuple_items; @@ -288,7 +303,7 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, mp_obj_get_int(tuple_items[1])); // if the current point is not background color ignore it - if (current_point_color_value != background_value) { + if (current_point_color_value != replaced_color_value) { mp_obj_list_get(fill_area, &list_length, &fill_points); continue; } @@ -298,7 +313,7 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, destination, mp_obj_get_int(tuple_items[0]), mp_obj_get_int(tuple_items[1]), - value); + fill_color_value); // add all 4 surrounding points to the list to check From b8b23c97d96f703ec0562f75bbf1d071204b0393 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 20 Aug 2021 20:30:13 -0400 Subject: [PATCH 221/418] improve SAMD audio DMA --- ports/atmel-samd/audio_dma.c | 168 +++++++++++------- ports/atmel-samd/audio_dma.h | 14 +- .../atmel-samd/common-hal/audioio/AudioOut.c | 6 +- ports/atmel-samd/peripherals | 2 +- ports/raspberrypi/audio_dma.c | 2 +- ports/raspberrypi/audio_dma.h | 14 +- 6 files changed, 126 insertions(+), 80 deletions(-) diff --git a/ports/atmel-samd/audio_dma.c b/ports/atmel-samd/audio_dma.c index 883fe0a192..d7ec9dcd07 100644 --- a/ports/atmel-samd/audio_dma.c +++ b/ports/atmel-samd/audio_dma.c @@ -24,6 +24,8 @@ * THE SOFTWARE. */ +#include + #include "audio_dma.h" #include "samd/clocks.h" #include "samd/events.h" @@ -31,6 +33,7 @@ #include "shared-bindings/audiocore/RawSample.h" #include "shared-bindings/audiocore/WaveFile.h" +#include "shared-bindings/microcontroller/__init__.h" #include "supervisor/background_callback.h" #include "py/mpstate.h" @@ -38,6 +41,10 @@ #if CIRCUITPY_AUDIOIO || CIRCUITPY_AUDIOBUSIO +// Flag value for dma->buffer_to_load, indicating there is nothing to do. +// Otherwise dma->buffer_to_load is 0 or 1. +#define NO_BUFFER_TO_LOAD 0xff + static audio_dma_t *audio_dma_state[AUDIO_DMA_CHANNEL_COUNT]; // This cannot be in audio_dma_state because it's volatile. @@ -85,70 +92,79 @@ void audio_dma_enable_channel(uint8_t channel) { dma_enable_channel(channel); } -void audio_dma_convert_signed(audio_dma_t *dma, uint8_t *buffer, uint32_t buffer_length, - uint8_t **output_buffer, uint32_t *output_buffer_length, +static void audio_dma_convert_samples( + audio_dma_t *dma, + uint8_t *input, uint32_t input_length, + uint8_t *available_output_buffer, uint32_t available_output_buffer_length, + uint8_t **output, uint32_t *output_length, uint8_t *output_spacing) { - if (dma->first_buffer_free) { - *output_buffer = dma->first_buffer; - } else { - *output_buffer = dma->second_buffer; - } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" if (dma->signed_to_unsigned || dma->unsigned_to_signed) { - *output_buffer_length = buffer_length / dma->spacing; + + // Must convert. + // Write the conversion into the passed-in output buffer + *output = available_output_buffer; + *output_length = input_length / dma->spacing; *output_spacing = 1; + + if (*output_length > available_output_buffer_length) { + mp_raise_RuntimeError(translate("Internal audio buffer too small")); + } + uint32_t out_i = 0; if (dma->bytes_per_sample == 1) { - for (uint32_t i = 0; i < buffer_length; i += dma->spacing) { + for (uint32_t i = 0; i < input_length; i += dma->spacing) { if (dma->signed_to_unsigned) { - ((uint8_t *)*output_buffer)[out_i] = ((int8_t *)buffer)[i] + 0x80; + ((uint8_t *)*output)[out_i] = ((int8_t *)input)[i] + 0x80; } else { - ((int8_t *)*output_buffer)[out_i] = ((uint8_t *)buffer)[i] - 0x80; + ((int8_t *)*output)[out_i] = ((uint8_t *)input)[i] - 0x80; } out_i += 1; } } else if (dma->bytes_per_sample == 2) { - for (uint32_t i = 0; i < buffer_length / 2; i += dma->spacing) { + for (uint32_t i = 0; i < input_length / 2; i += dma->spacing) { if (dma->signed_to_unsigned) { - ((uint16_t *)*output_buffer)[out_i] = ((int16_t *)buffer)[i] + 0x8000; + ((uint16_t *)*output)[out_i] = ((int16_t *)input)[i] + 0x8000; } else { - ((int16_t *)*output_buffer)[out_i] = ((uint16_t *)buffer)[i] - 0x8000; + ((int16_t *)*output)[out_i] = ((uint16_t *)input)[i] - 0x8000; } out_i += 1; } } } else { - *output_buffer = buffer; - *output_buffer_length = buffer_length; + *output = input; + *output_length = input_length; *output_spacing = dma->spacing; } #pragma GCC diagnostic pop - dma->first_buffer_free = !dma->first_buffer_free; } -void audio_dma_load_next_block(audio_dma_t *dma) { - uint8_t *buffer; - uint32_t buffer_length; +static void audio_dma_load_next_block(audio_dma_t *dma, size_t buffer_idx) { + uint8_t *sample_buffer; + uint32_t sample_buffer_length; audioio_get_buffer_result_t get_buffer_result = audiosample_get_buffer(dma->sample, dma->single_channel_output, dma->audio_channel, - &buffer, &buffer_length); + &sample_buffer, &sample_buffer_length); - DmacDescriptor *descriptor = dma->second_descriptor; - if (dma->first_descriptor_free) { - descriptor = dma_descriptor(dma->dma_channel); - } - dma->first_descriptor_free = !dma->first_descriptor_free; + DmacDescriptor *descriptor = dma->descriptor[buffer_idx]; if (get_buffer_result == GET_BUFFER_ERROR) { audio_dma_stop(dma); return; } + // Use one of the allocated buffers for conversion. But if there's no conversion, + // this will be set to buffer in audio_dma_convert_samples() to avoid any copying. uint8_t *output_buffer; uint32_t output_buffer_length; uint8_t output_spacing; - audio_dma_convert_signed(dma, buffer, buffer_length, &output_buffer, &output_buffer_length, + + audio_dma_convert_samples(dma, sample_buffer, sample_buffer_length, + // Available output buffer: may be used or not. + dma->buffer[buffer_idx], dma->buffer_length[buffer_idx], + // Buffer where output was placed. + &output_buffer, &output_buffer_length, &output_spacing); descriptor->BTCNT.reg = output_buffer_length / dma->beat_size / output_spacing; @@ -157,9 +173,10 @@ void audio_dma_load_next_block(audio_dma_t *dma) { if (dma->loop) { audiosample_reset_buffer(dma->sample, dma->single_channel_output, dma->audio_channel); } else { - if ((output_buffer_length == 0) && dma_transfer_status(SHARED_RX_CHANNEL) & 0x3) { + if (output_buffer_length == 0) { // Nothing further to read and previous buffer is finished. audio_dma_stop(dma); + return; } else { // Break descriptor chain. descriptor->DESCADDR.reg = 0; @@ -206,15 +223,15 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, dma->dma_channel = dma_channel; dma->signed_to_unsigned = false; dma->unsigned_to_signed = false; - dma->second_descriptor = NULL; dma->spacing = 1; - dma->first_descriptor_free = true; audiosample_reset_buffer(sample, single_channel_output, audio_channel); + dma->buffer_to_load = NO_BUFFER_TO_LOAD; + dma->descriptor[0] = dma_descriptor(dma_channel); + dma->descriptor[1] = &dma->second_descriptor; - bool single_buffer; bool samples_signed; uint32_t max_buffer_length; - audiosample_get_buffer_structure(sample, single_channel_output, &single_buffer, &samples_signed, + audiosample_get_buffer_structure(sample, single_channel_output, &dma->single_buffer, &samples_signed, &max_buffer_length, &dma->spacing); uint8_t output_spacing = dma->spacing; if (output_signed != samples_signed) { @@ -222,14 +239,17 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, max_buffer_length /= dma->spacing; } - dma->first_buffer = (uint8_t *)m_realloc(dma->first_buffer, max_buffer_length); - if (dma->first_buffer == NULL) { + + dma->buffer[0] = (uint8_t *)m_realloc(dma->buffer[0], max_buffer_length); + dma->buffer_length[0] = max_buffer_length; + if (dma->buffer[0] == NULL) { return AUDIO_DMA_MEMORY_ERROR; } - dma->first_buffer_free = true; - if (!single_buffer) { - dma->second_buffer = (uint8_t *)m_realloc(dma->second_buffer, max_buffer_length); - if (dma->second_buffer == NULL) { + + if (!dma->single_buffer) { + dma->buffer[1] = (uint8_t *)m_realloc(dma->buffer[1], max_buffer_length); + dma->buffer_length[1] = max_buffer_length; + if (dma->buffer[1] == NULL) { return AUDIO_DMA_MEMORY_ERROR; } } @@ -238,12 +258,7 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, dma->unsigned_to_signed = output_signed && !samples_signed; dma->event_channel = 0xff; - if (!single_buffer) { - dma->second_descriptor = (DmacDescriptor *)m_malloc(sizeof(DmacDescriptor), false); - if (dma->second_descriptor == NULL) { - return AUDIO_DMA_MEMORY_ERROR; - } - + if (!dma->single_buffer) { // We're likely double buffering so set up the block interrupts. turn_on_event_system(); dma->event_channel = find_sync_event_channel_raise(); @@ -280,25 +295,27 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t *dma, int irq = EVSYS_IRQn; #endif - DmacDescriptor *first_descriptor = dma_descriptor(dma_channel); - setup_audio_descriptor(first_descriptor, dma->beat_size, output_spacing, output_register_address); - if (single_buffer) { - first_descriptor->DESCADDR.reg = 0; + setup_audio_descriptor(dma->descriptor[0], dma->beat_size, output_spacing, output_register_address); + if (dma->single_buffer) { + dma->descriptor[0]->DESCADDR.reg = 0; if (dma->loop) { - first_descriptor->DESCADDR.reg = (uint32_t)first_descriptor; + // The descriptor chains to itself. + dma->descriptor[0]->DESCADDR.reg = (uint32_t)dma->descriptor[0]; } } else { - first_descriptor->DESCADDR.reg = (uint32_t)dma->second_descriptor; - setup_audio_descriptor(dma->second_descriptor, dma->beat_size, output_spacing, output_register_address); - dma->second_descriptor->DESCADDR.reg = (uint32_t)first_descriptor; + // Set up the two descriptors to chain to each other. + dma->descriptor[0]->DESCADDR.reg = (uint32_t)dma->descriptor[1]; + setup_audio_descriptor(dma->descriptor[1], dma->beat_size, output_spacing, output_register_address); + dma->descriptor[1]->DESCADDR.reg = (uint32_t)dma->descriptor[0]; } // Load the first two blocks up front. - audio_dma_load_next_block(dma); - if (!single_buffer) { - audio_dma_load_next_block(dma); + audio_dma_load_next_block(dma, 0); + if (!dma->single_buffer) { + audio_dma_load_next_block(dma, 1); } + dma->playing_in_progress = true; dma_configure(dma_channel, dma_trigger_source, true); audio_dma_enable_channel(dma_channel); @@ -317,6 +334,7 @@ void audio_dma_stop(audio_dma_t *dma) { dma_free_channel(dma->dma_channel); } dma->dma_channel = AUDIO_DMA_CHANNEL_COUNT; + dma->playing_in_progress = false; } void audio_dma_pause(audio_dma_t *dma) { @@ -355,12 +373,7 @@ bool audio_dma_get_playing(audio_dma_t *dma) { if (dma->dma_channel >= AUDIO_DMA_CHANNEL_COUNT) { return false; } - uint32_t status = dma_transfer_status(dma->dma_channel); - if ((status & DMAC_CHINTFLAG_TCMPL) != 0 || (status & DMAC_CHINTFLAG_TERR) != 0) { - audio_dma_stop(dma); - } - - return (status & DMAC_CHINTFLAG_TERR) == 0; + return dma->playing_in_progress; } // WARN(tannewt): DO NOT print from here, or anything it calls. Printing calls @@ -371,7 +384,16 @@ STATIC void dma_callback_fun(void *arg) { return; } - audio_dma_load_next_block(dma); + common_hal_mcu_disable_interrupts(); + uint8_t buffer_to_load = dma->buffer_to_load; + dma->buffer_to_load = NO_BUFFER_TO_LOAD; + common_hal_mcu_enable_interrupts(); + + if (buffer_to_load == NO_BUFFER_TO_LOAD) { + audio_dma_stop(dma); + } else { + audio_dma_load_next_block(dma, buffer_to_load); + } } void audio_evsys_handler(void) { @@ -384,6 +406,28 @@ void audio_evsys_handler(void) { if (!block_done) { continue; } + + // By the time we get here, the write-back descriptor has been set to the + // current running descriptor. Fill the buffer that the next chained descriptor + // will play. + // + // The state of the write-back descriptor was determined empirically, + // The datasheet appears to imply that the descriptor that just finished would + // be in the write-back descriptor. But the VALID bit is set in the write-back descriptor, + // and reversing which buffer to fill produces crackly output. So the choice + // of which buffer to fill here appears correct. + DmacDescriptor *next_descriptor = + (DmacDescriptor *)dma_write_back_descriptor(dma->dma_channel)->DESCADDR.reg; + if (next_descriptor == dma->descriptor[0]) { + dma->buffer_to_load = 0; + } else if (next_descriptor == dma->descriptor[1]) { + dma->buffer_to_load = 1; + } else if (next_descriptor == NULL) { + dma->buffer_to_load = NO_BUFFER_TO_LOAD; + } else { + continue; + } + background_callback_add(&dma->callback, dma_callback_fun, (void *)dma); } } diff --git a/ports/atmel-samd/audio_dma.h b/ports/atmel-samd/audio_dma.h index d06b589759..0b5f35c71b 100644 --- a/ports/atmel-samd/audio_dma.h +++ b/ports/atmel-samd/audio_dma.h @@ -35,22 +35,24 @@ typedef struct { mp_obj_t sample; + uint8_t *buffer[2]; + size_t buffer_length[2]; + DmacDescriptor *descriptor[2]; + DmacDescriptor second_descriptor; + background_callback_t callback; uint8_t dma_channel; uint8_t event_channel; uint8_t audio_channel; uint8_t bytes_per_sample; uint8_t beat_size; uint8_t spacing; + uint8_t buffer_to_load; // Index bool loop; + bool single_buffer; bool single_channel_output; bool signed_to_unsigned; bool unsigned_to_signed; - bool first_buffer_free; - uint8_t *first_buffer; - uint8_t *second_buffer; - bool first_descriptor_free; - DmacDescriptor *second_descriptor; - background_callback_t callback; + bool playing_in_progress; } audio_dma_t; typedef enum { diff --git a/ports/atmel-samd/common-hal/audioio/AudioOut.c b/ports/atmel-samd/common-hal/audioio/AudioOut.c index 5c1a02634b..7be7cf7c4c 100644 --- a/ports/atmel-samd/common-hal/audioio/AudioOut.c +++ b/ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -248,7 +248,7 @@ void common_hal_audioio_audioout_construct(audioio_audioout_obj_t *self, } self->tc_index = tc_index; - // Use the 48mhz clocks on both the SAMD21 and 51 because we will be going much slower. + // Use the 48MHz clocks on both the SAMD21 and 51 because we will be going much slower. uint8_t tc_gclk = 0; #ifdef SAM_D5X_E5X tc_gclk = 1; @@ -469,8 +469,8 @@ bool common_hal_audioio_audioout_get_paused(audioio_audioout_obj_t *self) { } void common_hal_audioio_audioout_stop(audioio_audioout_obj_t *self) { - Tc *timer = tc_insts[self->tc_index]; - timer->COUNT16.CTRLBSET.reg = TC_CTRLBSET_CMD_STOP; + // Do not stop the timer here. There are occasional audible artifacts if the DMA-triggering timer + // is stopped between audio plays. (Heard this only on PyPortal with one particular 32kHz sample.) audio_dma_stop(&self->left_dma); #ifdef SAM_D5X_E5X audio_dma_stop(&self->right_dma); diff --git a/ports/atmel-samd/peripherals b/ports/atmel-samd/peripherals index a7e39c4d01..d3b20192cf 160000 --- a/ports/atmel-samd/peripherals +++ b/ports/atmel-samd/peripherals @@ -1 +1 @@ -Subproject commit a7e39c4d01aa5916015beecb021777617e77b0ad +Subproject commit d3b20192cf94fdea68a412596e082108ba5ebbf0 diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index e9f62281cf..7850f09cdf 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -137,7 +137,7 @@ STATIC void audio_dma_convert_samples( #pragma GCC diagnostic pop } -// channel_idx is 0 or 1. +// buffer_idx is 0 or 1. STATIC void audio_dma_load_next_block(audio_dma_t *dma, size_t buffer_idx) { size_t dma_channel = dma->channel[buffer_idx]; diff --git a/ports/raspberrypi/audio_dma.h b/ports/raspberrypi/audio_dma.h index 0ca911d337..ae9a07a604 100644 --- a/ports/raspberrypi/audio_dma.h +++ b/ports/raspberrypi/audio_dma.h @@ -34,23 +34,23 @@ typedef struct { mp_obj_t sample; + uint8_t *buffer[2]; + size_t buffer_length[2]; + uint32_t channels_to_load_mask; + uint32_t output_register_address; + background_callback_t callback; uint8_t channel[2]; uint8_t audio_channel; uint8_t output_size; uint8_t sample_spacing; + uint8_t output_resolution; // in bits + uint8_t sample_resolution; // in bits bool loop; bool single_channel_output; bool signed_to_unsigned; bool unsigned_to_signed; bool output_signed; bool playing_in_progress; - uint8_t output_resolution; // in bits - uint8_t sample_resolution; // in bits - uint8_t *buffer[2]; - size_t buffer_length[2]; - uint32_t channels_to_load_mask; - uint32_t output_register_address; - background_callback_t callback; } audio_dma_t; typedef enum { From 046372d84027ba966cef5f980fafb0236674ba5d Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 21 Aug 2021 16:14:09 -0400 Subject: [PATCH 222/418] put back some dynossat_edu_obc pins --- ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h index f97569435d..afe96a9cd6 100644 --- a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h +++ b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h @@ -23,16 +23,11 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 -#define IGNORE_PIN_PA02 1 #define IGNORE_PIN_PA13 1 #define IGNORE_PIN_PA14 1 -#define IGNORE_PIN_PA20 1 -#define IGNORE_PIN_PA21 1 #define IGNORE_PIN_PA27 1 -#define IGNORE_PIN_PB00 1 #define IGNORE_PIN_PB04 1 #define IGNORE_PIN_PB05 1 -#define IGNORE_PIN_PB16 1 #define IGNORE_PIN_PB17 1 #define IGNORE_PIN_PB23 1 #define IGNORE_PIN_PB31 1 From 1b6283a5ae41055ecccb0b8fc1f5b02443b247fc Mon Sep 17 00:00:00 2001 From: Amit Sides Date: Sat, 21 Aug 2021 23:51:24 +0300 Subject: [PATCH 223/418] Adding quick refresh support --- shared-bindings/displayio/EPaperDisplay.c | 25 +++++++++++++++++++++++ shared-bindings/displayio/EPaperDisplay.h | 2 +- shared-module/displayio/EPaperDisplay.c | 2 +- shared-module/displayio/EPaperDisplay.h | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index 0f62ae63b4..dbffbbde3e 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -217,6 +217,30 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_show(mp_obj_t self_in, mp_obj_t grou } MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_show_obj, displayio_epaperdisplay_obj_show); +STATIC mp_obj_t update_refresh_mode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) +{ + enum { ARG_start_sequence, ARG_seconds_per_frame }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_start_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_seconds_per_frame, MP_ARG_OBJ, {.u_obj = MP_OBJ_NEW_SMALL_INT(180)} }, + }; + displayio_epaperdisplay_obj_t *self = native_display(pos_args[0]); + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + // Get parameters + mp_buffer_info_t start_sequence; + mp_get_buffer_raise(args[ARG_start_sequence].u_obj, &start_sequence, MP_BUFFER_READ); + float seconds_per_frame = mp_obj_get_float(args[ARG_seconds_per_frame].u_obj); + + // Update parameters + self->start_sequence = (uint8_t *)start_sequence.buf; + self->start_sequence_len = start_sequence.len; + self->milliseconds_per_frame = seconds_per_frame * 1000; + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_KW(update_refresh_mode_obj, 3, update_refresh_mode); + //| def refresh(self) -> None: //| """Refreshes the display immediately or raises an exception if too soon. Use //| ``time.sleep(display.time_to_refresh)`` to sleep until a refresh can occur.""" @@ -339,6 +363,7 @@ const mp_obj_property_t displayio_epaperdisplay_bus_obj = { STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_epaperdisplay_show_obj) }, + { MP_ROM_QSTR(MP_QSTR_update_refresh_mode), MP_ROM_PTR(&update_refresh_mode_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&displayio_epaperdisplay_refresh_obj) }, { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_epaperdisplay_width_obj) }, diff --git a/shared-bindings/displayio/EPaperDisplay.h b/shared-bindings/displayio/EPaperDisplay.h index 7c2b302ce5..1bf40adb99 100644 --- a/shared-bindings/displayio/EPaperDisplay.h +++ b/shared-bindings/displayio/EPaperDisplay.h @@ -39,7 +39,7 @@ extern const mp_obj_type_t displayio_epaperdisplay_type; #define NO_COMMAND 0x100 void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t *self, - mp_obj_t bus, const uint8_t *start_sequence, uint16_t start_sequence_len, const uint8_t *stop_sequence, uint16_t stop_sequence_len, + mp_obj_t bus, uint8_t *start_sequence, uint16_t start_sequence_len, const uint8_t *stop_sequence, uint16_t stop_sequence_len, uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation, uint16_t set_column_window_command, uint16_t set_row_window_command, uint16_t set_current_column_command, uint16_t set_current_row_command, diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c index 826fe9b8ea..41105de365 100644 --- a/shared-module/displayio/EPaperDisplay.c +++ b/shared-module/displayio/EPaperDisplay.c @@ -43,7 +43,7 @@ #include void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t *self, - mp_obj_t bus, const uint8_t *start_sequence, uint16_t start_sequence_len, + mp_obj_t bus, uint8_t *start_sequence, uint16_t start_sequence_len, const uint8_t *stop_sequence, uint16_t stop_sequence_len, uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation, diff --git a/shared-module/displayio/EPaperDisplay.h b/shared-module/displayio/EPaperDisplay.h index f200813626..d86dae815f 100644 --- a/shared-module/displayio/EPaperDisplay.h +++ b/shared-module/displayio/EPaperDisplay.h @@ -38,7 +38,7 @@ typedef struct { displayio_display_core_t core; digitalio_digitalinout_obj_t busy; uint32_t milliseconds_per_frame; - const uint8_t *start_sequence; + uint8_t *start_sequence; uint32_t start_sequence_len; const uint8_t *stop_sequence; uint32_t stop_sequence_len; From 0f478d59feef6986eb8ba047ec2dd36195dad5dc Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sat, 21 Aug 2021 16:15:59 -0500 Subject: [PATCH 224/418] remove string import. use minimum sized dirty area --- shared-module/bitmaptools/__init__.c | 31 ++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index fb7b5242cf..38359f5285 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -24,8 +24,6 @@ * THE SOFTWARE. */ -#include - #include "shared-bindings/bitmaptools/__init__.h" #include "shared-bindings/displayio/Bitmap.h" #include "shared-module/displayio/Bitmap.h" @@ -262,6 +260,9 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, return; } + + + uint32_t current_point_color_value; // the list of points that we'll check @@ -274,6 +275,11 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, mp_obj_new_tuple(2, point) ); + int16_t minx = x; + int16_t miny = x; + int16_t maxx = y; + int16_t maxy = y; + if (replaced_color_value == INT_MAX) { current_point_color_value = common_hal_displayio_bitmap_get_pixel( destination, @@ -288,10 +294,11 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, mp_obj_t current_point; - size_t tuple_len = 0; mp_obj_t *tuple_items; + int cur_x, cur_y; + // while there are still points to check while (list_length > 0) { mp_obj_list_get(fill_area, &list_length, &fill_points); @@ -308,6 +315,22 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, continue; } + cur_x = mp_obj_int_get_checked(tuple_items[0]); + cur_y = mp_obj_int_get_checked(tuple_items[1]); + + if (cur_x < minx) { + minx = (int16_t)cur_x; + } + if (cur_x > maxx) { + maxx = (int16_t)cur_x; + } + if (cur_y < miny) { + miny = (int16_t)cur_y; + } + if (cur_y > maxy) { + maxy = (int16_t)cur_y; + } + // fill the current point with fill color displayio_bitmap_write_pixel( destination, @@ -365,7 +388,7 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, } // set dirty the area so displayio will draw - displayio_area_t area = { 0, 0, destination->width, destination->height }; + displayio_area_t area = { minx, miny, maxx + 1, maxy + 1}; displayio_bitmap_set_dirty_area(destination, &area); } From cba71ea1579c95755c78bcf3d41976168a4288ef Mon Sep 17 00:00:00 2001 From: James Carr Date: Sun, 22 Aug 2021 10:51:20 +0100 Subject: [PATCH 225/418] Remove `displayio_copy_coords`. It is a duplicate of `displayio_area_copy` --- shared-module/displayio/__init__.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 23338275e8..8fda1b5cb0 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -296,13 +296,6 @@ bool displayio_area_compute_overlap(const displayio_area_t *a, return true; } -void displayio_copy_coords(const displayio_area_t *src, displayio_area_t *dest) { - dest->x1 = src->x1; - dest->y1 = src->y1; - dest->x2 = src->x2; - dest->y2 = src->y2; -} - bool displayio_area_empty(const displayio_area_t *a) { return (a->x1 == a->x2) || (a->y1 == a->y2); } @@ -325,11 +318,11 @@ void displayio_area_union(const displayio_area_t *a, displayio_area_t *u) { if (displayio_area_empty(a)) { - displayio_copy_coords(b, u); + displayio_area_copy(b, u); return; } if (displayio_area_empty(b)) { - displayio_copy_coords(a, u); + displayio_area_copy(a, u); return; } u->x1 = MIN(a->x1, b->x1); From 707f2e25af2beb017a8f0f5946cd339b8c5be35d Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 22 Aug 2021 08:52:12 -0500 Subject: [PATCH 226/418] disable bitmaptools on devices without enough room --- ports/stm/boards/pyb_nano_v2/mpconfigboard.mk | 1 + ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk index d1a627569c..4ff181c7f3 100644 --- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk +++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk @@ -19,3 +19,4 @@ CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_KEYPAD = 0 CIRCUITPY_MIDI = 0 CIRCUITPY_MSGPACK = 0 +CIRCUITPY_BITMAPTOOLS = 0 diff --git a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk index c8dc80a70c..d22075aea5 100644 --- a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk @@ -18,3 +18,4 @@ CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_KEYPAD = 0 CIRCUITPY_MIDI = 0 CIRCUITPY_MSGPACK = 0 +CIRCUITPY_BITMAPTOOLS = 0 \ No newline at end of file From 4c95150dabeee366edcb6ec876375c5cee47bd73 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 22 Aug 2021 08:53:10 -0500 Subject: [PATCH 227/418] eol file --- ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk index d22075aea5..d5368fa84c 100644 --- a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk @@ -18,4 +18,4 @@ CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_KEYPAD = 0 CIRCUITPY_MIDI = 0 CIRCUITPY_MSGPACK = 0 -CIRCUITPY_BITMAPTOOLS = 0 \ No newline at end of file +CIRCUITPY_BITMAPTOOLS = 0 From 80c7a15df7c382b0c821f767f686ebfd497a5b1f Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 22 Aug 2021 10:52:28 -0500 Subject: [PATCH 228/418] fix dirty area initial points --- shared-module/bitmaptools/__init__.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 38359f5285..2bb062239a 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -260,9 +260,6 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, return; } - - - uint32_t current_point_color_value; // the list of points that we'll check @@ -276,8 +273,8 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination, ); int16_t minx = x; - int16_t miny = x; - int16_t maxx = y; + int16_t miny = y; + int16_t maxx = x; int16_t maxy = y; if (replaced_color_value == INT_MAX) { From c72c679b1a93c0fc1a07576d96466152c72c608c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 22 Aug 2021 19:44:03 -0400 Subject: [PATCH 229/418] nrf: remove critical section around sd_app_evt_wait() --- ports/nrf/supervisor/port.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index 772fcde120..6af6fff5b2 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -364,12 +364,9 @@ void port_idle_until_interrupt(void) { sd_softdevice_is_enabled(&sd_enabled); if (sd_enabled) { - uint8_t is_nested_critical_region; - sd_nvic_critical_region_enter(&is_nested_critical_region); if (!background_callback_pending()) { sd_app_evt_wait(); } - sd_nvic_critical_region_exit(is_nested_critical_region); } else { // Call wait for interrupt ourselves if the SD isn't enabled. // Note that `wfi` should be called with interrupts disabled, From e35bcd348a125517e3f672d1a22fc38854cb24b1 Mon Sep 17 00:00:00 2001 From: James Carr Date: Mon, 23 Aug 2021 12:34:13 +0100 Subject: [PATCH 230/418] Use the modified args to sort in displayio.Group --- shared-bindings/displayio/Group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/Group.c b/shared-bindings/displayio/Group.c index 4783c97453..b706b627c4 100644 --- a/shared-bindings/displayio/Group.c +++ b/shared-bindings/displayio/Group.c @@ -335,7 +335,7 @@ STATIC mp_obj_t displayio_group_obj_sort(size_t n_args, const mp_obj_t *pos_args args[i] = pos_args[i]; } args[0] = MP_OBJ_FROM_PTR(self->members); - return mp_obj_list_sort(n_args, pos_args, kw_args); + return mp_obj_list_sort(n_args, args, kw_args); } MP_DEFINE_CONST_FUN_OBJ_KW(displayio_group_sort_obj, 1, displayio_group_obj_sort); From 379461df7d81b87d4fe59a63e78d1f353dff938f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Aug 2021 09:17:59 -0500 Subject: [PATCH 231/418] Deprecate Display's constructor arg set_vertical_scroll --- ports/atmel-samd/boards/hallowing_m0_express/board.c | 1 - ports/atmel-samd/boards/hallowing_m4_express/board.c | 1 - ports/atmel-samd/boards/monster_m4sk/board.c | 1 - ports/atmel-samd/boards/pewpew_m4/board.c | 1 - ports/atmel-samd/boards/pybadge/board.c | 1 - ports/atmel-samd/boards/pygamer/board.c | 1 - ports/atmel-samd/boards/pyportal/board.c | 1 - ports/atmel-samd/boards/pyportal_titano/board.c | 1 - ports/atmel-samd/boards/seeeduino_wio_terminal/board.c | 1 - ports/atmel-samd/boards/ugame10/board.c | 1 - .../boards/adafruit_feather_esp32s2_tftback_nopsram/board.c | 1 - ports/esp32s2/boards/adafruit_funhouse/board.c | 1 - ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c | 1 - ports/esp32s2/boards/morpheans_morphesp-240/board.c | 1 - ports/nrf/boards/clue_nrf52840_express/board.c | 1 - ports/nrf/boards/hiibot_bluefi/board.c | 1 - ports/nrf/boards/makerdiary_nrf52840_m2_devkit/board.c | 1 - ports/nrf/boards/ohs2020_badge/board.c | 1 - ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c | 1 - ports/stm/boards/meowbit_v121/board.c | 1 - shared-bindings/displayio/Display.c | 5 ++--- shared-bindings/displayio/Display.h | 2 +- shared-module/displayio/Display.c | 2 +- 23 files changed, 4 insertions(+), 25 deletions(-) diff --git a/ports/atmel-samd/boards/hallowing_m0_express/board.c b/ports/atmel-samd/boards/hallowing_m0_express/board.c index 76551426e3..e22a4bbe17 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/board.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/board.c @@ -100,7 +100,6 @@ void board_init(void) { 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_PA00, diff --git a/ports/atmel-samd/boards/hallowing_m4_express/board.c b/ports/atmel-samd/boards/hallowing_m4_express/board.c index f9cdbdbafb..d98bc57676 100644 --- a/ports/atmel-samd/boards/hallowing_m4_express/board.c +++ b/ports/atmel-samd/boards/hallowing_m4_express/board.c @@ -80,7 +80,6 @@ void board_init(void) { 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_PB14, // backlight pin diff --git a/ports/atmel-samd/boards/monster_m4sk/board.c b/ports/atmel-samd/boards/monster_m4sk/board.c index 8ef0c6ff95..eec24e1677 100644 --- a/ports/atmel-samd/boards/monster_m4sk/board.c +++ b/ports/atmel-samd/boards/monster_m4sk/board.c @@ -81,7 +81,6 @@ void board_init(void) { 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_PA23, // backlight pin diff --git a/ports/atmel-samd/boards/pewpew_m4/board.c b/ports/atmel-samd/boards/pewpew_m4/board.c index 88c5bd9698..6ce97f7b3f 100644 --- a/ports/atmel-samd/boards/pewpew_m4/board.c +++ b/ports/atmel-samd/boards/pewpew_m4/board.c @@ -133,7 +133,6 @@ void board_init(void) { 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), NULL, // backlight pin diff --git a/ports/atmel-samd/boards/pybadge/board.c b/ports/atmel-samd/boards/pybadge/board.c index 4adf10710e..5d0642e5c2 100644 --- a/ports/atmel-samd/boards/pybadge/board.c +++ b/ports/atmel-samd/boards/pybadge/board.c @@ -103,7 +103,6 @@ void board_init(void) { 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 diff --git a/ports/atmel-samd/boards/pygamer/board.c b/ports/atmel-samd/boards/pygamer/board.c index 11e18f1271..d9d9f11eda 100644 --- a/ports/atmel-samd/boards/pygamer/board.c +++ b/ports/atmel-samd/boards/pygamer/board.c @@ -103,7 +103,6 @@ void board_init(void) { 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 diff --git a/ports/atmel-samd/boards/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c index abeeab8e79..166b14fd5b 100644 --- a/ports/atmel-samd/boards/pyportal/board.c +++ b/ports/atmel-samd/boards/pyportal/board.c @@ -90,7 +90,6 @@ void board_init(void) { 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_PB31, // Backlight pin diff --git a/ports/atmel-samd/boards/pyportal_titano/board.c b/ports/atmel-samd/boards/pyportal_titano/board.c index e2b231980b..6c05e47d92 100644 --- a/ports/atmel-samd/boards/pyportal_titano/board.c +++ b/ports/atmel-samd/boards/pyportal_titano/board.c @@ -107,7 +107,6 @@ void board_init(void) { 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_PB31, // Backlight pin diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/board.c b/ports/atmel-samd/boards/seeeduino_wio_terminal/board.c index fe2393a572..0476932e67 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/board.c +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/board.c @@ -98,7 +98,6 @@ void board_init(void) { 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_PC05, // backlight pin diff --git a/ports/atmel-samd/boards/ugame10/board.c b/ports/atmel-samd/boards/ugame10/board.c index f17b60ff60..7799e83e6f 100644 --- a/ports/atmel-samd/boards/ugame10/board.c +++ b/ports/atmel-samd/boards/ugame10/board.c @@ -100,7 +100,6 @@ void board_init(void) { 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), NULL, diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c index 799494006d..943d91feda 100644 --- a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c @@ -94,7 +94,6 @@ void board_init(void) { 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_GPIO7, // backlight pin diff --git a/ports/esp32s2/boards/adafruit_funhouse/board.c b/ports/esp32s2/boards/adafruit_funhouse/board.c index 8451edef95..a4a1d07947 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/board.c +++ b/ports/esp32s2/boards/adafruit_funhouse/board.c @@ -97,7 +97,6 @@ void board_init(void) { 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_GPIO21, // backlight pin diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c index 1002fa6b76..b00a1ed8ed 100644 --- a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c +++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c @@ -113,7 +113,6 @@ static void display_init(void) { 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_GPIO33, // backlight pin diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/board.c b/ports/esp32s2/boards/morpheans_morphesp-240/board.c index 3dcf6d2465..aad2f0257a 100644 --- a/ports/esp32s2/boards/morpheans_morphesp-240/board.c +++ b/ports/esp32s2/boards/morpheans_morphesp-240/board.c @@ -198,7 +198,6 @@ void board_init(void) { 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), NULL, // There is no backlight pin, defined for now. diff --git a/ports/nrf/boards/clue_nrf52840_express/board.c b/ports/nrf/boards/clue_nrf52840_express/board.c index b5c0f56ba3..c926813732 100644 --- a/ports/nrf/boards/clue_nrf52840_express/board.c +++ b/ports/nrf/boards/clue_nrf52840_express/board.c @@ -80,7 +80,6 @@ void board_init(void) { 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_P1_05, // backlight pin diff --git a/ports/nrf/boards/hiibot_bluefi/board.c b/ports/nrf/boards/hiibot_bluefi/board.c index daca539619..29d0927dfe 100644 --- a/ports/nrf/boards/hiibot_bluefi/board.c +++ b/ports/nrf/boards/hiibot_bluefi/board.c @@ -81,7 +81,6 @@ void board_init(void) { 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_P1_13, // backlight pin diff --git a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/board.c b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/board.c index 51e453c1f0..0ed150f2b1 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/board.c +++ b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/board.c @@ -81,7 +81,6 @@ void board_init(void) { MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command - 37, // set vertical scroll command display_init_sequence, sizeof(display_init_sequence), &pin_P0_20, // backlight pin diff --git a/ports/nrf/boards/ohs2020_badge/board.c b/ports/nrf/boards/ohs2020_badge/board.c index 1522e45c9a..da90e08239 100644 --- a/ports/nrf/boards/ohs2020_badge/board.c +++ b/ports/nrf/boards/ohs2020_badge/board.c @@ -80,7 +80,6 @@ void board_init(void) { 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_P0_02, // backlight pin diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c index 2882e57922..1e16629f30 100644 --- a/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c @@ -91,7 +91,6 @@ void board_init(void) { 0, // Set column command 0, // Set row command 0, // Write memory command - 0xd3, // set vertical scroll command display_init_sequence, sizeof(display_init_sequence), NULL, diff --git a/ports/stm/boards/meowbit_v121/board.c b/ports/stm/boards/meowbit_v121/board.c index 7a31c14e7e..150325556e 100644 --- a/ports/stm/boards/meowbit_v121/board.c +++ b/ports/stm/boards/meowbit_v121/board.c @@ -100,7 +100,6 @@ void board_init(void) { 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_PB03, diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index f5df146455..3dcc26f691 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -54,7 +54,7 @@ //| Most people should not use this class directly. Use a specific display driver instead that will //| contain the initialization sequence at minimum.""" //| -//| def __init__(self, display_bus: _DisplayBus, init_sequence: ReadableBuffer, *, width: int, height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, color_depth: int = 16, grayscale: bool = False, pixels_in_byte_share_row: bool = True, bytes_per_cell: int = 1, reverse_pixels_in_byte: bool = False, set_column_command: int = 0x2a, set_row_command: int = 0x2b, write_ram_command: int = 0x2c, set_vertical_scroll: int = 0, backlight_pin: Optional[microcontroller.Pin] = None, brightness_command: Optional[int] = None, brightness: float = 1.0, auto_brightness: bool = False, single_byte_bounds: bool = False, data_as_commands: bool = False, auto_refresh: bool = True, native_frames_per_second: int = 60, backlight_on_high: bool = True, SH1107_addressing: bool = False) -> None: +//| def __init__(self, display_bus: _DisplayBus, init_sequence: ReadableBuffer, *, width: int, height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, color_depth: int = 16, grayscale: bool = False, pixels_in_byte_share_row: bool = True, bytes_per_cell: int = 1, reverse_pixels_in_byte: bool = False, set_column_command: int = 0x2a, set_row_command: int = 0x2b, write_ram_command: int = 0x2c, backlight_pin: Optional[microcontroller.Pin] = None, brightness_command: Optional[int] = None, brightness: float = 1.0, auto_brightness: bool = False, single_byte_bounds: bool = False, data_as_commands: bool = False, auto_refresh: bool = True, native_frames_per_second: int = 60, backlight_on_high: bool = True, SH1107_addressing: bool = False) -> None: //| r"""Create a Display object on the given display bus (`FourWire`, `ParallelBus` or `I2CDisplay`). //| //| The ``init_sequence`` is bitpacked to minimize the ram impact. Every command begins with a @@ -100,7 +100,6 @@ //| :param int set_column_command: Command used to set the start and end columns to update //| :param int set_row_command: Command used so set the start and end rows to update //| :param int write_ram_command: Command used to write pixels values into the update region. Ignored if data_as_commands is set. -//| :param int set_vertical_scroll: Command used to set the first row to show //| :param microcontroller.Pin backlight_pin: Pin connected to the display's backlight //| :param int brightness_command: Command to set display brightness. Usually available in OLED controllers. //| :param float brightness: Initial display brightness. This value is ignored if auto_brightness is True. @@ -111,6 +110,7 @@ //| :param int native_frames_per_second: Number of display refreshes per second that occur with the given init_sequence. //| :param bool backlight_on_high: If True, pulling the backlight pin high turns the backlight on. //| :param bool SH1107_addressing: Special quirk for SH1107, use upper/lower column set and page set +//| :param int set_vertical_scroll: This parameter is accepted but ignored for backwards compatibility. It will be removed in a future release. //| """ //| ... //| @@ -184,7 +184,6 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a args[ARG_reverse_bytes_in_word].u_bool, args[ARG_set_column_command].u_int, args[ARG_set_row_command].u_int, args[ARG_write_ram_command].u_int, - args[ARG_set_vertical_scroll].u_int, bufinfo.buf, bufinfo.len, MP_OBJ_TO_PTR(backlight_pin), args[ARG_brightness_command].u_int, diff --git a/shared-bindings/displayio/Display.h b/shared-bindings/displayio/Display.h index 36015cd56f..54a4ec84df 100644 --- a/shared-bindings/displayio/Display.h +++ b/shared-bindings/displayio/Display.h @@ -42,7 +42,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self, mp_obj_t bus, uint16_t width, uint16_t height, int16_t colstart, int16_t rowstart, uint16_t rotation, uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word, - uint8_t set_column_command, uint8_t set_row_command, uint8_t write_ram_command, uint8_t set_vertical_scroll, + uint8_t set_column_command, uint8_t set_row_command, uint8_t write_ram_command, uint8_t *init_sequence, uint16_t init_sequence_len, const mcu_pin_obj_t *backlight_pin, uint16_t brightness_command, mp_float_t brightness, bool auto_brightness, bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second, diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index ba509c6986..4c30a85970 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -45,7 +45,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self, mp_obj_t bus, uint16_t width, uint16_t height, int16_t colstart, int16_t rowstart, uint16_t rotation, uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word, uint8_t set_column_command, - uint8_t set_row_command, uint8_t write_ram_command, uint8_t set_vertical_scroll, + uint8_t set_row_command, uint8_t write_ram_command, uint8_t *init_sequence, uint16_t init_sequence_len, const mcu_pin_obj_t *backlight_pin, uint16_t brightness_command, mp_float_t brightness, bool auto_brightness, bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second, From 734aad1a4f4d880a0fe75bafc4d16622f6b93522 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 22 Aug 2021 15:48:38 +0000 Subject: [PATCH 232/418] Translated using Weblate (German) Currently translated at 73.6% (749 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/de/ --- locale/de_DE.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/de_DE.po b/locale/de_DE.po index 515327b835..64237d7eef 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-20 03:20+0000\n" -"Last-Translator: Boris Steinmetz \n" +"PO-Revision-Date: 2021-08-23 14:19+0000\n" +"Last-Translator: Jeff Epler \n" "Language: de_DE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.8-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -3976,7 +3976,7 @@ msgstr "pow() drittes Argument darf nicht 0 sein" #: py/objint_mpz.c msgid "pow() with 3 arguments requires integers" -msgstr "pow () mit 3 Argumenten erfordert Integer" +msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h #: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h From 352fecf17eee2f9af4ab99f9caf20d8799a50d5a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 22 Aug 2021 15:45:22 +0000 Subject: [PATCH 233/418] Translated using Weblate (Spanish) Currently translated at 98.3% (1000 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/es.po b/locale/es.po index 13dde65160..92f3e77814 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,15 +8,15 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-06-27 12:33+0000\n" -"Last-Translator: Alvaro Figueroa \n" +"PO-Revision-Date: 2021-08-23 14:19+0000\n" +"Last-Translator: Jeff Epler \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.7.1-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -658,7 +658,7 @@ msgstr "CRC o suma de comprobación inválida" #: py/objtype.c msgid "Call super().__init__() before accessing native object." -msgstr "Llame a super().__ init __() antes de acceder al objeto nativo." +msgstr "Llame a super().__init__() antes de acceder al objeto nativo." #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." From 21502f762016f85746be65f7da65b70f144dd179 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 22 Aug 2021 15:47:57 +0000 Subject: [PATCH 234/418] Translated using Weblate (Filipino) Currently translated at 40.1% (408 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fil/ --- locale/fil.po | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/locale/fil.po b/locale/fil.po index 97555e49dc..eefc5af97f 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -6,14 +6,16 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2018-12-20 22:15-0800\n" -"Last-Translator: Timothy \n" +"PO-Revision-Date: 2021-08-23 14:19+0000\n" +"Last-Translator: Jeff Epler \n" "Language-Team: fil\n" "Language: fil\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.1.1\n" +"Plural-Forms: nplurals=2; plural=n != 1 && n != 2 && n != 3 && (n % 10 == 4 " +"|| n % 10 == 6 || n % 10 == 9);\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -2503,7 +2505,7 @@ msgstr "Ikaw ang humiling sa safe mode sa pamamagitan ng " #: py/objtype.c msgid "__init__() should return None" -msgstr "__init __ () dapat magbalik na None" +msgstr "__init__() dapat magbalik na None" #: py/objtype.c msgid "__init__() should return None, not '%q'" From 966fe1c10797d5bb9046c0e8f3e56145697dcd98 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 22 Aug 2021 15:44:58 +0000 Subject: [PATCH 235/418] Translated using Weblate (French) Currently translated at 93.4% (950 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 6e9e4c2f0f..52fd02a4b2 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-07-27 14:33+0000\n" -"Last-Translator: Noel Gaetan \n" +"PO-Revision-Date: 2021-08-23 14:19+0000\n" +"Last-Translator: Jeff Epler \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.7.2-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -659,7 +659,7 @@ msgstr "CRC ou somme de contrôle invalide" #: py/objtype.c msgid "Call super().__init__() before accessing native object." -msgstr "Appelez super () .__ init __ () avant d'accéder à l'objet natif." +msgstr "Appelez super() .__init__() avant d'accéder à l'objet natif." #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." From 1f3ebd4e7c1719e08a6aa155a06f57b57e778322 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 22 Aug 2021 15:48:05 +0000 Subject: [PATCH 236/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1017 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index a0084858e7..5172027836 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,15 +6,15 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-21 08:36+0000\n" -"Last-Translator: Jonny Bergdahl \n" +"PO-Revision-Date: 2021-08-23 14:19+0000\n" +"Last-Translator: Jeff Epler \n" "Language-Team: LANGUAGE \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.8-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -174,7 +174,7 @@ msgstr "%q ska vara en int" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" -msgstr "% q () tar% d positionsargument men% d gavs" +msgstr "% q() tar %d positionsargument men %d gavs" #: shared-bindings/usb_hid/Device.c msgid "%q, %q, and %q must all be the same length" @@ -2525,7 +2525,7 @@ msgstr "Du begärt att starta i felsäkert läge genom att " #: py/objtype.c msgid "__init__() should return None" -msgstr "__init __ () ska returnera None" +msgstr "__init __() ska returnera None" #: py/objtype.c msgid "__init__() should return None, not '%q'" From c2ee527605921dbf477198c00fb076bb5513900e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 22 Aug 2021 15:48:14 +0000 Subject: [PATCH 237/418] Translated using Weblate (Dutch) Currently translated at 78.8% (802 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/nl/ --- locale/nl.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/nl.po b/locale/nl.po index 7abd583e44..fba8933852 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -6,15 +6,15 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2020-12-23 20:14+0000\n" -"Last-Translator: _fonzlate \n" +"PO-Revision-Date: 2021-08-23 14:19+0000\n" +"Last-Translator: Jeff Epler \n" "Language-Team: none\n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.4.1-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -2512,7 +2512,7 @@ msgstr "Je hebt aangeven de veilige modus te starten door " #: py/objtype.c msgid "__init__() should return None" -msgstr "__init __ () zou None moeten retourneren" +msgstr "__init __() zou None moeten retourneren" #: py/objtype.c msgid "__init__() should return None, not '%q'" From f55e79f70d8a84a74f34509b14700aad1152137a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 22 Aug 2021 15:47:25 +0000 Subject: [PATCH 238/418] Translated using Weblate (Chinese (Pinyin)) Currently translated at 98.3% (1000 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 789772e188..57844d3e11 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-07-06 16:32+0000\n" -"Last-Translator: hexthat \n" +"PO-Revision-Date: 2021-08-23 14:19+0000\n" +"Last-Translator: Jeff Epler \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.8-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -350,7 +350,7 @@ msgstr "0.0 dào fùzá diànyuán" #: py/modbuiltins.c msgid "3-arg pow() not supported" -msgstr "bù zhīchí 3-arg pow ()" +msgstr "bù zhīchí 3-arg pow()" #: shared-module/msgpack/__init__.c msgid "64 bit types" @@ -2543,7 +2543,7 @@ msgstr "xūyào yīgè zì jié lèi duìxiàng" #: lib/embed/abort_.c msgid "abort() called" -msgstr "zhōngzhǐ () diàoyòng" +msgstr "abort() diàoyòng" #: shared-bindings/i2cperipheral/I2CPeripheral.c msgid "address out of bounds" @@ -3178,7 +3178,7 @@ msgstr "dì yī gè cānshù bìxū shì ndarray" #: py/objtype.c msgid "first argument to super() must be type" -msgstr "chāojí () de dì yī gè cānshù bìxū shì lèixíng" +msgstr "super() de dì yī gè cānshù bìxū shì lèixíng" #: extmod/ulab/code/scipy/linalg/linalg.c msgid "first two arguments must be ndarrays" From 923fb44cda1d9b1be7ca6b37bbfed5adc738a6cf Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 23 Aug 2021 16:19:57 +0200 Subject: [PATCH 239/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 2 +- locale/cs.po | 2 +- locale/de_DE.po | 2 +- locale/el.po | 2 +- locale/en_GB.po | 2 +- locale/es.po | 2 +- locale/fil.po | 2 +- locale/fr.po | 2 +- locale/hi.po | 2 +- locale/it_IT.po | 2 +- locale/ja.po | 2 +- locale/ko.po | 2 +- locale/nl.po | 2 +- locale/pl.po | 2 +- locale/pt_BR.po | 2 +- locale/sv.po | 2 +- locale/zh_Latn_pinyin.po | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index a6c465bd67..b3dcc06db5 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -196,7 +196,7 @@ msgstr "Objek '%q' tidak mendukung '%q'" msgid "'%q' object is not an iterator" msgstr "Objek '%q' bukan merupakan iterator" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 61981f39f7..1cfe1023d2 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -192,7 +192,7 @@ msgstr "Objekt '%q' nepodporuje '%q'" msgid "'%q' object is not an iterator" msgstr "Objekt '%q' není iterátor" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "Objekt '%q' nelze volat" diff --git a/locale/de_DE.po b/locale/de_DE.po index 64237d7eef..4c22834412 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -198,7 +198,7 @@ msgstr "'%q' Objekt unterstützt '%q' nicht" msgid "'%q' object is not an iterator" msgstr "'%q' Objekt ist kein Iterator" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "'%q' Objekt ist kein callable" diff --git a/locale/el.po b/locale/el.po index f0380be3ba..60ae6f3067 100644 --- a/locale/el.po +++ b/locale/el.po @@ -189,7 +189,7 @@ msgstr "" msgid "'%q' object is not an iterator" msgstr "" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 9c3945d3fc..a7dee7a1a7 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -198,7 +198,7 @@ msgstr "'%q' object does not support '%q'" msgid "'%q' object is not an iterator" msgstr "'%q' object is not an iterator" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "'%q' object is not callable" diff --git a/locale/es.po b/locale/es.po index 92f3e77814..a8f576dc29 100644 --- a/locale/es.po +++ b/locale/es.po @@ -200,7 +200,7 @@ msgstr "objeto '%q' no tiene capacidad '%q'" msgid "'%q' object is not an iterator" msgstr "objeto '%q' no es un iterador" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "objeto '%q' no es llamable" diff --git a/locale/fil.po b/locale/fil.po index eefc5af97f..34544be890 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -193,7 +193,7 @@ msgstr "" msgid "'%q' object is not an iterator" msgstr "" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 52fd02a4b2..aa3bf8d2e1 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -200,7 +200,7 @@ msgstr "l'objet '%q' ne supporte pas '%q'" msgid "'%q' object is not an iterator" msgstr "l'objet '%q' n'est pas un itérateur" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "l'objet '%q' ne peut pas être appelé" diff --git a/locale/hi.po b/locale/hi.po index 1312959fef..072d5648f8 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -189,7 +189,7 @@ msgstr "" msgid "'%q' object is not an iterator" msgstr "" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 56d076408e..ebaff07b79 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -199,7 +199,7 @@ msgstr "L'oggetto '%q' non supporta '%q'" msgid "'%q' object is not an iterator" msgstr "L'oggetto '%q' non è un iteratore" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "L'oggetto '%q' non è richiamabile" diff --git a/locale/ja.po b/locale/ja.po index 7794a7893e..f7e8404fc2 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -194,7 +194,7 @@ msgstr "'%q' オブジェクトは '%q' に対応していません" msgid "'%q' object is not an iterator" msgstr "オブジェクト'%q'はイテレータではありません" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "オブジェクト'%q'は呼び出し可能ではありません" diff --git a/locale/ko.po b/locale/ko.po index be62b5056f..ee27542d3d 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -190,7 +190,7 @@ msgstr "" msgid "'%q' object is not an iterator" msgstr "" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index fba8933852..9aa6dd312b 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -192,7 +192,7 @@ msgstr "'%q' object ondersteunt geen '%q'" msgid "'%q' object is not an iterator" msgstr "'%q' object is geen iterator" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "'%q' object is niet aanroepbaar" diff --git a/locale/pl.po b/locale/pl.po index e2cc657aa0..c1542a5c1f 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -194,7 +194,7 @@ msgstr "Obiekt '%q' nie wspiera '%q'" msgid "'%q' object is not an iterator" msgstr "Obiekt '%q' nie jest iteratorem" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "Obiekt '%q' nie jest wywoływalny" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 82ba868478..f01a7c7f1e 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -198,7 +198,7 @@ msgstr "O objeto '%q' não suporta '%q'" msgid "'%q' object is not an iterator" msgstr "O objeto '%q' não é um iterador" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "O objeto '%s' não é invocável" diff --git a/locale/sv.po b/locale/sv.po index 5172027836..2bc62c5e06 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -197,7 +197,7 @@ msgstr "Objektet '%q' stöder inte '%q'" msgid "'%q' object is not an iterator" msgstr "Objektet '%q' är inte en iterator" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "Objektet '%q' kan inte anropas" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 57844d3e11..412475bdbc 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -199,7 +199,7 @@ msgstr "'%q' duì xiàng bù zhī chí '%q'" msgid "'%q' object is not an iterator" msgstr "%q' duì xiàng bù shì yí gè liú lǎn qì" -#: py/objtype.c py/runtime.c +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" msgstr "%q' duì xiàng bù kě diào yòng" From 533eab5b7fa8481e0a46807a901185f5d91d4c23 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Mon, 23 Aug 2021 23:33:55 +0530 Subject: [PATCH 240/418] turn off `synthio` on `pca10100` --- ports/nrf/boards/pca10100/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/nrf/boards/pca10100/mpconfigboard.mk b/ports/nrf/boards/pca10100/mpconfigboard.mk index 6381df74f4..c487753fa7 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.mk +++ b/ports/nrf/boards/pca10100/mpconfigboard.mk @@ -26,6 +26,7 @@ CIRCUITPY_PIXELBUF = 0 CIRCUITPY_RE = 0 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_SDCARDIO = 0 +CIRCUITPY_SYNTHIO = 0 CIRCUITPY_ULAB = 0 CIRCUITPY_USB_MIDI = 0 From de021c4fd2ee9bf404ce8764ecea5d84dc6015a3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Aug 2021 20:08:14 +0000 Subject: [PATCH 241/418] Translated using Weblate (French) Currently translated at 93.4% (950 of 1017 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index aa3bf8d2e1..716a73f676 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-23 14:19+0000\n" +"PO-Revision-Date: 2021-08-23 20:20+0000\n" "Last-Translator: Jeff Epler \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -659,7 +659,7 @@ msgstr "CRC ou somme de contrôle invalide" #: py/objtype.c msgid "Call super().__init__() before accessing native object." -msgstr "Appelez super() .__init__() avant d'accéder à l'objet natif." +msgstr "Appelez super().__init__() avant d'accéder à l'objet natif." #: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." From 3e244854fa22a7fd3efff7e903641408829551d9 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 23 Aug 2021 22:20:45 +0200 Subject: [PATCH 242/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 9 +++++++++ locale/cs.po | 9 +++++++++ locale/de_DE.po | 9 +++++++++ locale/el.po | 9 +++++++++ locale/en_GB.po | 9 +++++++++ locale/es.po | 9 +++++++++ locale/fil.po | 9 +++++++++ locale/fr.po | 9 +++++++++ locale/hi.po | 9 +++++++++ locale/it_IT.po | 9 +++++++++ locale/ja.po | 9 +++++++++ locale/ko.po | 9 +++++++++ locale/nl.po | 9 +++++++++ locale/pl.po | 9 +++++++++ locale/pt_BR.po | 9 +++++++++ locale/sv.po | 9 +++++++++ locale/zh_Latn_pinyin.po | 9 +++++++++ 17 files changed, 153 insertions(+) diff --git a/locale/ID.po b/locale/ID.po index b3dcc06db5..68ba6ca806 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -2617,6 +2617,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "mode compile buruk" @@ -3969,6 +3973,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4410,6 +4415,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 1cfe1023d2..71da75753f 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -2578,6 +2578,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -3929,6 +3933,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4370,6 +4375,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 4c22834412..1fc7725d9c 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -2623,6 +2623,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "schlechter Kompilierungsmodus" @@ -3998,6 +4002,7 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4446,6 +4451,10 @@ msgstr "nicht unterstützte Typen für %q: '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "Wert muss in %d Byte(s) passen" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "value_count muss größer als 0 sein" diff --git a/locale/el.po b/locale/el.po index 60ae6f3067..a2aecc40e2 100644 --- a/locale/el.po +++ b/locale/el.po @@ -2575,6 +2575,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -3926,6 +3930,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4367,6 +4372,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index a7dee7a1a7..1c7d7c7a57 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -2606,6 +2606,10 @@ msgstr "axis must be None, or an integer" msgid "axis too long" msgstr "axis too long" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "bad compile mode" @@ -3961,6 +3965,7 @@ msgstr "pow() with 3 arguments requires integers" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4404,6 +4409,10 @@ msgstr "unsupported types for %q: '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "value must fit in %d byte(s)" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "value_count must be > 0" diff --git a/locale/es.po b/locale/es.po index a8f576dc29..3a04192198 100644 --- a/locale/es.po +++ b/locale/es.po @@ -2650,6 +2650,10 @@ msgstr "Eje tiene que ser None, o un entero" msgid "axis too long" msgstr "Eje demasiado largo" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "modo de compilación erroneo" @@ -4015,6 +4019,7 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4459,6 +4464,10 @@ msgstr "tipos no soportados para %q: '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "el valor debe caber en %d byte(s)" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "value_count debe ser > 0" diff --git a/locale/fil.po b/locale/fil.po index 34544be890..a1ea9cde0e 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -2605,6 +2605,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "masamang mode ng compile" @@ -3975,6 +3979,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4420,6 +4425,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 716a73f676..21e673f9b7 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -2652,6 +2652,10 @@ msgstr "axis doit être None ou un entier" msgid "axis too long" msgstr "axis trop long" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "mauvais mode de compilation" @@ -4026,6 +4030,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4470,6 +4475,10 @@ msgstr "types non supportés pour %q: '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "la valeur doit tenir dans %d octet(s)" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "'value_count' doit être > 0" diff --git a/locale/hi.po b/locale/hi.po index 072d5648f8..c885638e81 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -2575,6 +2575,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -3926,6 +3930,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4367,6 +4372,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index ebaff07b79..cec3f73cf5 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -2618,6 +2618,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -3991,6 +3995,7 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4436,6 +4441,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index f7e8404fc2..0a60099ea3 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -2590,6 +2590,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -3948,6 +3952,7 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4390,6 +4395,10 @@ msgstr "%q が対応していない型: '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "値は%dバイトに収まらなければなりません" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "value_countは0より大きくなければなりません" diff --git a/locale/ko.po b/locale/ko.po index ee27542d3d..08f6d4decd 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -2579,6 +2579,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "" @@ -3930,6 +3934,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4371,6 +4376,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 9aa6dd312b..fc09c5ddbd 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -2612,6 +2612,10 @@ msgstr "as moet None of een integer zijn" msgid "axis too long" msgstr "as te lang" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "verkeerde compileer modus" @@ -3972,6 +3976,7 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4415,6 +4420,10 @@ msgstr "niet ondersteunde types voor %q: '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "waarde moet in %d byte(s) passen" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "value_count moet groter dan 0 zijn" diff --git a/locale/pl.po b/locale/pl.po index c1542a5c1f..bc2ede0f4e 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -2592,6 +2592,10 @@ msgstr "" msgid "axis too long" msgstr "" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "zły tryb kompilacji" @@ -3945,6 +3949,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4387,6 +4392,10 @@ msgstr "" msgid "value must fit in %d byte(s)" msgstr "wartość musi mieścić się w %d bajtach" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "value_count musi być > 0" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index f01a7c7f1e..04144b1aeb 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -2655,6 +2655,10 @@ msgstr "eixo deve ser Nenhum ou um número inteiro" msgid "axis too long" msgstr "o eixo é muito longo" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "modo de compilação ruim" @@ -4026,6 +4030,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4469,6 +4474,10 @@ msgstr "tipo sem suporte para %q: '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "o valor deve caber em %d byte(s)" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "o value_count deve ser > 0" diff --git a/locale/sv.po b/locale/sv.po index 2bc62c5e06..61982ff6bb 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -2625,6 +2625,10 @@ msgstr "axis måste vara None eller ett heltal" msgid "axis too long" msgstr "axis för lång" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "Ogiltigt kompileringsläge" @@ -3985,6 +3989,7 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4428,6 +4433,10 @@ msgstr "typen %q stöder inte '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "värdet måste passa i %d byte(s)" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "value_count måste vara > 0" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 412475bdbc..d37504836a 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -2627,6 +2627,10 @@ msgstr "zhóu bì xū wéi \" wú \" huò zhěng shù" msgid "axis too long" msgstr "zhóu tài cháng" +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + #: py/builtinevex.c msgid "bad compile mode" msgstr "biānyì móshì cuòwù" @@ -3985,6 +3989,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h +#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -4428,6 +4433,10 @@ msgstr "%q bù zhīchí de lèixíng: '%q', '%q'" msgid "value must fit in %d byte(s)" msgstr "Zhí bìxū fúhé %d zì jié" +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" msgstr "zhí jìshù bìxū wèi > 0" From 3a327cd9adbd6f568c9b55098f6d0fd94d54fc10 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Mon, 23 Aug 2021 22:15:36 +0000 Subject: [PATCH 243/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1019 of 1019 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 61982ff6bb..73b497dffb 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-23 14:19+0000\n" -"Last-Translator: Jeff Epler \n" +"PO-Revision-Date: 2021-08-23 23:02+0000\n" +"Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" "MIME-Version: 1.0\n" @@ -2627,7 +2627,7 @@ msgstr "axis för lång" #: shared-bindings/bitmaptools/__init__.c msgid "background value out of range of target" -msgstr "" +msgstr "värde för bakgrund utanför målintervall" #: py/builtinevex.c msgid "bad compile mode" @@ -4435,7 +4435,7 @@ msgstr "värdet måste passa i %d byte(s)" #: shared-bindings/bitmaptools/__init__.c msgid "value out of range of target" -msgstr "" +msgstr "värde utanför målintervall" #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" From c310a618e8428da6cf43065e04e7fa3fd51fc350 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Aug 2021 19:59:59 -0500 Subject: [PATCH 245/418] objtraceback: merge with an existing message in objtype --- py/objtraceback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/objtraceback.c b/py/objtraceback.c index f1f74142d6..989521a0a6 100644 --- a/py/objtraceback.c +++ b/py/objtraceback.c @@ -32,7 +32,7 @@ const mp_obj_traceback_t mp_const_empty_traceback_obj = {{&mp_type_traceback}, 0 STATIC void mp_obj_traceback_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) { (void)kind; mp_obj_traceback_t *o = MP_OBJ_TO_PTR(o_in); - mp_printf(print, "", o); + mp_printf(print, "<%q object at %p>", MP_QSTR_traceback, o); } const mp_obj_type_t mp_type_traceback = { From 4a9ad8a9424bfdc16d58d69ce19bf4425296ff6d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Aug 2021 20:00:21 -0500 Subject: [PATCH 246/418] Translate & compress some repl messages --- lib/utils/pyexec.c | 6 +++--- locale/circuitpython.pot | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index 31885b94dc..c1bb66aad1 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -370,7 +370,7 @@ STATIC int pyexec_raw_repl_process_char(int c) { } goto reset; } - mp_hal_stdout_tx_str("raw REPL; CTRL-B to exit\r\n"); + serial_write_compressed(translate("raw REPL; CTRL-B to exit\n")); goto reset; } else if (c == CHAR_CTRL_B) { // change to friendly REPL @@ -469,7 +469,7 @@ STATIC int pyexec_friendly_repl_process_char(int c) { return PYEXEC_FORCED_EXIT; } else if (ret == CHAR_CTRL_E) { // paste mode - mp_hal_stdout_tx_str("\r\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\r\n=== "); + serial_write_compressed(translate("\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\n=== ")); vstr_reset(MP_STATE_VM(repl_line)); repl.paste_mode = true; return 0; @@ -545,7 +545,7 @@ int pyexec_raw_repl(void) { vstr_init(&line, 32); raw_repl_reset: - mp_hal_stdout_tx_str("raw REPL; CTRL-B to exit\r\n"); + serial_write_compressed(translate("raw REPL; CTRL-B to exit\n")); for (;;) { vstr_reset(&line); diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c4dfb4e944..0f4024197d 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -35,6 +35,13 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -1392,7 +1399,8 @@ msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "" @@ -3915,8 +3923,10 @@ msgstr "" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3933,6 +3943,7 @@ msgstr "" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h @@ -3969,6 +3980,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" From 5c9f7e2fe40d38d931474afd1bb41bdf3aa6816f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Aug 2021 20:00:34 -0500 Subject: [PATCH 247/418] simplify printing a compressed message --- main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main.c b/main.c index ec25bcbf08..2b4327ad93 100755 --- a/main.c +++ b/main.c @@ -212,10 +212,7 @@ STATIC bool maybe_run_list(const char * const * filenames, pyexec_result_t* exec return false; } mp_hal_stdout_tx_str(filename); - const compressed_string_t* compressed = translate(" output:\n"); - char decompressed[decompress_length(compressed)]; - decompress(compressed, decompressed); - mp_hal_stdout_tx_str(decompressed); + serial_write_compressed(translate(" output:\n")); pyexec_file(filename, exec_result); #if CIRCUITPY_ATEXIT shared_module_atexit_execute(exec_result); From 6d26225b60b251ddcdc2d4562f70e0017a66a534 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Aug 2021 19:59:29 -0500 Subject: [PATCH 248/418] objgenerator: Unify two messages --- py/objgenerator.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/py/objgenerator.c b/py/objgenerator.c index 7bafd9ce98..f7bf235848 100644 --- a/py/objgenerator.c +++ b/py/objgenerator.c @@ -185,11 +185,13 @@ STATIC void gen_instance_print(const mp_print_t *print, mp_obj_t self_in, mp_pri mp_obj_gen_instance_t *self = MP_OBJ_TO_PTR(self_in); #if MICROPY_PY_ASYNC_AWAIT if (self->coroutine_generator) { - mp_printf(print, "", mp_obj_fun_get_name(MP_OBJ_FROM_PTR(self->code_state.fun_bc)), self); - return; + mp_printf(print, "<%q object '%q' at %p>", MP_QSTR_coroutine, mp_obj_fun_get_name(MP_OBJ_FROM_PTR(self->code_state.fun_bc)), self); + } else { + mp_printf(print, "<%q object '%q' at %p>", MP_QSTR_generator, mp_obj_fun_get_name(MP_OBJ_FROM_PTR(self->code_state.fun_bc)), self); } - #endif + #else mp_printf(print, "", mp_obj_fun_get_name(MP_OBJ_FROM_PTR(self->code_state.fun_bc)), self); + #endif } mp_vm_return_kind_t mp_obj_gen_resume(mp_obj_t self_in, mp_obj_t send_value, mp_obj_t throw_value, mp_obj_t *ret_val) { From ce5e267143e429af6f8cecaaaff6fcb19d1fc42b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 23 Aug 2021 21:57:29 -0400 Subject: [PATCH 249/418] shrink thunderpack_v11; fix PulseOut doc --- ports/stm/boards/thunderpack_v11/mpconfigboard.mk | 2 ++ shared-bindings/pulseio/PulseOut.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/stm/boards/thunderpack_v11/mpconfigboard.mk b/ports/stm/boards/thunderpack_v11/mpconfigboard.mk index 8f645068d7..29f9b14ba8 100644 --- a/ports/stm/boards/thunderpack_v11/mpconfigboard.mk +++ b/ports/stm/boards/thunderpack_v11/mpconfigboard.mk @@ -16,4 +16,6 @@ MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_nvm.ld LD_FILE = boards/STM32F411_nvm.ld +CIRCUITPY_BLEIO_HCI = 0 +CIRCUITPY_VECTORIO = 0 CIRCUITPY_ULAB = 0 diff --git a/shared-bindings/pulseio/PulseOut.c b/shared-bindings/pulseio/PulseOut.c index 564320ae0d..88d7eb40e0 100644 --- a/shared-bindings/pulseio/PulseOut.c +++ b/shared-bindings/pulseio/PulseOut.c @@ -42,9 +42,9 @@ //| for on and off pairs.""" //| //| def __init__(self, pin: microcontroller.Pin, *, frequency: int = 38000, duty_cycle: int = 1 << 15) -> None: -//| """Create a PulseOut object associated with the given PWMout object. +//| """Create a PulseOut object associated with the given pin. //| -//| :param ~microcontroller.Pin pin: PWMOut that is set to output on the desired pin. +//| :param ~microcontroller.Pin pin: Signal output pin //| :param int frequency: Carrier signal frequency in Hertz //| :param int duty_cycle: 16-bit duty cycle of carrier frequency (0 - 65536) //| From 0e3aa27794898f18345e4401c8cc678ab64f558a Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Aug 2021 21:37:34 -0500 Subject: [PATCH 250/418] Change optimizer option so RP2040 DEBUG builds work --- ports/raspberrypi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 926c8de9fd..ffab1fbcd0 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -117,7 +117,7 @@ CFLAGS += $(OPTIMIZATION_FLAGS) #Debugging/Optimization ifeq ($(DEBUG), 1) - CFLAGS += -ggdb3 -Og + CFLAGS += -ggdb3 -O3 # No LTO because we may place some functions in RAM instead of flash. else CFLAGS += -DNDEBUG From fe695372b37fae78d9d2ebb3c1773d2a3af7c429 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 24 Aug 2021 00:37:49 +0000 Subject: [PATCH 251/418] Translated using Weblate (Japanese) Currently translated at 53.0% (541 of 1019 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ja/ --- locale/ja.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/ja.po b/locale/ja.po index 0a60099ea3..cbfb678cac 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -8,15 +8,15 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2020-11-27 18:34+0000\n" -"Last-Translator: sporeball \n" +"PO-Revision-Date: 2021-08-24 06:48+0000\n" +"Last-Translator: Jeff Epler \n" "Language-Team: none\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.4-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -313,7 +313,7 @@ msgstr "'data'には整数の引数が必要" #: py/compile.c msgid "'label' requires 1 argument" -msgstr "'label'には1つの引数が必要" +msgstr "'label'には1つの引数が必要" #: py/compile.c msgid "'return' outside function" From 1685e1a99663972da515a71f9f8c6d7f5806faa0 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 24 Aug 2021 12:36:06 -0400 Subject: [PATCH 252/418] ../../shared-bindings/usb_hid/Device.c --- shared-bindings/usb_hid/Device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/usb_hid/Device.c b/shared-bindings/usb_hid/Device.c index 718df73241..774d991335 100644 --- a/shared-bindings/usb_hid/Device.c +++ b/shared-bindings/usb_hid/Device.c @@ -126,11 +126,11 @@ STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args 1, 255, MP_QSTR_report_ids); in_report_lengths_array[i] = (uint8_t)mp_arg_validate_int_range( - MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(in_report_lengths_array, i_obj, MP_OBJ_SENTINEL)), + MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(in_report_lengths, i_obj, MP_OBJ_SENTINEL)), 0, 255, MP_QSTR_in_report_lengths); out_report_lengths_array[i] = (uint8_t)mp_arg_validate_int_range( - MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(out_report_lengths_array, i_obj, MP_OBJ_SENTINEL)), + MP_OBJ_SMALL_INT_VALUE(mp_obj_subscr(out_report_lengths, i_obj, MP_OBJ_SENTINEL)), 0, 255, MP_QSTR_out_report_lengths); } From 77b0c76a376b7a750c3d653d241d556e25d5b049 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 24 Aug 2021 12:11:22 -0500 Subject: [PATCH 253/418] raspberrypi: audiopwmout: simple fix for #5092 --- ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c index 05246ef1be..48dc9ab388 100644 --- a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +++ b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -175,8 +175,8 @@ void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t *self, uint32_t best_error = system_clock; for (uint32_t denominator = 0xffff; denominator > 0; denominator--) { - uint32_t numerator = (denominator * sample_rate) / system_clock; - uint32_t remainder = (denominator * sample_rate) % system_clock; + uint32_t numerator = ((uint64_t)denominator * sample_rate) / system_clock; + uint32_t remainder = ((uint64_t)denominator * sample_rate) % system_clock; if (remainder > (system_clock / 2)) { numerator += 1; remainder = system_clock - remainder; From a5f2f6e1b10e0cf52b30a8f1113ced7fe3e8d203 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 23 Aug 2021 18:08:30 -0700 Subject: [PATCH 254/418] Two tweaks to BLE workflow 1. Use autoreload for restarting after a write. This gives time for a follow up command before restarting BLE. 2. Switch to recursive deletion of directories. This greatly simplifies deleting directories with contents. Fixes https://github.com/adafruit/Adafruit_CircuitPython_BLE_File_Transfer/issues/7 --- main.c | 4 +- supervisor/shared/autoreload.c | 12 ++--- supervisor/shared/autoreload.h | 9 +++- supervisor/shared/bluetooth/file_transfer.c | 57 +++++++++++++++++++-- 4 files changed, 68 insertions(+), 14 deletions(-) diff --git a/main.c b/main.c index ec25bcbf08..5ff243ef58 100755 --- a/main.c +++ b/main.c @@ -755,7 +755,7 @@ STATIC int run_repl(void) { usb_setup_with_vm(); #endif - autoreload_suspend(); + autoreload_suspend(AUTORELOAD_LOCK_REPL); // Set the status LED to the REPL color before running the REPL. For // NeoPixels and DotStars this will be sticky but for PWM or single LED it @@ -785,7 +785,7 @@ STATIC int run_repl(void) { status_led_deinit(); #endif - autoreload_resume(); + autoreload_resume(AUTORELOAD_LOCK_REPL); return exit_code; } diff --git a/supervisor/shared/autoreload.c b/supervisor/shared/autoreload.c index 19b683fff7..5c66c44298 100644 --- a/supervisor/shared/autoreload.c +++ b/supervisor/shared/autoreload.c @@ -35,7 +35,7 @@ supervisor_allocation *next_code_allocation; static volatile uint32_t autoreload_delay_ms = 0; static bool autoreload_enabled = false; -static bool autoreload_suspended = false; +static size_t autoreload_suspended = 0; volatile bool reload_requested = false; @@ -44,7 +44,7 @@ inline void autoreload_tick() { return; } if (autoreload_delay_ms == 1 && autoreload_enabled && - !autoreload_suspended && !reload_requested) { + autoreload_suspended == 0 && !reload_requested) { mp_raise_reload_exception(); reload_requested = true; supervisor_set_run_reason(RUN_REASON_AUTO_RELOAD); @@ -62,12 +62,12 @@ void autoreload_disable() { autoreload_enabled = false; } -void autoreload_suspend() { - autoreload_suspended = true; +void autoreload_suspend(size_t lock_mask) { + autoreload_suspended |= lock_mask; } -void autoreload_resume() { - autoreload_suspended = false; +void autoreload_resume(size_t lock_mask) { + autoreload_suspended &= ~lock_mask; } inline bool autoreload_is_enabled() { diff --git a/supervisor/shared/autoreload.h b/supervisor/shared/autoreload.h index 41f9faea85..7282b11a69 100644 --- a/supervisor/shared/autoreload.h +++ b/supervisor/shared/autoreload.h @@ -40,6 +40,11 @@ enum { SUPERVISOR_NEXT_CODE_OPT_NEWLY_SET = 0x20, }; +enum { + AUTORELOAD_LOCK_REPL = 0x1, + AUTORELOAD_LOCK_BLE = 0x2 +}; + typedef struct { uint8_t options; char filename[]; @@ -58,8 +63,8 @@ void autoreload_disable(void); bool autoreload_is_enabled(void); // Temporarily turn it off. Used during the REPL. -void autoreload_suspend(void); -void autoreload_resume(void); +void autoreload_suspend(size_t lock_mask); +void autoreload_resume(size_t lock_mask); void autoreload_now(void); diff --git a/supervisor/shared/bluetooth/file_transfer.c b/supervisor/shared/bluetooth/file_transfer.c index 943aed8c0f..d105892582 100644 --- a/supervisor/shared/bluetooth/file_transfer.c +++ b/supervisor/shared/bluetooth/file_transfer.c @@ -47,6 +47,7 @@ #include "supervisor/usb.h" #include "py/mpstate.h" +#include "py/stackctrl.h" STATIC bleio_service_obj_t supervisor_ble_service; STATIC bleio_uuid_obj_t supervisor_ble_service_uuid; @@ -97,7 +98,7 @@ void supervisor_start_bluetooth_file_transfer(void) { NULL, // no initial value NULL); // no description - uint32_t version = 1; + uint32_t version = 2; mp_buffer_info_t bufinfo; bufinfo.buf = &version; bufinfo.len = sizeof(version); @@ -291,7 +292,7 @@ STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { // Don't reload until everything is written out of the packet buffer. common_hal_bleio_packet_buffer_flush(&_transfer_packet_buffer); // Trigger an autoreload - autoreload_now(); + autoreload_start(); return ANY_COMMAND; } @@ -345,12 +346,45 @@ STATIC uint8_t _process_write_data(const uint8_t *raw_buf, size_t command_len) { // Don't reload until everything is written out of the packet buffer. common_hal_bleio_packet_buffer_flush(&_transfer_packet_buffer); // Trigger an autoreload - autoreload_now(); + autoreload_start(); return ANY_COMMAND; } return WRITE_DATA; } +STATIC FRESULT _delete_directory_contents(FATFS *fs, const TCHAR *path) { + FF_DIR dir; + FRESULT res = f_opendir(fs, &dir, path); + FILINFO file_info; + // Check the stack since we're putting paths on it. + if (mp_stack_usage() >= MP_STATE_THREAD(stack_limit)) { + return FR_INT_ERR; + } + while (res == FR_OK) { + res = f_readdir(&dir, &file_info); + if (res != FR_OK || file_info.fname[0] == '\0') { + break; + } + size_t pathlen = strlen(path); + size_t fnlen = strlen(file_info.fname); + TCHAR full_path[pathlen + 1 + fnlen]; + memcpy(full_path, path, pathlen); + full_path[pathlen] = '/'; + size_t full_pathlen = pathlen + 1 + fnlen; + memcpy(full_path + pathlen + 1, file_info.fname, fnlen); + full_path[full_pathlen] = '\0'; + if ((file_info.fattrib & AM_DIR) != 0) { + res = _delete_directory_contents(fs, full_path); + } + if (res != FR_OK) { + break; + } + res = f_unlink(fs, full_path); + } + f_closedir(&dir); + return res; +} + STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { const struct delete_command *command = (struct delete_command *)raw_buf; size_t header_size = 4; @@ -370,7 +404,16 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; char *path = (char *)((uint8_t *)command) + header_size; path[command->path_length] = '\0'; - FRESULT result = f_unlink(fs, path); + FRESULT result; + FILINFO file; + if (f_stat(fs, path, &file) == FR_OK) { + if ((file.fattrib & AM_DIR) != 0) { + result = _delete_directory_contents(fs, path); + } + if (result == FR_OK) { + result = f_unlink(fs, path); + } + } if (result != FR_OK) { response.status = STATUS_ERROR; } @@ -504,6 +547,7 @@ void supervisor_bluetooth_file_transfer_background(void) { if (size == 0) { break; } + autoreload_suspend(AUTORELOAD_LOCK_BLE); // TODO: If size < 0 return an error. current_offset += size; #if CIRCUITPY_VERBOSE_BLE @@ -521,6 +565,7 @@ void supervisor_bluetooth_file_transfer_background(void) { response[0] = next_command; response[1] = STATUS_ERROR_PROTOCOL; common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, response, 2, NULL, 0); + autoreload_resume(AUTORELOAD_LOCK_BLE); break; } switch (current_state) { @@ -550,6 +595,9 @@ void supervisor_bluetooth_file_transfer_background(void) { if (next_command != THIS_COMMAND) { current_offset = 0; } + if (next_command == ANY_COMMAND) { + autoreload_resume(AUTORELOAD_LOCK_BLE); + } } running = false; } @@ -558,4 +606,5 @@ void supervisor_bluetooth_file_transfer_disconnected(void) { next_command = ANY_COMMAND; current_offset = 0; f_close(&active_file); + autoreload_resume(AUTORELOAD_LOCK_BLE); } From bef07961ab9c6163f239324d215dfef2454e9915 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 24 Aug 2021 16:33:20 -0500 Subject: [PATCH 255/418] raspberrypi: audiopwmout: subtle for #5092 I noticed that the loop over 65535 possible denominators took a long time, causing up to 100ms wait for a sound sample to start playing! This algorithm, adapted from an algorithm shown in Python's fractions.py, is guaranteed to find the best denominator in a small number of steps (I think log2-many steps but I'm not sure). In practice, it means the time between samples playing is just 10ms, and some of that is recreating the sine wave sample in Python each time. It often finds the same solution as the old code, but sometimes it finds one a bit better since it compares the ratios using float point instead of integer arithmetic. --- .../common-hal/audiopwmio/PWMAudioOut.c | 77 +++++++++++++------ 1 file changed, 55 insertions(+), 22 deletions(-) diff --git a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c index 48dc9ab388..0654037d66 100644 --- a/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +++ b/ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -26,6 +26,7 @@ #include "common-hal/audiopwmio/PWMAudioOut.h" +#include #include #include @@ -51,6 +52,58 @@ #define SAMPLE_BITS_TO_DISCARD (16 - BITS_PER_SAMPLE) #define PWM_TOP ((1 << BITS_PER_SAMPLE) - 1) + +static uint32_t gcd(uint32_t a, uint32_t b) { + while (b) { + uint32_t tmp = a % b; + a = b; + b = tmp; + } + return a; +} + +static uint32_t limit_denominator(uint32_t max_denominator, uint32_t num_in, uint32_t den_in, uint32_t *den_out) { +// Algorithm based on Python's limit_denominator + uint32_t p0 = 0, q0 = 1, p1 = 1, q1 = 0; + uint32_t d = den_in, n = num_in; + uint32_t g = gcd(n, d); + d /= g; + n /= g; + if (d < max_denominator) { + *den_out = d; + return n; + } + while (1) { + uint32_t a = n / d; + uint32_t q2 = q0 + a * q1; + if (q2 > max_denominator) { + break; + } + + uint32_t p_tmp = p0 + a * p1; + p0 = p1; + q0 = q1; + p1 = p_tmp; + q1 = q2; + + uint32_t d_tmp = n - a * d; + n = d; + d = d_tmp; + } + uint32_t k = (max_denominator - q0) / q1; + uint32_t bound1_num = p0 + k * p1, bound1_den = q0 + k * q1; + uint32_t bound2_num = p1, bound2_den = q1; + + if (fabsf((float)bound1_num / bound1_den - (float)num_in / den_in) <= + fabsf((float)bound2_num / bound2_den - (float)num_in / den_in)) { + *den_out = bound2_den; + return bound2_num; + } + + *den_out = bound1_den; + return bound1_num; +} + void audiopwmout_reset() { for (size_t i = 0; i < NUM_DMA_TIMERS; i++) { dma_hw->timer[i] = 0; @@ -170,30 +223,10 @@ void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t *self, uint32_t sample_rate = audiosample_sample_rate(sample); uint32_t system_clock = common_hal_mcu_processor_get_frequency(); - uint32_t best_numerator = 0; - uint32_t best_denominator = 0; - uint32_t best_error = system_clock; - - for (uint32_t denominator = 0xffff; denominator > 0; denominator--) { - uint32_t numerator = ((uint64_t)denominator * sample_rate) / system_clock; - uint32_t remainder = ((uint64_t)denominator * sample_rate) % system_clock; - if (remainder > (system_clock / 2)) { - numerator += 1; - remainder = system_clock - remainder; - } - if (remainder < best_error) { - best_denominator = denominator; - best_numerator = numerator; - best_error = remainder; - // Stop early if we can't do better. - if (remainder == 0) { - break; - } - } - } + uint32_t best_denominator; + uint32_t best_numerator = limit_denominator(0xffff, sample_rate, system_clock, &best_denominator); dma_hw->timer[pacing_timer] = best_numerator << 16 | best_denominator; - audio_dma_result result = audio_dma_setup_playback( &self->dma, sample, From f9f3894888b394379c0d9664110d7e4b1b4d4d9e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 24 Aug 2021 14:35:11 -0700 Subject: [PATCH 256/418] Support multiple status dotstars Only supporting one left a white dotstar stranded. Fixes #5170 --- .../boards/adafruit_funhouse/mpconfigboard.h | 1 + supervisor/shared/status_leds.c | 21 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h index a040fe70e0..6379147c30 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h +++ b/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h @@ -31,6 +31,7 @@ #define MICROPY_HW_APA102_MOSI (&pin_GPIO14) #define MICROPY_HW_APA102_SCK (&pin_GPIO15) +#define MICROPY_HW_APA102_COUNT (5) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) diff --git a/supervisor/shared/status_leds.c b/supervisor/shared/status_leds.c index 056833a8d3..92c9578051 100644 --- a/supervisor/shared/status_leds.c +++ b/supervisor/shared/status_leds.c @@ -26,6 +26,8 @@ #include "supervisor/shared/status_leds.h" +#include + #include "mphalport.h" #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/shared/tick.h" @@ -52,8 +54,12 @@ static digitalio_digitalinout_obj_t status_neopixel; #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) uint8_t rgb_status_brightness = 50; - #define APA102_BUFFER_LENGTH 12 -static uint8_t status_apa102_color[APA102_BUFFER_LENGTH] = {0, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0xff, 0xff, 0xff}; +#ifndef MICROPY_HW_APA102_COUNT +#define MICROPY_HW_APA102_COUNT (1) +#endif + + #define APA102_BUFFER_LENGTH (4 + 4 * MICROPY_HW_APA102_COUNT + 4) +static uint8_t status_apa102_color[APA102_BUFFER_LENGTH]; #if CIRCUITPY_BITBANG_APA102 #include "shared-bindings/bitbangio/SPI.h" @@ -142,6 +148,8 @@ void status_led_init() { common_hal_digitalio_digitalinout_construct(&status_neopixel, MICROPY_HW_NEOPIXEL); common_hal_digitalio_digitalinout_switch_to_output(&status_neopixel, false, DRIVE_MODE_PUSH_PULL); #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) + // Set every byte to 0xff except the start 4 bytes that make up the header. + memset(status_apa102_color + 4, 0xff, APA102_BUFFER_LENGTH - 4); #if CIRCUITPY_BITBANG_APA102 shared_module_bitbangio_spi_construct(&status_apa102, MICROPY_HW_APA102_SCK, @@ -259,9 +267,12 @@ void new_status_color(uint32_t rgb) { common_hal_neopixel_write(&status_neopixel, status_neopixel_color, 3 * MICROPY_HW_NEOPIXEL_COUNT); #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) - status_apa102_color[5] = rgb_adjusted & 0xff; - status_apa102_color[6] = (rgb_adjusted >> 8) & 0xff; - status_apa102_color[7] = (rgb_adjusted >> 16) & 0xff; + for (size_t i = 0; i < MICROPY_HW_APA102_COUNT; i++) { + // Skip 4 + offset to skip the header bytes too. + status_apa102_color[4 * i + 4 + 1] = rgb_adjusted & 0xff; + status_apa102_color[4 * i + 4 + 2] = (rgb_adjusted >> 8) & 0xff; + status_apa102_color[4 * i + 4 + 3] = (rgb_adjusted >> 16) & 0xff; + } #if CIRCUITPY_BITBANG_APA102 shared_module_bitbangio_spi_write(&status_apa102, status_apa102_color, APA102_BUFFER_LENGTH); From 0552ce2d3bfb8b27700de04dde061eafab753ab1 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 24 Aug 2021 16:02:48 -0700 Subject: [PATCH 257/418] Allocate I2C mutex with IDF This keeps the mutex info in the same spot in memory. "Statically allocating it" with CircuitPython meant that the buffer moved when the I2C object is moved to keep it alive for a display. Fixes #4962 --- ports/esp32s2/common-hal/busio/I2C.c | 2 +- ports/esp32s2/common-hal/busio/I2C.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/esp32s2/common-hal/busio/I2C.c b/ports/esp32s2/common-hal/busio/I2C.c index 8052715ae9..fd887c31ac 100644 --- a/ports/esp32s2/common-hal/busio/I2C.c +++ b/ports/esp32s2/common-hal/busio/I2C.c @@ -88,7 +88,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, } #endif - self->xSemaphore = xSemaphoreCreateMutexStatic(&self->xSemaphoreBuffer); + self->xSemaphore = xSemaphoreCreateMutex(); if (self->xSemaphore == NULL) { mp_raise_RuntimeError(translate("Unable to create lock")); } diff --git a/ports/esp32s2/common-hal/busio/I2C.h b/ports/esp32s2/common-hal/busio/I2C.h index d699b84ef1..0844be6b22 100644 --- a/ports/esp32s2/common-hal/busio/I2C.h +++ b/ports/esp32s2/common-hal/busio/I2C.h @@ -40,7 +40,6 @@ typedef struct { const mcu_pin_obj_t *sda_pin; i2c_port_t i2c_num; SemaphoreHandle_t xSemaphore; - StaticSemaphore_t xSemaphoreBuffer; bool has_lock; } busio_i2c_obj_t; From 17af5cd492e926c2d3a2c06b6519242bf8f3885c Mon Sep 17 00:00:00 2001 From: Rob Capellini Date: Tue, 24 Aug 2021 20:07:10 -0400 Subject: [PATCH 258/418] Use MP_REGISTER_MODULE with displayio, terminalio, and fontio Convert from using MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS to using MP_REGISTER_MODULE for displayio, terminalio, and fontio modules. Related to #5183. --- py/circuitpy_mpconfig.h | 22 +++++----------------- shared-bindings/displayio/__init__.c | 2 ++ shared-bindings/fontio/__init__.c | 2 ++ shared-bindings/terminalio/__init__.c | 2 ++ 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 3aa6d34494..c5ebdcff17 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -412,27 +412,18 @@ extern const struct _mp_obj_module_t digitalio_module; #define DIGITALIO_MODULE #endif +// CIRCUITPY_DISPLAYIO uses MP_REGISTER_MODULE +// CIRCUITPY_TERMINALIO uses MP_REGISTER_MODULE +// CIRCUITPY_FONTIO uses MP_REGISTER_MODULE + #if CIRCUITPY_DISPLAYIO -extern const struct _mp_obj_module_t displayio_module; -extern const struct _mp_obj_module_t fontio_module; -extern const struct _mp_obj_module_t terminalio_module; -#define DISPLAYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_displayio), (mp_obj_t)&displayio_module }, #ifndef CIRCUITPY_DISPLAY_LIMIT #define CIRCUITPY_DISPLAY_LIMIT (1) #endif #else -#define DISPLAYIO_MODULE #define CIRCUITPY_DISPLAY_LIMIT (0) #endif -#if CIRCUITPY_DISPLAYIO && CIRCUITPY_TERMINALIO -#define FONTIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_fontio), (mp_obj_t)&fontio_module }, -#define TERMINALIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_terminalio), (mp_obj_t)&terminalio_module }, -#else -#define FONTIO_MODULE -#define TERMINALIO_MODULE -#endif - #if CIRCUITPY_DUALBANK extern const struct _mp_obj_module_t dualbank_module; #define DUALBANK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_dualbank), (mp_obj_t)&dualbank_module }, @@ -886,7 +877,7 @@ extern const struct _mp_obj_module_t msgpack_module; TIME_MODULE_ALT_NAME \ // This is an inclusive list that should correspond to the CIRCUITPY_XXX list above, -// including dependencies such as TERMINALIO depending on DISPLAYIO (shown by indentation). +// including dependencies (shown by indentation). // Some of these definitions will be blank depending on what is turned on and off. // Some are omitted because they're in MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS above. #define MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \ @@ -912,10 +903,7 @@ extern const struct _mp_obj_module_t msgpack_module; CANIO_MODULE \ COUNTIO_MODULE \ DIGITALIO_MODULE \ - DISPLAYIO_MODULE \ DUALBANK_MODULE \ - FONTIO_MODULE \ - TERMINALIO_MODULE \ VECTORIO_MODULE \ ERRNO_MODULE \ ESPIDF_MODULE \ diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index dc4971de2a..89d18d9609 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -136,3 +136,5 @@ const mp_obj_module_t displayio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&displayio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_displayio, displayio_module, CIRCUITPY_DISPLAYIO); diff --git a/shared-bindings/fontio/__init__.c b/shared-bindings/fontio/__init__.c index c80d68a879..fc5c011eb3 100644 --- a/shared-bindings/fontio/__init__.c +++ b/shared-bindings/fontio/__init__.c @@ -48,3 +48,5 @@ const mp_obj_module_t fontio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&fontio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_fontio, fontio_module, CIRCUITPY_DISPLAYIO && CIRCUITPY_TERMINALIO); diff --git a/shared-bindings/terminalio/__init__.c b/shared-bindings/terminalio/__init__.c index 084b76f21e..38313dc757 100644 --- a/shared-bindings/terminalio/__init__.c +++ b/shared-bindings/terminalio/__init__.c @@ -56,3 +56,5 @@ const mp_obj_module_t terminalio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&terminalio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_terminalio, terminalio_module, CIRCUITPY_DISPLAYIO && CIRCUITPY_TERMINALIO); From deb8e2a50aa2d3632ae3b9a3916774dd4a670847 Mon Sep 17 00:00:00 2001 From: Rob Capellini Date: Tue, 24 Aug 2021 20:55:39 -0400 Subject: [PATCH 259/418] Remove comment that no longer applies --- py/circuitpy_mpconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index c5ebdcff17..463cad1442 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -877,7 +877,7 @@ extern const struct _mp_obj_module_t msgpack_module; TIME_MODULE_ALT_NAME \ // This is an inclusive list that should correspond to the CIRCUITPY_XXX list above, -// including dependencies (shown by indentation). +// including dependencies. // Some of these definitions will be blank depending on what is turned on and off. // Some are omitted because they're in MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS above. #define MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \ From 86d8d9f6a7dc04695dfe91bfc26cdabfbce02844 Mon Sep 17 00:00:00 2001 From: James Carr <70200140+lesamouraipourpre@users.noreply.github.com> Date: Wed, 25 Aug 2021 11:23:33 +0100 Subject: [PATCH 260/418] Minor docs fix in FourWire.c --- shared-bindings/displayio/FourWire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c index 3ba55a4470..2145425342 100644 --- a/shared-bindings/displayio/FourWire.c +++ b/shared-bindings/displayio/FourWire.c @@ -111,7 +111,7 @@ STATIC mp_obj_t displayio_fourwire_obj_reset(mp_obj_t self_in) { } MP_DEFINE_CONST_FUN_OBJ_1(displayio_fourwire_reset_obj, displayio_fourwire_obj_reset); -//| def send(self, command: int, data: FourWire, *, toggle_every_byte: bool = False) -> None: +//| def send(self, command: int, data: ReadableBuffer, *, toggle_every_byte: bool = False) -> None: //| """Sends the given command value followed by the full set of data. Display state, such as //| vertical scroll, set via ``send`` may or may not be reset once the code is done.""" //| ... From c0c98928875735f0728bc86ba3caf0dbb1c7a8ac Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 25 Aug 2021 11:17:09 -0400 Subject: [PATCH 261/418] Add adafruit_led_glasses_nrf52840 --- .github/workflows/build.yml | 1 + .../adafruit_led_glasses_nrf52840/board.c | 38 +++++++++++++++++++ .../mpconfigboard.h | 30 +++++++++++++++ .../mpconfigboard.mk | 10 +++++ .../adafruit_led_glasses_nrf52840/pins.c | 19 ++++++++++ 5 files changed, 98 insertions(+) create mode 100644 ports/nrf/boards/adafruit_led_glasses_nrf52840/board.c create mode 100644 ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h create mode 100644 ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk create mode 100644 ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a29a702d87..8e2c35f966 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -209,6 +209,7 @@ jobs: - "TG-Watch" - "adafruit_feather_rp2040" - "adafruit_itsybitsy_rp2040" + - "adafruit_led_glasses_nrf52840" - "adafruit_macropad_rp2040" - "adafruit_neokey_trinkey_m0" - "adafruit_proxlight_trinkey_m0" diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/board.c b/ports/nrf/boards/adafruit_led_glasses_nrf52840/board.c new file mode 100644 index 0000000000..688cfb4ded --- /dev/null +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h b/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h new file mode 100644 index 0000000000..7b6a61d797 --- /dev/null +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h @@ -0,0 +1,30 @@ +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "Adafruit LED Glasses Driver nRF52840" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define MICROPY_HW_NEOPIXEL (&pin_P1_15) + +#define MICROPY_HW_LED_STATUS (&pin_P0_31) + +#if QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(1, 00) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 23) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 20) +#endif + +#if SPI_FLASH_FILESYSTEM +#define SPI_FLASH_MOSI_PIN &pin_P1_00 +#define SPI_FLASH_MISO_PIN &pin_P0_21 +#define SPI_FLASH_SCK_PIN &pin_P0_19 +#define SPI_FLASH_CS_PIN &pin_P0_20 +#endif + +// Board does not have a 32kHz crystal. It does have a 32MHz crystal, in the module. +#define BOARD_HAS_32KHZ_XTAL (0) + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_14) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_16) diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk b/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk new file mode 100644 index 0000000000..5d90582865 --- /dev/null +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.mk @@ -0,0 +1,10 @@ +USB_VID = 0x239A +USB_PID = 0x810E +USB_PRODUCT = "nRF52840 LED Glasses Driver" +USB_MANUFACTURER = "Adafruit Industries LLC" + +MCU_CHIP = nrf52840 + + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c new file mode 100644 index 0000000000..0c6ca12d92 --- /dev/null +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c @@ -0,0 +1,19 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_00) }, + { MP_ROM_QSTR(MP_QSTR_MICROPHONE_DATA), MP_ROM_PTR(&pin_P0_27) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P1_15) }, + + { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_P0_30) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_05) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 01a935e52ff9cb831e9a9f6ac2af8d3afeb24dbc Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 24 Aug 2021 14:49:23 +0000 Subject: [PATCH 262/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1019 of 1019 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 04144b1aeb..295400528a 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-21 08:36+0000\n" +"PO-Revision-Date: 2021-08-25 15:34+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.8-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -2657,7 +2657,7 @@ msgstr "o eixo é muito longo" #: shared-bindings/bitmaptools/__init__.c msgid "background value out of range of target" -msgstr "" +msgstr "valor de fundo fora do intervalo do alvo" #: py/builtinevex.c msgid "bad compile mode" @@ -4476,7 +4476,7 @@ msgstr "o valor deve caber em %d byte(s)" #: shared-bindings/bitmaptools/__init__.c msgid "value out of range of target" -msgstr "" +msgstr "valor fora do alcance do alvo" #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" From 870aa2d79dee188a81e520165065823dc300328a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 25 Aug 2021 11:37:37 -0500 Subject: [PATCH 263/418] espidf: Add function to erase nvs This may be necessary for some cases of migrating from 6.3.0 to 7.0.0. --- locale/circuitpython.pot | 8 ++++++-- ports/esp32s2/bindings/espidf/__init__.c | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c4dfb4e944..f0f07a4264 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1225,7 +1225,7 @@ msgstr "" msgid "Insufficient encryption" msgstr "" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1392,7 +1392,8 @@ msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "" @@ -3915,8 +3916,10 @@ msgstr "" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3933,6 +3936,7 @@ msgstr "" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/ports/esp32s2/bindings/espidf/__init__.c b/ports/esp32s2/bindings/espidf/__init__.c index 97e1136f87..9d79dd5195 100644 --- a/ports/esp32s2/bindings/espidf/__init__.c +++ b/ports/esp32s2/bindings/espidf/__init__.c @@ -26,9 +26,12 @@ #include "py/obj.h" #include "py/runtime.h" +#include "py/mphal.h" + #include "bindings/espidf/__init__.h" +#include "nvs_flash.h" #include "components/heap/include/esp_heap_caps.h" //| """Direct access to a few ESP-IDF details. This module *should not* include any functionality @@ -65,6 +68,20 @@ STATIC mp_obj_t espidf_heap_caps_get_largest_free_block(void) { } MP_DEFINE_CONST_FUN_OBJ_0(espidf_heap_caps_get_largest_free_block_obj, espidf_heap_caps_get_largest_free_block); +//| def erase_nvs() -> None: +//| """Erase all data in the non-volatile storage (nvs), including data stored by with `microcontroller.nvm` +//| +//| This is necessary when upgrading from CircuitPython 6.3.0 or earlier to CircuitPython 7.0.0, because the +//| layout of data in nvs has changed. The old data will be lost when you perform this operation.""" +STATIC mp_obj_t espidf_erase_nvs(void) { + ESP_ERROR_CHECK(nvs_flash_deinit()); + ESP_ERROR_CHECK(nvs_flash_erase()); + ESP_ERROR_CHECK(nvs_flash_init()); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_0(espidf_erase_nvs_obj, espidf_erase_nvs); + + //| class IDFError(OSError): //| """Raised for certain generic ESP IDF errors.""" //| ... @@ -117,6 +134,8 @@ STATIC const mp_rom_map_elem_t espidf_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_heap_caps_get_free_size), MP_ROM_PTR(&espidf_heap_caps_get_free_size_obj)}, { MP_ROM_QSTR(MP_QSTR_heap_caps_get_largest_free_block), MP_ROM_PTR(&espidf_heap_caps_get_largest_free_block_obj)}, + { MP_ROM_QSTR(MP_QSTR_erase_nvs), MP_ROM_PTR(&espidf_erase_nvs_obj)}, + { MP_ROM_QSTR(MP_QSTR_IDFError), MP_ROM_PTR(&mp_type_espidf_IDFError) }, { MP_ROM_QSTR(MP_QSTR_MemoryError), MP_ROM_PTR(&mp_type_espidf_MemoryError) }, }; From 4621cd54fb2ba0f021ae559a9774b40dea79ca88 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 25 Aug 2021 11:39:22 -0500 Subject: [PATCH 264/418] esp32s2: update how nvm is mapped onto nvs The old way mapped each byte of nvm onto a distinct nvs key, but this allowed storage of only a very small number of bytes out of the theoretical capacity. Reworked like this, about half of the nvs capacity can be used for nvm, so you're guaranteed the ability to store 9kB this way. --- ports/esp32s2/common-hal/nvm/ByteArray.c | 110 ++++++++++++++++------- ports/esp32s2/mpconfigport.h | 6 +- 2 files changed, 85 insertions(+), 31 deletions(-) diff --git a/ports/esp32s2/common-hal/nvm/ByteArray.c b/ports/esp32s2/common-hal/nvm/ByteArray.c index 3130873792..6eeed72e2e 100644 --- a/ports/esp32s2/common-hal/nvm/ByteArray.c +++ b/ports/esp32s2/common-hal/nvm/ByteArray.c @@ -24,9 +24,13 @@ * THE SOFTWARE. */ +#include + #include "common-hal/nvm/ByteArray.h" +#include "bindings/espidf/__init__.h" #include "py/runtime.h" +#include "py/gc.h" #include "nvs_flash.h" uint32_t common_hal_nvm_bytearray_get_length(nvm_bytearray_obj_t *self) { @@ -50,48 +54,94 @@ static void get_nvs_handle(nvs_handle_t *nvs_handle) { } } -bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self, - uint32_t start_index, uint8_t *values, uint32_t len) { - char index[9]; - - // start nvs - nvs_handle_t handle; - get_nvs_handle(&handle); - - // stage flash changes - for (uint32_t i = 0; i < len; i++) { - sprintf(index, "%i", start_index + i); - if (nvs_set_u8(handle, (const char *)index, values[i]) != ESP_OK) { - return false; - } +// Get a copy of the nvm data, or an array initialized to all 0 bytes if it is not present +static esp_err_t get_bytes(nvs_handle_t handle, uint8_t **buf_out) { + size_t size; + void *buf; + esp_err_t result = nvs_get_blob(handle, "data", NULL, &size); + if (result == ESP_ERR_NVS_NOT_FOUND) { + size = CIRCUITPY_INTERNAL_NVM_SIZE; + } else if (result != ESP_OK) { + *buf_out = NULL; + return result; } - - // commit flash changes - if (nvs_commit(handle) != ESP_OK) { - return false; + buf = gc_alloc(size, 0, false); // this SHOULD be the same as + if (result == ESP_OK) { + result = nvs_get_blob(handle, "data", buf, &size); + } else { + result = ESP_OK; } - - // close nvs - nvs_close(handle); - return true; + *buf_out = buf; + return result; } -void common_hal_nvm_bytearray_get_bytes(nvm_bytearray_obj_t *self, - uint32_t start_index, uint32_t len, uint8_t *values) { - char index[9]; +bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self, + uint32_t start_index, uint8_t *values, uint32_t len) { // start nvs nvs_handle_t handle; get_nvs_handle(&handle); // get from flash - for (uint32_t i = 0; i < len; i++) { - sprintf(index, "%i", start_index + i); - if (nvs_get_u8(handle, (const char *)index, &values[i]) != ESP_OK) { - mp_raise_RuntimeError(translate("NVS Error")); - } + uint8_t *buf = NULL; + esp_err_t result = get_bytes(handle, &buf); + if (result != ESP_OK) { + gc_free(buf); + nvs_close(handle); + raise_esp_error(result); + } + + // erase old data, including 6.3.x incompatible data + result = nvs_erase_all(handle); + if (result != ESP_OK) { + gc_free(buf); + nvs_close(handle); + raise_esp_error(result); + } + + // make our modification + memcpy(buf + start_index, values, len); + + result = nvs_set_blob(handle, "data", buf, CIRCUITPY_INTERNAL_NVM_SIZE); + if (result != ESP_OK) { + gc_free(buf); + nvs_close(handle); + raise_esp_error(result); + } + + result = nvs_commit(handle); + if (result != ESP_OK) { + gc_free(buf); + nvs_close(handle); + raise_esp_error(result); } // close nvs + gc_free(buf); + nvs_close(handle); + return true; +} + +void common_hal_nvm_bytearray_get_bytes(nvm_bytearray_obj_t *self, + uint32_t start_index, uint32_t len, uint8_t *values) { + + // start nvs + nvs_handle_t handle; + get_nvs_handle(&handle); + + // get from flash + uint8_t *buf; + esp_err_t result = get_bytes(handle, &buf); + if (result != ESP_OK) { + gc_free(buf); + nvs_close(handle); + raise_esp_error(result); + } + + // copy the subset of data requested + memcpy(values, buf + start_index, len); + + // close nvs + gc_free(buf); nvs_close(handle); } diff --git a/ports/esp32s2/mpconfigport.h b/ports/esp32s2/mpconfigport.h index a3db0ab3d5..4b72d9f965 100644 --- a/ports/esp32s2/mpconfigport.h +++ b/ports/esp32s2/mpconfigport.h @@ -42,8 +42,12 @@ #define CIRCUITPY_INTERNAL_NVM_START_ADDR (0x9000) +// 20kB is statically allocated to nvs, but when overwriting an existing +// item, it's temporarily necessary to store both the old and new copies. +// Additionally, there is some overhad for the names and values of items +// in nvs. So, set the size at 9/20ths of the allocated space #ifndef CIRCUITPY_INTERNAL_NVM_SIZE -#define CIRCUITPY_INTERNAL_NVM_SIZE (20 * 1024) +#define CIRCUITPY_INTERNAL_NVM_SIZE (9 * 1024) #endif #endif // __INCLUDED_ESP32S2_MPCONFIGPORT_H From 7098d4ccd75c1c1fcfc45ec21c5e13103653f24f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 25 Aug 2021 13:38:39 -0500 Subject: [PATCH 265/418] 8Kib may align better with flash blocks than 9KiB --- ports/esp32s2/mpconfigport.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/mpconfigport.h b/ports/esp32s2/mpconfigport.h index 4b72d9f965..4b8156930c 100644 --- a/ports/esp32s2/mpconfigport.h +++ b/ports/esp32s2/mpconfigport.h @@ -45,9 +45,11 @@ // 20kB is statically allocated to nvs, but when overwriting an existing // item, it's temporarily necessary to store both the old and new copies. // Additionally, there is some overhad for the names and values of items -// in nvs. So, set the size at 9/20ths of the allocated space +// in nvs, and alignment to 4kB flash erase boundaries may give better +// performance characteristics (h/t @tannewt). This implies we should select an +// 8kB size for CircuitPython'ns NVM. #ifndef CIRCUITPY_INTERNAL_NVM_SIZE -#define CIRCUITPY_INTERNAL_NVM_SIZE (9 * 1024) +#define CIRCUITPY_INTERNAL_NVM_SIZE (8 * 1024) #endif #endif // __INCLUDED_ESP32S2_MPCONFIGPORT_H From da644bebb342d069404e8c4fbe600708b875e0ba Mon Sep 17 00:00:00 2001 From: WarmBit Date: Wed, 25 Aug 2021 15:16:59 -0600 Subject: [PATCH 266/418] add warmbit_bluepixel --- .github/workflows/build.yml | 1 + ports/nrf/boards/warmbit_bluepixel/board.c | 38 +++++++++++++++++++ .../boards/warmbit_bluepixel/mpconfigboard.h | 20 ++++++++++ .../boards/warmbit_bluepixel/mpconfigboard.mk | 8 ++++ ports/nrf/boards/warmbit_bluepixel/pins.c | 36 ++++++++++++++++++ 5 files changed, 103 insertions(+) create mode 100644 ports/nrf/boards/warmbit_bluepixel/board.c create mode 100644 ports/nrf/boards/warmbit_bluepixel/mpconfigboard.h create mode 100644 ports/nrf/boards/warmbit_bluepixel/mpconfigboard.mk create mode 100644 ports/nrf/boards/warmbit_bluepixel/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a29a702d87..97887a63ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -395,6 +395,7 @@ jobs: - "uartlogger2" - "uchip" - "ugame10" + - "warmbit_bluepixel" - "winterbloom_big_honking_button" - "winterbloom_sol" - "xinabox_cc03" diff --git a/ports/nrf/boards/warmbit_bluepixel/board.c b/ports/nrf/boards/warmbit_bluepixel/board.c new file mode 100644 index 0000000000..688cfb4ded --- /dev/null +++ b/ports/nrf/boards/warmbit_bluepixel/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/warmbit_bluepixel/mpconfigboard.h b/ports/nrf/boards/warmbit_bluepixel/mpconfigboard.h new file mode 100644 index 0000000000..224bdd5e90 --- /dev/null +++ b/ports/nrf/boards/warmbit_bluepixel/mpconfigboard.h @@ -0,0 +1,20 @@ +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "WarmBit BluePixel nRF52840" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define MICROPY_HW_LED_STATUS (&pin_P0_12) + +#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 + +#define CIRCUITPY_INTERNAL_NVM_SIZE (4096) + +#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) + +#define BOARD_HAS_CRYSTAL 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_08) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_04) + +#define DEFAULT_UART_BUS_RX (&pin_P0_24) +#define DEFAULT_UART_BUS_TX (&pin_P0_22) diff --git a/ports/nrf/boards/warmbit_bluepixel/mpconfigboard.mk b/ports/nrf/boards/warmbit_bluepixel/mpconfigboard.mk new file mode 100644 index 0000000000..757c3cfad5 --- /dev/null +++ b/ports/nrf/boards/warmbit_bluepixel/mpconfigboard.mk @@ -0,0 +1,8 @@ +USB_VID = 0x192F +USB_PID = 0xB1B2 +USB_PRODUCT = "WarmBit BluePixel nRF52840" +USB_MANUFACTURER = "WarmBit" + +MCU_CHIP = nrf52840 + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/warmbit_bluepixel/pins.c b/ports/nrf/boards/warmbit_bluepixel/pins.c new file mode 100644 index 0000000000..919b91164d --- /dev/null +++ b/ports/nrf/boards/warmbit_bluepixel/pins.c @@ -0,0 +1,36 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_22) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P0_18) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_08) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_04) }, + + { MP_ROM_QSTR(MP_QSTR_MAXTEMP_SCL), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_MAXTEMP_SDA), MP_ROM_PTR(&pin_P1_15) }, + + { MP_ROM_QSTR(MP_QSTR_ACC_SCL), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_ACC_SDA), MP_ROM_PTR(&pin_P1_10) }, + + { MP_ROM_QSTR(MP_QSTR_ADDON_SCL), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_ADDON_SDA), MP_ROM_PTR(&pin_P0_06) }, + + { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_YELLOW_LED), MP_ROM_PTR(&pin_P0_27) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 98f026fbb4377481115d0218c36eca8e0a98a5a7 Mon Sep 17 00:00:00 2001 From: Amit Sides Date: Wed, 25 Aug 2021 15:07:19 -0700 Subject: [PATCH 267/418] Fixing comments for PR --- shared-bindings/displayio/EPaperDisplay.c | 14 ++++++++------ shared-bindings/displayio/EPaperDisplay.h | 2 +- shared-module/displayio/EPaperDisplay.c | 9 ++++++++- shared-module/displayio/EPaperDisplay.h | 4 +++- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index dbffbbde3e..eeabd85791 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -217,7 +217,11 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_show(mp_obj_t self_in, mp_obj_t grou } MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_show_obj, displayio_epaperdisplay_obj_show); -STATIC mp_obj_t update_refresh_mode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) +//| def update_refresh_mode(self, start_sequence, seconds_per_frame) -> None: +//| """Sets the ``start_sequence`` and ``seconds_per_frame`` parameters to enable +//| quicker refresh modes of the display.""" +//| +STATIC mp_obj_t displayio_epaperdisplay_update_refresh_mode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_start_sequence, ARG_seconds_per_frame }; static const mp_arg_t allowed_args[] = { @@ -234,12 +238,10 @@ STATIC mp_obj_t update_refresh_mode(size_t n_args, const mp_obj_t *pos_args, mp_ float seconds_per_frame = mp_obj_get_float(args[ARG_seconds_per_frame].u_obj); // Update parameters - self->start_sequence = (uint8_t *)start_sequence.buf; - self->start_sequence_len = start_sequence.len; - self->milliseconds_per_frame = seconds_per_frame * 1000; + displayio_epaperdisplay_change_refresh_mode_parameters(self, &start_sequence, seconds_per_frame); return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_KW(update_refresh_mode_obj, 3, update_refresh_mode); +MP_DEFINE_CONST_FUN_OBJ_KW(displayio_epaperdisplay_update_refresh_mode_obj, 3, displayio_epaperdisplay_update_refresh_mode); //| def refresh(self) -> None: //| """Refreshes the display immediately or raises an exception if too soon. Use @@ -363,7 +365,7 @@ const mp_obj_property_t displayio_epaperdisplay_bus_obj = { STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_epaperdisplay_show_obj) }, - { MP_ROM_QSTR(MP_QSTR_update_refresh_mode), MP_ROM_PTR(&update_refresh_mode_obj) }, + { MP_ROM_QSTR(MP_QSTR_update_refresh_mode), MP_ROM_PTR(&displayio_epaperdisplay_update_refresh_mode_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&displayio_epaperdisplay_refresh_obj) }, { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_epaperdisplay_width_obj) }, diff --git a/shared-bindings/displayio/EPaperDisplay.h b/shared-bindings/displayio/EPaperDisplay.h index 1bf40adb99..7c2b302ce5 100644 --- a/shared-bindings/displayio/EPaperDisplay.h +++ b/shared-bindings/displayio/EPaperDisplay.h @@ -39,7 +39,7 @@ extern const mp_obj_type_t displayio_epaperdisplay_type; #define NO_COMMAND 0x100 void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t *self, - mp_obj_t bus, uint8_t *start_sequence, uint16_t start_sequence_len, const uint8_t *stop_sequence, uint16_t stop_sequence_len, + mp_obj_t bus, const uint8_t *start_sequence, uint16_t start_sequence_len, const uint8_t *stop_sequence, uint16_t stop_sequence_len, uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation, uint16_t set_column_window_command, uint16_t set_row_window_command, uint16_t set_current_column_command, uint16_t set_current_row_command, diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c index 41105de365..8de7d4e45f 100644 --- a/shared-module/displayio/EPaperDisplay.c +++ b/shared-module/displayio/EPaperDisplay.c @@ -43,7 +43,7 @@ #include void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t *self, - mp_obj_t bus, uint8_t *start_sequence, uint16_t start_sequence_len, + mp_obj_t bus, const uint8_t *start_sequence, uint16_t start_sequence_len, const uint8_t *stop_sequence, uint16_t stop_sequence_len, uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation, @@ -163,6 +163,13 @@ STATIC void send_command_sequence(displayio_epaperdisplay_obj_t *self, } } +void displayio_epaperdisplay_change_refresh_mode_parameters(displayio_epaperdisplay_obj_t *self, + mp_buffer_info_t *start_sequence, float seconds_per_frame) { + self->start_sequence = (uint8_t *)start_sequence->buf; + self->start_sequence_len = start_sequence->len; + self->milliseconds_per_frame = seconds_per_frame * 1000; +} + void displayio_epaperdisplay_start_refresh(displayio_epaperdisplay_obj_t *self) { // run start sequence self->core.bus_reset(self->core.bus); diff --git a/shared-module/displayio/EPaperDisplay.h b/shared-module/displayio/EPaperDisplay.h index d86dae815f..65a4dd7743 100644 --- a/shared-module/displayio/EPaperDisplay.h +++ b/shared-module/displayio/EPaperDisplay.h @@ -38,7 +38,7 @@ typedef struct { displayio_display_core_t core; digitalio_digitalinout_obj_t busy; uint32_t milliseconds_per_frame; - uint8_t *start_sequence; + const uint8_t *start_sequence; uint32_t start_sequence_len; const uint8_t *stop_sequence; uint32_t stop_sequence_len; @@ -59,6 +59,8 @@ typedef struct { display_chip_select_behavior_t chip_select; } displayio_epaperdisplay_obj_t; +void displayio_epaperdisplay_change_refresh_mode_parameters(displayio_epaperdisplay_obj_t *self, + mp_buffer_info_t *start_sequence, float seconds_per_frame); void displayio_epaperdisplay_background(displayio_epaperdisplay_obj_t *self); void release_epaperdisplay(displayio_epaperdisplay_obj_t *self); size_t maybe_refresh_epaperdisplay(void); From 5ce73f896af33278adb7b0957ef82d4310ff67eb Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 26 Aug 2021 00:35:37 +0200 Subject: [PATCH 268/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 8 ++++++-- locale/cs.po | 8 ++++++-- locale/de_DE.po | 8 ++++++-- locale/el.po | 8 ++++++-- locale/en_GB.po | 8 ++++++-- locale/es.po | 8 ++++++-- locale/fil.po | 8 ++++++-- locale/fr.po | 8 ++++++-- locale/hi.po | 8 ++++++-- locale/it_IT.po | 8 ++++++-- locale/ja.po | 8 ++++++-- locale/ko.po | 8 ++++++-- locale/nl.po | 8 ++++++-- locale/pl.po | 8 ++++++-- locale/pt_BR.po | 8 ++++++-- locale/sv.po | 8 ++++++-- locale/zh_Latn_pinyin.po | 8 ++++++-- 17 files changed, 102 insertions(+), 34 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 68ba6ca806..58ef8993a4 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1245,7 +1245,7 @@ msgstr "Otentikasi tidak cukup" msgid "Insufficient encryption" msgstr "Enkripsi tidak cukup" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1412,7 +1412,8 @@ msgstr "Pin untuk channel kanan tidak valid" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Pin-pin tidak valid" @@ -3958,8 +3959,10 @@ msgstr "" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3976,6 +3979,7 @@ msgstr "" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/cs.po b/locale/cs.po index 71da75753f..77cf8a32ed 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1228,7 +1228,7 @@ msgstr "" msgid "Insufficient encryption" msgstr "" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1395,7 +1395,8 @@ msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "" @@ -3918,8 +3919,10 @@ msgstr "" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3936,6 +3939,7 @@ msgstr "" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/de_DE.po b/locale/de_DE.po index 1fc7725d9c..a0a877fe3e 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1245,7 +1245,7 @@ msgstr "Unzureichende Authentifizierung" msgid "Insufficient encryption" msgstr "Unzureichende Verschlüsselung" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1412,7 +1412,8 @@ msgstr "Ungültiger Pin für rechten Kanal" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Ungültige Pins" @@ -3987,8 +3988,10 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -4005,6 +4008,7 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/el.po b/locale/el.po index a2aecc40e2..7c43d6b8a3 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1225,7 +1225,7 @@ msgstr "" msgid "Insufficient encryption" msgstr "" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1392,7 +1392,8 @@ msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "" @@ -3915,8 +3916,10 @@ msgstr "" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3933,6 +3936,7 @@ msgstr "" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/en_GB.po b/locale/en_GB.po index 1c7d7c7a57..496d22924b 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -1240,7 +1240,7 @@ msgstr "Insufficient authentication" msgid "Insufficient encryption" msgstr "Insufficient encryption" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1407,7 +1407,8 @@ msgstr "Invalid pin for right channel" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Invalid pins" @@ -3950,8 +3951,10 @@ msgstr "pow() with 3 arguments requires integers" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3968,6 +3971,7 @@ msgstr "pow() with 3 arguments requires integers" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/es.po b/locale/es.po index 3a04192198..59e4c55b31 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1258,7 +1258,7 @@ msgstr "Autenticación insuficiente" msgid "Insufficient encryption" msgstr "Cifrado insuficiente" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1425,7 +1425,8 @@ msgstr "Pin inválido para canal derecho" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "pines inválidos" @@ -4004,8 +4005,10 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -4022,6 +4025,7 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/fil.po b/locale/fil.po index a1ea9cde0e..da5e3f608d 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1242,7 +1242,7 @@ msgstr "" msgid "Insufficient encryption" msgstr "" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1409,7 +1409,8 @@ msgstr "Mali ang pin para sa kanang channel" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Mali ang pins" @@ -3964,8 +3965,10 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3982,6 +3985,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/fr.po b/locale/fr.po index 21e673f9b7..f00844a9f3 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1268,7 +1268,7 @@ msgstr "Authentification insuffisante" msgid "Insufficient encryption" msgstr "Chiffrement insuffisant" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1435,7 +1435,8 @@ msgstr "Broche invalide pour le canal droit" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Broches invalides" @@ -4015,8 +4016,10 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -4033,6 +4036,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/hi.po b/locale/hi.po index c885638e81..433fbcfdb0 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1225,7 +1225,7 @@ msgstr "" msgid "Insufficient encryption" msgstr "" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1392,7 +1392,8 @@ msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "" @@ -3915,8 +3916,10 @@ msgstr "" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3933,6 +3936,7 @@ msgstr "" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/it_IT.po b/locale/it_IT.po index cec3f73cf5..9ac5a56d4a 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1249,7 +1249,7 @@ msgstr "" msgid "Insufficient encryption" msgstr "" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1418,7 +1418,8 @@ msgstr "Pin non valido per il canale destro" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Pin non validi" @@ -3980,8 +3981,10 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3998,6 +4001,7 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/ja.po b/locale/ja.po index cbfb678cac..0c56823aad 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1236,7 +1236,7 @@ msgstr "認証が不十分" msgid "Insufficient encryption" msgstr "暗号化が不十分" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1403,7 +1403,8 @@ msgstr "右チャネルのピンが不正" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "ピンが不正" @@ -3937,8 +3938,10 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3955,6 +3958,7 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/ko.po b/locale/ko.po index 08f6d4decd..15148a0bef 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1228,7 +1228,7 @@ msgstr "" msgid "Insufficient encryption" msgstr "" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1395,7 +1395,8 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "핀이 유효하지 않습니다" @@ -3919,8 +3920,10 @@ msgstr "" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3937,6 +3940,7 @@ msgstr "" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/nl.po b/locale/nl.po index fc09c5ddbd..eb1dde7e05 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1237,7 +1237,7 @@ msgstr "Onvoldoende authenticatie" msgid "Insufficient encryption" msgstr "Onvoldoende encryptie" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1404,7 +1404,8 @@ msgstr "Ongeldige pin voor rechter kanaal" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Ongeldige pinnen" @@ -3961,8 +3962,10 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3979,6 +3982,7 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/pl.po b/locale/pl.po index bc2ede0f4e..20f79b0fa8 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1236,7 +1236,7 @@ msgstr "Niewystarczające uwierzytelnienie" msgid "Insufficient encryption" msgstr "Niewystarczające szyfrowanie" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1403,7 +1403,8 @@ msgstr "Zła nóżka dla prawego kanału" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Złe nóżki" @@ -3934,8 +3935,10 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3952,6 +3955,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 295400528a..456cad0269 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -1259,7 +1259,7 @@ msgstr "Autenticação insuficiente" msgid "Insufficient encryption" msgstr "Criptografia insuficiente" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "O buffer interno de áudio é muito pequeno" @@ -1426,7 +1426,8 @@ msgstr "Pino inválido para canal direito" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Pinos inválidos" @@ -4015,8 +4016,10 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -4033,6 +4036,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/sv.po b/locale/sv.po index 73b497dffb..8ff1931499 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -1244,7 +1244,7 @@ msgstr "Otillräcklig autentisering" msgid "Insufficient encryption" msgstr "Otillräcklig kryptering" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "Intern ljudbuffert för liten" @@ -1411,7 +1411,8 @@ msgstr "Ogiltig pinne för höger kanal" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Ogiltiga pinnar" @@ -3974,8 +3975,10 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3992,6 +3995,7 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index d37504836a..caf55ffe6f 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -1247,7 +1247,7 @@ msgstr "Rènzhèng bùzú" msgid "Insufficient encryption" msgstr "Jiāmì bùzú" -#: ports/raspberrypi/audio_dma.c +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" msgstr "" @@ -1414,7 +1414,8 @@ msgstr "Yòuxián tōngdào yǐn jiǎo wúxiào" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/SPI.c -#: ports/raspberrypi/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c msgid "Invalid pins" msgstr "Wúxiào de yǐn jiǎo" @@ -3974,8 +3975,10 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h @@ -3992,6 +3995,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h From ad103ac6f1069e44d560532873aa2c85c713bd7a Mon Sep 17 00:00:00 2001 From: Rob Capellini Date: Wed, 25 Aug 2021 20:48:55 -0400 Subject: [PATCH 269/418] Convert more modules to use MP_REGISTER_MODULE Convert adafruit_bus_device, adafruit_pixelbuf, analogio, atexit, audiobusio, audiocore, audioio, audiomixer, and audiomp3 modules to use MP_REGISTER_MODULE. Related to #5183. --- py/circuitpy_mpconfig.h | 79 +++---------------- .../adafruit_bus_device/__init__.c | 2 + shared-bindings/adafruit_pixelbuf/__init__.c | 2 + shared-bindings/analogio/__init__.c | 2 + shared-bindings/atexit/__init__.c | 2 + shared-bindings/audiobusio/__init__.c | 2 + shared-bindings/audiocore/__init__.c | 2 + shared-bindings/audioio/__init__.c | 2 + shared-bindings/audiomixer/__init__.c | 2 + shared-bindings/audiomp3/__init__.c | 2 + 10 files changed, 27 insertions(+), 70 deletions(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 463cad1442..d3bf62d2f7 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -258,54 +258,13 @@ extern const struct _mp_obj_module_t alarm_module; #define ALARM_MODULE #endif -#if CIRCUITPY_ANALOGIO -#define ANALOGIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_analogio), (mp_obj_t)&analogio_module }, -extern const struct _mp_obj_module_t analogio_module; -#else -#define ANALOGIO_MODULE -#endif - -#if CIRCUITPY_ATEXIT -extern const struct _mp_obj_module_t atexit_module; -#define ATEXIT_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_atexit), (mp_obj_t)&atexit_module }, -#else -#define ATEXIT_MODULE -#endif - -#if CIRCUITPY_AUDIOBUSIO -#define AUDIOBUSIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiobusio), (mp_obj_t)&audiobusio_module }, -extern const struct _mp_obj_module_t audiobusio_module; -#else -#define AUDIOBUSIO_MODULE -#endif - -#if CIRCUITPY_AUDIOCORE -#define AUDIOCORE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiocore), (mp_obj_t)&audiocore_module }, -extern const struct _mp_obj_module_t audiocore_module; -#else -#define AUDIOCORE_MODULE -#endif - -#if CIRCUITPY_AUDIOIO -#define AUDIOIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audioio), (mp_obj_t)&audioio_module }, -extern const struct _mp_obj_module_t audioio_module; -#else -#define AUDIOIO_MODULE -#endif - -#if CIRCUITPY_AUDIOMIXER -#define AUDIOMIXER_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiomixer), (mp_obj_t)&audiomixer_module }, -extern const struct _mp_obj_module_t audiomixer_module; -#else -#define AUDIOMIXER_MODULE -#endif - -#if CIRCUITPY_AUDIOMP3 -#define AUDIOMP3_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiomp3), (mp_obj_t)&audiomp3_module }, -extern const struct _mp_obj_module_t audiomp3_module; -#else -#define AUDIOMP3_MODULE -#endif +// CIRCUITPY_ANALOGIO uses MP_REGISTER_MODULE +// CIRCUITPY_ATEXIT uses MP_REGISTER_MODULE +// CIRCUITPY_AUDIOBUSIO uses MP_REGISTER_MODULE +// CIRCUITPY_AUDIOCORE uses MP_REGISTER_MODULE +// CIRCUITPY_AUDIOIO uses MP_REGISTER_MODULE +// CIRCUITPY_AUDIOMIXER uses MP_REGISTER_MODULE +// CIRCUITPY_AUDIOMP3 uses MP_REGISTER_MODULE #if CIRCUITPY_AUDIOPWMIO #define AUDIOPWMIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiopwmio), (mp_obj_t)&audiopwmio_module }, @@ -370,12 +329,7 @@ extern const struct _mp_obj_module_t board_module; #define BOARD_UART_ROOT_POINTER #endif -#if CIRCUITPY_BUSDEVICE -extern const struct _mp_obj_module_t adafruit_bus_device_module; -#define BUSDEVICE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_adafruit_bus_device), (mp_obj_t)&adafruit_bus_device_module }, -#else -#define BUSDEVICE_MODULE -#endif +// CIRCUITPY_BUSDEVICE (adafruit_bus_device_module) uses MP_REGISTER_MODULE #if CIRCUITPY_BUSIO extern const struct _mp_obj_module_t busio_module; @@ -614,13 +568,7 @@ extern const struct _mp_obj_module_t pew_module; #define PEW_MODULE #endif -#if CIRCUITPY_PIXELBUF -extern const struct _mp_obj_module_t pixelbuf_module; -#define PIXELBUF_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_adafruit_pixelbuf),(mp_obj_t)&pixelbuf_module }, \ - { MP_OBJ_NEW_QSTR(MP_QSTR__pixelbuf),(mp_obj_t)&pixelbuf_module }, -#else -#define PIXELBUF_MODULE -#endif +// CIRCUITPY_PIXELBUF (pixelbuf_module) uses MP_REGISTER_MODULE #if CIRCUITPY_PS2IO extern const struct _mp_obj_module_t ps2io_module; @@ -883,13 +831,6 @@ extern const struct _mp_obj_module_t msgpack_module; #define MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \ AESIO_MODULE \ ALARM_MODULE \ - ANALOGIO_MODULE \ - ATEXIT_MODULE \ - AUDIOBUSIO_MODULE \ - AUDIOCORE_MODULE \ - AUDIOIO_MODULE \ - AUDIOMIXER_MODULE \ - AUDIOMP3_MODULE \ AUDIOPWMIO_MODULE \ BINASCII_MODULE \ BITBANGIO_MODULE \ @@ -897,7 +838,6 @@ extern const struct _mp_obj_module_t msgpack_module; BITOPS_MODULE \ BLEIO_MODULE \ BOARD_MODULE \ - BUSDEVICE_MODULE \ BUSIO_MODULE \ CAMERA_MODULE \ CANIO_MODULE \ @@ -925,7 +865,6 @@ extern const struct _mp_obj_module_t msgpack_module; NEOPIXEL_WRITE_MODULE \ ONEWIREIO_MODULE \ PEW_MODULE \ - PIXELBUF_MODULE \ PS2IO_MODULE \ PULSEIO_MODULE \ PWMIO_MODULE \ diff --git a/shared-bindings/adafruit_bus_device/__init__.c b/shared-bindings/adafruit_bus_device/__init__.c index 84abbd0c2e..f25a882557 100644 --- a/shared-bindings/adafruit_bus_device/__init__.c +++ b/shared-bindings/adafruit_bus_device/__init__.c @@ -76,3 +76,5 @@ const mp_obj_module_t adafruit_bus_device_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&adafruit_bus_device_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_adafruit_bus_device, adafruit_bus_device_module, CIRCUITPY_BUSDEVICE); diff --git a/shared-bindings/adafruit_pixelbuf/__init__.c b/shared-bindings/adafruit_pixelbuf/__init__.c index 1f4ecb8ae1..7b8d0da829 100644 --- a/shared-bindings/adafruit_pixelbuf/__init__.c +++ b/shared-bindings/adafruit_pixelbuf/__init__.c @@ -54,3 +54,5 @@ const mp_obj_module_t pixelbuf_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&pixelbuf_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_adafruit_pixelbuf, pixelbuf_module, CIRCUITPY_PIXELBUF); diff --git a/shared-bindings/analogio/__init__.c b/shared-bindings/analogio/__init__.c index 4e5aebf010..51f8a21537 100644 --- a/shared-bindings/analogio/__init__.c +++ b/shared-bindings/analogio/__init__.c @@ -72,3 +72,5 @@ const mp_obj_module_t analogio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&analogio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_analogio, analogio_module, CIRCUITPY_ANALOGIO); diff --git a/shared-bindings/atexit/__init__.c b/shared-bindings/atexit/__init__.c index 2d6faf9c72..e6d1372ccf 100644 --- a/shared-bindings/atexit/__init__.c +++ b/shared-bindings/atexit/__init__.c @@ -91,3 +91,5 @@ const mp_obj_module_t atexit_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&atexit_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_atexit, atexit_module, CIRCUITPY_ATEXIT); diff --git a/shared-bindings/audiobusio/__init__.c b/shared-bindings/audiobusio/__init__.c index 23e246ec22..0476443768 100644 --- a/shared-bindings/audiobusio/__init__.c +++ b/shared-bindings/audiobusio/__init__.c @@ -58,3 +58,5 @@ const mp_obj_module_t audiobusio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&audiobusio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_audiobusio, audiobusio_module, CIRCUITPY_AUDIOBUSIO); diff --git a/shared-bindings/audiocore/__init__.c b/shared-bindings/audiocore/__init__.c index 9fe4a81c4c..f03c64ccf8 100644 --- a/shared-bindings/audiocore/__init__.c +++ b/shared-bindings/audiocore/__init__.c @@ -50,3 +50,5 @@ const mp_obj_module_t audiocore_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&audiocore_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_audiocore, audiocore_module, CIRCUITPY_AUDIOCORE); diff --git a/shared-bindings/audioio/__init__.c b/shared-bindings/audioio/__init__.c index 426f756d44..9f8411f484 100644 --- a/shared-bindings/audioio/__init__.c +++ b/shared-bindings/audioio/__init__.c @@ -61,3 +61,5 @@ const mp_obj_module_t audioio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&audioio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_audioio, audioio_module, CIRCUITPY_AUDIOIO); diff --git a/shared-bindings/audiomixer/__init__.c b/shared-bindings/audiomixer/__init__.c index 9d0bf676fc..a29d4f18ef 100644 --- a/shared-bindings/audiomixer/__init__.c +++ b/shared-bindings/audiomixer/__init__.c @@ -46,3 +46,5 @@ const mp_obj_module_t audiomixer_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&audiomixer_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_audiomixer, audiomixer_module, CIRCUITPY_AUDIOMIXER); diff --git a/shared-bindings/audiomp3/__init__.c b/shared-bindings/audiomp3/__init__.c index 29bdd0bb21..d6c408b143 100644 --- a/shared-bindings/audiomp3/__init__.c +++ b/shared-bindings/audiomp3/__init__.c @@ -45,3 +45,5 @@ const mp_obj_module_t audiomp3_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&audiomp3_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_audiomp3, audiomp3_module, CIRCUITPY_AUDIOMP3); From 52001f167840d62c275af23564ac779706a33318 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Wed, 25 Aug 2021 21:08:42 -0400 Subject: [PATCH 270/418] Initial try at Lolin S2 Mini board definition --- ports/esp32s2/boards/lolin_s2_mini/ai_pins.c | 88 +++++++++++++++++++ ports/esp32s2/boards/lolin_s2_mini/board.c | 61 +++++++++++++ .../boards/lolin_s2_mini/mpconfigboard.h | 47 ++++++++++ .../boards/lolin_s2_mini/mpconfigboard.mk | 20 +++++ ports/esp32s2/boards/lolin_s2_mini/pins.c | 73 +++++++++++++++ ports/esp32s2/boards/lolin_s2_mini/sdkconfig | 39 ++++++++ 6 files changed, 328 insertions(+) create mode 100644 ports/esp32s2/boards/lolin_s2_mini/ai_pins.c create mode 100644 ports/esp32s2/boards/lolin_s2_mini/board.c create mode 100644 ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h create mode 100644 ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/lolin_s2_mini/pins.c create mode 100644 ports/esp32s2/boards/lolin_s2_mini/sdkconfig diff --git a/ports/esp32s2/boards/lolin_s2_mini/ai_pins.c b/ports/esp32s2/boards/lolin_s2_mini/ai_pins.c new file mode 100644 index 0000000000..f7e5cea7ed --- /dev/null +++ b/ports/esp32s2/boards/lolin_s2_mini/ai_pins.c @@ -0,0 +1,88 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + // S2 Mini Board bottom, right, top-bottom + // GPIO0-GPIO14: broken out as a bloc on ESP32-S2FN4R2 SoC + // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO0) }, // EN + // mpconfigboard.h: GPIO1: MICROPY_HW_NEOPIXEL + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, // RTC_GPIO1,GPIO1,TOUCH1,ADC1_CH0 + + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, // RTC_GPIO2,GPIO2,TOUCH2,ADC1_CH1 + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, // RTC_GPIO3,GPIO3,TOUCH3,ADC1_CH2 + + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // RTC_GPIO4,GPIO4,TOUCH4,ADC1_CH3 + { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) } + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, // RTC_GPIO5,GPIO5,TOUCH5,ADC1_CH4 + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 + { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO7) }, + + // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 + + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },//RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },//RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 + + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },//RTC_GPIO14,GPIO14,TOUCH14,ADC2_CH3,FSPIWP,FSPIDQS + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, + + // S2 Mini Board bottom, left, bottom-top + // mpconfigboard.h: GPIO15: CIRCUITPY_STATUS_LED_POWER + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },//XTAL_32K_P: RTC_GPIO15,GPIO15,U0RTS,ADC2_CH4,XTAL_32K_P + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },//XTAL_32K_N: RTC_GPIO16,GPIO16,U0CTS,ADC2_CH5,XTAL_32K_N + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },//DAC_1: RTC_GPIO17,GPIO17,U1TXD,ADC2_CH6,DAC_1 + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },//DAC_2: RTC_GPIO18,GPIO18,U1RXD,ADC2_CH7,DAC_2,CLK_OUT3 + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) }, + // skip GPIO19-GPIO20: USB_D-/USB_D+ + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },// RTC_GPIO21,GPIO21 + // skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC + // skip GPIO26-GPIO32: SPI, not broken on on S2 Mini + + // GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },// SPIIO5,GPIO34,FSPICS0 + + // mpconfigboard.h: GPIO35/GPIO36/GPIO37: SCK/MOSI/MISO SPI + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },// GPIO38,FSPIWP + + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },// MTCK,GPIO39,CLK_OUT3 + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },// MTDO,GPIO40,CLK_OUT2 + + // S2 Mini - not broken out on board + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) },// MTDI,GPIO41,CLK_OUT1 + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },// MTMS,GPIO42 + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, // U0TXD,GPIO43,CLK_OUT1 + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },// + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, // U0RXD,GPIO44,CLK_OUT2 + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },// GPIO45 + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) },// GPIO46 + + // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/lolin_s2_mini/board.c b/ports/esp32s2/boards/lolin_s2_mini/board.c new file mode 100644 index 0000000000..a0e399b1ef --- /dev/null +++ b/ports/esp32s2/boards/lolin_s2_mini/board.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ + + // SPI Flash and RAM + common_hal_never_reset_pin(&pin_GPIO26); + common_hal_never_reset_pin(&pin_GPIO27); + common_hal_never_reset_pin(&pin_GPIO28); + common_hal_never_reset_pin(&pin_GPIO29); + common_hal_never_reset_pin(&pin_GPIO30); + common_hal_never_reset_pin(&pin_GPIO31); + common_hal_never_reset_pin(&pin_GPIO32); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h new file mode 100644 index 0000000000..4cf71911a9 --- /dev/null +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "S2Mini" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO1) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO15) +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO37) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO36) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk new file mode 100644 index 0000000000..2aec4db287 --- /dev/null +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk @@ -0,0 +1,20 @@ +USB_VID = 0x303A +USB_PID = 0x8002 +USB_PRODUCT = "S2Mini" +USB_MANUFACTURER = "Lolin" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=qio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_BITBANG_NEOPIXEL = 1 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c new file mode 100644 index 0000000000..aef348029b --- /dev/null +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -0,0 +1,73 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO37) }, + + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/lolin_s2_mini/sdkconfig b/ports/esp32s2/boards/lolin_s2_mini/sdkconfig new file mode 100644 index 0000000000..126ae31312 --- /dev/null +++ b/ports/esp32s2/boards/lolin_s2_mini/sdkconfig @@ -0,0 +1,39 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO=y +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M=y +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="LS2Mini" +# end of LWIP From c6ab3b3a9705d0adcd20700d0f98bebe42efdbd6 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Wed, 25 Aug 2021 21:16:22 -0400 Subject: [PATCH 271/418] nitial try at Lolin S2 Mini board definition --- ports/esp32s2/boards/lolin_s2_mini/ai_pins.c | 88 ------------- ports/esp32s2/boards/lolin_s2_mini/pins.c | 127 +++++++++++-------- 2 files changed, 71 insertions(+), 144 deletions(-) delete mode 100644 ports/esp32s2/boards/lolin_s2_mini/ai_pins.c diff --git a/ports/esp32s2/boards/lolin_s2_mini/ai_pins.c b/ports/esp32s2/boards/lolin_s2_mini/ai_pins.c deleted file mode 100644 index f7e5cea7ed..0000000000 --- a/ports/esp32s2/boards/lolin_s2_mini/ai_pins.c +++ /dev/null @@ -1,88 +0,0 @@ -#include "shared-bindings/board/__init__.h" - -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - // S2 Mini Board bottom, right, top-bottom - // GPIO0-GPIO14: broken out as a bloc on ESP32-S2FN4R2 SoC - // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON - { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO0) }, // EN - // mpconfigboard.h: GPIO1: MICROPY_HW_NEOPIXEL - { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, // RTC_GPIO1,GPIO1,TOUCH1,ADC1_CH0 - - { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, // RTC_GPIO2,GPIO2,TOUCH2,ADC1_CH1 - { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, // RTC_GPIO3,GPIO3,TOUCH3,ADC1_CH2 - - { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // RTC_GPIO4,GPIO4,TOUCH4,ADC1_CH3 - { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) } - { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, // RTC_GPIO5,GPIO5,TOUCH5,ADC1_CH4 - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, - - { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 - { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 - { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO7) }, - - // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 - { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, - - { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 - { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 - - { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },//RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 - { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },//RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 - - { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },//RTC_GPIO14,GPIO14,TOUCH14,ADC2_CH3,FSPIWP,FSPIDQS - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, - - // S2 Mini Board bottom, left, bottom-top - // mpconfigboard.h: GPIO15: CIRCUITPY_STATUS_LED_POWER - { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },//XTAL_32K_P: RTC_GPIO15,GPIO15,U0RTS,ADC2_CH4,XTAL_32K_P - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO15) }, - - { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },//XTAL_32K_N: RTC_GPIO16,GPIO16,U0CTS,ADC2_CH5,XTAL_32K_N - { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },//DAC_1: RTC_GPIO17,GPIO17,U1TXD,ADC2_CH6,DAC_1 - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) }, - - { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },//DAC_2: RTC_GPIO18,GPIO18,U1RXD,ADC2_CH7,DAC_2,CLK_OUT3 - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) }, - // skip GPIO19-GPIO20: USB_D-/USB_D+ - { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },// RTC_GPIO21,GPIO21 - // skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC - // skip GPIO26-GPIO32: SPI, not broken on on S2 Mini - - // GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG - { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD - { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },// SPIIO5,GPIO34,FSPICS0 - - // mpconfigboard.h: GPIO35/GPIO36/GPIO37: SCK/MOSI/MISO SPI - { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO36) }, - - { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, - { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },// GPIO38,FSPIWP - - { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },// MTCK,GPIO39,CLK_OUT3 - { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },// MTDO,GPIO40,CLK_OUT2 - - // S2 Mini - not broken out on board - { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) },// MTDI,GPIO41,CLK_OUT1 - { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },// MTMS,GPIO42 - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, // U0TXD,GPIO43,CLK_OUT1 - { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },// - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, // U0RXD,GPIO44,CLK_OUT2 - { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, - { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },// GPIO45 - { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) },// GPIO46 - - // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, -}; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index aef348029b..f7e5cea7ed 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -1,73 +1,88 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, - { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO0) }, + // S2 Mini Board bottom, right, top-bottom + // GPIO0-GPIO14: broken out as a bloc on ESP32-S2FN4R2 SoC + // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO0) }, // EN + // mpconfigboard.h: GPIO1: MICROPY_HW_NEOPIXEL + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, // RTC_GPIO1,GPIO1,TOUCH1,ADC1_CH0 - { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, // RTC_GPIO2,GPIO2,TOUCH2,ADC1_CH1 + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, // RTC_GPIO3,GPIO3,TOUCH3,ADC1_CH2 - { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // RTC_GPIO4,GPIO4,TOUCH4,ADC1_CH3 + { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) } + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, // RTC_GPIO5,GPIO5,TOUCH5,ADC1_CH4 + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 + { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO7) }, + + // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 + + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },//RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },//RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 + + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },//RTC_GPIO14,GPIO14,TOUCH14,ADC2_CH3,FSPIWP,FSPIDQS + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, + + // S2 Mini Board bottom, left, bottom-top + // mpconfigboard.h: GPIO15: CIRCUITPY_STATUS_LED_POWER + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },//XTAL_32K_P: RTC_GPIO15,GPIO15,U0RTS,ADC2_CH4,XTAL_32K_P + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },//XTAL_32K_N: RTC_GPIO16,GPIO16,U0CTS,ADC2_CH5,XTAL_32K_N + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },//DAC_1: RTC_GPIO17,GPIO17,U1TXD,ADC2_CH6,DAC_1 + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, - { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO7) }, - { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },//DAC_2: RTC_GPIO18,GPIO18,U1RXD,ADC2_CH7,DAC_2,CLK_OUT3 + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) }, + // skip GPIO19-GPIO20: USB_D-/USB_D+ + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },// RTC_GPIO21,GPIO21 + // skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC + // skip GPIO26-GPIO32: SPI, not broken on on S2 Mini - { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO6) }, + // GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },// SPIIO5,GPIO34,FSPICS0 - { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO5) }, - - { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO4) }, - - { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + // mpconfigboard.h: GPIO35/GPIO36/GPIO37: SCK/MOSI/MISO SPI + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO35) }, - - { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, - { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },// GPIO38,FSPIWP - { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, - { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) }, - - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO8) }, - - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, - { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, - { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO9) }, - - { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, - { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO38) }, - - { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, - { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO33) }, - - { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) }, - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },// MTCK,GPIO39,CLK_OUT3 + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },// MTDO,GPIO40,CLK_OUT2 + // S2 Mini - not broken out on board + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) },// MTDI,GPIO41,CLK_OUT1 + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },// MTMS,GPIO42 + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, // U0TXD,GPIO43,CLK_OUT1 + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },// + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, // U0RXD,GPIO44,CLK_OUT2 { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO44) }, - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },// GPIO45 + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) },// GPIO46 + + // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From ba4277d823706b169e663134933f478adfb8ac57 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 26 Aug 2021 05:52:21 +0200 Subject: [PATCH 272/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 11 +++++++++++ locale/cs.po | 11 +++++++++++ locale/de_DE.po | 11 +++++++++++ locale/el.po | 11 +++++++++++ locale/en_GB.po | 11 +++++++++++ locale/es.po | 11 +++++++++++ locale/fil.po | 11 +++++++++++ locale/fr.po | 11 +++++++++++ locale/hi.po | 11 +++++++++++ locale/it_IT.po | 11 +++++++++++ locale/ja.po | 11 +++++++++++ locale/ko.po | 11 +++++++++++ locale/nl.po | 11 +++++++++++ locale/pl.po | 11 +++++++++++ locale/pt_BR.po | 11 +++++++++++ locale/sv.po | 11 +++++++++++ locale/zh_Latn_pinyin.po | 11 +++++++++++ 17 files changed, 187 insertions(+) diff --git a/locale/ID.po b/locale/ID.po index 58ef8993a4..b13ecfb589 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -42,6 +42,13 @@ msgstr "" "Harap ajukan masalah dengan konten drive CIRCUITPY Anda di\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -4016,6 +4023,10 @@ msgstr "" msgid "queue overflow" msgstr "antrian meluap (overflow)" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 77cf8a32ed..0357dd1b8c 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -38,6 +38,13 @@ msgstr "" "Založte prosím problém s obsahem vaší jednotky CIRCUITPY na adrese\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Soubor \"%q\"" @@ -3976,6 +3983,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index a0a877fe3e..627aeb4b2d 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -41,6 +41,13 @@ msgstr "" "Bitte melden Sie ein Problem mit dem Inhalt Ihres CIRCUITPY-Laufwerks unter\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Datei \"%q\"" @@ -4045,6 +4052,10 @@ msgstr "" msgid "queue overflow" msgstr "Warteschlangenüberlauf" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "rohe F-Strings sind nicht implementiert" diff --git a/locale/el.po b/locale/el.po index 7c43d6b8a3..4c69445400 100644 --- a/locale/el.po +++ b/locale/el.po @@ -35,6 +35,13 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -3973,6 +3980,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 496d22924b..98124a11d0 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -43,6 +43,13 @@ msgstr "" "Please file an issue with the contents of your CIRCUITPY drive at \n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -4008,6 +4015,10 @@ msgstr "push_threshold must be between 1 and 32" msgid "queue overflow" msgstr "queue overflow" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "raw f-strings are not implemented" diff --git a/locale/es.po b/locale/es.po index 59e4c55b31..f8c3240142 100644 --- a/locale/es.po +++ b/locale/es.po @@ -44,6 +44,13 @@ msgstr "" "Presente un problema con el contenido de su unidad CIRCUITPY en\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Archivo \"%q\"" @@ -4062,6 +4069,10 @@ msgstr "push_threshold debe esta entre 1 y 32" msgid "queue overflow" msgstr "desbordamiento de cola(queue)" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "no está implementado cadenas-f sin procesar" diff --git a/locale/fil.po b/locale/fil.po index da5e3f608d..eb74dc793f 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -36,6 +36,13 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -4022,6 +4029,10 @@ msgstr "" msgid "queue overflow" msgstr "puno na ang pila (overflow)" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index f00844a9f3..bdd49e1666 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -44,6 +44,13 @@ msgstr "" "l'adresse\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Fichier \"%q\"" @@ -4073,6 +4080,10 @@ msgstr "push_threshold doit être entre 1 et 32" msgid "queue overflow" msgstr "dépassement de file" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "les chaînes f brutes ne sont pas implémentées" diff --git a/locale/hi.po b/locale/hi.po index 433fbcfdb0..f4a821107b 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -35,6 +35,13 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -3973,6 +3980,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 9ac5a56d4a..8385c3c8c7 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -43,6 +43,13 @@ msgstr "" "Per favore, segnala il problema con il contenuto del tuo CIRCUITPY a\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -4038,6 +4045,10 @@ msgstr "" msgid "queue overflow" msgstr "overflow della coda" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 0c56823aad..ad286abc06 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -40,6 +40,13 @@ msgstr "" "CIRCUITPYドライブの内容を添えて問題を以下で報告してください:\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " ファイル \"%q\"" @@ -3995,6 +4002,10 @@ msgstr "" msgid "queue overflow" msgstr "キューがオーバーフローしました" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "raw f-文字列は実装されていません" diff --git a/locale/ko.po b/locale/ko.po index 15148a0bef..ccad4c0c8d 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -36,6 +36,13 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " 파일 \"%q\"" @@ -3977,6 +3984,10 @@ msgstr "" msgid "queue overflow" msgstr "" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index eb1dde7e05..1460e52524 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -38,6 +38,13 @@ msgstr "" "Meld een probleem met de inhoud van de CIRCUITPY drive op:\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Bestand" @@ -4019,6 +4026,10 @@ msgstr "" msgid "queue overflow" msgstr "wachtrij overloop" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "ruwe f-strings zijn niet geïmplementeerd" diff --git a/locale/pl.po b/locale/pl.po index 20f79b0fa8..15f083b7c6 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -40,6 +40,13 @@ msgstr "" "Zgłoś problem z zawartością dysku CIRCUITPY pod adresem\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Plik \"%q\"" @@ -3992,6 +3999,10 @@ msgstr "" msgid "queue overflow" msgstr "przepełnienie kolejki" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 456cad0269..b95155ac3f 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -42,6 +42,13 @@ msgstr "" "Registre um problema com o conteúdo do seu controlador no CIRCUITPY\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Arquivo \"%q\"" @@ -4073,6 +4080,10 @@ msgstr "O pull_threshold deve ser entre 1 e 32" msgid "queue overflow" msgstr "estouro de fila" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "o f-strings bruto não estão implementados" diff --git a/locale/sv.po b/locale/sv.po index 8ff1931499..17fc98e89e 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -42,6 +42,13 @@ msgstr "" "Vänligen skapa ett ärende med innehållet i din CIRCUITPY-enhet på\n" "https://github.com/adafruit/circuitpython/issues\n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Filen \"%q\"" @@ -4032,6 +4039,10 @@ msgstr "push_threshold måste vara mellan 1 och 32" msgid "queue overflow" msgstr "köstorlek överskreds" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "råa f-strängar inte implementerade" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index caf55ffe6f..d4f94a7e9b 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -43,6 +43,13 @@ msgstr "" "Qǐng tōngguò https://github.com/adafruit/circuitpython/issues\n" "tíjiāo yǒuguān nín de CIRCUITPY qūdòngqì nèiróng de wèntí \n" +#: lib/utils/pyexec.c +msgid "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Wénjiàn \"%q\"" @@ -4032,6 +4039,10 @@ msgstr "tuī sòng yù zhí bì xū jiè yú 1 hé 32 zhī jiān" msgid "queue overflow" msgstr "duìliè yìchū" +#: lib/utils/pyexec.c +msgid "raw REPL; CTRL-B to exit\n" +msgstr "" + #: py/parse.c msgid "raw f-strings are not implemented" msgstr "wèi zhíxíng yuánshǐ f-strings" From da1e29d9e4827bf303ef9b8ba82d5e0a197a35a7 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Thu, 26 Aug 2021 08:59:02 -0400 Subject: [PATCH 273/418] fix in pins.c for build --- ports/esp32s2/boards/lolin_s2_mini/pins.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index f7e5cea7ed..c603c8b6fa 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -12,7 +12,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, // RTC_GPIO3,GPIO3,TOUCH3,ADC1_CH2 { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // RTC_GPIO4,GPIO4,TOUCH4,ADC1_CH3 - { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) } + { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) }, { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, // RTC_GPIO5,GPIO5,TOUCH5,ADC1_CH4 { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, @@ -52,7 +52,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // skip GPIO19-GPIO20: USB_D-/USB_D+ { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },// RTC_GPIO21,GPIO21 // skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC - // skip GPIO26-GPIO32: SPI, not broken on on S2 Mini + // skip GPIO26-GPIO32: SPI Flash & RAM, not broken out on S2 Mini (internal to ESP32-S2FN4R2 SoC?) // GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD @@ -74,14 +74,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },// MTDO,GPIO40,CLK_OUT2 // S2 Mini - not broken out on board + /* { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) },// MTDI,GPIO41,CLK_OUT1 { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },// MTMS,GPIO42 - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, // U0TXD,GPIO43,CLK_OUT1 + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, // U0TXD,GPIO43,CLK_OUT1 { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },// - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, // U0RXD,GPIO44,CLK_OUT2 + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, // U0RXD,GPIO44,CLK_OUT2 { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },// GPIO45 { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) },// GPIO46 + */ // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; From a608934f31840dd171cac86c966cebdee2f67b75 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 26 Aug 2021 09:34:02 -0400 Subject: [PATCH 274/418] restrict WaveFile buffer size to 8-1024 --- locale/circuitpython.pot | 2 +- py/argcheck.c | 8 ++++---- py/runtime.h | 2 +- shared-bindings/audiocore/WaveFile.c | 9 ++++++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c6940b5594..a614078beb 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -103,7 +103,7 @@ msgid "%q indices must be integers, not %s" msgstr "" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/py/argcheck.c b/py/argcheck.c index ae779a1faa..a2b5f63f33 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -195,11 +195,11 @@ mp_float_t mp_arg_validate_obj_float_non_negative(mp_obj_t float_in, mp_float_t return f; } -size_t mp_arg_validate_length_with_name(mp_int_t i, size_t length, qstr arg_name, qstr length_name) { - if (i != (mp_int_t)length) { - mp_raise_ValueError_varg(translate("%q length must be %q"), arg_name, length_name); +mp_uint_t mp_arg_validate_length_range(mp_uint_t length, mp_uint_t min, mp_uint_t max, qstr arg_name) { + if (length < min || length > max) { + mp_raise_ValueError_varg(translate("%q length must be %d-%d"), arg_name, min, max); } - return (size_t)i; + return length; } mp_obj_t mp_arg_validate_type(mp_obj_t obj, const mp_obj_type_t *type, qstr arg_name) { diff --git a/py/runtime.h b/py/runtime.h index fc6434ca72..b93f484ec8 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -95,7 +95,7 @@ mp_int_t mp_arg_validate_int_min(mp_int_t i, mp_int_t min, qstr arg_name); mp_int_t mp_arg_validate_int_max(mp_int_t i, mp_int_t j, qstr arg_name); mp_int_t mp_arg_validate_int_range(mp_int_t i, mp_int_t min, mp_int_t max, qstr arg_name); mp_float_t mp_arg_validate_obj_float_non_negative(mp_obj_t float_in, mp_float_t default_for_null, qstr arg_name); -size_t mp_arg_validate_length_with_name(mp_int_t i, size_t length, qstr arg_name, qstr length_name); +mp_uint_t mp_arg_validate_length_range(mp_uint_t length, mp_uint_t min, mp_uint_t max, qstr arg_name); mp_obj_t mp_arg_validate_type(mp_obj_t obj, const mp_obj_type_t *type, qstr arg_name); mp_obj_t mp_arg_validate_string(mp_obj_t obj, qstr arg_name); diff --git a/shared-bindings/audiocore/WaveFile.c b/shared-bindings/audiocore/WaveFile.c index ebf8a7807e..c46976229e 100644 --- a/shared-bindings/audiocore/WaveFile.c +++ b/shared-bindings/audiocore/WaveFile.c @@ -38,13 +38,16 @@ //| //| A .wav file prepped for audio playback. Only mono and stereo files are supported. Samples must //| be 8 bit unsigned or 16 bit signed. If a buffer is provided, it will be used instead of allocating -//| an internal buffer.""" +//| an internal buffer, which can prevent memory fragmentation.""" //| //| def __init__(self, file: typing.BinaryIO, buffer: WriteableBuffer) -> None: //| """Load a .wav file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`. //| //| :param typing.BinaryIO file: Already opened wave file -//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two 256 byte buffers are allocated internally. +//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, +//| that will be split in half and used for double-buffering of the data. +//| The buffer must be 8 to 1024 bytes long. +//| If not provided, two 256 byte buffers are initially allocated internally. //| //| //| Playing a wave file from flash:: @@ -83,7 +86,7 @@ STATIC mp_obj_t audioio_wavefile_make_new(const mp_obj_type_t *type, size_t n_ar mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_WRITE); buffer = bufinfo.buf; - buffer_size = bufinfo.len; + buffer_size = mp_arg_validate_length_range(bufinfo.len, 8, 1024, MP_QSTR_buffer); } common_hal_audioio_wavefile_construct(self, MP_OBJ_TO_PTR(args[0]), buffer, buffer_size); From ffaad9631031eee5907facbeb37ccab226693270 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Thu, 26 Aug 2021 10:15:15 -0400 Subject: [PATCH 275/418] fix for GPIO0 / CIRCUITPY_BOOT_BUTTON --- ports/esp32s2/boards/lolin_s2_mini/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index c603c8b6fa..7d868fbf01 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -4,7 +4,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // S2 Mini Board bottom, right, top-bottom // GPIO0-GPIO14: broken out as a bloc on ESP32-S2FN4R2 SoC // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON - { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO0) }, // EN + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, // RTC_GPIO0,GPIO0 // mpconfigboard.h: GPIO1: MICROPY_HW_NEOPIXEL { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, // RTC_GPIO1,GPIO1,TOUCH1,ADC1_CH0 From b9c7badb56cef4ac08f12c6dd3523d7672a94888 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Thu, 26 Aug 2021 10:31:35 -0400 Subject: [PATCH 276/418] fix for default names for BUTTON, NEOPIXEL, SDA/SCL, LED, SPI MOSI/MISO/SCK --- ports/esp32s2/boards/lolin_s2_mini/pins.c | 32 ++++++++--------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index 7d868fbf01..c72c23dfed 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -4,28 +4,26 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // S2 Mini Board bottom, right, top-bottom // GPIO0-GPIO14: broken out as a bloc on ESP32-S2FN4R2 SoC // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, // RTC_GPIO0,GPIO0 - // mpconfigboard.h: GPIO1: MICROPY_HW_NEOPIXEL + // mpconfigboard.h: GPIO1: MICROPY_HW_NEOPIXEL - left to user to solder on + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, // RTC_GPIO1,GPIO1,TOUCH1,ADC1_CH0 { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, // RTC_GPIO2,GPIO2,TOUCH2,ADC1_CH1 { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, // RTC_GPIO3,GPIO3,TOUCH3,ADC1_CH2 { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // RTC_GPIO4,GPIO4,TOUCH4,ADC1_CH3 - { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO4) }, { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, // RTC_GPIO5,GPIO5,TOUCH5,ADC1_CH4 - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 - { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 - { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO7) }, // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 - { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 @@ -34,23 +32,19 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },//RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },//RTC_GPIO14,GPIO14,TOUCH14,ADC2_CH3,FSPIWP,FSPIDQS - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, // S2 Mini Board bottom, left, bottom-top // mpconfigboard.h: GPIO15: CIRCUITPY_STATUS_LED_POWER - { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },//XTAL_32K_P: RTC_GPIO15,GPIO15,U0RTS,ADC2_CH4,XTAL_32K_P { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },//XTAL_32K_P: RTC_GPIO15,GPIO15,U0RTS,ADC2_CH4,XTAL_32K_P { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },//XTAL_32K_N: RTC_GPIO16,GPIO16,U0CTS,ADC2_CH5,XTAL_32K_N { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },//DAC_1: RTC_GPIO17,GPIO17,U1TXD,ADC2_CH6,DAC_1 - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },//DAC_2: RTC_GPIO18,GPIO18,U1RXD,ADC2_CH7,DAC_2,CLK_OUT3 - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) }, // skip GPIO19-GPIO20: USB_D-/USB_D+ { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },// RTC_GPIO21,GPIO21 + // skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC // skip GPIO26-GPIO32: SPI Flash & RAM, not broken out on S2 Mini (internal to ESP32-S2FN4R2 SoC?) @@ -58,16 +52,14 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },// SPIIO5,GPIO34,FSPICS0 - // mpconfigboard.h: GPIO35/GPIO36/GPIO37: SCK/MOSI/MISO SPI - { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID + // mpconfigboard.h: GPIO35/GPIO36/GPIO37: MOSI/MESO/SCK SPI { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK - { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },// GPIO38,FSPIWP { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },// MTCK,GPIO39,CLK_OUT3 @@ -84,7 +76,5 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },// GPIO45 { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) },// GPIO46 */ - - // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From ab6f47e0447cceefc892c6bb6f6a982b55315538 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Thu, 26 Aug 2021 12:03:24 -0400 Subject: [PATCH 277/418] Add lolin_s2_mini to build.yml for board Lolin S2 Mini --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e2c35f966..d4e6703151 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -521,6 +521,7 @@ jobs: - "gravitech_cucumber_r" - "gravitech_cucumber_rs" - "lilygo_ttgo_t8_s2_st7789" + - "lolin_s2_mini" - "microdev_micro_s2" - "morpheans_morphesp-240" - "muselab_nanoesp32_s2_wroom" From 17919de54ed6df4d3f05c6f168e9ade5f3441593 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Thu, 26 Aug 2021 13:07:15 +0000 Subject: [PATCH 278/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1021 of 1021 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index b95155ac3f..c61edc887a 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-25 15:34+0000\n" +"PO-Revision-Date: 2021-08-26 17:10+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -48,6 +48,9 @@ msgid "" "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" "=== " msgstr "" +"\n" +"modo colar; Ctrl-C para cancelar, Ctrl-D para concluir\n" +"=== " #: py/obj.c msgid " File \"%q\"" @@ -4082,7 +4085,7 @@ msgstr "estouro de fila" #: lib/utils/pyexec.c msgid "raw REPL; CTRL-B to exit\n" -msgstr "" +msgstr "REPL bruto; CTRL-B para encerrar\n" #: py/parse.c msgid "raw f-strings are not implemented" From 60c2f5cfdc22a17bd8d62d6c94acdcf66f2c2ea1 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Thu, 26 Aug 2021 08:11:32 +0000 Subject: [PATCH 279/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1021 of 1021 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 17fc98e89e..a3dbe2786d 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-23 23:02+0000\n" +"PO-Revision-Date: 2021-08-26 17:10+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -48,6 +48,9 @@ msgid "" "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" "=== " msgstr "" +"\n" +"klistra in-läge; Ctrl-C för att avbryta, Ctrl-D för att avsluta\n" +"=== " #: py/obj.c msgid " File \"%q\"" @@ -4041,7 +4044,7 @@ msgstr "köstorlek överskreds" #: lib/utils/pyexec.c msgid "raw REPL; CTRL-B to exit\n" -msgstr "" +msgstr "rå REPL. CTRL-B för att avsluta\n" #: py/parse.c msgid "raw f-strings are not implemented" From 3756e9d9a5bf1e678e442106bbea0c1c289fecf5 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 26 Aug 2021 19:10:05 +0200 Subject: [PATCH 280/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 2 +- locale/cs.po | 2 +- locale/de_DE.po | 2 +- locale/el.po | 2 +- locale/en_GB.po | 2 +- locale/es.po | 7 +++++-- locale/fil.po | 2 +- locale/fr.po | 7 +++++-- locale/hi.po | 2 +- locale/it_IT.po | 2 +- locale/ja.po | 2 +- locale/ko.po | 2 +- locale/nl.po | 2 +- locale/pl.po | 2 +- locale/pt_BR.po | 7 +++++-- locale/sv.po | 7 +++++-- locale/zh_Latn_pinyin.po | 7 +++++-- 17 files changed, 37 insertions(+), 22 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index b13ecfb589..f691a4a5c2 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -110,7 +110,7 @@ msgid "%q indices must be integers, not %s" msgstr "indeks %q harus bilangan bulat, bukan %s" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/cs.po b/locale/cs.po index 0357dd1b8c..b45f2769b8 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -106,7 +106,7 @@ msgid "%q indices must be integers, not %s" msgstr "Indexy %q musí být celá čísla, nikoli %s" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/de_DE.po b/locale/de_DE.po index 627aeb4b2d..4d7665deb6 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -111,7 +111,7 @@ msgid "%q indices must be integers, not %s" msgstr "%q Indizes müssen Integer sein, nicht %s" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/el.po b/locale/el.po index 4c69445400..56cc2db84c 100644 --- a/locale/el.po +++ b/locale/el.po @@ -103,7 +103,7 @@ msgid "%q indices must be integers, not %s" msgstr "" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/en_GB.po b/locale/en_GB.po index 98124a11d0..fc5e153abe 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -112,7 +112,7 @@ msgid "%q indices must be integers, not %s" msgstr "" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/es.po b/locale/es.po index f8c3240142..8c594a9ce6 100644 --- a/locale/es.po +++ b/locale/es.po @@ -114,8 +114,8 @@ msgid "%q indices must be integers, not %s" msgstr "%q indices deben ser enteros, no %s" #: py/argcheck.c -msgid "%q length must be %q" -msgstr "el tamaño de %q debe ser %q" +msgid "%q length must be %d-%d" +msgstr "" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" @@ -4568,6 +4568,9 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "%q length must be %q" +#~ msgstr "el tamaño de %q debe ser %q" + #~ msgid "%q must be 0-255" #~ msgstr "%q debe ser de 0-255" diff --git a/locale/fil.po b/locale/fil.po index eb74dc793f..217effed03 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -104,7 +104,7 @@ msgid "%q indices must be integers, not %s" msgstr "%q indeks ay dapat integers, hindi %s" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/fr.po b/locale/fr.po index bdd49e1666..b92494f808 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -114,8 +114,8 @@ msgid "%q indices must be integers, not %s" msgstr "les indices %q doivent être des entiers, pas %s" #: py/argcheck.c -msgid "%q length must be %q" -msgstr "La longueur de %q doit être de %q" +msgid "%q length must be %d-%d" +msgstr "" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" @@ -4579,6 +4579,9 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "%q length must be %q" +#~ msgstr "La longueur de %q doit être de %q" + #~ msgid "%q must be 0-255" #~ msgstr "%q doit être compris entre 0 et 255" diff --git a/locale/hi.po b/locale/hi.po index f4a821107b..902c73c088 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -103,7 +103,7 @@ msgid "%q indices must be integers, not %s" msgstr "" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/it_IT.po b/locale/it_IT.po index 8385c3c8c7..4801402fa0 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -112,7 +112,7 @@ msgid "%q indices must be integers, not %s" msgstr "gli indici %q devono essere interi, non %s" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/ja.po b/locale/ja.po index ad286abc06..476739c694 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -108,7 +108,7 @@ msgid "%q indices must be integers, not %s" msgstr "" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/ko.po b/locale/ko.po index ccad4c0c8d..0d45524948 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -104,7 +104,7 @@ msgid "%q indices must be integers, not %s" msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/nl.po b/locale/nl.po index 1460e52524..d7ff5308ce 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -106,7 +106,7 @@ msgid "%q indices must be integers, not %s" msgstr "%q indexen moeten integers zijn, niet %s" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/pl.po b/locale/pl.po index 15f083b7c6..513f7f5e4f 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -108,7 +108,7 @@ msgid "%q indices must be integers, not %s" msgstr "%q indeks musi być liczbą całkowitą, a nie %s" #: py/argcheck.c -msgid "%q length must be %q" +msgid "%q length must be %d-%d" msgstr "" #: shared-bindings/usb_hid/Device.c diff --git a/locale/pt_BR.po b/locale/pt_BR.po index c61edc887a..6db2786170 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -115,8 +115,8 @@ msgid "%q indices must be integers, not %s" msgstr "Os índices %q devem ser inteiros, e não %s" #: py/argcheck.c -msgid "%q length must be %q" -msgstr "o comprimento %q deve ser %q" +msgid "%q length must be %d-%d" +msgstr "" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" @@ -4581,6 +4581,9 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "%q length must be %q" +#~ msgstr "o comprimento %q deve ser %q" + #~ msgid "%q must be 0-255" #~ msgstr "%q deve ser entre 0-255" diff --git a/locale/sv.po b/locale/sv.po index a3dbe2786d..41fd2942c5 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -114,8 +114,8 @@ msgid "%q indices must be integers, not %s" msgstr "Indexet %q måste vara ett heltal, inte %s" #: py/argcheck.c -msgid "%q length must be %q" -msgstr "längden på %q måste vara %q" +msgid "%q length must be %d-%d" +msgstr "" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" @@ -4540,6 +4540,9 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "%q length must be %q" +#~ msgstr "längden på %q måste vara %q" + #~ msgid "%q must be 0-255" #~ msgstr "%q måste vara 0-255" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index d4f94a7e9b..c5959e399b 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -113,8 +113,8 @@ msgid "%q indices must be integers, not %s" msgstr "%q suǒyǐn bìxū shì zhěngshù, ér bùshì %s" #: py/argcheck.c -msgid "%q length must be %q" -msgstr "%q cháng dù bì xū wéi %q" +msgid "%q length must be %d-%d" +msgstr "" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" @@ -4537,6 +4537,9 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "%q length must be %q" +#~ msgstr "%q cháng dù bì xū wéi %q" + #~ msgid "%q must be 0-255" #~ msgstr "%q bì xū wéi 0-255" From 9663a227a3804281918b1985427a4b38a3ba4532 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 26 Aug 2021 10:20:26 -0700 Subject: [PATCH 281/418] Fix usb irq race Run the USB background once after we hook our IRQ up in case we missed one. Related to #5212 --- ports/raspberrypi/supervisor/usb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/raspberrypi/supervisor/usb.c b/ports/raspberrypi/supervisor/usb.c index 799ed06953..2fc07a20a9 100644 --- a/ports/raspberrypi/supervisor/usb.c +++ b/ports/raspberrypi/supervisor/usb.c @@ -44,4 +44,10 @@ void post_usb_init(void) { irq_set_exclusive_handler(USBCTRL_IRQ, usb_irq_handler); irq_set_enabled(USBCTRL_IRQ, true); + + // There is a small window where the USB interrupt may be handled by the + // pico-sdk instead of CircuitPython. If that is the case, then we'll have + // USB events to process that we didn't queue up a background task for. So, + // queue one up here even if we might not have anything to do. + usb_background_schedule(); } From 24fcc3f9557c2b06067b7378e80c8c45fdf764cb Mon Sep 17 00:00:00 2001 From: amit-sides <69360073+amit-sides@users.noreply.github.com> Date: Thu, 26 Aug 2021 20:44:27 +0300 Subject: [PATCH 282/418] Added type hints Co-authored-by: Scott Shawcroft --- shared-bindings/displayio/EPaperDisplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index eeabd85791..392346f6d9 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -217,7 +217,7 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_show(mp_obj_t self_in, mp_obj_t grou } MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_show_obj, displayio_epaperdisplay_obj_show); -//| def update_refresh_mode(self, start_sequence, seconds_per_frame) -> None: +//| def update_refresh_mode(self, start_sequence: ReadableBuffer, seconds_per_frame: float = 180) -> None: //| """Sets the ``start_sequence`` and ``seconds_per_frame`` parameters to enable //| quicker refresh modes of the display.""" //| From 23bb0bd2626af71e323e1ab2c65d9dc8ba1b00d6 Mon Sep 17 00:00:00 2001 From: amit-sides <69360073+amit-sides@users.noreply.github.com> Date: Thu, 26 Aug 2021 20:45:38 +0300 Subject: [PATCH 283/418] Improved documentation Co-authored-by: Scott Shawcroft --- shared-bindings/displayio/EPaperDisplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index 392346f6d9..a3ac480c0d 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -218,8 +218,8 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_show(mp_obj_t self_in, mp_obj_t grou MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_show_obj, displayio_epaperdisplay_obj_show); //| def update_refresh_mode(self, start_sequence: ReadableBuffer, seconds_per_frame: float = 180) -> None: -//| """Sets the ``start_sequence`` and ``seconds_per_frame`` parameters to enable -//| quicker refresh modes of the display.""" +//| """Updates the ``start_sequence`` and ``seconds_per_frame`` parameters to enable +//| varying the refresh mode of the display.""" //| STATIC mp_obj_t displayio_epaperdisplay_update_refresh_mode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { From 27502f90cdb9fbb8e2330ce1c2f2405f481fcee1 Mon Sep 17 00:00:00 2001 From: amit-sides <69360073+amit-sides@users.noreply.github.com> Date: Thu, 26 Aug 2021 20:51:32 +0300 Subject: [PATCH 284/418] Fixed formatting --- shared-bindings/displayio/EPaperDisplay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index a3ac480c0d..689ac413eb 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -221,8 +221,7 @@ MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_show_obj, displayio_epaperdisp //| """Updates the ``start_sequence`` and ``seconds_per_frame`` parameters to enable //| varying the refresh mode of the display.""" //| -STATIC mp_obj_t displayio_epaperdisplay_update_refresh_mode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) -{ +STATIC mp_obj_t displayio_epaperdisplay_update_refresh_mode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_start_sequence, ARG_seconds_per_frame }; static const mp_arg_t allowed_args[] = { { MP_QSTR_start_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ }, From b0d0880f802405147d3e94622cd9aaa04276c49d Mon Sep 17 00:00:00 2001 From: Durapensa Date: Thu, 26 Aug 2021 13:53:04 -0400 Subject: [PATCH 285/418] Add some more pin definitions, for NEOPIXEL_POWER, I2C, SPI --- ports/esp32s2/boards/lolin_s2_mini/pins.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index c72c23dfed..687b225d00 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -10,6 +10,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, // RTC_GPIO1,GPIO1,TOUCH1,ADC1_CH0 + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, // RTC_GPIO2,GPIO2,TOUCH2,ADC1_CH1 { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, // RTC_GPIO3,GPIO3,TOUCH3,ADC1_CH2 @@ -24,6 +25,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 @@ -61,6 +63,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },// GPIO38,FSPIWP + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },// MTCK,GPIO39,CLK_OUT3 { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },// MTDO,GPIO40,CLK_OUT2 From 05874f3fabb15b650a55f1072eacdcc19e125477 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Thu, 26 Aug 2021 14:29:04 -0400 Subject: [PATCH 286/418] pre-commit fixes --- ports/esp32s2/boards/lolin_s2_mini/pins.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index 687b225d00..5c469879f9 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -30,23 +30,23 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 - { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },//RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 - { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },//RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },// RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },// RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 - { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },//RTC_GPIO14,GPIO14,TOUCH14,ADC2_CH3,FSPIWP,FSPIDQS + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },// RTC_GPIO14,GPIO14,TOUCH14,ADC2_CH3,FSPIWP,FSPIDQS // S2 Mini Board bottom, left, bottom-top // mpconfigboard.h: GPIO15: CIRCUITPY_STATUS_LED_POWER { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },//XTAL_32K_P: RTC_GPIO15,GPIO15,U0RTS,ADC2_CH4,XTAL_32K_P + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },// XTAL_32K_P: RTC_GPIO15,GPIO15,U0RTS,ADC2_CH4,XTAL_32K_P - { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },//XTAL_32K_N: RTC_GPIO16,GPIO16,U0CTS,ADC2_CH5,XTAL_32K_N - { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },//DAC_1: RTC_GPIO17,GPIO17,U1TXD,ADC2_CH6,DAC_1 + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },// XTAL_32K_N: RTC_GPIO16,GPIO16,U0CTS,ADC2_CH5,XTAL_32K_N + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },// DAC_1: RTC_GPIO17,GPIO17,U1TXD,ADC2_CH6,DAC_1 - { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },//DAC_2: RTC_GPIO18,GPIO18,U1RXD,ADC2_CH7,DAC_2,CLK_OUT3 + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },// DAC_2: RTC_GPIO18,GPIO18,U1RXD,ADC2_CH7,DAC_2,CLK_OUT3 // skip GPIO19-GPIO20: USB_D-/USB_D+ { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },// RTC_GPIO21,GPIO21 - + // skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC // skip GPIO26-GPIO32: SPI Flash & RAM, not broken out on S2 Mini (internal to ESP32-S2FN4R2 SoC?) @@ -73,7 +73,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) },// MTDI,GPIO41,CLK_OUT1 { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },// MTMS,GPIO42 { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, // U0TXD,GPIO43,CLK_OUT1 - { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },// + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },// { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, // U0RXD,GPIO44,CLK_OUT2 { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },// GPIO45 From c70ec3fbbca1d4711d595709bfc3861c3e8ba1b2 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Sun, 8 Aug 2021 19:01:44 +0200 Subject: [PATCH 287/418] add the Board ID to boot_out.txt --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index 2b4327ad93..1c39859f24 100755 --- a/main.c +++ b/main.c @@ -691,6 +691,9 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { // Write version info to boot_out.txt. mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO); + // Write the board ID (board directory and ID on circuitpython.org) + mp_hal_stdout_tx_str("\r\n" "Board ID:"); + mp_hal_stdout_tx_str(CIRCUITPY_BOARD_ID); mp_hal_stdout_tx_str("\r\n"); } #endif From b14b2945167fd20c313e3bf8e1337b73355dc7ff Mon Sep 17 00:00:00 2001 From: Neradoc Date: Sat, 14 Aug 2021 00:51:09 +0200 Subject: [PATCH 288/418] add board.ID --- ports/atmel-samd/boards/8086_commander/pins.c | 2 ++ ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c | 2 ++ ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c | 2 ++ ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c | 2 ++ ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c | 2 ++ ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c | 2 ++ ports/atmel-samd/boards/arduino_mkr1300/pins.c | 2 ++ ports/atmel-samd/boards/arduino_mkrzero/pins.c | 2 ++ ports/atmel-samd/boards/arduino_nano_33_iot/pins.c | 2 ++ ports/atmel-samd/boards/arduino_zero/pins.c | 2 ++ ports/atmel-samd/boards/bast_pro_mini_m0/pins.c | 2 ++ ports/atmel-samd/boards/bdmicro_vina_d21/pins.c | 2 ++ ports/atmel-samd/boards/bdmicro_vina_d51/pins.c | 2 ++ ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c | 2 ++ ports/atmel-samd/boards/blm_badge/pins.c | 2 ++ ports/atmel-samd/boards/capablerobot_usbhub/pins.c | 2 ++ ports/atmel-samd/boards/catwan_usbstick/pins.c | 2 ++ ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c | 2 ++ ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c | 2 ++ ports/atmel-samd/boards/circuitplayground_express/pins.c | 2 ++ .../atmel-samd/boards/circuitplayground_express_crickit/pins.c | 2 ++ .../boards/circuitplayground_express_displayio/pins.c | 2 ++ ports/atmel-samd/boards/cp32-m4/pins.c | 2 ++ ports/atmel-samd/boards/cp_sapling_m0/pins.c | 2 ++ ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c | 2 ++ ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c | 2 ++ ports/atmel-samd/boards/datalore_ip_m4/pins.c | 2 ++ ports/atmel-samd/boards/datum_distance/pins.c | 2 ++ ports/atmel-samd/boards/datum_imu/pins.c | 2 ++ ports/atmel-samd/boards/datum_light/pins.c | 2 ++ ports/atmel-samd/boards/datum_weather/pins.c | 2 ++ ports/atmel-samd/boards/dynalora_usb/pins.c | 2 ++ ports/atmel-samd/boards/dynossat_edu_eps/pins.c | 2 ++ ports/atmel-samd/boards/dynossat_edu_obc/pins.c | 2 ++ ports/atmel-samd/boards/escornabot_makech/pins.c | 2 ++ ports/atmel-samd/boards/feather_m0_adalogger/pins.c | 2 ++ ports/atmel-samd/boards/feather_m0_basic/pins.c | 2 ++ ports/atmel-samd/boards/feather_m0_express/pins.c | 2 ++ ports/atmel-samd/boards/feather_m0_express_crickit/pins.c | 2 ++ ports/atmel-samd/boards/feather_m0_rfm69/pins.c | 2 ++ ports/atmel-samd/boards/feather_m0_rfm9x/pins.c | 2 ++ ports/atmel-samd/boards/feather_m0_supersized/pins.c | 2 ++ ports/atmel-samd/boards/feather_m4_can/pins.c | 2 ++ ports/atmel-samd/boards/feather_m4_express/pins.c | 2 ++ ports/atmel-samd/boards/fluff_m0/pins.c | 2 ++ ports/atmel-samd/boards/gemma_m0/pins.c | 2 ++ ports/atmel-samd/boards/grandcentral_m4_express/pins.c | 2 ++ ports/atmel-samd/boards/hallowing_m0_express/pins.c | 2 ++ ports/atmel-samd/boards/hallowing_m4_express/pins.c | 2 ++ ports/atmel-samd/boards/huntercat_nfc/pins.c | 2 ++ ports/atmel-samd/boards/itsybitsy_m0_express/pins.c | 2 ++ ports/atmel-samd/boards/itsybitsy_m4_express/pins.c | 2 ++ ports/atmel-samd/boards/kicksat-sprite/pins.c | 2 ++ ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c | 2 ++ ports/atmel-samd/boards/matrixportal_m4/pins.c | 2 ++ ports/atmel-samd/boards/meowmeow/pins.c | 2 ++ ports/atmel-samd/boards/metro_m0_express/pins.c | 2 ++ ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c | 2 ++ ports/atmel-samd/boards/metro_m4_express/pins.c | 2 ++ ports/atmel-samd/boards/mini_sam_m4/pins.c | 2 ++ ports/atmel-samd/boards/monster_m4sk/pins.c | 2 ++ ports/atmel-samd/boards/ndgarage_ndbit6/pins.c | 2 ++ ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c | 2 ++ ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c | 2 ++ ports/atmel-samd/boards/nfc_copy_cat/pins.c | 2 ++ ports/atmel-samd/boards/openbook_m4/pins.c | 2 ++ ports/atmel-samd/boards/pewpew10/pins.c | 2 ++ ports/atmel-samd/boards/pewpew_m4/pins.c | 2 ++ ports/atmel-samd/boards/picoplanet/pins.c | 2 ++ ports/atmel-samd/boards/pybadge/pins.c | 2 ++ ports/atmel-samd/boards/pycubed/pins.c | 2 ++ ports/atmel-samd/boards/pycubed_mram/pins.c | 2 ++ ports/atmel-samd/boards/pygamer/pins.c | 2 ++ ports/atmel-samd/boards/pyportal/pins.c | 2 ++ ports/atmel-samd/boards/pyportal_titano/pins.c | 2 ++ ports/atmel-samd/boards/pyruler/pins.c | 2 ++ ports/atmel-samd/boards/qtpy_m0/pins.c | 2 ++ ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c | 2 ++ ports/atmel-samd/boards/robohatmm1_m4/pins.c | 2 ++ ports/atmel-samd/boards/sam32/pins.c | 2 ++ ports/atmel-samd/boards/same54_xplained/pins.c | 2 ++ ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c | 2 ++ ports/atmel-samd/boards/seeeduino_xiao/pins.c | 2 ++ ports/atmel-samd/boards/sensebox_mcu/pins.c | 2 ++ ports/atmel-samd/boards/serpente/pins.c | 2 ++ ports/atmel-samd/boards/shirtty/pins.c | 2 ++ ports/atmel-samd/boards/silicognition-m4-shim/pins.c | 2 ++ ports/atmel-samd/boards/snekboard/pins.c | 2 ++ ports/atmel-samd/boards/sparkfun_lumidrive/pins.c | 2 ++ ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c | 2 ++ ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c | 2 ++ ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c | 2 ++ ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c | 2 ++ ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c | 2 ++ ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c | 1 + ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c | 2 ++ ports/atmel-samd/boards/stackrduino_m0_pro/pins.c | 2 ++ ports/atmel-samd/boards/stringcar_m0_express/pins.c | 2 ++ ports/atmel-samd/boards/trellis_m4_express/pins.c | 2 ++ ports/atmel-samd/boards/trinket_m0/pins.c | 2 ++ ports/atmel-samd/boards/trinket_m0_haxpress/pins.c | 2 ++ ports/atmel-samd/boards/uartlogger2/pins.c | 2 ++ ports/atmel-samd/boards/uchip/pins.c | 2 ++ ports/atmel-samd/boards/ugame10/pins.c | 2 ++ ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c | 2 ++ ports/atmel-samd/boards/winterbloom_sol/pins.c | 2 ++ ports/atmel-samd/boards/xinabox_cc03/pins.c | 2 ++ ports/atmel-samd/boards/xinabox_cs11/pins.c | 2 ++ ports/cxd56/boards/spresense/pins.c | 2 ++ ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c | 2 ++ .../boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c | 2 ++ ports/esp32s2/boards/adafruit_funhouse/pins.c | 2 ++ ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c | 2 ++ ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c | 2 ++ ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c | 2 ++ ports/esp32s2/boards/artisense_rd00/pins.c | 2 ++ ports/esp32s2/boards/atmegazero_esp32s2/pins.c | 2 ++ ports/esp32s2/boards/crumpspace_crumps2/pins.c | 2 ++ ports/esp32s2/boards/electroniccats_bastwifi/pins.c | 2 ++ ports/esp32s2/boards/espressif_kaluga_1.3/pins.c | 2 ++ ports/esp32s2/boards/espressif_kaluga_1/pins.c | 2 ++ ports/esp32s2/boards/espressif_saola_1_wroom/pins.c | 2 ++ ports/esp32s2/boards/espressif_saola_1_wrover/pins.c | 2 ++ ports/esp32s2/boards/franzininho_wifi_wroom/pins.c | 2 ++ ports/esp32s2/boards/franzininho_wifi_wrover/pins.c | 2 ++ ports/esp32s2/boards/gravitech_cucumber_m/pins.c | 2 ++ ports/esp32s2/boards/gravitech_cucumber_ms/pins.c | 2 ++ ports/esp32s2/boards/gravitech_cucumber_r/pins.c | 2 ++ ports/esp32s2/boards/gravitech_cucumber_rs/pins.c | 2 ++ ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c | 2 ++ ports/esp32s2/boards/microdev_micro_s2/pins.c | 2 ++ ports/esp32s2/boards/morpheans_morphesp-240/pins.c | 2 ++ ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c | 2 ++ ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c | 2 ++ ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c | 1 + ports/esp32s2/boards/targett_module_clip_wroom/pins.c | 2 ++ ports/esp32s2/boards/targett_module_clip_wrover/pins.c | 2 ++ ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c | 2 ++ .../esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c | 2 ++ ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c | 2 ++ ports/litex/boards/fomu/pins.c | 2 ++ ports/mimxrt10xx/boards/feather_m7_1011/pins.c | 2 ++ ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c | 2 ++ ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c | 2 ++ ports/mimxrt10xx/boards/imxrt1010_evk/pins.c | 2 ++ ports/mimxrt10xx/boards/imxrt1020_evk/pins.c | 2 ++ ports/mimxrt10xx/boards/imxrt1060_evk/pins.c | 2 ++ ports/mimxrt10xx/boards/metro_m7_1011/pins.c | 2 ++ ports/mimxrt10xx/boards/teensy40/pins.c | 2 ++ ports/mimxrt10xx/boards/teensy41/pins.c | 2 ++ ports/nrf/boards/ADM_B_NRF52840_1/pins.c | 2 ++ ports/nrf/boards/TG-Watch/pins.c | 2 ++ ports/nrf/boards/aramcon2_badge/pins.c | 2 ++ ports/nrf/boards/aramcon_badge_2019/pins.c | 2 ++ ports/nrf/boards/arduino_nano_33_ble/pins.c | 2 ++ ports/nrf/boards/bastble/pins.c | 2 ++ ports/nrf/boards/bless_dev_board_multi_sensor/pins.c | 2 ++ ports/nrf/boards/bluemicro840/pins.c | 2 ++ ports/nrf/boards/circuitplayground_bluefruit/pins.c | 2 ++ ports/nrf/boards/clue_nrf52840_express/pins.c | 2 ++ ports/nrf/boards/electronut_labs_blip/pins.c | 2 ++ ports/nrf/boards/electronut_labs_papyr/pins.c | 2 ++ ports/nrf/boards/feather_bluefruit_sense/pins.c | 2 ++ ports/nrf/boards/feather_nrf52840_express/pins.c | 2 ++ ports/nrf/boards/hiibot_bluefi/pins.c | 2 ++ ports/nrf/boards/ikigaisense_vita/pins.c | 2 ++ ports/nrf/boards/itsybitsy_nrf52840_express/pins.c | 2 ++ ports/nrf/boards/makerdiary_m60_keyboard/pins.c | 2 ++ ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c | 2 ++ ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c | 2 ++ ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c | 2 ++ ports/nrf/boards/metro_nrf52840_express/pins.c | 2 ++ ports/nrf/boards/microbit_v2/pins.c | 2 ++ ports/nrf/boards/nice_nano/pins.c | 2 ++ ports/nrf/boards/ohs2020_badge/pins.c | 2 ++ ports/nrf/boards/particle_argon/pins.c | 2 ++ ports/nrf/boards/particle_boron/pins.c | 2 ++ ports/nrf/boards/particle_xenon/pins.c | 2 ++ ports/nrf/boards/pca10056/pins.c | 2 ++ ports/nrf/boards/pca10059/pins.c | 2 ++ ports/nrf/boards/pca10100/pins.c | 2 ++ ports/nrf/boards/pitaya_go/pins.c | 2 ++ ports/nrf/boards/raytac_mdbt50q-db-40/pins.c | 2 ++ ports/nrf/boards/raytac_mdbt50q-rx/pins.c | 2 ++ ports/nrf/boards/simmel/pins.c | 2 ++ ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c | 1 + ports/nrf/boards/sparkfun_nrf52840_mini/pins.c | 2 ++ ports/nrf/boards/teknikio_bluebird/pins.c | 2 ++ ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c | 2 ++ ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c | 2 ++ ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c | 2 ++ ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c | 2 ++ ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c | 2 ++ ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c | 2 ++ ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c | 2 ++ ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c | 2 ++ ports/raspberrypi/boards/pimoroni_interstate75/pins.c | 2 ++ ports/raspberrypi/boards/pimoroni_keybow2040/pins.c | 2 ++ ports/raspberrypi/boards/pimoroni_pga2040/pins.c | 2 ++ ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c | 2 ++ ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c | 2 ++ ports/raspberrypi/boards/pimoroni_picosystem/pins.c | 2 ++ ports/raspberrypi/boards/pimoroni_plasma2040/pins.c | 2 ++ ports/raspberrypi/boards/pimoroni_tiny2040/pins.c | 2 ++ ports/raspberrypi/boards/raspberry_pi_pico/pins.c | 2 ++ ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c | 1 + ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c | 2 ++ ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c | 2 ++ ports/stm/boards/espruino_pico/pins.c | 2 ++ ports/stm/boards/espruino_wifi/pins.c | 2 ++ ports/stm/boards/feather_stm32f405_express/pins.c | 2 ++ ports/stm/boards/meowbit_v121/pins.c | 2 ++ ports/stm/boards/nucleo_f746zg/pins.c | 2 ++ ports/stm/boards/nucleo_f767zi/pins.c | 2 ++ ports/stm/boards/nucleo_h743zi_2/pins.c | 2 ++ ports/stm/boards/openmv_h7/pins.c | 2 ++ ports/stm/boards/pyb_nano_v2/pins.c | 2 ++ ports/stm/boards/pyboard_v11/pins.c | 2 ++ ports/stm/boards/sparkfun_stm32f405_micromod/pins.c | 2 ++ ports/stm/boards/stm32f411ce_blackpill/pins.c | 2 ++ ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c | 2 ++ ports/stm/boards/stm32f411ve_discovery/pins.c | 2 ++ ports/stm/boards/stm32f412zg_discovery/pins.c | 2 ++ ports/stm/boards/stm32f4_discovery/pins.c | 2 ++ ports/stm/boards/stm32f746g_discovery/pins.c | 2 ++ ports/stm/boards/thunderpack_v11/pins.c | 2 ++ ports/stm/boards/thunderpack_v12/pins.c | 2 ++ ports/stm/tools/parse_pins_csv.py | 1 + shared-bindings/board/__init__.h | 2 ++ 229 files changed, 453 insertions(+) diff --git a/ports/atmel-samd/boards/8086_commander/pins.c b/ports/atmel-samd/boards/8086_commander/pins.c index 728da3f6b2..36055ba62e 100644 --- a/ports/atmel-samd/boards/8086_commander/pins.c +++ b/ports/atmel-samd/boards/8086_commander/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Serial { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, // RX diff --git a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c index df8dfb0bfa..9ea0d7d0fa 100644 --- a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_PA28) }, diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c index 21410f8ad1..c6ff8fbb0d 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_INTERRUPT), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_TOUCH2), MP_ROM_PTR(&pin_PA03) }, diff --git a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c index 95e3fef822..dff9cbb935 100644 --- a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_ROTA), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_ROTB), MP_ROM_PTR(&pin_PA00) }, diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c index e23b80d4c7..84db30bbc6 100644 --- a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_POTENTIOMETER), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c b/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c index 129a3eed9c..0660e01494 100644 --- a/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c +++ b/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/arduino_mkr1300/pins.c b/ports/atmel-samd/boards/arduino_mkr1300/pins.c index 5f08cfb9ae..4436661acc 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/pins.c +++ b/ports/atmel-samd/boards/arduino_mkr1300/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB03) }, diff --git a/ports/atmel-samd/boards/arduino_mkrzero/pins.c b/ports/atmel-samd/boards/arduino_mkrzero/pins.c index 490d12d613..3b68c727ca 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/pins.c +++ b/ports/atmel-samd/boards/arduino_mkrzero/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB03) }, diff --git a/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c b/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c index 7269f2ad3f..61e76ed0d8 100644 --- a/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c +++ b/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA11) }, diff --git a/ports/atmel-samd/boards/arduino_zero/pins.c b/ports/atmel-samd/boards/arduino_zero/pins.c index ec53e80166..5944b55e1a 100644 --- a/ports/atmel-samd/boards/arduino_zero/pins.c +++ b/ports/atmel-samd/boards/arduino_zero/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c b/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c index 3ed940e362..f5567c912f 100644 --- a/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c +++ b/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c index 323f71dec2..cfd9fb8b89 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index 8a97842e20..71c636580a 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -4,6 +4,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PB07) }, diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c index 8eeab8a9a5..3ba40b636b 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PB07) }, diff --git a/ports/atmel-samd/boards/blm_badge/pins.c b/ports/atmel-samd/boards/blm_badge/pins.c index 805a713893..28b602e5d1 100644 --- a/ports/atmel-samd/boards/blm_badge/pins.c +++ b/ports/atmel-samd/boards/blm_badge/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA01) }, // pad 1 { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA01) }, diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/pins.c b/ports/atmel-samd/boards/capablerobot_usbhub/pins.c index f7ad82c579..7b9fad792c 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/pins.c +++ b/ports/atmel-samd/boards/capablerobot_usbhub/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ANMB), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_ANVLIM), MP_ROM_PTR(&pin_PA04) }, { MP_OBJ_NEW_QSTR(MP_QSTR_AN5V), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/catwan_usbstick/pins.c b/ports/atmel-samd/boards/catwan_usbstick/pins.c index b7eb7f2115..707602e82f 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/pins.c +++ b/ports/atmel-samd/boards/catwan_usbstick/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA30) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA31) }, { MP_ROM_QSTR(MP_QSTR_RFM9X_D0), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c b/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c index 9e8b72784c..3b3612f83c 100644 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c index b7cc0f41a7..ab7f67072e 100755 --- a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c +++ b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB04) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB05) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express/pins.c b/ports/atmel-samd/boards/circuitplayground_express/pins.c index 1c14ee2322..e8b96b9fdf 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c index 1c14ee2322..e8b96b9fdf 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c b/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c index 1c14ee2322..e8b96b9fdf 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/cp32-m4/pins.c b/ports/atmel-samd/boards/cp32-m4/pins.c index 1946c9d3ab..0fb5a4a560 100644 --- a/ports/atmel-samd/boards/cp32-m4/pins.c +++ b/ports/atmel-samd/boards/cp32-m4/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_P), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_N), MP_ROM_PTR(&pin_PA05) }, { MP_OBJ_NEW_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/cp_sapling_m0/pins.c b/ports/atmel-samd/boards/cp_sapling_m0/pins.c index d527aaddcb..5b84a81a63 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c b/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c index dcc410572b..b5e9a879a1 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA19) }, diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c index d527aaddcb..5b84a81a63 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/datalore_ip_m4/pins.c b/ports/atmel-samd/boards/datalore_ip_m4/pins.c index 4eb26dd21b..5fb7976e70 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/pins.c +++ b/ports/atmel-samd/boards/datalore_ip_m4/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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_PA06) }, diff --git a/ports/atmel-samd/boards/datum_distance/pins.c b/ports/atmel-samd/boards/datum_distance/pins.c index 78d2ed28f7..2b8c43c743 100644 --- a/ports/atmel-samd/boards/datum_distance/pins.c +++ b/ports/atmel-samd/boards/datum_distance/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/datum_imu/pins.c b/ports/atmel-samd/boards/datum_imu/pins.c index 938c0c38ba..bc53555ab4 100644 --- a/ports/atmel-samd/boards/datum_imu/pins.c +++ b/ports/atmel-samd/boards/datum_imu/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, diff --git a/ports/atmel-samd/boards/datum_light/pins.c b/ports/atmel-samd/boards/datum_light/pins.c index 78d2ed28f7..2b8c43c743 100644 --- a/ports/atmel-samd/boards/datum_light/pins.c +++ b/ports/atmel-samd/boards/datum_light/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/datum_weather/pins.c b/ports/atmel-samd/boards/datum_weather/pins.c index 93147a335d..cba4919851 100644 --- a/ports/atmel-samd/boards/datum_weather/pins.c +++ b/ports/atmel-samd/boards/datum_weather/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/dynalora_usb/pins.c b/ports/atmel-samd/boards/dynalora_usb/pins.c index 25f4985432..79fb2b9172 100644 --- a/ports/atmel-samd/boards/dynalora_usb/pins.c +++ b/ports/atmel-samd/boards/dynalora_usb/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c index c9eceac0a2..ce7b4d0117 100644 --- a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c +++ b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB10) }, diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c index 54f51f85d4..06e638527e 100644 --- a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c +++ b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/escornabot_makech/pins.c b/ports/atmel-samd/boards/escornabot_makech/pins.c index 44cb307739..0d5e1c1860 100644 --- a/ports/atmel-samd/boards/escornabot_makech/pins.c +++ b/ports/atmel-samd/boards/escornabot_makech/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // LEDs { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c index 34017ccaad..1e6bcc2cac 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c +++ b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/feather_m0_basic/pins.c b/ports/atmel-samd/boards/feather_m0_basic/pins.c index 3c967753c3..a9b1a360b3 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/pins.c +++ b/ports/atmel-samd/boards/feather_m0_basic/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/feather_m0_express/pins.c b/ports/atmel-samd/boards/feather_m0_express/pins.c index 19320ca794..392af69d13 100644 --- a/ports/atmel-samd/boards/feather_m0_express/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c index 19320ca794..392af69d13 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c index ea1b4366c3..0342512de7 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c +++ b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c index 3a7386c2d5..002cc4fdad 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/feather_m0_supersized/pins.c b/ports/atmel-samd/boards/feather_m0_supersized/pins.c index 19320ca794..392af69d13 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/pins.c +++ b/ports/atmel-samd/boards/feather_m0_supersized/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/feather_m4_can/pins.c b/ports/atmel-samd/boards/feather_m4_can/pins.c index b6a568f421..35352085c1 100644 --- a/ports/atmel-samd/boards/feather_m4_can/pins.c +++ b/ports/atmel-samd/boards/feather_m4_can/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m4_express/pins.c b/ports/atmel-samd/boards/feather_m4_express/pins.c index a30f4179c7..129fb2fb9b 100644 --- a/ports/atmel-samd/boards/feather_m4_express/pins.c +++ b/ports/atmel-samd/boards/feather_m4_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/fluff_m0/pins.c b/ports/atmel-samd/boards/fluff_m0/pins.c index 6b56297afe..36def1ca5b 100644 --- a/ports/atmel-samd/boards/fluff_m0/pins.c +++ b/ports/atmel-samd/boards/fluff_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/gemma_m0/pins.c b/ports/atmel-samd/boards/gemma_m0/pins.c index bb6e9bda53..ee513bfe0a 100644 --- a/ports/atmel-samd/boards/gemma_m0/pins.c +++ b/ports/atmel-samd/boards/gemma_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // pad 1 { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c index 7db9491dd3..285522e747 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c +++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c @@ -17,6 +17,8 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/hallowing_m0_express/pins.c b/ports/atmel-samd/boards/hallowing_m0_express/pins.c index b00875ea4a..30f6746ea6 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/pins.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/hallowing_m4_express/pins.c b/ports/atmel-samd/boards/hallowing_m4_express/pins.c index 935f1a0b47..6d6585d567 100644 --- a/ports/atmel-samd/boards/hallowing_m4_express/pins.c +++ b/ports/atmel-samd/boards/hallowing_m4_express/pins.c @@ -3,6 +3,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/huntercat_nfc/pins.c b/ports/atmel-samd/boards/huntercat_nfc/pins.c index 12b0d93480..32c459f80a 100644 --- a/ports/atmel-samd/boards/huntercat_nfc/pins.c +++ b/ports/atmel-samd/boards/huntercat_nfc/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA00) }, diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c index c2d5882ecc..1dc5b282dc 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c index 88c3fbe495..5c5b82676d 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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) }, diff --git a/ports/atmel-samd/boards/kicksat-sprite/pins.c b/ports/atmel-samd/boards/kicksat-sprite/pins.c index 711406189d..31feaee13a 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/pins.c +++ b/ports/atmel-samd/boards/kicksat-sprite/pins.c @@ -2,6 +2,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c b/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c index 76f4c0657c..9c7bcce6cc 100644 --- a/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c +++ b/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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) }, diff --git a/ports/atmel-samd/boards/matrixportal_m4/pins.c b/ports/atmel-samd/boards/matrixportal_m4/pins.c index 4bd0a0df7e..ffbe9ad575 100644 --- a/ports/atmel-samd/boards/matrixportal_m4/pins.c +++ b/ports/atmel-samd/boards/matrixportal_m4/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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_PA04) }, diff --git a/ports/atmel-samd/boards/meowmeow/pins.c b/ports/atmel-samd/boards/meowmeow/pins.c index da128fef40..840c7ee13d 100644 --- a/ports/atmel-samd/boards/meowmeow/pins.c +++ b/ports/atmel-samd/boards/meowmeow/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/metro_m0_express/pins.c b/ports/atmel-samd/boards/metro_m0_express/pins.c index eba885cb78..a67f905929 100644 --- a/ports/atmel-samd/boards/metro_m0_express/pins.c +++ b/ports/atmel-samd/boards/metro_m0_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c b/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c index 4e90870c49..0f93f98d19 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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_PA06) }, diff --git a/ports/atmel-samd/boards/metro_m4_express/pins.c b/ports/atmel-samd/boards/metro_m4_express/pins.c index 8b04072917..72fe98f403 100644 --- a/ports/atmel-samd/boards/metro_m4_express/pins.c +++ b/ports/atmel-samd/boards/metro_m4_express/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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_PA06) }, diff --git a/ports/atmel-samd/boards/mini_sam_m4/pins.c b/ports/atmel-samd/boards/mini_sam_m4/pins.c index b1d8d5325c..e2f1283598 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/pins.c +++ b/ports/atmel-samd/boards/mini_sam_m4/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/monster_m4sk/pins.c b/ports/atmel-samd/boards/monster_m4sk/pins.c index eb5cfd3965..a23873a073 100644 --- a/ports/atmel-samd/boards/monster_m4sk/pins.c +++ b/ports/atmel-samd/boards/monster_m4sk/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_HEADPHONE_LEFT), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c index ebfa9c36f0..86acc4ac11 100644 --- a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c +++ b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA11) }, diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c index 8c296f81e8..d3719b1159 100644 --- a/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c +++ b/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA07) }, diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c b/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c index 3673fcbeca..e266afccf2 100644 --- a/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH1), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_TOUCH2), MP_ROM_PTR(&pin_PA07) }, diff --git a/ports/atmel-samd/boards/nfc_copy_cat/pins.c b/ports/atmel-samd/boards/nfc_copy_cat/pins.c index ebe6e89e47..86f58988f8 100644 --- a/ports/atmel-samd/boards/nfc_copy_cat/pins.c +++ b/ports/atmel-samd/boards/nfc_copy_cat/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA02) }, // IRQ { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA06) }, // IN_A { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA07) }, // IN_B diff --git a/ports/atmel-samd/boards/openbook_m4/pins.c b/ports/atmel-samd/boards/openbook_m4/pins.c index 8bd108b45c..794f5409f8 100644 --- a/ports/atmel-samd/boards/openbook_m4/pins.c +++ b/ports/atmel-samd/boards/openbook_m4/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, // A0 = audio right channel { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // A1 = audio left channel { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/pewpew10/pins.c b/ports/atmel-samd/boards/pewpew10/pins.c index 9e5b9d98ec..8c54a2f4cf 100644 --- a/ports/atmel-samd/boards/pewpew10/pins.c +++ b/ports/atmel-samd/boards/pewpew10/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Pins for internal use. { MP_ROM_QSTR(MP_QSTR__R1), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR__R2), MP_ROM_PTR(&pin_PA11) }, diff --git a/ports/atmel-samd/boards/pewpew_m4/pins.c b/ports/atmel-samd/boards/pewpew_m4/pins.c index 7654432f57..f668cd2b2d 100644 --- a/ports/atmel-samd/boards/pewpew_m4/pins.c +++ b/ports/atmel-samd/boards/pewpew_m4/pins.c @@ -2,6 +2,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LEFT), MP_ROM_PTR(&pin_PB23) }, { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_RIGHT), MP_ROM_PTR(&pin_PB22) }, { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_UP), MP_ROM_PTR(&pin_PA23) }, diff --git a/ports/atmel-samd/boards/picoplanet/pins.c b/ports/atmel-samd/boards/picoplanet/pins.c index 0f56bfb6d5..0f9f7bf850 100644 --- a/ports/atmel-samd/boards/picoplanet/pins.c +++ b/ports/atmel-samd/boards/picoplanet/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/pybadge/pins.c b/ports/atmel-samd/boards/pybadge/pins.c index 8757adb8e1..efc578bc49 100644 --- a/ports/atmel-samd/boards/pybadge/pins.c +++ b/ports/atmel-samd/boards/pybadge/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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) }, diff --git a/ports/atmel-samd/boards/pycubed/pins.c b/ports/atmel-samd/boards/pycubed/pins.c index 93f349ffa4..71c4126e41 100644 --- a/ports/atmel-samd/boards/pycubed/pins.c +++ b/ports/atmel-samd/boards/pycubed/pins.c @@ -2,6 +2,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA14) }, diff --git a/ports/atmel-samd/boards/pycubed_mram/pins.c b/ports/atmel-samd/boards/pycubed_mram/pins.c index 93f349ffa4..71c4126e41 100644 --- a/ports/atmel-samd/boards/pycubed_mram/pins.c +++ b/ports/atmel-samd/boards/pycubed_mram/pins.c @@ -2,6 +2,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA14) }, diff --git a/ports/atmel-samd/boards/pygamer/pins.c b/ports/atmel-samd/boards/pygamer/pins.c index 9fa68dd81d..d1dce2df19 100644 --- a/ports/atmel-samd/boards/pygamer/pins.c +++ b/ports/atmel-samd/boards/pygamer/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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) }, diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c index d7cde230a1..aad53447ee 100644 --- a/ports/atmel-samd/boards/pyportal/pins.c +++ b/ports/atmel-samd/boards/pyportal/pins.c @@ -7,6 +7,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, // analog out/in diff --git a/ports/atmel-samd/boards/pyportal_titano/pins.c b/ports/atmel-samd/boards/pyportal_titano/pins.c index d7cde230a1..aad53447ee 100644 --- a/ports/atmel-samd/boards/pyportal_titano/pins.c +++ b/ports/atmel-samd/boards/pyportal_titano/pins.c @@ -7,6 +7,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, // analog out/in diff --git a/ports/atmel-samd/boards/pyruler/pins.c b/ports/atmel-samd/boards/pyruler/pins.c index 37538cae5f..b8996f800a 100644 --- a/ports/atmel-samd/boards/pyruler/pins.c +++ b/ports/atmel-samd/boards/pyruler/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/qtpy_m0/pins.c b/ports/atmel-samd/boards/qtpy_m0/pins.c index 636c48bffc..f4ebcd08fe 100644 --- a/ports/atmel-samd/boards/qtpy_m0/pins.c +++ b/ports/atmel-samd/boards/qtpy_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c b/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c index 636c48bffc..f4ebcd08fe 100644 --- a/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c +++ b/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/robohatmm1_m4/pins.c b/ports/atmel-samd/boards/robohatmm1_m4/pins.c index 32959ef3f2..9d12b38ec3 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/pins.c +++ b/ports/atmel-samd/boards/robohatmm1_m4/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" // Version 2.4 STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // SERVO Pins { MP_ROM_QSTR(MP_QSTR_SERVO1), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_SERVO2), MP_ROM_PTR(&pin_PA19) }, diff --git a/ports/atmel-samd/boards/sam32/pins.c b/ports/atmel-samd/boards/sam32/pins.c index 463615960f..e8cdb9c68c 100644 --- a/ports/atmel-samd/boards/sam32/pins.c +++ b/ports/atmel-samd/boards/sam32/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_PB09) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB04) }, diff --git a/ports/atmel-samd/boards/same54_xplained/pins.c b/ports/atmel-samd/boards/same54_xplained/pins.c index 1ed431fbad..0a35f9ed82 100644 --- a/ports/atmel-samd/boards/same54_xplained/pins.c +++ b/ports/atmel-samd/boards/same54_xplained/pins.c @@ -17,6 +17,8 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PD08) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PD09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_VSYNC), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c b/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c index fb043349f3..4d0e5775d5 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c @@ -2,6 +2,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog pins { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/seeeduino_xiao/pins.c b/ports/atmel-samd/boards/seeeduino_xiao/pins.c index 8b96902531..4f7825ee74 100644 --- a/ports/atmel-samd/boards/seeeduino_xiao/pins.c +++ b/ports/atmel-samd/boards/seeeduino_xiao/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog pins { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/sensebox_mcu/pins.c b/ports/atmel-samd/boards/sensebox_mcu/pins.c index 55afcc989e..e5285e1af6 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/pins.c +++ b/ports/atmel-samd/boards/sensebox_mcu/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog pins { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/serpente/pins.c b/ports/atmel-samd/boards/serpente/pins.c index 7b7b14799e..68798840d5 100644 --- a/ports/atmel-samd/boards/serpente/pins.c +++ b/ports/atmel-samd/boards/serpente/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/atmel-samd/boards/shirtty/pins.c b/ports/atmel-samd/boards/shirtty/pins.c index 40e8192341..1cd713840c 100644 --- a/ports/atmel-samd/boards/shirtty/pins.c +++ b/ports/atmel-samd/boards/shirtty/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c index 287890df35..177c1e344c 100644 --- a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c +++ b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/snekboard/pins.c b/ports/atmel-samd/boards/snekboard/pins.c index ec4becc0f7..e55d4e3e77 100644 --- a/ports/atmel-samd/boards/snekboard/pins.c +++ b/ports/atmel-samd/boards/snekboard/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c b/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c index 692fc6c1ca..fc89de85d9 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) }, diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c index 58113dd47f..c55b981e6f 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c index 58113dd47f..c55b981e6f 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c b/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c index 833de278ec..2f30e73103 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c b/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c index 039100956e..57312b08ae 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog pins { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c index a90b0b5a30..faef8045ee 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog pins { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c b/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c index 2233635084..3944cf0bf0 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c @@ -28,6 +28,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). diff --git a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c index a9ac6d98a9..fa5b6c32e1 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c b/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c index 349ce61a9f..49d88bb876 100644 --- a/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c +++ b/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/stringcar_m0_express/pins.c b/ports/atmel-samd/boards/stringcar_m0_express/pins.c index 8bdfae9541..ef880be1bd 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/pins.c +++ b/ports/atmel-samd/boards/stringcar_m0_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_PIEZO), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/trellis_m4_express/pins.c b/ports/atmel-samd/boards/trellis_m4_express/pins.c index 6573b5fab3..2d3d110cf1 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/pins.c +++ b/ports/atmel-samd/boards/trellis_m4_express/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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_PA04) }, // INT pin diff --git a/ports/atmel-samd/boards/trinket_m0/pins.c b/ports/atmel-samd/boards/trinket_m0/pins.c index b793190650..014af8be8d 100644 --- a/ports/atmel-samd/boards/trinket_m0/pins.c +++ b/ports/atmel-samd/boards/trinket_m0/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c index b793190650..014af8be8d 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/uartlogger2/pins.c b/ports/atmel-samd/boards/uartlogger2/pins.c index 4e90870c49..0f93f98d19 100644 --- a/ports/atmel-samd/boards/uartlogger2/pins.c +++ b/ports/atmel-samd/boards/uartlogger2/pins.c @@ -4,6 +4,8 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { 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_PA06) }, diff --git a/ports/atmel-samd/boards/uchip/pins.c b/ports/atmel-samd/boards/uchip/pins.c index de5508110d..384950182a 100644 --- a/ports/atmel-samd/boards/uchip/pins.c +++ b/ports/atmel-samd/boards/uchip/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_BOOST_EN), MP_ROM_PTR(&pin_PA14) }, { MP_ROM_QSTR(MP_QSTR_VEXT_SELECT), MP_ROM_PTR(&pin_PA15) }, diff --git a/ports/atmel-samd/boards/ugame10/pins.c b/ports/atmel-samd/boards/ugame10/pins.c index 4a03f8bb5c..fa01e434b5 100644 --- a/ports/atmel-samd/boards/ugame10/pins.c +++ b/ports/atmel-samd/boards/ugame10/pins.c @@ -2,6 +2,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_X), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_O), MP_ROM_PTR(&pin_PA01) }, diff --git a/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c b/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c index a079929447..482a64061a 100644 --- a/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c +++ b/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_HONK_OUT), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_GATE_OUT), MP_ROM_PTR(&pin_PA11) }, diff --git a/ports/atmel-samd/boards/winterbloom_sol/pins.c b/ports/atmel-samd/boards/winterbloom_sol/pins.c index 013542d3ca..d0514dbbc9 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/pins.c +++ b/ports/atmel-samd/boards/winterbloom_sol/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) }, diff --git a/ports/atmel-samd/boards/xinabox_cc03/pins.c b/ports/atmel-samd/boards/xinabox_cc03/pins.c index a5d459796c..b33425c8f4 100644 --- a/ports/atmel-samd/boards/xinabox_cc03/pins.c +++ b/ports/atmel-samd/boards/xinabox_cc03/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, diff --git a/ports/atmel-samd/boards/xinabox_cs11/pins.c b/ports/atmel-samd/boards/xinabox_cs11/pins.c index f0ef0da674..fb0c23e7a4 100644 --- a/ports/atmel-samd/boards/xinabox_cs11/pins.c +++ b/ports/atmel-samd/boards/xinabox_cs11/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_PA09) }, diff --git a/ports/cxd56/boards/spresense/pins.c b/ports/cxd56/boards/spresense/pins.c index 5028d91556..0896ed9579 100644 --- a/ports/cxd56/boards/spresense/pins.c +++ b/ports/cxd56/boards/spresense/pins.c @@ -40,6 +40,8 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { }; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_UART2_RXD) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_UART2_TXD) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_HIF_IRQ_OUT) }, diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c index 848c2c44ff..8fad0a6e9b 100644 --- a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c index ba0bd29784..78e2631ae3 100644 --- a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c @@ -3,6 +3,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, diff --git a/ports/esp32s2/boards/adafruit_funhouse/pins.c b/ports/esp32s2/boards/adafruit_funhouse/pins.c index 9728512c0e..c993d5ccf5 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/pins.c +++ b/ports/esp32s2/boards/adafruit_funhouse/pins.c @@ -3,6 +3,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO40) }, diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c index 990cfd9957..4067db9425 100644 --- a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c +++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c @@ -3,6 +3,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c b/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c index dbd6cfef8d..0dd98cd734 100644 --- a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c +++ b/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c index a8ca8ba3ed..f1245f1217 100644 --- a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c +++ b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/artisense_rd00/pins.c b/ports/esp32s2/boards/artisense_rd00/pins.c index 3cd05f5b3c..61596754bd 100644 --- a/ports/esp32s2/boards/artisense_rd00/pins.c +++ b/ports/esp32s2/boards/artisense_rd00/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO6) }, diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c b/ports/esp32s2/boards/atmegazero_esp32s2/pins.c index 96dd940985..17479bfc92 100644 --- a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c +++ b/ports/esp32s2/boards/atmegazero_esp32s2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/crumpspace_crumps2/pins.c b/ports/esp32s2/boards/crumpspace_crumps2/pins.c index 278f1ab7bd..56bdc7f802 100644 --- a/ports/esp32s2/boards/crumpspace_crumps2/pins.c +++ b/ports/esp32s2/boards/crumpspace_crumps2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/electroniccats_bastwifi/pins.c b/ports/esp32s2/boards/electroniccats_bastwifi/pins.c index 2f9987b0ed..2d609a1ec6 100644 --- a/ports/esp32s2/boards/electroniccats_bastwifi/pins.c +++ b/ports/esp32s2/boards/electroniccats_bastwifi/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c b/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c index 557a0977c1..536f7e91c6 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c +++ b/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c @@ -17,6 +17,8 @@ STATIC const mp_rom_obj_tuple_t camera_data_tuple = { }; STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/espressif_kaluga_1/pins.c b/ports/esp32s2/boards/espressif_kaluga_1/pins.c index f28062a164..2f96e8def2 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1/pins.c +++ b/ports/esp32s2/boards/espressif_kaluga_1/pins.c @@ -17,6 +17,8 @@ STATIC const mp_rom_obj_tuple_t camera_data_tuple = { }; STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c b/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c index 0562d9331f..d01c7d76d8 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c index 0562d9331f..d01c7d76d8 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c b/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c index 0562d9331f..d01c7d76d8 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c b/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c index 0562d9331f..d01c7d76d8 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/pins.c b/ports/esp32s2/boards/gravitech_cucumber_m/pins.c index 0d8bde1919..f09a0e318f 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_m/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_m/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c b/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c index 980e153995..7c43bd41f4 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/pins.c b/ports/esp32s2/boards/gravitech_cucumber_r/pins.c index 0d8bde1919..f09a0e318f 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_r/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_r/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c b/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c index 980e153995..7c43bd41f4 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c index a30c6797a5..a9a4893280 100644 --- a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c +++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c @@ -2,6 +2,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/microdev_micro_s2/pins.c b/ports/esp32s2/boards/microdev_micro_s2/pins.c index bd230ed38f..18dadb716c 100644 --- a/ports/esp32s2/boards/microdev_micro_s2/pins.c +++ b/ports/esp32s2/boards/microdev_micro_s2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c index f311daeaa2..52c12445da 100644 --- a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c +++ b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c @@ -2,6 +2,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c b/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c index 0562d9331f..d01c7d76d8 100644 --- a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c +++ b/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c b/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c index 0562d9331f..d01c7d76d8 100644 --- a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c +++ b/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c index 9396b536f3..d34fbc9e21 100644 --- a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c +++ b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c @@ -1,6 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO21) }, diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/pins.c b/ports/esp32s2/boards/targett_module_clip_wroom/pins.c index a8ca8ba3ed..f1245f1217 100644 --- a/ports/esp32s2/boards/targett_module_clip_wroom/pins.c +++ b/ports/esp32s2/boards/targett_module_clip_wroom/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c index a8ca8ba3ed..f1245f1217 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c +++ b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c index a4967992a8..445900b7fe 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) }, diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c index 57ac27aeb9..4d5b45de8c 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO17) }, diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c b/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c index 9815cf288d..0c58dcdad5 100644 --- a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/litex/boards/fomu/pins.c b/ports/litex/boards/fomu/pins.c index 804a8b37f9..ec990adefd 100644 --- a/ports/litex/boards/fomu/pins.c +++ b/ports/litex/boards/fomu/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH1), MP_ROM_PTR(&pin_TOUCH1) }, { MP_ROM_QSTR(MP_QSTR_TOUCH2), MP_ROM_PTR(&pin_TOUCH2) }, { MP_ROM_QSTR(MP_QSTR_TOUCH3), MP_ROM_PTR(&pin_TOUCH3) }, diff --git a/ports/mimxrt10xx/boards/feather_m7_1011/pins.c b/ports/mimxrt10xx/boards/feather_m7_1011/pins.c index f08173943e..7f56cb7819 100644 --- a/ports/mimxrt10xx/boards/feather_m7_1011/pins.c +++ b/ports/mimxrt10xx/boards/feather_m7_1011/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_11) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_10) }, diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c b/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c index 4d2536a941..6da54626bf 100644 --- a/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c +++ b/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_14) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_11) }, diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c b/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c index 9747aefd19..b05d4c4ab2 100644 --- a/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c +++ b/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B0_13) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_B1_10) }, diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c index 46b590edd3..8c0dc57b15 100644 --- a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_10) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_AD_05) }, diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c index 0e665bef32..728958f29e 100644 --- a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_AD_B1_08) }, diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c index 11e21bd983..80659839ec 100644 --- a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_AD_B1_06) }, diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c index fe9db8c634..f97ff90d7e 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c +++ b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_01) }, diff --git a/ports/mimxrt10xx/boards/teensy40/pins.c b/ports/mimxrt10xx/boards/teensy40/pins.c index 83aa986729..e74dc7d9d1 100644 --- a/ports/mimxrt10xx/boards/teensy40/pins.c +++ b/ports/mimxrt10xx/boards/teensy40/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // With USB on left. Bottom edge. { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, diff --git a/ports/mimxrt10xx/boards/teensy41/pins.c b/ports/mimxrt10xx/boards/teensy41/pins.c index c54db941a9..d83d3de9e5 100644 --- a/ports/mimxrt10xx/boards/teensy41/pins.c +++ b/ports/mimxrt10xx/boards/teensy41/pins.c @@ -3,6 +3,8 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // With USB on left. Bottom edge. { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, diff --git a/ports/nrf/boards/ADM_B_NRF52840_1/pins.c b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c index 83be4f0ac7..fc7425f751 100644 --- a/ports/nrf/boards/ADM_B_NRF52840_1/pins.c +++ b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) }, diff --git a/ports/nrf/boards/TG-Watch/pins.c b/ports/nrf/boards/TG-Watch/pins.c index 275b89b226..003bdb9967 100644 --- a/ports/nrf/boards/TG-Watch/pins.c +++ b/ports/nrf/boards/TG-Watch/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + /* default ports */ { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/nrf/boards/aramcon2_badge/pins.c b/ports/nrf/boards/aramcon2_badge/pins.c index 0a44f0d5a9..e83decdccf 100644 --- a/ports/nrf/boards/aramcon2_badge/pins.c +++ b/ports/nrf/boards/aramcon2_badge/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_UP_BUTTON), MP_ROM_PTR(&pin_P0_31) }, { MP_ROM_QSTR(MP_QSTR_LEFT_BUTTON), MP_ROM_PTR(&pin_P0_29) }, { MP_ROM_QSTR(MP_QSTR_DOWN_BUTTON), MP_ROM_PTR(&pin_P1_13) }, diff --git a/ports/nrf/boards/aramcon_badge_2019/pins.c b/ports/nrf/boards/aramcon_badge_2019/pins.c index 82ab200131..9f65ecb829 100644 --- a/ports/nrf/boards/aramcon_badge_2019/pins.c +++ b/ports/nrf/boards/aramcon_badge_2019/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_LEFT_BUTTON), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_MIDDLE_BUTTON), MP_ROM_PTR(&pin_P0_29) }, { MP_ROM_QSTR(MP_QSTR_RIGHT_BUTTON), MP_ROM_PTR(&pin_P0_31) }, diff --git a/ports/nrf/boards/arduino_nano_33_ble/pins.c b/ports/nrf/boards/arduino_nano_33_ble/pins.c index 9cdd369331..c039e92c6c 100644 --- a/ports/nrf/boards/arduino_nano_33_ble/pins.c +++ b/ports/nrf/boards/arduino_nano_33_ble/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_12) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_15) }, diff --git a/ports/nrf/boards/bastble/pins.c b/ports/nrf/boards/bastble/pins.c index b35dad43de..ac9d3c5df7 100644 --- a/ports/nrf/boards/bastble/pins.c +++ b/ports/nrf/boards/bastble/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_00) }, diff --git a/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c b/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c index c6010a8c33..8af2eeab7b 100644 --- a/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c +++ b/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_02) }, // TP7 { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P0_03) }, // TP6 { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P0_04) }, // LED1 diff --git a/ports/nrf/boards/bluemicro840/pins.c b/ports/nrf/boards/bluemicro840/pins.c index e33aff2bfa..24b3d8c611 100644 --- a/ports/nrf/boards/bluemicro840/pins.c +++ b/ports/nrf/boards/bluemicro840/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/circuitplayground_bluefruit/pins.c b/ports/nrf/boards/circuitplayground_bluefruit/pins.c index f600282528..7478b25159 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/pins.c +++ b/ports/nrf/boards/circuitplayground_bluefruit/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO), MP_ROM_PTR(&pin_P0_26) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_26) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_P0_26) }, diff --git a/ports/nrf/boards/clue_nrf52840_express/pins.c b/ports/nrf/boards/clue_nrf52840_express/pins.c index e54272b44b..4f5efcfc77 100644 --- a/ports/nrf/boards/clue_nrf52840_express/pins.c +++ b/ports/nrf/boards/clue_nrf52840_express/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/electronut_labs_blip/pins.c b/ports/nrf/boards/electronut_labs_blip/pins.c index 9a660e989b..9525a39b8e 100644 --- a/ports/nrf/boards/electronut_labs_blip/pins.c +++ b/ports/nrf/boards/electronut_labs_blip/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/electronut_labs_papyr/pins.c b/ports/nrf/boards/electronut_labs_papyr/pins.c index 6912e8ca04..9103f4a978 100644 --- a/ports/nrf/boards/electronut_labs_papyr/pins.c +++ b/ports/nrf/boards/electronut_labs_papyr/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_06) }, diff --git a/ports/nrf/boards/feather_bluefruit_sense/pins.c b/ports/nrf/boards/feather_bluefruit_sense/pins.c index 961bebc8e6..876652c2b7 100644 --- a/ports/nrf/boards/feather_bluefruit_sense/pins.c +++ b/ports/nrf/boards/feather_bluefruit_sense/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_30) }, diff --git a/ports/nrf/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c index 036ec121e7..cf91d74539 100644 --- a/ports/nrf/boards/feather_nrf52840_express/pins.c +++ b/ports/nrf/boards/feather_nrf52840_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_30) }, diff --git a/ports/nrf/boards/hiibot_bluefi/pins.c b/ports/nrf/boards/hiibot_bluefi/pins.c index a34991f801..12b290e9a9 100644 --- a/ports/nrf/boards/hiibot_bluefi/pins.c +++ b/ports/nrf/boards/hiibot_bluefi/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_28) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_28) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/ikigaisense_vita/pins.c b/ports/nrf/boards/ikigaisense_vita/pins.c index 895fa71ec7..8bd6b596ea 100644 --- a/ports/nrf/boards/ikigaisense_vita/pins.c +++ b/ports/nrf/boards/ikigaisense_vita/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_29) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P1_15) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P1_13) }, diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c b/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c index 3afb25de64..a976ae518f 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_30) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/makerdiary_m60_keyboard/pins.c b/ports/nrf/boards/makerdiary_m60_keyboard/pins.c index 82e9dfc5a0..ba4678930c 100644 --- a/ports/nrf/boards/makerdiary_m60_keyboard/pins.c +++ b/ports/nrf/boards/makerdiary_m60_keyboard/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_R1), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_R2), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_R3), MP_ROM_PTR(&pin_P0_07) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c index a8eaab092e..f701d8e704 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c @@ -4,6 +4,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_AIN2), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c index bd0e6e4802..c7c0b4c42b 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_AIN2), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c index 05813bd04a..24a9063bd8 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_AIN2), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/metro_nrf52840_express/pins.c b/ports/nrf/boards/metro_nrf52840_express/pins.c index ab8bf8b5cc..3b94bc1664 100644 --- a/ports/nrf/boards/metro_nrf52840_express/pins.c +++ b/ports/nrf/boards/metro_nrf52840_express/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/microbit_v2/pins.c b/ports/nrf/boards/microbit_v2/pins.c index 4f33b98e5a..deeeb2305d 100644 --- a/ports/nrf/boards/microbit_v2/pins.c +++ b/ports/nrf/boards/microbit_v2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_02) }, // RING0 { MP_ROM_QSTR(MP_QSTR_P1), MP_ROM_PTR(&pin_P0_03) }, // RING1 { MP_ROM_QSTR(MP_QSTR_P2), MP_ROM_PTR(&pin_P0_04) }, // RING2 diff --git a/ports/nrf/boards/nice_nano/pins.c b/ports/nrf/boards/nice_nano/pins.c index 98c1251fe3..a5720569f2 100644 --- a/ports/nrf/boards/nice_nano/pins.c +++ b/ports/nrf/boards/nice_nano/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) }, diff --git a/ports/nrf/boards/ohs2020_badge/pins.c b/ports/nrf/boards/ohs2020_badge/pins.c index 2cf783cc1e..524256cb08 100644 --- a/ports/nrf/boards/ohs2020_badge/pins.c +++ b/ports/nrf/boards/ohs2020_badge/pins.c @@ -2,6 +2,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_25) }, { MP_ROM_QSTR(MP_QSTR_MICROPHONE_DATA), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/particle_argon/pins.c b/ports/nrf/boards/particle_argon/pins.c index 71a20639c0..bf34b9f834 100644 --- a/ports/nrf/boards/particle_argon/pins.c +++ b/ports/nrf/boards/particle_argon/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/particle_boron/pins.c b/ports/nrf/boards/particle_boron/pins.c index 8a2e12c139..2567c37f99 100644 --- a/ports/nrf/boards/particle_boron/pins.c +++ b/ports/nrf/boards/particle_boron/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/particle_xenon/pins.c b/ports/nrf/boards/particle_xenon/pins.c index 08e38530b5..8c9d2b8e2c 100644 --- a/ports/nrf/boards/particle_xenon/pins.c +++ b/ports/nrf/boards/particle_xenon/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/pca10056/pins.c b/ports/nrf/boards/pca10056/pins.c index e00bc8a11e..7a7c01a369 100644 --- a/ports/nrf/boards/pca10056/pins.c +++ b/ports/nrf/boards/pca10056/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0_00), MP_ROM_PTR(&pin_P0_00) }, { MP_ROM_QSTR(MP_QSTR_P0_01), MP_ROM_PTR(&pin_P0_01) }, { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, diff --git a/ports/nrf/boards/pca10059/pins.c b/ports/nrf/boards/pca10059/pins.c index 932b925d17..f4423f101e 100644 --- a/ports/nrf/boards/pca10059/pins.c +++ b/ports/nrf/boards/pca10059/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_P0_05), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/nrf/boards/pca10100/pins.c b/ports/nrf/boards/pca10100/pins.c index dd030bae9a..a99d0fec69 100644 --- a/ports/nrf/boards/pca10100/pins.c +++ b/ports/nrf/boards/pca10100/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, diff --git a/ports/nrf/boards/pitaya_go/pins.c b/ports/nrf/boards/pitaya_go/pins.c index c0f2976a57..c957e92ed2 100644 --- a/ports/nrf/boards/pitaya_go/pins.c +++ b/ports/nrf/boards/pitaya_go/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_AIN2), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c b/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c index 10f42f9027..53c81f642a 100644 --- a/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c +++ b/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/raytac_mdbt50q-rx/pins.c b/ports/nrf/boards/raytac_mdbt50q-rx/pins.c index db5e7f769d..c0d5189308 100644 --- a/ports/nrf/boards/raytac_mdbt50q-rx/pins.c +++ b/ports/nrf/boards/raytac_mdbt50q-rx/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_P0_15) }, diff --git a/ports/nrf/boards/simmel/pins.c b/ports/nrf/boards/simmel/pins.c index e9710967b6..e7e04d4b14 100644 --- a/ports/nrf/boards/simmel/pins.c +++ b/ports/nrf/boards/simmel/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI_CSN), MP_ROM_PTR(&pin_P1_06) }, { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_P1_04) }, { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_P0_09) }, diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c index 11ca39f28d..8b7b1e1ec0 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c @@ -28,6 +28,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c index 026b566ef8..2340341285 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_15) }, // D1/TX { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_17) }, // D0/RX // D2 on qwiic gap diff --git a/ports/nrf/boards/teknikio_bluebird/pins.c b/ports/nrf/boards/teknikio_bluebird/pins.c index 1ff1198a15..d6b0810c32 100644 --- a/ports/nrf/boards/teknikio_bluebird/pins.c +++ b/ports/nrf/boards/teknikio_bluebird/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_12) }, diff --git a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c index 60f1c5969d..126de88f99 100644 --- a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c +++ b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_30) }, diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c index 8d5be961e0..7e380f0f5e 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c index bc8ace4654..6edc395d97 100644 --- a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c index 0f3d20c849..bfae6257f2 100644 --- a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c @@ -2,6 +2,8 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_KEY1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_KEY2), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_KEY3), MP_ROM_PTR(&pin_GPIO3) }, diff --git a/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c b/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c index 1f7dc5eb41..19a897b8dd 100644 --- a/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c +++ b/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO16) }, diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c index e9e726f35a..d611221280 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO29) }, diff --git a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c index 68b42ccd09..385f5de25c 100644 --- a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c +++ b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c b/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c index 869cad17d3..a1f1a7355a 100644 --- a/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c +++ b/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c index 6e3e1a57b7..a967474f05 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c +++ b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_R0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_B0), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c b/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c index c4cdb7b293..8cc6bed865 100644 --- a/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/raspberrypi/boards/pimoroni_pga2040/pins.c b/ports/raspberrypi/boards/pimoroni_pga2040/pins.c index 1ddc885082..c2aaf5d75b 100644 --- a/ports/raspberrypi/boards/pimoroni_pga2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_pga2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c index 229d510ead..0083d8efe2 100644 --- a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c index 229d510ead..0083d8efe2 100644 --- a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/pins.c b/ports/raspberrypi/boards/pimoroni_picosystem/pins.c index 30aafacbad..1c6755aaad 100644 --- a/ports/raspberrypi/boards/pimoroni_picosystem/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picosystem/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c index e4e686da9d..f8b6f917c1 100644 --- a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_SW_B), MP_ROM_PTR(&pin_GPIO13) }, diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c b/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c index 1660de058e..813a9583f1 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c index 057eaec2af..00656285d8 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c +++ b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c index ea9d38402c..314eb6c461 100644 --- a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c @@ -28,6 +28,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c index e8f2335d99..e45e2d1dbc 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, diff --git a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c index a27a6c6550..92d12d5b91 100644 --- a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // Left side breakouts, top-to-bottom, as labeled { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO6) }, diff --git a/ports/stm/boards/espruino_pico/pins.c b/ports/stm/boards/espruino_pico/pins.c index 55c0336c54..e8d9e07cc7 100644 --- a/ports/stm/boards/espruino_pico/pins.c +++ b/ports/stm/boards/espruino_pico/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_B15), MP_ROM_PTR(&pin_PB15) }, { MP_ROM_QSTR(MP_QSTR_B14), MP_ROM_PTR(&pin_PB14) }, { MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_PB13) }, diff --git a/ports/stm/boards/espruino_wifi/pins.c b/ports/stm/boards/espruino_wifi/pins.c index 2d36ae8b95..a1a40235ab 100644 --- a/ports/stm/boards/espruino_wifi/pins.c +++ b/ports/stm/boards/espruino_wifi/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // P1 { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA01) }, diff --git a/ports/stm/boards/feather_stm32f405_express/pins.c b/ports/stm/boards/feather_stm32f405_express/pins.c index 74ed49dd3d..0062900d2a 100644 --- a/ports/stm/boards/feather_stm32f405_express/pins.c +++ b/ports/stm/boards/feather_stm32f405_express/pins.c @@ -13,6 +13,8 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { }; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/stm/boards/meowbit_v121/pins.c b/ports/stm/boards/meowbit_v121/pins.c index fd988b5919..f3991faa6d 100644 --- a/ports/stm/boards/meowbit_v121/pins.c +++ b/ports/stm/boards/meowbit_v121/pins.c @@ -7,6 +7,8 @@ extern audiopwmio_pwmaudioout_obj_t board_buzz_obj; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_PB04) }, { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_PB05) }, diff --git a/ports/stm/boards/nucleo_f746zg/pins.c b/ports/stm/boards/nucleo_f746zg/pins.c index 251ce4bcba..9ac3a1abf7 100644 --- a/ports/stm/boards/nucleo_f746zg/pins.c +++ b/ports/stm/boards/nucleo_f746zg/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PC03) }, diff --git a/ports/stm/boards/nucleo_f767zi/pins.c b/ports/stm/boards/nucleo_f767zi/pins.c index 0373fc4fb6..8982ab7fb6 100644 --- a/ports/stm/boards/nucleo_f767zi/pins.c +++ b/ports/stm/boards/nucleo_f767zi/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PC03) }, diff --git a/ports/stm/boards/nucleo_h743zi_2/pins.c b/ports/stm/boards/nucleo_h743zi_2/pins.c index d35f40dd2d..24e5e295c6 100644 --- a/ports/stm/boards/nucleo_h743zi_2/pins.c +++ b/ports/stm/boards/nucleo_h743zi_2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PC03) }, diff --git a/ports/stm/boards/openmv_h7/pins.c b/ports/stm/boards/openmv_h7/pins.c index 2f7fa93c1d..8a94c2fe5a 100644 --- a/ports/stm/boards/openmv_h7/pins.c +++ b/ports/stm/boards/openmv_h7/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_PB15) }, { MP_ROM_QSTR(MP_QSTR_P1), MP_ROM_PTR(&pin_PB14) }, { MP_ROM_QSTR(MP_QSTR_P2), MP_ROM_PTR(&pin_PB13) }, diff --git a/ports/stm/boards/pyb_nano_v2/pins.c b/ports/stm/boards/pyb_nano_v2/pins.c index e10124f6af..57e358fa30 100644 --- a/ports/stm/boards/pyb_nano_v2/pins.c +++ b/ports/stm/boards/pyb_nano_v2/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_Y10), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_Y9), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_Y8), MP_ROM_PTR(&pin_PA14) }, diff --git a/ports/stm/boards/pyboard_v11/pins.c b/ports/stm/boards/pyboard_v11/pins.c index 8783dfcf10..bd5416fbe5 100644 --- a/ports/stm/boards/pyboard_v11/pins.c +++ b/ports/stm/boards/pyboard_v11/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_Y1), MP_ROM_PTR(&pin_PC06) }, { MP_ROM_QSTR(MP_QSTR_Y2), MP_ROM_PTR(&pin_PC07) }, { MP_ROM_QSTR(MP_QSTR_Y3), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c b/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c index 2379e9a371..ca313cb21f 100644 --- a/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c +++ b/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c @@ -27,6 +27,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). diff --git a/ports/stm/boards/stm32f411ce_blackpill/pins.c b/ports/stm/boards/stm32f411ce_blackpill/pins.c index 7e25ad042b..456a3c9aa5 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/pins.c +++ b/ports/stm/boards/stm32f411ce_blackpill/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_B12), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_PB13) }, { MP_ROM_QSTR(MP_QSTR_B14), MP_ROM_PTR(&pin_PB14) }, diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c b/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c index 7e25ad042b..456a3c9aa5 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_B12), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_PB13) }, { MP_ROM_QSTR(MP_QSTR_B14), MP_ROM_PTR(&pin_PB14) }, diff --git a/ports/stm/boards/stm32f411ve_discovery/pins.c b/ports/stm/boards/stm32f411ve_discovery/pins.c index 6261513342..03c90d94d5 100644 --- a/ports/stm/boards/stm32f411ve_discovery/pins.c +++ b/ports/stm/boards/stm32f411ve_discovery/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // P1 { MP_ROM_QSTR(MP_QSTR_PC00), MP_ROM_PTR(&pin_PC00) }, { MP_ROM_QSTR(MP_QSTR_PC01), MP_ROM_PTR(&pin_PC01) }, diff --git a/ports/stm/boards/stm32f412zg_discovery/pins.c b/ports/stm/boards/stm32f412zg_discovery/pins.c index 84e646ca7f..148834d4a3 100644 --- a/ports/stm/boards/stm32f412zg_discovery/pins.c +++ b/ports/stm/boards/stm32f412zg_discovery/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_PE02), MP_ROM_PTR(&pin_PE02) }, { MP_ROM_QSTR(MP_QSTR_PE03), MP_ROM_PTR(&pin_PE03) }, { MP_ROM_QSTR(MP_QSTR_PE04), MP_ROM_PTR(&pin_PE04) }, diff --git a/ports/stm/boards/stm32f4_discovery/pins.c b/ports/stm/boards/stm32f4_discovery/pins.c index ee53fbd784..70b647aa9a 100644 --- a/ports/stm/boards/stm32f4_discovery/pins.c +++ b/ports/stm/boards/stm32f4_discovery/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + // P1 { MP_ROM_QSTR(MP_QSTR_PC00), MP_ROM_PTR(&pin_PC00) }, { MP_ROM_QSTR(MP_QSTR_PC01), MP_ROM_PTR(&pin_PC01) }, diff --git a/ports/stm/boards/stm32f746g_discovery/pins.c b/ports/stm/boards/stm32f746g_discovery/pins.c index bd9c1dcb15..41ca856f75 100644 --- a/ports/stm/boards/stm32f746g_discovery/pins.c +++ b/ports/stm/boards/stm32f746g_discovery/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PF10) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PF09) }, diff --git a/ports/stm/boards/thunderpack_v11/pins.c b/ports/stm/boards/thunderpack_v11/pins.c index eed54eb3c8..33a7fb362c 100644 --- a/ports/stm/boards/thunderpack_v11/pins.c +++ b/ports/stm/boards/thunderpack_v11/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_PA0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_PA1), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_PA2), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/stm/boards/thunderpack_v12/pins.c b/ports/stm/boards/thunderpack_v12/pins.c index 1e07621eaa..c47a6f47c9 100644 --- a/ports/stm/boards/thunderpack_v12/pins.c +++ b/ports/stm/boards/thunderpack_v12/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_PA0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_PA1), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_PA2), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/stm/tools/parse_pins_csv.py b/ports/stm/tools/parse_pins_csv.py index 972c6b6a88..07fe3dce63 100644 --- a/ports/stm/tools/parse_pins_csv.py +++ b/ports/stm/tools/parse_pins_csv.py @@ -37,6 +37,7 @@ with open(sys.argv[1]) as csv_file: line_count = 0 print("STATIC const mp_rom_map_elem_t board_module_globals_table[] = {") + print(" { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) },") for row in csv_reader: label = row[0] diff --git a/shared-bindings/board/__init__.h b/shared-bindings/board/__init__.h index a9b652ba8d..27faa51ed1 100644 --- a/shared-bindings/board/__init__.h +++ b/shared-bindings/board/__init__.h @@ -28,10 +28,12 @@ #define MICROPY_INCLUDED_SHARED_BINDINGS_BOARD___INIT___H #include "py/obj.h" +#include "py/objstr.h" #include "shared-bindings/microcontroller/Pin.h" // for the pin definitions extern const mp_obj_dict_t board_module_globals; +STATIC const MP_DEFINE_STR_OBJ(board_module_id_obj, CIRCUITPY_BOARD_ID); mp_obj_t common_hal_board_get_i2c(void); mp_obj_t common_hal_board_create_i2c(void); From fed6e8ea99fdc0d8eff533fd7fe7293afa5fbe3f Mon Sep 17 00:00:00 2001 From: Neradoc Date: Wed, 25 Aug 2021 03:52:22 +0200 Subject: [PATCH 289/418] Spresense: add CIRCUITPY_BOARD_ID because it doesn't use BASE_CFLAGS --- ports/cxd56/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/cxd56/Makefile b/ports/cxd56/Makefile index 1fea295194..ed5d2bedb1 100644 --- a/ports/cxd56/Makefile +++ b/ports/cxd56/Makefile @@ -106,6 +106,7 @@ CFLAGS += \ -DCONFIG_HAVE_DOUBLE \ -Dmain=spresense_main \ -D_estack=__stack \ + -DCIRCUITPY_BOARD_ID="\"$(BOARD)\"" \ -c \ -pipe \ -std=gnu11 \ From 4d05bb26bf30c8dbb0076e7adaa71c5becb7c450 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Thu, 26 Aug 2021 19:38:43 +0200 Subject: [PATCH 290/418] change board.ID to board.board_id --- ports/atmel-samd/boards/8086_commander/pins.c | 2 +- ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c | 2 +- ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c | 2 +- ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c | 2 +- ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c | 2 +- ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c | 2 +- ports/atmel-samd/boards/arduino_mkr1300/pins.c | 2 +- ports/atmel-samd/boards/arduino_mkrzero/pins.c | 2 +- ports/atmel-samd/boards/arduino_nano_33_iot/pins.c | 2 +- ports/atmel-samd/boards/arduino_zero/pins.c | 2 +- ports/atmel-samd/boards/bast_pro_mini_m0/pins.c | 2 +- ports/atmel-samd/boards/bdmicro_vina_d21/pins.c | 2 +- ports/atmel-samd/boards/bdmicro_vina_d51/pins.c | 2 +- ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c | 2 +- ports/atmel-samd/boards/blm_badge/pins.c | 2 +- ports/atmel-samd/boards/capablerobot_usbhub/pins.c | 2 +- ports/atmel-samd/boards/catwan_usbstick/pins.c | 2 +- ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c | 2 +- ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c | 2 +- ports/atmel-samd/boards/circuitplayground_express/pins.c | 2 +- .../atmel-samd/boards/circuitplayground_express_crickit/pins.c | 2 +- .../boards/circuitplayground_express_displayio/pins.c | 2 +- ports/atmel-samd/boards/cp32-m4/pins.c | 2 +- ports/atmel-samd/boards/cp_sapling_m0/pins.c | 2 +- ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c | 2 +- ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c | 2 +- ports/atmel-samd/boards/datalore_ip_m4/pins.c | 2 +- ports/atmel-samd/boards/datum_distance/pins.c | 2 +- ports/atmel-samd/boards/datum_imu/pins.c | 2 +- ports/atmel-samd/boards/datum_light/pins.c | 2 +- ports/atmel-samd/boards/datum_weather/pins.c | 2 +- ports/atmel-samd/boards/dynalora_usb/pins.c | 2 +- ports/atmel-samd/boards/dynossat_edu_eps/pins.c | 2 +- ports/atmel-samd/boards/dynossat_edu_obc/pins.c | 2 +- ports/atmel-samd/boards/escornabot_makech/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_adalogger/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_basic/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_express/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_express_crickit/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_rfm69/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_rfm9x/pins.c | 2 +- ports/atmel-samd/boards/feather_m0_supersized/pins.c | 2 +- ports/atmel-samd/boards/feather_m4_can/pins.c | 2 +- ports/atmel-samd/boards/feather_m4_express/pins.c | 2 +- ports/atmel-samd/boards/fluff_m0/pins.c | 2 +- ports/atmel-samd/boards/gemma_m0/pins.c | 2 +- ports/atmel-samd/boards/grandcentral_m4_express/pins.c | 2 +- ports/atmel-samd/boards/hallowing_m0_express/pins.c | 2 +- ports/atmel-samd/boards/hallowing_m4_express/pins.c | 2 +- ports/atmel-samd/boards/huntercat_nfc/pins.c | 2 +- ports/atmel-samd/boards/itsybitsy_m0_express/pins.c | 2 +- ports/atmel-samd/boards/itsybitsy_m4_express/pins.c | 2 +- ports/atmel-samd/boards/kicksat-sprite/pins.c | 2 +- ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c | 2 +- ports/atmel-samd/boards/matrixportal_m4/pins.c | 2 +- ports/atmel-samd/boards/meowmeow/pins.c | 2 +- ports/atmel-samd/boards/metro_m0_express/pins.c | 2 +- ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c | 2 +- ports/atmel-samd/boards/metro_m4_express/pins.c | 2 +- ports/atmel-samd/boards/mini_sam_m4/pins.c | 2 +- ports/atmel-samd/boards/monster_m4sk/pins.c | 2 +- ports/atmel-samd/boards/ndgarage_ndbit6/pins.c | 2 +- ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c | 2 +- ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c | 2 +- ports/atmel-samd/boards/nfc_copy_cat/pins.c | 2 +- ports/atmel-samd/boards/openbook_m4/pins.c | 2 +- ports/atmel-samd/boards/pewpew10/pins.c | 2 +- ports/atmel-samd/boards/pewpew_m4/pins.c | 2 +- ports/atmel-samd/boards/picoplanet/pins.c | 2 +- ports/atmel-samd/boards/pybadge/pins.c | 2 +- ports/atmel-samd/boards/pycubed/pins.c | 2 +- ports/atmel-samd/boards/pycubed_mram/pins.c | 2 +- ports/atmel-samd/boards/pygamer/pins.c | 2 +- ports/atmel-samd/boards/pyportal/pins.c | 2 +- ports/atmel-samd/boards/pyportal_titano/pins.c | 2 +- ports/atmel-samd/boards/pyruler/pins.c | 2 +- ports/atmel-samd/boards/qtpy_m0/pins.c | 2 +- ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c | 2 +- ports/atmel-samd/boards/robohatmm1_m4/pins.c | 2 +- ports/atmel-samd/boards/sam32/pins.c | 2 +- ports/atmel-samd/boards/same54_xplained/pins.c | 2 +- ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c | 2 +- ports/atmel-samd/boards/seeeduino_xiao/pins.c | 2 +- ports/atmel-samd/boards/sensebox_mcu/pins.c | 2 +- ports/atmel-samd/boards/serpente/pins.c | 2 +- ports/atmel-samd/boards/shirtty/pins.c | 2 +- ports/atmel-samd/boards/silicognition-m4-shim/pins.c | 2 +- ports/atmel-samd/boards/snekboard/pins.c | 2 +- ports/atmel-samd/boards/sparkfun_lumidrive/pins.c | 2 +- ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c | 2 +- ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c | 2 +- ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c | 2 +- ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c | 2 +- ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c | 2 +- ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c | 2 +- ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c | 2 +- ports/atmel-samd/boards/stackrduino_m0_pro/pins.c | 2 +- ports/atmel-samd/boards/stringcar_m0_express/pins.c | 2 +- ports/atmel-samd/boards/trellis_m4_express/pins.c | 2 +- ports/atmel-samd/boards/trinket_m0/pins.c | 2 +- ports/atmel-samd/boards/trinket_m0_haxpress/pins.c | 2 +- ports/atmel-samd/boards/uartlogger2/pins.c | 2 +- ports/atmel-samd/boards/uchip/pins.c | 2 +- ports/atmel-samd/boards/ugame10/pins.c | 2 +- ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c | 2 +- ports/atmel-samd/boards/winterbloom_sol/pins.c | 2 +- ports/atmel-samd/boards/xinabox_cc03/pins.c | 2 +- ports/atmel-samd/boards/xinabox_cs11/pins.c | 2 +- ports/cxd56/boards/spresense/pins.c | 2 +- ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c | 2 +- .../boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c | 2 +- ports/esp32s2/boards/adafruit_funhouse/pins.c | 2 +- ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c | 2 +- ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c | 2 +- ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c | 2 +- ports/esp32s2/boards/artisense_rd00/pins.c | 2 +- ports/esp32s2/boards/atmegazero_esp32s2/pins.c | 2 +- ports/esp32s2/boards/crumpspace_crumps2/pins.c | 2 +- ports/esp32s2/boards/electroniccats_bastwifi/pins.c | 2 +- ports/esp32s2/boards/espressif_kaluga_1.3/pins.c | 2 +- ports/esp32s2/boards/espressif_kaluga_1/pins.c | 2 +- ports/esp32s2/boards/espressif_saola_1_wroom/pins.c | 2 +- ports/esp32s2/boards/espressif_saola_1_wrover/pins.c | 2 +- ports/esp32s2/boards/franzininho_wifi_wroom/pins.c | 2 +- ports/esp32s2/boards/franzininho_wifi_wrover/pins.c | 2 +- ports/esp32s2/boards/gravitech_cucumber_m/pins.c | 2 +- ports/esp32s2/boards/gravitech_cucumber_ms/pins.c | 2 +- ports/esp32s2/boards/gravitech_cucumber_r/pins.c | 2 +- ports/esp32s2/boards/gravitech_cucumber_rs/pins.c | 2 +- ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c | 2 +- ports/esp32s2/boards/microdev_micro_s2/pins.c | 2 +- ports/esp32s2/boards/morpheans_morphesp-240/pins.c | 2 +- ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c | 2 +- ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c | 2 +- ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c | 2 +- ports/esp32s2/boards/targett_module_clip_wroom/pins.c | 2 +- ports/esp32s2/boards/targett_module_clip_wrover/pins.c | 2 +- ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c | 2 +- .../esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c | 2 +- ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c | 2 +- ports/litex/boards/fomu/pins.c | 2 +- ports/mimxrt10xx/boards/feather_m7_1011/pins.c | 2 +- ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c | 2 +- ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c | 2 +- ports/mimxrt10xx/boards/imxrt1010_evk/pins.c | 2 +- ports/mimxrt10xx/boards/imxrt1020_evk/pins.c | 2 +- ports/mimxrt10xx/boards/imxrt1060_evk/pins.c | 2 +- ports/mimxrt10xx/boards/metro_m7_1011/pins.c | 2 +- ports/mimxrt10xx/boards/teensy40/pins.c | 2 +- ports/mimxrt10xx/boards/teensy41/pins.c | 2 +- ports/nrf/boards/ADM_B_NRF52840_1/pins.c | 2 +- ports/nrf/boards/TG-Watch/pins.c | 2 +- ports/nrf/boards/aramcon2_badge/pins.c | 2 +- ports/nrf/boards/aramcon_badge_2019/pins.c | 2 +- ports/nrf/boards/arduino_nano_33_ble/pins.c | 2 +- ports/nrf/boards/bastble/pins.c | 2 +- ports/nrf/boards/bless_dev_board_multi_sensor/pins.c | 2 +- ports/nrf/boards/bluemicro840/pins.c | 2 +- ports/nrf/boards/circuitplayground_bluefruit/pins.c | 2 +- ports/nrf/boards/clue_nrf52840_express/pins.c | 2 +- ports/nrf/boards/electronut_labs_blip/pins.c | 2 +- ports/nrf/boards/electronut_labs_papyr/pins.c | 2 +- ports/nrf/boards/feather_bluefruit_sense/pins.c | 2 +- ports/nrf/boards/feather_nrf52840_express/pins.c | 2 +- ports/nrf/boards/hiibot_bluefi/pins.c | 2 +- ports/nrf/boards/ikigaisense_vita/pins.c | 2 +- ports/nrf/boards/itsybitsy_nrf52840_express/pins.c | 2 +- ports/nrf/boards/makerdiary_m60_keyboard/pins.c | 2 +- ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c | 2 +- ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c | 2 +- ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c | 2 +- ports/nrf/boards/metro_nrf52840_express/pins.c | 2 +- ports/nrf/boards/microbit_v2/pins.c | 2 +- ports/nrf/boards/nice_nano/pins.c | 2 +- ports/nrf/boards/ohs2020_badge/pins.c | 2 +- ports/nrf/boards/particle_argon/pins.c | 2 +- ports/nrf/boards/particle_boron/pins.c | 2 +- ports/nrf/boards/particle_xenon/pins.c | 2 +- ports/nrf/boards/pca10056/pins.c | 2 +- ports/nrf/boards/pca10059/pins.c | 2 +- ports/nrf/boards/pca10100/pins.c | 2 +- ports/nrf/boards/pitaya_go/pins.c | 2 +- ports/nrf/boards/raytac_mdbt50q-db-40/pins.c | 2 +- ports/nrf/boards/raytac_mdbt50q-rx/pins.c | 2 +- ports/nrf/boards/simmel/pins.c | 2 +- ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c | 2 +- ports/nrf/boards/sparkfun_nrf52840_mini/pins.c | 2 +- ports/nrf/boards/teknikio_bluebird/pins.c | 2 +- ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c | 2 +- ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c | 2 +- ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c | 2 +- ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c | 2 +- ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c | 2 +- ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c | 2 +- ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c | 2 +- ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c | 2 +- ports/raspberrypi/boards/pimoroni_interstate75/pins.c | 2 +- ports/raspberrypi/boards/pimoroni_keybow2040/pins.c | 2 +- ports/raspberrypi/boards/pimoroni_pga2040/pins.c | 2 +- ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c | 2 +- ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c | 2 +- ports/raspberrypi/boards/pimoroni_picosystem/pins.c | 2 +- ports/raspberrypi/boards/pimoroni_plasma2040/pins.c | 2 +- ports/raspberrypi/boards/pimoroni_tiny2040/pins.c | 2 +- ports/raspberrypi/boards/raspberry_pi_pico/pins.c | 2 +- ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c | 2 +- ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c | 2 +- ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c | 2 +- ports/stm/boards/espruino_pico/pins.c | 2 +- ports/stm/boards/espruino_wifi/pins.c | 2 +- ports/stm/boards/feather_stm32f405_express/pins.c | 2 +- ports/stm/boards/meowbit_v121/pins.c | 2 +- ports/stm/boards/nucleo_f746zg/pins.c | 2 +- ports/stm/boards/nucleo_f767zi/pins.c | 2 +- ports/stm/boards/nucleo_h743zi_2/pins.c | 2 +- ports/stm/boards/openmv_h7/pins.c | 2 +- ports/stm/boards/pyb_nano_v2/pins.c | 2 +- ports/stm/boards/pyboard_v11/pins.c | 2 +- ports/stm/boards/sparkfun_stm32f405_micromod/pins.c | 2 +- ports/stm/boards/stm32f411ce_blackpill/pins.c | 2 +- ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c | 2 +- ports/stm/boards/stm32f411ve_discovery/pins.c | 2 +- ports/stm/boards/stm32f412zg_discovery/pins.c | 2 +- ports/stm/boards/stm32f4_discovery/pins.c | 2 +- ports/stm/boards/stm32f746g_discovery/pins.c | 2 +- ports/stm/boards/thunderpack_v11/pins.c | 2 +- ports/stm/boards/thunderpack_v12/pins.c | 2 +- 227 files changed, 227 insertions(+), 227 deletions(-) diff --git a/ports/atmel-samd/boards/8086_commander/pins.c b/ports/atmel-samd/boards/8086_commander/pins.c index 36055ba62e..810534642b 100644 --- a/ports/atmel-samd/boards/8086_commander/pins.c +++ b/ports/atmel-samd/boards/8086_commander/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Serial diff --git a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c index 9ea0d7d0fa..26f5ccf475 100644 --- a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) }, diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c index c6ff8fbb0d..a8f4e40927 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_INTERRUPT), MP_ROM_PTR(&pin_PA00) }, diff --git a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c index dff9cbb935..0387835f7b 100644 --- a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_ROTA), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c index 84db30bbc6..6391fba733 100644 --- a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c b/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c index 0660e01494..73df4e9db7 100644 --- a/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c +++ b/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/arduino_mkr1300/pins.c b/ports/atmel-samd/boards/arduino_mkr1300/pins.c index 4436661acc..1c6fe272db 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/pins.c +++ b/ports/atmel-samd/boards/arduino_mkr1300/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, diff --git a/ports/atmel-samd/boards/arduino_mkrzero/pins.c b/ports/atmel-samd/boards/arduino_mkrzero/pins.c index 3b68c727ca..574feb98d2 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/pins.c +++ b/ports/atmel-samd/boards/arduino_mkrzero/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, diff --git a/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c b/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c index 61e76ed0d8..43f840927b 100644 --- a/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c +++ b/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, diff --git a/ports/atmel-samd/boards/arduino_zero/pins.c b/ports/atmel-samd/boards/arduino_zero/pins.c index 5944b55e1a..cebdb2ffd8 100644 --- a/ports/atmel-samd/boards/arduino_zero/pins.c +++ b/ports/atmel-samd/boards/arduino_zero/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c b/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c index f5567c912f..46c9b97b28 100644 --- a/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c +++ b/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c index cfd9fb8b89..d0d69ce058 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index 71c636580a..f4c2a90f63 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -4,7 +4,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c index 3ba40b636b..72980176b5 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/atmel-samd/boards/blm_badge/pins.c b/ports/atmel-samd/boards/blm_badge/pins.c index 28b602e5d1..2b37a2519b 100644 --- a/ports/atmel-samd/boards/blm_badge/pins.c +++ b/ports/atmel-samd/boards/blm_badge/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA01) }, // pad 1 diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/pins.c b/ports/atmel-samd/boards/capablerobot_usbhub/pins.c index 7b9fad792c..1c6ede1d51 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/pins.c +++ b/ports/atmel-samd/boards/capablerobot_usbhub/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_ANMB), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_ANVLIM), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/catwan_usbstick/pins.c b/ports/atmel-samd/boards/catwan_usbstick/pins.c index 707602e82f..12ffa853ea 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/pins.c +++ b/ports/atmel-samd/boards/catwan_usbstick/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA30) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA31) }, diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c b/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c index 3b3612f83c..d54c5dea3d 100644 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c index ab7f67072e..79b30b696d 100755 --- a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c +++ b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB04) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express/pins.c b/ports/atmel-samd/boards/circuitplayground_express/pins.c index e8b96b9fdf..e290715104 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c index e8b96b9fdf..e290715104 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c b/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c index e8b96b9fdf..e290715104 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/cp32-m4/pins.c b/ports/atmel-samd/boards/cp32-m4/pins.c index 0fb5a4a560..7d9ca6d451 100644 --- a/ports/atmel-samd/boards/cp32-m4/pins.c +++ b/ports/atmel-samd/boards/cp32-m4/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_P), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_N), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/cp_sapling_m0/pins.c b/ports/atmel-samd/boards/cp_sapling_m0/pins.c index 5b84a81a63..6d6829ab07 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c b/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c index b5e9a879a1..208ca6f703 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA19) }, diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c index 5b84a81a63..6d6829ab07 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/datalore_ip_m4/pins.c b/ports/atmel-samd/boards/datalore_ip_m4/pins.c index 5fb7976e70..4ace176893 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/pins.c +++ b/ports/atmel-samd/boards/datalore_ip_m4/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/datum_distance/pins.c b/ports/atmel-samd/boards/datum_distance/pins.c index 2b8c43c743..7f91771fa4 100644 --- a/ports/atmel-samd/boards/datum_distance/pins.c +++ b/ports/atmel-samd/boards/datum_distance/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, diff --git a/ports/atmel-samd/boards/datum_imu/pins.c b/ports/atmel-samd/boards/datum_imu/pins.c index bc53555ab4..8020d8ac48 100644 --- a/ports/atmel-samd/boards/datum_imu/pins.c +++ b/ports/atmel-samd/boards/datum_imu/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA03) }, diff --git a/ports/atmel-samd/boards/datum_light/pins.c b/ports/atmel-samd/boards/datum_light/pins.c index 2b8c43c743..7f91771fa4 100644 --- a/ports/atmel-samd/boards/datum_light/pins.c +++ b/ports/atmel-samd/boards/datum_light/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, diff --git a/ports/atmel-samd/boards/datum_weather/pins.c b/ports/atmel-samd/boards/datum_weather/pins.c index cba4919851..46d062025f 100644 --- a/ports/atmel-samd/boards/datum_weather/pins.c +++ b/ports/atmel-samd/boards/datum_weather/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, diff --git a/ports/atmel-samd/boards/dynalora_usb/pins.c b/ports/atmel-samd/boards/dynalora_usb/pins.c index 79fb2b9172..34da109622 100644 --- a/ports/atmel-samd/boards/dynalora_usb/pins.c +++ b/ports/atmel-samd/boards/dynalora_usb/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA01) }, diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c index ce7b4d0117..b7b99068c7 100644 --- a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c +++ b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c index 06e638527e..8089588e9e 100644 --- a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c +++ b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, diff --git a/ports/atmel-samd/boards/escornabot_makech/pins.c b/ports/atmel-samd/boards/escornabot_makech/pins.c index 0d5e1c1860..d8906c558c 100644 --- a/ports/atmel-samd/boards/escornabot_makech/pins.c +++ b/ports/atmel-samd/boards/escornabot_makech/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // LEDs { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c index 1e6bcc2cac..6273daef79 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c +++ b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/feather_m0_basic/pins.c b/ports/atmel-samd/boards/feather_m0_basic/pins.c index a9b1a360b3..aea2f5a756 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/pins.c +++ b/ports/atmel-samd/boards/feather_m0_basic/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/feather_m0_express/pins.c b/ports/atmel-samd/boards/feather_m0_express/pins.c index 392af69d13..5d28f01a0c 100644 --- a/ports/atmel-samd/boards/feather_m0_express/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c index 392af69d13..5d28f01a0c 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c index 0342512de7..fcbe9f1f3a 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c +++ b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c index 002cc4fdad..04f6a49ad6 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/feather_m0_supersized/pins.c b/ports/atmel-samd/boards/feather_m0_supersized/pins.c index 392af69d13..5d28f01a0c 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/pins.c +++ b/ports/atmel-samd/boards/feather_m0_supersized/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/feather_m4_can/pins.c b/ports/atmel-samd/boards/feather_m4_can/pins.c index 35352085c1..2a4526b56d 100644 --- a/ports/atmel-samd/boards/feather_m4_can/pins.c +++ b/ports/atmel-samd/boards/feather_m4_can/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/feather_m4_express/pins.c b/ports/atmel-samd/boards/feather_m4_express/pins.c index 129fb2fb9b..3e8f0a02e2 100644 --- a/ports/atmel-samd/boards/feather_m4_express/pins.c +++ b/ports/atmel-samd/boards/feather_m4_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/fluff_m0/pins.c b/ports/atmel-samd/boards/fluff_m0/pins.c index 36def1ca5b..2bd0ea8d26 100644 --- a/ports/atmel-samd/boards/fluff_m0/pins.c +++ b/ports/atmel-samd/boards/fluff_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, diff --git a/ports/atmel-samd/boards/gemma_m0/pins.c b/ports/atmel-samd/boards/gemma_m0/pins.c index ee513bfe0a..92545017fd 100644 --- a/ports/atmel-samd/boards/gemma_m0/pins.c +++ b/ports/atmel-samd/boards/gemma_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // pad 1 { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c index 285522e747..73f3b7ff01 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c +++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c @@ -17,7 +17,7 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, diff --git a/ports/atmel-samd/boards/hallowing_m0_express/pins.c b/ports/atmel-samd/boards/hallowing_m0_express/pins.c index 30f6746ea6..18a256ef26 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/pins.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/hallowing_m4_express/pins.c b/ports/atmel-samd/boards/hallowing_m4_express/pins.c index 6d6585d567..50b7c1109b 100644 --- a/ports/atmel-samd/boards/hallowing_m4_express/pins.c +++ b/ports/atmel-samd/boards/hallowing_m4_express/pins.c @@ -3,7 +3,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/huntercat_nfc/pins.c b/ports/atmel-samd/boards/huntercat_nfc/pins.c index 32c459f80a..b0e1aa886c 100644 --- a/ports/atmel-samd/boards/huntercat_nfc/pins.c +++ b/ports/atmel-samd/boards/huntercat_nfc/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA00) }, diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c index 1dc5b282dc..840f934e1c 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c index 5c5b82676d..e87bc70e9c 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/kicksat-sprite/pins.c b/ports/atmel-samd/boards/kicksat-sprite/pins.c index 31feaee13a..d0d6478f30 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/pins.c +++ b/ports/atmel-samd/boards/kicksat-sprite/pins.c @@ -2,7 +2,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA07) }, diff --git a/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c b/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c index 9c7bcce6cc..baf8ead6ca 100644 --- a/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c +++ b/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/matrixportal_m4/pins.c b/ports/atmel-samd/boards/matrixportal_m4/pins.c index ffbe9ad575..f33cdebe16 100644 --- a/ports/atmel-samd/boards/matrixportal_m4/pins.c +++ b/ports/atmel-samd/boards/matrixportal_m4/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/meowmeow/pins.c b/ports/atmel-samd/boards/meowmeow/pins.c index 840c7ee13d..35dc87582a 100644 --- a/ports/atmel-samd/boards/meowmeow/pins.c +++ b/ports/atmel-samd/boards/meowmeow/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA03) }, diff --git a/ports/atmel-samd/boards/metro_m0_express/pins.c b/ports/atmel-samd/boards/metro_m0_express/pins.c index a67f905929..39556b889d 100644 --- a/ports/atmel-samd/boards/metro_m0_express/pins.c +++ b/ports/atmel-samd/boards/metro_m0_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c b/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c index 0f93f98d19..24e53357d0 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/metro_m4_express/pins.c b/ports/atmel-samd/boards/metro_m4_express/pins.c index 72fe98f403..7297e8e24b 100644 --- a/ports/atmel-samd/boards/metro_m4_express/pins.c +++ b/ports/atmel-samd/boards/metro_m4_express/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/mini_sam_m4/pins.c b/ports/atmel-samd/boards/mini_sam_m4/pins.c index e2f1283598..a10f8a0a90 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/pins.c +++ b/ports/atmel-samd/boards/mini_sam_m4/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/monster_m4sk/pins.c b/ports/atmel-samd/boards/monster_m4sk/pins.c index a23873a073..6de4686f04 100644 --- a/ports/atmel-samd/boards/monster_m4sk/pins.c +++ b/ports/atmel-samd/boards/monster_m4sk/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_HEADPHONE_LEFT), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c index 86acc4ac11..5267c44ad8 100644 --- a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c +++ b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c index d3719b1159..344cd8e0bc 100644 --- a/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c +++ b/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA04) }, diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c b/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c index e266afccf2..14ed7e4472 100644 --- a/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_TOUCH1), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/nfc_copy_cat/pins.c b/ports/atmel-samd/boards/nfc_copy_cat/pins.c index 86f58988f8..17a382440b 100644 --- a/ports/atmel-samd/boards/nfc_copy_cat/pins.c +++ b/ports/atmel-samd/boards/nfc_copy_cat/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA02) }, // IRQ { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA06) }, // IN_A diff --git a/ports/atmel-samd/boards/openbook_m4/pins.c b/ports/atmel-samd/boards/openbook_m4/pins.c index 794f5409f8..72285a1727 100644 --- a/ports/atmel-samd/boards/openbook_m4/pins.c +++ b/ports/atmel-samd/boards/openbook_m4/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, // A0 = audio right channel { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // A1 = audio left channel diff --git a/ports/atmel-samd/boards/pewpew10/pins.c b/ports/atmel-samd/boards/pewpew10/pins.c index 8c54a2f4cf..5506c5ecbe 100644 --- a/ports/atmel-samd/boards/pewpew10/pins.c +++ b/ports/atmel-samd/boards/pewpew10/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Pins for internal use. { MP_ROM_QSTR(MP_QSTR__R1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/pewpew_m4/pins.c b/ports/atmel-samd/boards/pewpew_m4/pins.c index f668cd2b2d..fa5c27aef9 100644 --- a/ports/atmel-samd/boards/pewpew_m4/pins.c +++ b/ports/atmel-samd/boards/pewpew_m4/pins.c @@ -2,7 +2,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LEFT), MP_ROM_PTR(&pin_PB23) }, { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_RIGHT), MP_ROM_PTR(&pin_PB22) }, diff --git a/ports/atmel-samd/boards/picoplanet/pins.c b/ports/atmel-samd/boards/picoplanet/pins.c index 0f9f7bf850..9e2d24745d 100644 --- a/ports/atmel-samd/boards/picoplanet/pins.c +++ b/ports/atmel-samd/boards/picoplanet/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, diff --git a/ports/atmel-samd/boards/pybadge/pins.c b/ports/atmel-samd/boards/pybadge/pins.c index efc578bc49..54920cdc37 100644 --- a/ports/atmel-samd/boards/pybadge/pins.c +++ b/ports/atmel-samd/boards/pybadge/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/pycubed/pins.c b/ports/atmel-samd/boards/pycubed/pins.c index 71c4126e41..6f1d9b2d4e 100644 --- a/ports/atmel-samd/boards/pycubed/pins.c +++ b/ports/atmel-samd/boards/pycubed/pins.c @@ -2,7 +2,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/pycubed_mram/pins.c b/ports/atmel-samd/boards/pycubed_mram/pins.c index 71c4126e41..6f1d9b2d4e 100644 --- a/ports/atmel-samd/boards/pycubed_mram/pins.c +++ b/ports/atmel-samd/boards/pycubed_mram/pins.c @@ -2,7 +2,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, diff --git a/ports/atmel-samd/boards/pygamer/pins.c b/ports/atmel-samd/boards/pygamer/pins.c index d1dce2df19..c184f95221 100644 --- a/ports/atmel-samd/boards/pygamer/pins.c +++ b/ports/atmel-samd/boards/pygamer/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c index aad53447ee..68f87e29aa 100644 --- a/ports/atmel-samd/boards/pyportal/pins.c +++ b/ports/atmel-samd/boards/pyportal/pins.c @@ -7,7 +7,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/pyportal_titano/pins.c b/ports/atmel-samd/boards/pyportal_titano/pins.c index aad53447ee..68f87e29aa 100644 --- a/ports/atmel-samd/boards/pyportal_titano/pins.c +++ b/ports/atmel-samd/boards/pyportal_titano/pins.c @@ -7,7 +7,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/pyruler/pins.c b/ports/atmel-samd/boards/pyruler/pins.c index b8996f800a..6a8e43f10c 100644 --- a/ports/atmel-samd/boards/pyruler/pins.c +++ b/ports/atmel-samd/boards/pyruler/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/qtpy_m0/pins.c b/ports/atmel-samd/boards/qtpy_m0/pins.c index f4ebcd08fe..67f44fd81a 100644 --- a/ports/atmel-samd/boards/qtpy_m0/pins.c +++ b/ports/atmel-samd/boards/qtpy_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c b/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c index f4ebcd08fe..67f44fd81a 100644 --- a/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c +++ b/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/robohatmm1_m4/pins.c b/ports/atmel-samd/boards/robohatmm1_m4/pins.c index 9d12b38ec3..31ce1ffc4b 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/pins.c +++ b/ports/atmel-samd/boards/robohatmm1_m4/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" // Version 2.4 STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // SERVO Pins { MP_ROM_QSTR(MP_QSTR_SERVO1), MP_ROM_PTR(&pin_PA18) }, diff --git a/ports/atmel-samd/boards/sam32/pins.c b/ports/atmel-samd/boards/sam32/pins.c index e8cdb9c68c..67ad175ac0 100644 --- a/ports/atmel-samd/boards/sam32/pins.c +++ b/ports/atmel-samd/boards/sam32/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_PB09) }, diff --git a/ports/atmel-samd/boards/same54_xplained/pins.c b/ports/atmel-samd/boards/same54_xplained/pins.c index 0a35f9ed82..40db108eff 100644 --- a/ports/atmel-samd/boards/same54_xplained/pins.c +++ b/ports/atmel-samd/boards/same54_xplained/pins.c @@ -17,7 +17,7 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PD08) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PD09) }, diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c b/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c index 4d0e5775d5..c6ea5a7a54 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c @@ -2,7 +2,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog pins diff --git a/ports/atmel-samd/boards/seeeduino_xiao/pins.c b/ports/atmel-samd/boards/seeeduino_xiao/pins.c index 4f7825ee74..947b825b1f 100644 --- a/ports/atmel-samd/boards/seeeduino_xiao/pins.c +++ b/ports/atmel-samd/boards/seeeduino_xiao/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog pins diff --git a/ports/atmel-samd/boards/sensebox_mcu/pins.c b/ports/atmel-samd/boards/sensebox_mcu/pins.c index e5285e1af6..f4ac58f02d 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/pins.c +++ b/ports/atmel-samd/boards/sensebox_mcu/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog pins diff --git a/ports/atmel-samd/boards/serpente/pins.c b/ports/atmel-samd/boards/serpente/pins.c index 68798840d5..fcd6588378 100644 --- a/ports/atmel-samd/boards/serpente/pins.c +++ b/ports/atmel-samd/boards/serpente/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/shirtty/pins.c b/ports/atmel-samd/boards/shirtty/pins.c index 1cd713840c..06418160cf 100644 --- a/ports/atmel-samd/boards/shirtty/pins.c +++ b/ports/atmel-samd/boards/shirtty/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c index 177c1e344c..bbcfd08d20 100644 --- a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c +++ b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/snekboard/pins.c b/ports/atmel-samd/boards/snekboard/pins.c index e55d4e3e77..2fa371a132 100644 --- a/ports/atmel-samd/boards/snekboard/pins.c +++ b/ports/atmel-samd/boards/snekboard/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c b/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c index fc89de85d9..4d45ae9cab 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c index c55b981e6f..f67e348104 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c index c55b981e6f..f67e348104 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c b/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c index 2f30e73103..1fece3b14f 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c b/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c index 57312b08ae..6552a936c6 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog pins diff --git a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c index faef8045ee..8281bc3790 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog pins diff --git a/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c b/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c index 3944cf0bf0..bfda5a0692 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c @@ -28,7 +28,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). diff --git a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c index fa5b6c32e1..021c7f78bb 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c b/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c index 49d88bb876..0397cd2cc1 100644 --- a/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c +++ b/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, diff --git a/ports/atmel-samd/boards/stringcar_m0_express/pins.c b/ports/atmel-samd/boards/stringcar_m0_express/pins.c index ef880be1bd..8de45254cc 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/pins.c +++ b/ports/atmel-samd/boards/stringcar_m0_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_PIEZO), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/trellis_m4_express/pins.c b/ports/atmel-samd/boards/trellis_m4_express/pins.c index 2d3d110cf1..f408dc0dfc 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/pins.c +++ b/ports/atmel-samd/boards/trellis_m4_express/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/trinket_m0/pins.c b/ports/atmel-samd/boards/trinket_m0/pins.c index 014af8be8d..4127439375 100644 --- a/ports/atmel-samd/boards/trinket_m0/pins.c +++ b/ports/atmel-samd/boards/trinket_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c index 014af8be8d..4127439375 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) }, diff --git a/ports/atmel-samd/boards/uartlogger2/pins.c b/ports/atmel-samd/boards/uartlogger2/pins.c index 0f93f98d19..24e53357d0 100644 --- a/ports/atmel-samd/boards/uartlogger2/pins.c +++ b/ports/atmel-samd/boards/uartlogger2/pins.c @@ -4,7 +4,7 @@ // out on connectors are labeled with their MCU name available from // microcontroller.pin. STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/atmel-samd/boards/uchip/pins.c b/ports/atmel-samd/boards/uchip/pins.c index 384950182a..0ed3219ccc 100644 --- a/ports/atmel-samd/boards/uchip/pins.c +++ b/ports/atmel-samd/boards/uchip/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_BOOST_EN), MP_ROM_PTR(&pin_PA14) }, diff --git a/ports/atmel-samd/boards/ugame10/pins.c b/ports/atmel-samd/boards/ugame10/pins.c index fa01e434b5..5795f88d6b 100644 --- a/ports/atmel-samd/boards/ugame10/pins.c +++ b/ports/atmel-samd/boards/ugame10/pins.c @@ -2,7 +2,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_X), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_O), MP_ROM_PTR(&pin_PA01) }, diff --git a/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c b/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c index 482a64061a..162917d797 100644 --- a/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c +++ b/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_HONK_OUT), MP_ROM_PTR(&pin_PA02) }, diff --git a/ports/atmel-samd/boards/winterbloom_sol/pins.c b/ports/atmel-samd/boards/winterbloom_sol/pins.c index d0514dbbc9..771963670a 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/pins.c +++ b/ports/atmel-samd/boards/winterbloom_sol/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) }, diff --git a/ports/atmel-samd/boards/xinabox_cc03/pins.c b/ports/atmel-samd/boards/xinabox_cc03/pins.c index b33425c8f4..23b66bf34a 100644 --- a/ports/atmel-samd/boards/xinabox_cc03/pins.c +++ b/ports/atmel-samd/boards/xinabox_cc03/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, diff --git a/ports/atmel-samd/boards/xinabox_cs11/pins.c b/ports/atmel-samd/boards/xinabox_cs11/pins.c index fb0c23e7a4..468c250a46 100644 --- a/ports/atmel-samd/boards/xinabox_cs11/pins.c +++ b/ports/atmel-samd/boards/xinabox_cs11/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, diff --git a/ports/cxd56/boards/spresense/pins.c b/ports/cxd56/boards/spresense/pins.c index 0896ed9579..90f545013e 100644 --- a/ports/cxd56/boards/spresense/pins.c +++ b/ports/cxd56/boards/spresense/pins.c @@ -40,7 +40,7 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { }; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_UART2_RXD) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_UART2_TXD) }, diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c index 8fad0a6e9b..07b6a5a87c 100644 --- a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c index 78e2631ae3..570249e96f 100644 --- a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c @@ -3,7 +3,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/esp32s2/boards/adafruit_funhouse/pins.c b/ports/esp32s2/boards/adafruit_funhouse/pins.c index c993d5ccf5..e71d300c85 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/pins.c +++ b/ports/esp32s2/boards/adafruit_funhouse/pins.c @@ -3,7 +3,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO21) }, diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c index 4067db9425..18626b4d26 100644 --- a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c +++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c @@ -3,7 +3,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c b/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c index 0dd98cd734..c16077df0b 100644 --- a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c +++ b/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c index f1245f1217..736df1baae 100644 --- a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c +++ b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/artisense_rd00/pins.c b/ports/esp32s2/boards/artisense_rd00/pins.c index 61596754bd..264b508e68 100644 --- a/ports/esp32s2/boards/artisense_rd00/pins.c +++ b/ports/esp32s2/boards/artisense_rd00/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c b/ports/esp32s2/boards/atmegazero_esp32s2/pins.c index 17479bfc92..37fa9a8e4a 100644 --- a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c +++ b/ports/esp32s2/boards/atmegazero_esp32s2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/crumpspace_crumps2/pins.c b/ports/esp32s2/boards/crumpspace_crumps2/pins.c index 56bdc7f802..4e88d2ebb1 100644 --- a/ports/esp32s2/boards/crumpspace_crumps2/pins.c +++ b/ports/esp32s2/boards/crumpspace_crumps2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/electroniccats_bastwifi/pins.c b/ports/esp32s2/boards/electroniccats_bastwifi/pins.c index 2d609a1ec6..4d5fdf0c8d 100644 --- a/ports/esp32s2/boards/electroniccats_bastwifi/pins.c +++ b/ports/esp32s2/boards/electroniccats_bastwifi/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c b/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c index 536f7e91c6..1ec7ee599a 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c +++ b/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c @@ -17,7 +17,7 @@ STATIC const mp_rom_obj_tuple_t camera_data_tuple = { }; STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/espressif_kaluga_1/pins.c b/ports/esp32s2/boards/espressif_kaluga_1/pins.c index 2f96e8def2..c294067f58 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1/pins.c +++ b/ports/esp32s2/boards/espressif_kaluga_1/pins.c @@ -17,7 +17,7 @@ STATIC const mp_rom_obj_tuple_t camera_data_tuple = { }; STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c b/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c index d01c7d76d8..e4e4c09220 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c index d01c7d76d8..e4e4c09220 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c b/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c index d01c7d76d8..e4e4c09220 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c b/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c index d01c7d76d8..e4e4c09220 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/pins.c b/ports/esp32s2/boards/gravitech_cucumber_m/pins.c index f09a0e318f..fe4420386c 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_m/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_m/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c b/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c index 7c43bd41f4..b40daa2211 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/pins.c b/ports/esp32s2/boards/gravitech_cucumber_r/pins.c index f09a0e318f..fe4420386c 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_r/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_r/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c b/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c index 7c43bd41f4..b40daa2211 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c index a9a4893280..097b1f055d 100644 --- a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c +++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c @@ -2,7 +2,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/microdev_micro_s2/pins.c b/ports/esp32s2/boards/microdev_micro_s2/pins.c index 18dadb716c..e0607cea66 100644 --- a/ports/esp32s2/boards/microdev_micro_s2/pins.c +++ b/ports/esp32s2/boards/microdev_micro_s2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c index 52c12445da..d0dcc37958 100644 --- a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c +++ b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c @@ -2,7 +2,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c b/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c index d01c7d76d8..e4e4c09220 100644 --- a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c +++ b/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c b/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c index d01c7d76d8..e4e4c09220 100644 --- a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c +++ b/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c index d34fbc9e21..0b6f27c13e 100644 --- a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c +++ b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO21) }, diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/pins.c b/ports/esp32s2/boards/targett_module_clip_wroom/pins.c index f1245f1217..736df1baae 100644 --- a/ports/esp32s2/boards/targett_module_clip_wroom/pins.c +++ b/ports/esp32s2/boards/targett_module_clip_wroom/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c index f1245f1217..736df1baae 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c +++ b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c index 445900b7fe..73b4c5c892 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c index 4d5b45de8c..b61c5099d0 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c b/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c index 0c58dcdad5..3fbfe36c98 100644 --- a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/litex/boards/fomu/pins.c b/ports/litex/boards/fomu/pins.c index ec990adefd..8bab4257a5 100644 --- a/ports/litex/boards/fomu/pins.c +++ b/ports/litex/boards/fomu/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_TOUCH1), MP_ROM_PTR(&pin_TOUCH1) }, { MP_ROM_QSTR(MP_QSTR_TOUCH2), MP_ROM_PTR(&pin_TOUCH2) }, diff --git a/ports/mimxrt10xx/boards/feather_m7_1011/pins.c b/ports/mimxrt10xx/boards/feather_m7_1011/pins.c index 7f56cb7819..1dbe02a5ce 100644 --- a/ports/mimxrt10xx/boards/feather_m7_1011/pins.c +++ b/ports/mimxrt10xx/boards/feather_m7_1011/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_11) }, diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c b/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c index 6da54626bf..6536e52ff8 100644 --- a/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c +++ b/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_14) }, diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c b/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c index b05d4c4ab2..93a6d06c2d 100644 --- a/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c +++ b/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B0_13) }, diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c index 8c0dc57b15..e45b23003f 100644 --- a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_10) }, diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c index 728958f29e..bdd15f75f9 100644 --- a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c index 80659839ec..27a0ad701b 100644 --- a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c index f97ff90d7e..5f867932fb 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c +++ b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_02) }, diff --git a/ports/mimxrt10xx/boards/teensy40/pins.c b/ports/mimxrt10xx/boards/teensy40/pins.c index e74dc7d9d1..37d2a56178 100644 --- a/ports/mimxrt10xx/boards/teensy40/pins.c +++ b/ports/mimxrt10xx/boards/teensy40/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // With USB on left. Bottom edge. { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, diff --git a/ports/mimxrt10xx/boards/teensy41/pins.c b/ports/mimxrt10xx/boards/teensy41/pins.c index d83d3de9e5..fdf1116c2f 100644 --- a/ports/mimxrt10xx/boards/teensy41/pins.c +++ b/ports/mimxrt10xx/boards/teensy41/pins.c @@ -3,7 +3,7 @@ #include "supervisor/board.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // With USB on left. Bottom edge. { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, diff --git a/ports/nrf/boards/ADM_B_NRF52840_1/pins.c b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c index fc7425f751..5045e29e8c 100644 --- a/ports/nrf/boards/ADM_B_NRF52840_1/pins.c +++ b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P0_02) }, diff --git a/ports/nrf/boards/TG-Watch/pins.c b/ports/nrf/boards/TG-Watch/pins.c index 003bdb9967..1a7ca117c5 100644 --- a/ports/nrf/boards/TG-Watch/pins.c +++ b/ports/nrf/boards/TG-Watch/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, /* default ports */ diff --git a/ports/nrf/boards/aramcon2_badge/pins.c b/ports/nrf/boards/aramcon2_badge/pins.c index e83decdccf..f46afcfe9f 100644 --- a/ports/nrf/boards/aramcon2_badge/pins.c +++ b/ports/nrf/boards/aramcon2_badge/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_UP_BUTTON), MP_ROM_PTR(&pin_P0_31) }, { MP_ROM_QSTR(MP_QSTR_LEFT_BUTTON), MP_ROM_PTR(&pin_P0_29) }, diff --git a/ports/nrf/boards/aramcon_badge_2019/pins.c b/ports/nrf/boards/aramcon_badge_2019/pins.c index 9f65ecb829..8fc2a482b7 100644 --- a/ports/nrf/boards/aramcon_badge_2019/pins.c +++ b/ports/nrf/boards/aramcon_badge_2019/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_LEFT_BUTTON), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_MIDDLE_BUTTON), MP_ROM_PTR(&pin_P0_29) }, diff --git a/ports/nrf/boards/arduino_nano_33_ble/pins.c b/ports/nrf/boards/arduino_nano_33_ble/pins.c index c039e92c6c..faef38a5f4 100644 --- a/ports/nrf/boards/arduino_nano_33_ble/pins.c +++ b/ports/nrf/boards/arduino_nano_33_ble/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_12) }, diff --git a/ports/nrf/boards/bastble/pins.c b/ports/nrf/boards/bastble/pins.c index ac9d3c5df7..f6bbdd2c6b 100644 --- a/ports/nrf/boards/bastble/pins.c +++ b/ports/nrf/boards/bastble/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_10) }, diff --git a/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c b/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c index 8af2eeab7b..9095b8cb35 100644 --- a/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c +++ b/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_02) }, // TP7 { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P0_03) }, // TP6 diff --git a/ports/nrf/boards/bluemicro840/pins.c b/ports/nrf/boards/bluemicro840/pins.c index 24b3d8c611..9651faa6b8 100644 --- a/ports/nrf/boards/bluemicro840/pins.c +++ b/ports/nrf/boards/bluemicro840/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/circuitplayground_bluefruit/pins.c b/ports/nrf/boards/circuitplayground_bluefruit/pins.c index 7478b25159..74f7be2fe1 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/pins.c +++ b/ports/nrf/boards/circuitplayground_bluefruit/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_AUDIO), MP_ROM_PTR(&pin_P0_26) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_26) }, diff --git a/ports/nrf/boards/clue_nrf52840_express/pins.c b/ports/nrf/boards/clue_nrf52840_express/pins.c index 4f5efcfc77..654c0d414a 100644 --- a/ports/nrf/boards/clue_nrf52840_express/pins.c +++ b/ports/nrf/boards/clue_nrf52840_express/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/electronut_labs_blip/pins.c b/ports/nrf/boards/electronut_labs_blip/pins.c index 9525a39b8e..02fb2e4600 100644 --- a/ports/nrf/boards/electronut_labs_blip/pins.c +++ b/ports/nrf/boards/electronut_labs_blip/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/electronut_labs_papyr/pins.c b/ports/nrf/boards/electronut_labs_papyr/pins.c index 9103f4a978..ae06cd3339 100644 --- a/ports/nrf/boards/electronut_labs_papyr/pins.c +++ b/ports/nrf/boards/electronut_labs_papyr/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_06) }, diff --git a/ports/nrf/boards/feather_bluefruit_sense/pins.c b/ports/nrf/boards/feather_bluefruit_sense/pins.c index 876652c2b7..fd28834563 100644 --- a/ports/nrf/boards/feather_bluefruit_sense/pins.c +++ b/ports/nrf/boards/feather_bluefruit_sense/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/nrf/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c index cf91d74539..99f7cf4a09 100644 --- a/ports/nrf/boards/feather_nrf52840_express/pins.c +++ b/ports/nrf/boards/feather_nrf52840_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/nrf/boards/hiibot_bluefi/pins.c b/ports/nrf/boards/hiibot_bluefi/pins.c index 12b290e9a9..d9774ff3a3 100644 --- a/ports/nrf/boards/hiibot_bluefi/pins.c +++ b/ports/nrf/boards/hiibot_bluefi/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_28) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/ikigaisense_vita/pins.c b/ports/nrf/boards/ikigaisense_vita/pins.c index 8bd6b596ea..25463eba36 100644 --- a/ports/nrf/boards/ikigaisense_vita/pins.c +++ b/ports/nrf/boards/ikigaisense_vita/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_29) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P1_15) }, diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c b/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c index a976ae518f..7bcb0d9eca 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_30) }, diff --git a/ports/nrf/boards/makerdiary_m60_keyboard/pins.c b/ports/nrf/boards/makerdiary_m60_keyboard/pins.c index ba4678930c..c1b4d34d02 100644 --- a/ports/nrf/boards/makerdiary_m60_keyboard/pins.c +++ b/ports/nrf/boards/makerdiary_m60_keyboard/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_R1), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_R2), MP_ROM_PTR(&pin_P0_06) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c index f701d8e704..cc066645b3 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c index c7c0b4c42b..3005f6df27 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c index 24a9063bd8..d4593194f8 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/metro_nrf52840_express/pins.c b/ports/nrf/boards/metro_nrf52840_express/pins.c index 3b94bc1664..46a2c9259b 100644 --- a/ports/nrf/boards/metro_nrf52840_express/pins.c +++ b/ports/nrf/boards/metro_nrf52840_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/nrf/boards/microbit_v2/pins.c b/ports/nrf/boards/microbit_v2/pins.c index deeeb2305d..d92939baf1 100644 --- a/ports/nrf/boards/microbit_v2/pins.c +++ b/ports/nrf/boards/microbit_v2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_02) }, // RING0 { MP_ROM_QSTR(MP_QSTR_P1), MP_ROM_PTR(&pin_P0_03) }, // RING1 diff --git a/ports/nrf/boards/nice_nano/pins.c b/ports/nrf/boards/nice_nano/pins.c index a5720569f2..b69b4acd46 100644 --- a/ports/nrf/boards/nice_nano/pins.c +++ b/ports/nrf/boards/nice_nano/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/ohs2020_badge/pins.c b/ports/nrf/boards/ohs2020_badge/pins.c index 524256cb08..4ef7a37c69 100644 --- a/ports/nrf/boards/ohs2020_badge/pins.c +++ b/ports/nrf/boards/ohs2020_badge/pins.c @@ -2,7 +2,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_25) }, { MP_ROM_QSTR(MP_QSTR_MICROPHONE_DATA), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/particle_argon/pins.c b/ports/nrf/boards/particle_argon/pins.c index bf34b9f834..c094fa6120 100644 --- a/ports/nrf/boards/particle_argon/pins.c +++ b/ports/nrf/boards/particle_argon/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/particle_boron/pins.c b/ports/nrf/boards/particle_boron/pins.c index 2567c37f99..2cb87272e8 100644 --- a/ports/nrf/boards/particle_boron/pins.c +++ b/ports/nrf/boards/particle_boron/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/particle_xenon/pins.c b/ports/nrf/boards/particle_xenon/pins.c index 8c9d2b8e2c..58d0856c44 100644 --- a/ports/nrf/boards/particle_xenon/pins.c +++ b/ports/nrf/boards/particle_xenon/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/pca10056/pins.c b/ports/nrf/boards/pca10056/pins.c index 7a7c01a369..8bb4f4bf57 100644 --- a/ports/nrf/boards/pca10056/pins.c +++ b/ports/nrf/boards/pca10056/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0_00), MP_ROM_PTR(&pin_P0_00) }, { MP_ROM_QSTR(MP_QSTR_P0_01), MP_ROM_PTR(&pin_P0_01) }, diff --git a/ports/nrf/boards/pca10059/pins.c b/ports/nrf/boards/pca10059/pins.c index f4423f101e..883bc23927 100644 --- a/ports/nrf/boards/pca10059/pins.c +++ b/ports/nrf/boards/pca10059/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/pca10100/pins.c b/ports/nrf/boards/pca10100/pins.c index a99d0fec69..11c34bcae7 100644 --- a/ports/nrf/boards/pca10100/pins.c +++ b/ports/nrf/boards/pca10100/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, diff --git a/ports/nrf/boards/pitaya_go/pins.c b/ports/nrf/boards/pitaya_go/pins.c index c957e92ed2..6778763274 100644 --- a/ports/nrf/boards/pitaya_go/pins.c +++ b/ports/nrf/boards/pitaya_go/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c b/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c index 53c81f642a..472d0832cb 100644 --- a/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c +++ b/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/raytac_mdbt50q-rx/pins.c b/ports/nrf/boards/raytac_mdbt50q-rx/pins.c index c0d5189308..6add442df3 100644 --- a/ports/nrf/boards/raytac_mdbt50q-rx/pins.c +++ b/ports/nrf/boards/raytac_mdbt50q-rx/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_P0_15) }, diff --git a/ports/nrf/boards/simmel/pins.c b/ports/nrf/boards/simmel/pins.c index e7e04d4b14..eaf0b4ec09 100644 --- a/ports/nrf/boards/simmel/pins.c +++ b/ports/nrf/boards/simmel/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI_CSN), MP_ROM_PTR(&pin_P1_06) }, { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_P1_04) }, diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c index 8b7b1e1ec0..4d4599f166 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c @@ -28,7 +28,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c index 2340341285..096e7aa2d3 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_15) }, // D1/TX { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_17) }, // D0/RX diff --git a/ports/nrf/boards/teknikio_bluebird/pins.c b/ports/nrf/boards/teknikio_bluebird/pins.c index d6b0810c32..d34b468971 100644 --- a/ports/nrf/boards/teknikio_bluebird/pins.c +++ b/ports/nrf/boards/teknikio_bluebird/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, diff --git a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c index 126de88f99..43c850fc85 100644 --- a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c +++ b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c index 7e380f0f5e..4143c9cd15 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c index 6edc395d97..f890677859 100644 --- a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c index bfae6257f2..e24b623dac 100644 --- a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c @@ -2,7 +2,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_KEY1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_KEY2), MP_ROM_PTR(&pin_GPIO2) }, diff --git a/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c b/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c index 19a897b8dd..9cd031b36e 100644 --- a/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c +++ b/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO16) }, diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c index d611221280..5fe9ea01a3 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO29) }, diff --git a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c index 385f5de25c..5ebce34a9b 100644 --- a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c +++ b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c b/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c index a1f1a7355a..5f6b31a872 100644 --- a/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c +++ b/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c index a967474f05..fefaf70cfd 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c +++ b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_R0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c b/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c index 8cc6bed865..d7b0b8f76c 100644 --- a/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/raspberrypi/boards/pimoroni_pga2040/pins.c b/ports/raspberrypi/boards/pimoroni_pga2040/pins.c index c2aaf5d75b..7d911385d7 100644 --- a/ports/raspberrypi/boards/pimoroni_pga2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_pga2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c index 0083d8efe2..fb2da2e598 100644 --- a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c index 0083d8efe2..fb2da2e598 100644 --- a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/pins.c b/ports/raspberrypi/boards/pimoroni_picosystem/pins.c index 1c6755aaad..30587015b2 100644 --- a/ports/raspberrypi/boards/pimoroni_picosystem/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picosystem/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c index f8b6f917c1..e7ba2a1546 100644 --- a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_SW_B), MP_ROM_PTR(&pin_GPIO13) }, diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c b/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c index 813a9583f1..d0c4bb9947 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c index 00656285d8..e848ec53df 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c +++ b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, diff --git a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c index 314eb6c461..ac3ccdb340 100644 --- a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c @@ -28,7 +28,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c index e45e2d1dbc..9235963d65 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, diff --git a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c index 92d12d5b91..84b137fefc 100644 --- a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // Left side breakouts, top-to-bottom, as labeled { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, diff --git a/ports/stm/boards/espruino_pico/pins.c b/ports/stm/boards/espruino_pico/pins.c index e8d9e07cc7..7627146c96 100644 --- a/ports/stm/boards/espruino_pico/pins.c +++ b/ports/stm/boards/espruino_pico/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_B15), MP_ROM_PTR(&pin_PB15) }, { MP_ROM_QSTR(MP_QSTR_B14), MP_ROM_PTR(&pin_PB14) }, diff --git a/ports/stm/boards/espruino_wifi/pins.c b/ports/stm/boards/espruino_wifi/pins.c index a1a40235ab..b4a3a6f8b8 100644 --- a/ports/stm/boards/espruino_wifi/pins.c +++ b/ports/stm/boards/espruino_wifi/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // P1 { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA00) }, diff --git a/ports/stm/boards/feather_stm32f405_express/pins.c b/ports/stm/boards/feather_stm32f405_express/pins.c index 0062900d2a..f7824ea93c 100644 --- a/ports/stm/boards/feather_stm32f405_express/pins.c +++ b/ports/stm/boards/feather_stm32f405_express/pins.c @@ -13,7 +13,7 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { }; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/stm/boards/meowbit_v121/pins.c b/ports/stm/boards/meowbit_v121/pins.c index f3991faa6d..20a9ab3d7c 100644 --- a/ports/stm/boards/meowbit_v121/pins.c +++ b/ports/stm/boards/meowbit_v121/pins.c @@ -7,7 +7,7 @@ extern audiopwmio_pwmaudioout_obj_t board_buzz_obj; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_PB04) }, { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_PB05) }, diff --git a/ports/stm/boards/nucleo_f746zg/pins.c b/ports/stm/boards/nucleo_f746zg/pins.c index 9ac3a1abf7..1fcc49c3cf 100644 --- a/ports/stm/boards/nucleo_f746zg/pins.c +++ b/ports/stm/boards/nucleo_f746zg/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/nucleo_f767zi/pins.c b/ports/stm/boards/nucleo_f767zi/pins.c index 8982ab7fb6..57bd675efa 100644 --- a/ports/stm/boards/nucleo_f767zi/pins.c +++ b/ports/stm/boards/nucleo_f767zi/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/nucleo_h743zi_2/pins.c b/ports/stm/boards/nucleo_h743zi_2/pins.c index 24e5e295c6..c56e4c69e5 100644 --- a/ports/stm/boards/nucleo_h743zi_2/pins.c +++ b/ports/stm/boards/nucleo_h743zi_2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/openmv_h7/pins.c b/ports/stm/boards/openmv_h7/pins.c index 8a94c2fe5a..99d677a3a6 100644 --- a/ports/stm/boards/openmv_h7/pins.c +++ b/ports/stm/boards/openmv_h7/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_PB15) }, { MP_ROM_QSTR(MP_QSTR_P1), MP_ROM_PTR(&pin_PB14) }, diff --git a/ports/stm/boards/pyb_nano_v2/pins.c b/ports/stm/boards/pyb_nano_v2/pins.c index 57e358fa30..d61c0b51f1 100644 --- a/ports/stm/boards/pyb_nano_v2/pins.c +++ b/ports/stm/boards/pyb_nano_v2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_Y10), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_Y9), MP_ROM_PTR(&pin_PA13) }, diff --git a/ports/stm/boards/pyboard_v11/pins.c b/ports/stm/boards/pyboard_v11/pins.c index bd5416fbe5..ac7e43c9a7 100644 --- a/ports/stm/boards/pyboard_v11/pins.c +++ b/ports/stm/boards/pyboard_v11/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_Y1), MP_ROM_PTR(&pin_PC06) }, { MP_ROM_QSTR(MP_QSTR_Y2), MP_ROM_PTR(&pin_PC07) }, diff --git a/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c b/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c index ca313cb21f..8f06a784a4 100644 --- a/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c +++ b/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c @@ -27,7 +27,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the diff --git a/ports/stm/boards/stm32f411ce_blackpill/pins.c b/ports/stm/boards/stm32f411ce_blackpill/pins.c index 456a3c9aa5..9d1ed63c59 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/pins.c +++ b/ports/stm/boards/stm32f411ce_blackpill/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_B12), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_PB13) }, diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c b/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c index 456a3c9aa5..9d1ed63c59 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_B12), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_PB13) }, diff --git a/ports/stm/boards/stm32f411ve_discovery/pins.c b/ports/stm/boards/stm32f411ve_discovery/pins.c index 03c90d94d5..32e13753f3 100644 --- a/ports/stm/boards/stm32f411ve_discovery/pins.c +++ b/ports/stm/boards/stm32f411ve_discovery/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // P1 { MP_ROM_QSTR(MP_QSTR_PC00), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/stm32f412zg_discovery/pins.c b/ports/stm/boards/stm32f412zg_discovery/pins.c index 148834d4a3..26c930ccb6 100644 --- a/ports/stm/boards/stm32f412zg_discovery/pins.c +++ b/ports/stm/boards/stm32f412zg_discovery/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_PE02), MP_ROM_PTR(&pin_PE02) }, { MP_ROM_QSTR(MP_QSTR_PE03), MP_ROM_PTR(&pin_PE03) }, diff --git a/ports/stm/boards/stm32f4_discovery/pins.c b/ports/stm/boards/stm32f4_discovery/pins.c index 70b647aa9a..2427e1ab53 100644 --- a/ports/stm/boards/stm32f4_discovery/pins.c +++ b/ports/stm/boards/stm32f4_discovery/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, // P1 { MP_ROM_QSTR(MP_QSTR_PC00), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/stm32f746g_discovery/pins.c b/ports/stm/boards/stm32f746g_discovery/pins.c index 41ca856f75..3b12f108bd 100644 --- a/ports/stm/boards/stm32f746g_discovery/pins.c +++ b/ports/stm/boards/stm32f746g_discovery/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PF10) }, diff --git a/ports/stm/boards/thunderpack_v11/pins.c b/ports/stm/boards/thunderpack_v11/pins.c index 33a7fb362c..2f6c2a471f 100644 --- a/ports/stm/boards/thunderpack_v11/pins.c +++ b/ports/stm/boards/thunderpack_v11/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_PA0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_PA1), MP_ROM_PTR(&pin_PA01) }, diff --git a/ports/stm/boards/thunderpack_v12/pins.c b/ports/stm/boards/thunderpack_v12/pins.c index c47a6f47c9..cc49a8ce42 100644 --- a/ports/stm/boards/thunderpack_v12/pins.c +++ b/ports/stm/boards/thunderpack_v12/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_ID), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, { MP_ROM_QSTR(MP_QSTR_PA0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_PA1), MP_ROM_PTR(&pin_PA01) }, From 318ea7c8cb8ac49a741d58f60947d68a9c921909 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 26 Aug 2021 16:04:43 -0500 Subject: [PATCH 291/418] Add Espressif's HMI DevKit this is only tested to come up to the REPL & mount CIRCUITPY. Pin assignments should be right but were not double-checked. The screen is unsupported so far. This board depends on the I/O pull ups for the I2C bus (verified by schematic) so this adds a compile time option that enables pull ups for ANY i2c bus on a board. --- .github/workflows/build.yml | 1 + .../boards/espressif_hmi_devkit_1/board.c | 50 ++++++++++++ .../espressif_hmi_devkit_1/mpconfigboard.h | 47 +++++++++++ .../espressif_hmi_devkit_1/mpconfigboard.mk | 17 ++++ .../boards/espressif_hmi_devkit_1/pins.c | 78 +++++++++++++++++++ .../boards/espressif_hmi_devkit_1/sdkconfig | 33 ++++++++ ports/esp32s2/common-hal/busio/I2C.c | 12 ++- ports/esp32s2/mpconfigport.h | 9 +++ 8 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 ports/esp32s2/boards/espressif_hmi_devkit_1/board.c create mode 100644 ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h create mode 100644 ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c create mode 100644 ports/esp32s2/boards/espressif_hmi_devkit_1/sdkconfig diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a29a702d87..10468a7da8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -509,6 +509,7 @@ jobs: - "atmegazero_esp32s2" - "crumpspace_crumps2" - "electroniccats_bastwifi" + - "espressif_hmi_devkit_1" - "espressif_kaluga_1" - "espressif_kaluga_1.3" - "espressif_saola_1_wroom" diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/board.c b/ports/esp32s2/boards/espressif_hmi_devkit_1/board.c new file mode 100644 index 0000000000..ff5d9cfb6c --- /dev/null +++ b/ports/esp32s2/boards/espressif_hmi_devkit_1/board.c @@ -0,0 +1,50 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h b/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h new file mode 100644 index 0000000000..9379c015b2 --- /dev/null +++ b/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "HMI-DevKit-1.1" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO21) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO39) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO40) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (1) diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk b/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk new file mode 100644 index 0000000000..a7542e9ae8 --- /dev/null +++ b/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x80B9 +USB_PRODUCT = "ESP32-S2-HMI-DevKit-1" +USB_MANUFACTURER = "Espressif" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c b/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c new file mode 100644 index 0000000000..1b4779f374 --- /dev/null +++ b/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c @@ -0,0 +1,78 @@ +#include "py/objtuple.h" +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_obj_tuple_t lcd_data_tuple = { + {&mp_type_tuple}, + 8, + { + MP_ROM_PTR(&pin_GPIO1), + MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO2), + MP_ROM_PTR(&pin_GPIO11), + MP_ROM_PTR(&pin_GPIO3), + MP_ROM_PTR(&pin_GPIO12), + MP_ROM_PTR(&pin_GPIO4), + MP_ROM_PTR(&pin_GPIO13), + MP_ROM_PTR(&pin_GPIO5), + MP_ROM_PTR(&pin_GPIO14), + MP_ROM_PTR(&pin_GPIO6), + MP_ROM_PTR(&pin_GPIO15), + MP_ROM_PTR(&pin_GPIO7), + MP_ROM_PTR(&pin_GPIO16), + MP_ROM_PTR(&pin_GPIO8), + MP_ROM_PTR(&pin_GPIO17), + } +}; + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_LCD_RS), MP_ROM_PTR(&pin_GPIO38) }, + + // LCD + { MP_ROM_QSTR(MP_QSTR_LCD_DATA), MP_ROM_PTR(&lcd_data_tuple) }, + { MP_ROM_QSTR(MP_QSTR_LCD_WR), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_LCD_RS), MP_ROM_PTR(&pin_GPIO38) }, + + // SPI and SD + { MP_ROM_QSTR(MP_QSTR_CS_SD), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_CS_CNN), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(DEFAULT_SPI_BUS_MISO) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(DEFAULT_SPI_BUS_MOSI) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(DEFAULT_SPI_BUS_SCK) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + + // I2C + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + + // canbus (TWAI) + { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_GPIO42) }, + + // Audio + { MP_ROM_QSTR(MP_QSTR_MIC_ADC_M), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_DAC_OUT), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_SPI_MISO), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_SPI_MOSI), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_SPI_SCK), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_SPI_CS), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_BT_ADC), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_SCL), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_MCLK), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_BCLK), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_LRCK), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_SDI), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S0_SDO), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_RST), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_WAKE_INT), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_MCLK), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_PA_CTRL), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_SDI), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_SDO), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_LRCK_DAC1), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_BCLK_DAC2), MP_ROM_PTR(&pin_GPIO18) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/sdkconfig b/ports/esp32s2/boards/espressif_hmi_devkit_1/sdkconfig new file mode 100644 index 0000000000..9d8bbde967 --- /dev/null +++ b/ports/esp32s2/boards/espressif_hmi_devkit_1/sdkconfig @@ -0,0 +1,33 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config diff --git a/ports/esp32s2/common-hal/busio/I2C.c b/ports/esp32s2/common-hal/busio/I2C.c index fd887c31ac..be80538582 100644 --- a/ports/esp32s2/common-hal/busio/I2C.c +++ b/ports/esp32s2/common-hal/busio/I2C.c @@ -78,8 +78,13 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, gpio_pulldown_dis(sda->number); gpio_pulldown_dis(scl->number); + #if CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP + gpio_pullup_en(sda->number); + gpio_pullup_en(scl->number); + #endif + // We must pull up within 3us to achieve 400khz. - common_hal_mcu_delay_us(3); + common_hal_mcu_delay_us((1200000 + frequency - 1) / frequency); if (gpio_get_level(sda->number) == 0 || gpio_get_level(scl->number) == 0) { reset_pin_number(sda->number); @@ -112,8 +117,13 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, .mode = I2C_MODE_MASTER, .sda_io_num = self->sda_pin->number, .scl_io_num = self->scl_pin->number, + #if CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP + .sda_pullup_en = GPIO_PULLUP_ENABLE, /*!< Internal GPIO pull mode for I2C sda signal*/ + .scl_pullup_en = GPIO_PULLUP_ENABLE, /*!< Internal GPIO pull mode for I2C scl signal*/ + #else .sda_pullup_en = GPIO_PULLUP_DISABLE, /*!< Internal GPIO pull mode for I2C sda signal*/ .scl_pullup_en = GPIO_PULLUP_DISABLE, /*!< Internal GPIO pull mode for I2C scl signal*/ + #endif .master = { .clk_speed = frequency, diff --git a/ports/esp32s2/mpconfigport.h b/ports/esp32s2/mpconfigport.h index a3db0ab3d5..6a05b474ec 100644 --- a/ports/esp32s2/mpconfigport.h +++ b/ports/esp32s2/mpconfigport.h @@ -46,4 +46,13 @@ #define CIRCUITPY_INTERNAL_NVM_SIZE (20 * 1024) #endif +// Define to (1) in mpconfigboard.h if the board has a defined I2C port that +// lacks pull up resistors (Espressif's HMI Devkit), and the internal pull-up +// resistors will be enabled for all busio.I2C objects. This is only to +// compensate for design decisions that are out of the control of the authors +// of CircuitPython and is not an endorsement of running without appropriate +// external pull up resistors. +#ifndef CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP +#define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0) +#endif #endif // __INCLUDED_ESP32S2_MPCONFIGPORT_H From 1302ef62f7b12836f306043c19491bc6c93c5288 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Thu, 26 Aug 2021 23:18:36 +0200 Subject: [PATCH 292/418] rebase, add adafruit_led_glasses_nrf52840 --- ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c index 0c6ca12d92..f387c27611 100644 --- a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + { MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_00) }, { MP_ROM_QSTR(MP_QSTR_MICROPHONE_DATA), MP_ROM_PTR(&pin_P0_27) }, From 19420fb2cfb625a01acdea4f1d12381d632c32c6 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Thu, 26 Aug 2021 18:44:37 +0000 Subject: [PATCH 293/418] Translated using Weblate (Swedish) Currently translated at 100.0% (1021 of 1021 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 41fd2942c5..f5aff4c856 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-26 17:10+0000\n" +"PO-Revision-Date: 2021-08-26 21:34+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -115,7 +115,7 @@ msgstr "Indexet %q måste vara ett heltal, inte %s" #: py/argcheck.c msgid "%q length must be %d-%d" -msgstr "" +msgstr "längden på %q måste vara %d-%d" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" From b8f2799609159ba5d215656e49117f3198e9df5a Mon Sep 17 00:00:00 2001 From: Rob Capellini Date: Thu, 26 Aug 2021 21:32:44 -0400 Subject: [PATCH 294/418] Convert more modules to use MP_REGISTER_MODULE Convert bitbangio, bitmaptools, _bleio, board, busio, countio, digitalio, framebufferio, frequencyio, gamepadshift, getpass, keypad, math, microcontroller, and msgpack modules to use MP_REGISTER_MODULE. Related to #5183. --- py/circuitpy_mpconfig.h | 129 +++------------------ shared-bindings/_bleio/__init__.c | 2 + shared-bindings/bitbangio/__init__.c | 2 + shared-bindings/bitmaptools/__init__.c | 3 + shared-bindings/board/__init__.c | 2 + shared-bindings/busio/__init__.c | 2 + shared-bindings/countio/__init__.c | 2 + shared-bindings/digitalio/__init__.c | 2 + shared-bindings/framebufferio/__init__.c | 4 + shared-bindings/frequencyio/__init__.c | 2 + shared-bindings/gamepadshift/__init__.c | 3 + shared-bindings/getpass/__init__.c | 2 + shared-bindings/keypad/__init__.c | 2 + shared-bindings/math/__init__.c | 4 +- shared-bindings/microcontroller/__init__.c | 2 + shared-bindings/msgpack/__init__.c | 2 + 16 files changed, 51 insertions(+), 114 deletions(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index d3bf62d2f7..1db489b953 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -280,19 +280,8 @@ extern const struct _mp_obj_module_t audiopwmio_module; #define BINASCII_MODULE #endif -#if CIRCUITPY_BITBANGIO -#define BITBANGIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_bitbangio), (mp_obj_t)&bitbangio_module }, -extern const struct _mp_obj_module_t bitbangio_module; -#else -#define BITBANGIO_MODULE -#endif - -#if CIRCUITPY_BITMAPTOOLS -#define BITMAPTOOLS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_bitmaptools), (mp_obj_t)&bitmaptools_module }, -extern const struct _mp_obj_module_t bitmaptools_module; -#else -#define BITMAPTOOLS_MODULE -#endif +// CIRCUITPY_BITBANGIO uses MP_REGISTER_MODULE +// CIRCUITPY_BITMAPTOOLS uses MP_REGISTER_MODULE #if CIRCUITPY_BITOPS extern const struct _mp_obj_module_t bitops_module; @@ -301,17 +290,10 @@ extern const struct _mp_obj_module_t bitops_module; #define BITOPS_MODULE #endif -#if CIRCUITPY_BLEIO -#define BLEIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__bleio), (mp_obj_t)&bleio_module }, -extern const struct _mp_obj_module_t bleio_module; -#else -#define BLEIO_MODULE -#endif +// CIRCUITPY_BLEIO uses MP_REGISTER_MODULE +// CIRCUITPY_BOARD uses MP_REGISTER_MODULE #if CIRCUITPY_BOARD -#define BOARD_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_board), (mp_obj_t)&board_module }, -extern const struct _mp_obj_module_t board_module; - #define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL)) #define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI)) #define BOARD_UART (defined(DEFAULT_UART_BUS_RX) && defined(DEFAULT_UART_BUS_TX)) @@ -325,18 +307,11 @@ extern const struct _mp_obj_module_t board_module; #endif #else -#define BOARD_MODULE #define BOARD_UART_ROOT_POINTER #endif // CIRCUITPY_BUSDEVICE (adafruit_bus_device_module) uses MP_REGISTER_MODULE - -#if CIRCUITPY_BUSIO -extern const struct _mp_obj_module_t busio_module; -#define BUSIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_busio), (mp_obj_t)&busio_module }, -#else -#define BUSIO_MODULE -#endif +// CIRCUITPY_BUSIO uses MP_REGISTER_MODULE #if CIRCUITPY_CAMERA extern const struct _mp_obj_module_t camera_module; @@ -352,20 +327,8 @@ extern const struct _mp_obj_module_t canio_module; #define CANIO_MODULE #endif -#if CIRCUITPY_COUNTIO -extern const struct _mp_obj_module_t countio_module; -#define COUNTIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_countio), (mp_obj_t)&countio_module }, -#else -#define COUNTIO_MODULE -#endif - -#if CIRCUITPY_DIGITALIO -extern const struct _mp_obj_module_t digitalio_module; -#define DIGITALIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_digitalio), (mp_obj_t)&digitalio_module }, -#else -#define DIGITALIO_MODULE -#endif - +// CIRCUITPY_COUNTIO uses MP_REGISTER_MODULE +// CIRCUITPY_DIGITALIO uses MP_REGISTER_MODULE // CIRCUITPY_DISPLAYIO uses MP_REGISTER_MODULE // CIRCUITPY_TERMINALIO uses MP_REGISTER_MODULE // CIRCUITPY_FONTIO uses MP_REGISTER_MODULE @@ -409,12 +372,7 @@ extern const struct _mp_obj_module_t _eve_module; #define _EVE_MODULE #endif -#if CIRCUITPY_FRAMEBUFFERIO -extern const struct _mp_obj_module_t framebufferio_module; -#define FRAMEBUFFERIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_framebufferio), (mp_obj_t)&framebufferio_module }, -#else -#define FRAMEBUFFERIO_MODULE -#endif +// CIRCUITPY_FRAMEBUFFERIO uses MP_REGISTER_MODULE #if CIRCUITPY_VECTORIO extern const struct _mp_obj_module_t vectorio_module; @@ -423,19 +381,8 @@ extern const struct _mp_obj_module_t vectorio_module; #define VECTORIO_MODULE #endif -#if CIRCUITPY_FREQUENCYIO -extern const struct _mp_obj_module_t frequencyio_module; -#define FREQUENCYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_frequencyio), (mp_obj_t)&frequencyio_module }, -#else -#define FREQUENCYIO_MODULE -#endif - -#if CIRCUITPY_GAMEPADSHIFT -extern const struct _mp_obj_module_t gamepadshift_module; -#define GAMEPADSHIFT_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gamepadshift),(mp_obj_t)&gamepadshift_module }, -#else -#define GAMEPADSHIFT_MODULE -#endif +// CIRCUITPY_FREQUENCYIO uses MP_REGISTER_MODULE +// CIRCUITPY_GAMEPADSHIFT uses MP_REGISTER_MODULE #if CIRCUITPY_GAMEPADSHIFT // Scan gamepad every 32ms @@ -445,12 +392,7 @@ extern const struct _mp_obj_module_t gamepadshift_module; #define GAMEPAD_ROOT_POINTERS #endif -#if CIRCUITPY_GETPASS -extern const struct _mp_obj_module_t getpass_module; -#define GETPASS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_getpass), (mp_obj_t)&getpass_module }, -#else -#define GETPASS_MODULE -#endif +// CIRCUITPY_GETPASS uses MP_REGISTER_MODULE #if CIRCUITPY_GNSS extern const struct _mp_obj_module_t gnss_module; @@ -492,29 +434,15 @@ extern const struct _mp_obj_module_t ipaddress_module; #define JSON_MODULE #endif +// CIRCUITPY_KEYPAD uses MP_REGISTER_MODULE + #if CIRCUITPY_KEYPAD -extern const struct _mp_obj_module_t keypad_module; -#define KEYPAD_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_keypad), (mp_obj_t)&keypad_module }, #define KEYPAD_ROOT_POINTERS mp_obj_t keypad_scanners_linked_list; #else -#define KEYPAD_MODULE #define KEYPAD_ROOT_POINTERS #endif -#if CIRCUITPY_GAMEPADSHIFT -// Scan gamepadshift every 32ms -#define CIRCUITPY_GAMEPAD_TICKS 0x1f -#define GAMEPAD_ROOT_POINTERS mp_obj_t gamepad_singleton; -#else -#define GAMEPAD_ROOT_POINTERS -#endif - -#if CIRCUITPY_MATH -extern const struct _mp_obj_module_t math_module; -#define MATH_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_math), (mp_obj_t)&math_module }, -#else -#define MATH_MODULE -#endif +// CIRCUITPY_MATH uses MP_REGISTER_MODULE #if CIRCUITPY_MEMORYMONITOR extern const struct _mp_obj_module_t memorymonitor_module; @@ -526,12 +454,7 @@ extern const struct _mp_obj_module_t memorymonitor_module; #define MEMORYMONITOR_ROOT_POINTERS #endif -#if CIRCUITPY_MICROCONTROLLER -extern const struct _mp_obj_module_t microcontroller_module; -#define MICROCONTROLLER_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_microcontroller), (mp_obj_t)µcontroller_module }, -#else -#define MICROCONTROLLER_MODULE -#endif +// CIRCUITPY_MICROCONTROLLER uses MP_REGISTER_MODULE #if CIRCUITPY_NEOPIXEL_WRITE extern const struct _mp_obj_module_t neopixel_write_module; @@ -803,12 +726,7 @@ extern const struct _mp_obj_module_t wifi_module; #define WIFI_MODULE #endif -#if CIRCUITPY_MSGPACK -extern const struct _mp_obj_module_t msgpack_module; -#define MSGPACK_MODULE { MP_ROM_QSTR(MP_QSTR_msgpack), MP_ROM_PTR(&msgpack_module) }, -#else -#define MSGPACK_MODULE -#endif +// CIRCUITPY_MSGPACK uses MP_REGISTER_MODULE // Define certain native modules with weak links so they can be replaced with Python // implementations. This list may grow over time. @@ -833,35 +751,20 @@ extern const struct _mp_obj_module_t msgpack_module; ALARM_MODULE \ AUDIOPWMIO_MODULE \ BINASCII_MODULE \ - BITBANGIO_MODULE \ - BITMAPTOOLS_MODULE \ BITOPS_MODULE \ - BLEIO_MODULE \ - BOARD_MODULE \ - BUSIO_MODULE \ CAMERA_MODULE \ CANIO_MODULE \ - COUNTIO_MODULE \ - DIGITALIO_MODULE \ DUALBANK_MODULE \ VECTORIO_MODULE \ ERRNO_MODULE \ ESPIDF_MODULE \ _EVE_MODULE \ - FRAMEBUFFERIO_MODULE \ - FREQUENCYIO_MODULE \ - GAMEPADSHIFT_MODULE \ - GETPASS_MODULE \ GNSS_MODULE \ I2CPERIPHERAL_MODULE \ IPADDRESS_MODULE \ IMAGECAPTURE_MODULE \ JSON_MODULE \ - KEYPAD_MODULE \ - MATH_MODULE \ MEMORYMONITOR_MODULE \ - MICROCONTROLLER_MODULE \ - MSGPACK_MODULE \ NEOPIXEL_WRITE_MODULE \ ONEWIREIO_MODULE \ PEW_MODULE \ diff --git a/shared-bindings/_bleio/__init__.c b/shared-bindings/_bleio/__init__.c index c89a787d2e..72d96846aa 100644 --- a/shared-bindings/_bleio/__init__.c +++ b/shared-bindings/_bleio/__init__.c @@ -201,3 +201,5 @@ const mp_obj_module_t bleio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&bleio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR__bleio, bleio_module, CIRCUITPY_BLEIO); diff --git a/shared-bindings/bitbangio/__init__.c b/shared-bindings/bitbangio/__init__.c index acf7f05e45..57348a3c1e 100644 --- a/shared-bindings/bitbangio/__init__.c +++ b/shared-bindings/bitbangio/__init__.c @@ -84,3 +84,5 @@ const mp_obj_module_t bitbangio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&bitbangio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_bitbangio, bitbangio_module, CIRCUITPY_BITBANGIO); diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index 4956c61a1f..bd15985838 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -578,6 +578,7 @@ STATIC mp_obj_t bitmaptools_readinto(size_t n_args, const mp_obj_t *pos_args, mp MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_readinto_obj, 0, bitmaptools_readinto); STATIC const mp_rom_map_elem_t bitmaptools_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitmaptools) }, { MP_ROM_QSTR(MP_QSTR_readinto), MP_ROM_PTR(&bitmaptools_readinto_obj) }, { MP_ROM_QSTR(MP_QSTR_rotozoom), MP_ROM_PTR(&bitmaptools_rotozoom_obj) }, { MP_ROM_QSTR(MP_QSTR_arrayblit), MP_ROM_PTR(&bitmaptools_arrayblit_obj) }, @@ -591,3 +592,5 @@ const mp_obj_module_t bitmaptools_module = { .base = {&mp_type_module }, .globals = (mp_obj_dict_t *)&bitmaptools_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_bitmaptools, bitmaptools_module, CIRCUITPY_BITMAPTOOLS); diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index 06b3a899d8..3951639c04 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -124,3 +124,5 @@ const mp_obj_module_t board_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&board_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_board, board_module, CIRCUITPY_BOARD); diff --git a/shared-bindings/busio/__init__.c b/shared-bindings/busio/__init__.c index 38efd06bd9..b2397a65cc 100644 --- a/shared-bindings/busio/__init__.c +++ b/shared-bindings/busio/__init__.c @@ -85,3 +85,5 @@ const mp_obj_module_t busio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&busio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_busio, busio_module, CIRCUITPY_BUSIO); diff --git a/shared-bindings/countio/__init__.c b/shared-bindings/countio/__init__.c index f6c0a4221c..faa23da9b0 100644 --- a/shared-bindings/countio/__init__.c +++ b/shared-bindings/countio/__init__.c @@ -34,3 +34,5 @@ const mp_obj_module_t countio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&countio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_countio, countio_module, CIRCUITPY_COUNTIO); diff --git a/shared-bindings/digitalio/__init__.c b/shared-bindings/digitalio/__init__.c index 52ce377e37..39b569253b 100644 --- a/shared-bindings/digitalio/__init__.c +++ b/shared-bindings/digitalio/__init__.c @@ -90,3 +90,5 @@ const mp_obj_module_t digitalio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&digitalio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_digitalio, digitalio_module, CIRCUITPY_DIGITALIO); diff --git a/shared-bindings/framebufferio/__init__.c b/shared-bindings/framebufferio/__init__.c index ae0f3f906f..5d95ef41f5 100644 --- a/shared-bindings/framebufferio/__init__.c +++ b/shared-bindings/framebufferio/__init__.c @@ -42,9 +42,13 @@ static const mp_rom_map_elem_t framebufferio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_framebufferio) }, { MP_ROM_QSTR(MP_QSTR_FramebufferDisplay), MP_ROM_PTR(&framebufferio_framebufferdisplay_type) }, }; + STATIC MP_DEFINE_CONST_DICT(framebufferio_module_globals, framebufferio_module_globals_table); + const mp_obj_module_t framebufferio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&framebufferio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_framebufferio, framebufferio_module, CIRCUITPY_FRAMEBUFFERIO); #endif diff --git a/shared-bindings/frequencyio/__init__.c b/shared-bindings/frequencyio/__init__.c index 0ad8bbbe9b..02f19de65d 100644 --- a/shared-bindings/frequencyio/__init__.c +++ b/shared-bindings/frequencyio/__init__.c @@ -72,3 +72,5 @@ const mp_obj_module_t frequencyio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&frequencyio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_frequencyio, frequencyio_module, CIRCUITPY_FREQUENCYIO); diff --git a/shared-bindings/gamepadshift/__init__.c b/shared-bindings/gamepadshift/__init__.c index 3c9c4ce8b2..816fd8d7b0 100644 --- a/shared-bindings/gamepadshift/__init__.c +++ b/shared-bindings/gamepadshift/__init__.c @@ -40,9 +40,12 @@ STATIC const mp_rom_map_elem_t gamepadshift_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_gamepadshift) }, { MP_OBJ_NEW_QSTR(MP_QSTR_GamePadShift), MP_ROM_PTR(&gamepadshift_type)}, }; + STATIC MP_DEFINE_CONST_DICT(gamepadshift_module_globals, gamepadshift_module_globals_table); const mp_obj_module_t gamepadshift_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&gamepadshift_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_gamepadshift, gamepadshift_module, CIRCUITPY_GAMEPADSHIFT); diff --git a/shared-bindings/getpass/__init__.c b/shared-bindings/getpass/__init__.c index d627087aae..7c2de89b34 100644 --- a/shared-bindings/getpass/__init__.c +++ b/shared-bindings/getpass/__init__.c @@ -84,3 +84,5 @@ const mp_obj_module_t getpass_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&getpass_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_getpass, getpass_module, CIRCUITPY_GETPASS); diff --git a/shared-bindings/keypad/__init__.c b/shared-bindings/keypad/__init__.c index 30d3dd49f0..e12992ec5f 100644 --- a/shared-bindings/keypad/__init__.c +++ b/shared-bindings/keypad/__init__.c @@ -57,3 +57,5 @@ const mp_obj_module_t keypad_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&keypad_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_keypad, keypad_module, CIRCUITPY_KEYPAD); diff --git a/shared-bindings/math/__init__.c b/shared-bindings/math/__init__.c index f5a8ca9cb3..e38b0a2f7e 100644 --- a/shared-bindings/math/__init__.c +++ b/shared-bindings/math/__init__.c @@ -427,4 +427,6 @@ const mp_obj_module_t math_module = { .globals = (mp_obj_dict_t *)&mp_module_math_globals, }; -#endif // MICROPY_PY_BUILTINS_FLOAT && MICROPY_PY_MATH +MP_REGISTER_MODULE(MP_QSTR_math, math_module, CIRCUITPY_MATH); + +#endif // MICROPY_PY_BUILTINS_FLOAT diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c index 053958cca1..ad77eb6536 100644 --- a/shared-bindings/microcontroller/__init__.c +++ b/shared-bindings/microcontroller/__init__.c @@ -193,3 +193,5 @@ const mp_obj_module_t microcontroller_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&mcu_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_microcontroller, microcontroller_module, CIRCUITPY_MICROCONTROLLER); diff --git a/shared-bindings/msgpack/__init__.c b/shared-bindings/msgpack/__init__.c index c4852f5427..65d5558e60 100644 --- a/shared-bindings/msgpack/__init__.c +++ b/shared-bindings/msgpack/__init__.c @@ -160,3 +160,5 @@ const mp_obj_module_t msgpack_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&msgpack_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_msgpack, msgpack_module, CIRCUITPY_MSGPACK); From 873729149d305c6c73871804c203b9b78c642bfa Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 26 Aug 2021 23:08:10 -0600 Subject: [PATCH 295/418] adding EncodderPad RP2040 --- .github/workflows/build.yml | 1 + .../jpconstantineau_encoderpad_rp2040/board.c | 45 +++++++++++++++++++ .../mpconfigboard.h | 11 +++++ .../mpconfigboard.mk | 9 ++++ .../pico-sdk-configboard.h | 4 ++ .../jpconstantineau_encoderpad_rp2040/pins.c | 39 ++++++++++++++++ 6 files changed, 109 insertions(+) create mode 100644 ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/board.c create mode 100644 ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e2c35f966..5e0d708a28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -290,6 +290,7 @@ jobs: - "itsybitsy_m0_express" - "itsybitsy_m4_express" - "itsybitsy_nrf52840_express" + - "jpconstantineau_encoderpad_rp2040" - "kicksat-sprite" - "loc_ber_m4_base_board" - "makerdiary_m60_keyboard" diff --git a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/board.c b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/board.c new file mode 100644 index 0000000000..57866b00ab --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/board.c @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/board/__init__.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" +#include "supervisor/shared/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + // turn off any left over LED + board_reset_user_neopixels(&pin_GPIO15, 9); +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..317aec7f99 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.h @@ -0,0 +1,11 @@ +#define MICROPY_HW_BOARD_NAME "EncoderPad RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO15) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO26) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO27) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO28) diff --git a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..5a791f2238 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x1d50 +USB_PID = 0x616f +USB_PRODUCT = "EncoderPad RP2040" +USB_MANUFACTURER = "JPConstantineau" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" diff --git a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pins.c b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pins.c new file mode 100644 index 0000000000..8ba0551250 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pins.c @@ -0,0 +1,39 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + + { MP_ROM_QSTR(MP_QSTR_KEY1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_KEY2), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_KEY3), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_KEY4), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_KEY5), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_KEY6), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_KEY7), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_KEY8), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_KEY9), MP_ROM_PTR(&pin_GPIO4) }, + + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_ENCODER_A), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_ROTA), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_ENCODER_B), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_ROTB), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) } +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From e07bce2bf127744e73733eef7194a99c237f3e2c Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Fri, 27 Aug 2021 00:25:22 -0600 Subject: [PATCH 296/418] fixing trailing space --- .../boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk index 5a791f2238..5eacfd5b15 100644 --- a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x1d50 -USB_PID = 0x616f +USB_PID = 0x616f USB_PRODUCT = "EncoderPad RP2040" USB_MANUFACTURER = "JPConstantineau" From 172febefacdd477eb26a9c0211f08faa71a48ea4 Mon Sep 17 00:00:00 2001 From: James Carr <70200140+lesamouraipourpre@users.noreply.github.com> Date: Fri, 27 Aug 2021 12:49:50 +0100 Subject: [PATCH 297/418] Minor typo in README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 52a48b2b3d..69acb8550b 100644 --- a/README.rst +++ b/README.rst @@ -108,7 +108,7 @@ CircuitPython: - Supports native USB on most boards and BLE otherwise, allowing file editing without special tools. - Floats (aka decimals) are enabled for all builds. - Error messages are translated into 10+ languages. -- Concurrenncy within Python is not well supported. Interrupts and threading are disabled. +- Concurrency within Python is not well supported. Interrupts and threading are disabled. async/await keywords are available on some boards for cooperative multitasking. Some concurrency is achieved with native modules for tasks that require it such as audio file playback. From f1d25af7ba18ed0abcdf33c3e86731c8a45c4616 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 27 Aug 2021 08:18:18 -0400 Subject: [PATCH 298/418] Allow PIO to be user-interruptible --- .../bindings/rp2pio/StateMachine.c | 25 +++++++++++---- .../bindings/rp2pio/StateMachine.h | 3 +- .../common-hal/audiobusio/I2SOut.c | 3 +- .../raspberrypi/common-hal/audiobusio/PDMIn.c | 3 +- .../common-hal/displayio/ParallelBus.c | 4 +-- .../imagecapture/ParallelImageCapture.c | 4 ++- .../common-hal/neopixel_write/__init__.c | 3 +- .../raspberrypi/common-hal/pulseio/PulseIn.c | 3 +- .../common-hal/rotaryio/IncrementalEncoder.c | 3 +- .../common-hal/rp2pio/StateMachine.c | 32 ++++++++++++++++--- .../common-hal/rp2pio/StateMachine.h | 12 ++++--- 11 files changed, 69 insertions(+), 26 deletions(-) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index 8d96c51dfe..3dffc39363 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -80,12 +80,13 @@ //| initial_sideset_pin_direction: int = 0x1f, //| exclusive_pin_use: bool = True, //| auto_pull: bool = False, -//| pull_threshold : int = 32, -//| out_shift_right : bool = True, +//| pull_threshold: int = 32, +//| out_shift_right: bool = True, //| wait_for_txstall: bool = True, //| auto_push: bool = False, -//| push_threshold : int = 32, -//| in_shift_right : bool = True) -> None: +//| push_threshold: int = 32, +//| in_shift_right: bool = True, +//| user_interruptible: bool = True) -> None: //| //| """Construct a StateMachine object on the given pins with the given program. //| @@ -126,7 +127,14 @@ //| :param int push_threshold: Number of bits to shift before saving the ISR value to the RX FIFO //| :param bool in_shift_right: When True, data is shifted into the right side (LSB) of the //| ISR. It is shifted into the left (MSB) otherwise. NOTE! This impacts data alignment -//| when the number of bytes is not a power of two (1, 2 or 4 bytes).""" +//| when the number of bytes is not a power of two (1, 2 or 4 bytes). +//| :param bool user_interruptible: When True (the default), +//| `write()`, `readinto()`, and `write_readinto()` can be interrupted by a ctrl-C. +//| This is useful when developing a PIO program: if there is an error in the program +//| that causes an infinite loop, you will be able to interrupt the loop. +//| However, if you are writing to a device that can get into a bad state if a read or write +//| is interrupted, you may want to set this to False after your program has been vetted. +//| """ //| ... //| @@ -143,7 +151,8 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n ARG_exclusive_pin_use, ARG_auto_pull, ARG_pull_threshold, ARG_out_shift_right, ARG_wait_for_txstall, - ARG_auto_push, ARG_push_threshold, ARG_in_shift_right}; + ARG_auto_push, ARG_push_threshold, ARG_in_shift_right, + ARG_user_interruptible,}; static const mp_arg_t allowed_args[] = { { MP_QSTR_program, MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_frequency, MP_ARG_REQUIRED | MP_ARG_INT }, @@ -179,6 +188,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n { MP_QSTR_auto_push, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} }, { MP_QSTR_push_threshold, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 32} }, { MP_QSTR_in_shift_right, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} }, + { MP_QSTR_user_interruptible, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} }, }; 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); @@ -252,7 +262,8 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n args[ARG_exclusive_pin_use].u_bool, args[ARG_auto_pull].u_bool, pull_threshold, args[ARG_out_shift_right].u_bool, args[ARG_wait_for_txstall].u_bool, - args[ARG_auto_push].u_bool, push_threshold, args[ARG_in_shift_right].u_bool); + args[ARG_auto_push].u_bool, push_threshold, args[ARG_in_shift_right].u_bool, + args[ARG_user_interruptible].u_bool); return MP_OBJ_FROM_PTR(self); } diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.h b/ports/raspberrypi/bindings/rp2pio/StateMachine.h index 295a414cd9..effa9c9ce3 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.h +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.h @@ -49,7 +49,8 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, bool exclusive_pin_use, bool auto_pull, uint8_t pull_threshold, bool out_shift_right, bool wait_for_txstall, - bool auto_push, uint8_t push_threshold, bool in_shift_right); + bool auto_push, uint8_t push_threshold, bool in_shift_right, + bool user_interruptible); void common_hal_rp2pio_statemachine_deinit(rp2pio_statemachine_obj_t *self); bool common_hal_rp2pio_statemachine_deinited(rp2pio_statemachine_obj_t *self); diff --git a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c index 425b65e601..0ac11c690f 100644 --- a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c +++ b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -132,7 +132,8 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, true, // exclusive pin use false, 32, false, // shift out left to start with MSB false, // Wait for txstall - false, 32, false); // in settings + false, 32, false, // in settings + false); // Not user-interruptible. self->playing = false; audio_dma_init(&self->dma); diff --git a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c index 4dc14eaeda..323a3dfbc8 100644 --- a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c +++ b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c @@ -76,7 +76,8 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self, true, // exclusive pin use false, 32, false, // out settings false, // Wait for txstall - false, 32, true); // in settings + false, 32, true, // in settings + false); // Not user-interruptible uint32_t actual_frequency = common_hal_rp2pio_statemachine_get_frequency(&self->state_machine); if (actual_frequency < MIN_MIC_CLOCK) { diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/displayio/ParallelBus.c index 5b97c79521..93477e2453 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/displayio/ParallelBus.c @@ -104,8 +104,8 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel true, // exclusive pin usage true, 8, true, // TX, auto pull every 8 bits. shift left to output msb first false, // wait for TX stall - false, 32, true // RX setting we don't use - ); + false, 32, true, // RX setting we don't use + false); // Not user-interruptible. common_hal_rp2pio_statemachine_never_reset(&self->state_machine); } diff --git a/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c b/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c index 0b388f4b3e..1d0355d1c0 100644 --- a/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c +++ b/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c @@ -116,7 +116,9 @@ void common_hal_imagecapture_parallelimagecapture_construct(imagecapture_paralle true, // exclusive pin use false, 32, false, // out settings false, // wait for txstall - true, 32, true); // in settings + true, 32, true, // in settings + false); // Not user-interruptible. + PIO pio = self->state_machine.pio; uint8_t pio_index = pio_get_index(pio); diff --git a/ports/raspberrypi/common-hal/neopixel_write/__init__.c b/ports/raspberrypi/common-hal/neopixel_write/__init__.c index 3f923c8e0b..b3d704453c 100644 --- a/ports/raspberrypi/common-hal/neopixel_write/__init__.c +++ b/ports/raspberrypi/common-hal/neopixel_write/__init__.c @@ -76,7 +76,8 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, true, 8, false, // TX, auto pull every 8 bits. shift left to output msb first true, // Wait for txstall. If we don't, then we'll deinit too quickly. false, 32, true, // RX setting we don't use - false); // claim pins + false, // claim pins + false); // Not user-interruptible. if (!ok) { // Do nothing. Maybe bitbang? return; diff --git a/ports/raspberrypi/common-hal/pulseio/PulseIn.c b/ports/raspberrypi/common-hal/pulseio/PulseIn.c index b9210af5f0..4e9b56a1a1 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseIn.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseIn.c @@ -72,7 +72,8 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, false, 8, false, // TX, unused false, true, 32, true, // RX auto-push every 32 bits - false); // claim pins + false, // claim pins + false); // Not user-interruptible. if (!ok) { mp_raise_RuntimeError(translate("All state machines in use")); diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index d5251f6598..54bbd71f6d 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -89,7 +89,8 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode true, // exclusive pin use false, 32, false, // out settings false, // Wait for txstall - false, 32, false); // in settings + false, 32, false, // in settings + false); // Not user-interruptible. common_hal_rp2pio_statemachine_run(&self->state_machine, encoder_init, MP_ARRAY_SIZE(encoder_init)); diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index 6594dd9c6f..2962ddd9fc 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -163,7 +163,9 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, bool auto_pull, uint8_t pull_threshold, bool out_shift_right, bool wait_for_txstall, bool auto_push, uint8_t push_threshold, bool in_shift_right, - bool claim_pins) { + bool claim_pins, + bool user_interruptible + ) { // Create a program id that isn't the pointer so we can store it without storing the original object. uint32_t program_id = ~((uint32_t)program); @@ -303,6 +305,7 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, self->out_shift_right = out_shift_right; self->in_shift_right = in_shift_right; self->wait_for_txstall = wait_for_txstall; + self->user_interruptible = user_interruptible; self->init = init; self->init_len = init_len; @@ -338,7 +341,8 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, bool exclusive_pin_use, bool auto_pull, uint8_t pull_threshold, bool out_shift_right, bool wait_for_txstall, - bool auto_push, uint8_t push_threshold, bool in_shift_right) { + bool auto_push, uint8_t push_threshold, bool in_shift_right, + bool user_interruptible) { // First, check that all pins are free OR already in use by any PIO if exclusive_pin_use is false. uint32_t pins_we_use = wait_gpio_mask; @@ -482,7 +486,8 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, if (initial_pin_direction & (pull_up | pull_down)) { mp_raise_ValueError(translate("pull masks conflict with direction masks")); } - bool ok = rp2pio_statemachine_construct(self, + bool ok = rp2pio_statemachine_construct( + self, program, program_len, frequency, init, init_len, @@ -497,7 +502,8 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, auto_pull, pull_threshold, out_shift_right, wait_for_txstall, auto_push, push_threshold, in_shift_right, - true /* claim pins */); + true /* claim pins */, + user_interruptible); if (!ok) { mp_raise_RuntimeError(translate("All state machines in use")); } @@ -664,6 +670,16 @@ static bool _transfer(rp2pio_statemachine_obj_t *self, (tx && dma_channel_is_busy(chan_tx))) { // TODO: We should idle here until we get a DMA interrupt or something else. RUN_BACKGROUND_TASKS; + if (self->user_interruptible && mp_hal_is_interrupted()) { + if (rx && dma_channel_is_busy(chan_rx)) { + dma_channel_abort(chan_rx); + } + if (tx && dma_channel_is_busy(chan_tx)) { + dma_channel_abort(chan_tx); + } + break; + } + } // Clear the stall bit so we can detect when the state machine is done transmitting. self->pio->fdebug = stall_mask; @@ -678,7 +694,7 @@ static bool _transfer(rp2pio_statemachine_obj_t *self, dma_channel_unclaim(chan_tx); } - if (!use_dma) { + if (!use_dma && !(self->user_interruptible && mp_hal_is_interrupted())) { // Use software for small transfers, or if couldn't claim two DMA channels size_t rx_remaining = in_len / in_stride_in_bytes; size_t tx_remaining = out_len / out_stride_in_bytes; @@ -707,6 +723,9 @@ static bool _transfer(rp2pio_statemachine_obj_t *self, --rx_remaining; } RUN_BACKGROUND_TASKS; + if (self->user_interruptible && mp_hal_is_interrupted()) { + break; + } } // Clear the stall bit so we can detect when the state machine is done transmitting. self->pio->fdebug = stall_mask; @@ -717,6 +736,9 @@ static bool _transfer(rp2pio_statemachine_obj_t *self, while (!pio_sm_is_tx_fifo_empty(self->pio, self->state_machine) || (self->wait_for_txstall && (self->pio->fdebug & stall_mask) == 0)) { RUN_BACKGROUND_TASKS; + if (self->user_interruptible && mp_hal_is_interrupted()) { + break; + } } } return true; diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h index b04d9c5049..f877bdb152 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h @@ -43,15 +43,16 @@ typedef struct { uint32_t initial_pin_direction; uint32_t pull_pin_up; uint32_t pull_pin_down; + uint tx_dreq; + uint rx_dreq; + uint32_t actual_frequency; + pio_sm_config sm_config; bool in; bool out; bool wait_for_txstall; - uint tx_dreq; - uint rx_dreq; bool out_shift_right; bool in_shift_right; - uint32_t actual_frequency; - pio_sm_config sm_config; + bool user_interruptible; uint8_t offset; } rp2pio_statemachine_obj_t; @@ -73,7 +74,8 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, bool auto_pull, uint8_t pull_threshold, bool out_shift_right, bool wait_for_txstall, bool auto_push, uint8_t push_threshold, bool in_shift_right, - bool claim_pins); + bool claim_pins, + bool interruptible); uint8_t rp2pio_statemachine_program_offset(rp2pio_statemachine_obj_t *self); void rp2pio_statemachine_set_wrap(rp2pio_statemachine_obj_t *self, uint wrap_target, uint wrap); From 0261cacb06a3a0eabe40b850dcea9dbe4a47f03f Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 27 Aug 2021 10:07:14 -0400 Subject: [PATCH 299/418] Stop StateMachine explicitly on deinit --- ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c | 2 -- ports/raspberrypi/common-hal/rp2pio/StateMachine.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index d5251f6598..06504a66f9 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -91,8 +91,6 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode false, // Wait for txstall false, 32, false); // in settings - common_hal_rp2pio_statemachine_run(&self->state_machine, encoder_init, MP_ARRAY_SIZE(encoder_init)); - // We're guaranteed by the init code that some output will be available promptly uint8_t quiescent_state; common_hal_rp2pio_statemachine_readinto(&self->state_machine, &quiescent_state, 1, 1); diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index 6594dd9c6f..fcbb7e2bb7 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -553,6 +553,8 @@ void common_hal_rp2pio_statemachine_set_frequency(rp2pio_statemachine_obj_t *sel } void rp2pio_statemachine_deinit(rp2pio_statemachine_obj_t *self, bool leave_pins) { + common_hal_rp2pio_statemachine_stop(self); + uint8_t sm = self->state_machine; uint8_t pio_index = pio_get_index(self->pio); common_hal_mcu_disable_interrupts(); From 15133cbf59d11da039d8df1eb8c4d3ce40ad851a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 27 Aug 2021 09:02:03 -0500 Subject: [PATCH 300/418] gc.c: Avoid valgrind false positives. When you wish to use the valgrind memory analysis tool on micropython, you can arrange to define MICROPY_DEBUG_VALGRIND to enable use of special valgrind macros. For now, this only fixes `gc_get_ptr` so that it never emits the diagnostic "Conditional jump or move depends on uninitialised value(s)". Signed-off-by: Jeff Epler --- py/gc.c | 9 +++++++++ py/mpconfig.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/py/gc.c b/py/gc.c index 8284c435ba..4d48a02a14 100644 --- a/py/gc.c +++ b/py/gc.c @@ -32,6 +32,10 @@ #include "py/gc.h" #include "py/runtime.h" +#if MICROPY_DEBUG_VALGRIND +#include +#endif + #if MICROPY_ENABLE_GC #if MICROPY_DEBUG_VERBOSE // print debugging info @@ -349,6 +353,11 @@ void gc_collect_start(void) { __attribute__((no_sanitize_address)) #endif static void *gc_get_ptr(void **ptrs, int i) { + #if MICROPY_DEBUG_VALGRIND + if (!VALGRIND_CHECK_MEM_IS_ADDRESSABLE(&ptrs[i], sizeof(*ptrs))) { + return NULL; + } + #endif return ptrs[i]; } diff --git a/py/mpconfig.h b/py/mpconfig.h index d40637dfaf..f679f1e33f 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -479,6 +479,11 @@ #define MICROPY_DEBUG_VM_STACK_OVERFLOW (0) #endif +// Whether to enable extra instrumentation for valgrind +#ifndef MICROPY_DEBUG_VALGRIND +#define MICROPY_DEBUG_VALGRIND (0) +#endif + /*****************************************************************************/ /* Optimisations */ From 5a162eb168b8518e20c04f12b5a3a8977d9d0020 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 27 Aug 2021 09:04:32 -0500 Subject: [PATCH 301/418] gc.c: Ensure a gap of one byte before the finaliser table. .. or, for !MICROPY_ENABLE_FINALISER, before the first block of the pool. Closes: adafruit/circuitpython#5021 Closes: micropython/micropython#7116 Signed-off-by: Jeff Epler --- py/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/gc.c b/py/gc.c index 4d48a02a14..35bdf21fb2 100644 --- a/py/gc.c +++ b/py/gc.c @@ -122,7 +122,7 @@ void gc_init(void *start, void *end) { // => T = A * (1 + BLOCKS_PER_ATB / BLOCKS_PER_FTB + BLOCKS_PER_ATB * BYTES_PER_BLOCK) size_t total_byte_len = (byte *)end - (byte *)start; #if MICROPY_ENABLE_FINALISER - MP_STATE_MEM(gc_alloc_table_byte_len) = total_byte_len * MP_BITS_PER_BYTE / (MP_BITS_PER_BYTE + MP_BITS_PER_BYTE * BLOCKS_PER_ATB / BLOCKS_PER_FTB + MP_BITS_PER_BYTE * BLOCKS_PER_ATB * BYTES_PER_BLOCK); + MP_STATE_MEM(gc_alloc_table_byte_len) = (total_byte_len - 1) * MP_BITS_PER_BYTE / (MP_BITS_PER_BYTE + MP_BITS_PER_BYTE * BLOCKS_PER_ATB / BLOCKS_PER_FTB + MP_BITS_PER_BYTE * BLOCKS_PER_ATB * BYTES_PER_BLOCK); #else MP_STATE_MEM(gc_alloc_table_byte_len) = total_byte_len / (1 + MP_BITS_PER_BYTE / 2 * BYTES_PER_BLOCK); #endif @@ -131,7 +131,7 @@ void gc_init(void *start, void *end) { #if MICROPY_ENABLE_FINALISER size_t gc_finaliser_table_byte_len = (MP_STATE_MEM(gc_alloc_table_byte_len) * BLOCKS_PER_ATB + BLOCKS_PER_FTB - 1) / BLOCKS_PER_FTB; - MP_STATE_MEM(gc_finaliser_table_start) = MP_STATE_MEM(gc_alloc_table_start) + MP_STATE_MEM(gc_alloc_table_byte_len); + MP_STATE_MEM(gc_finaliser_table_start) = MP_STATE_MEM(gc_alloc_table_start) + MP_STATE_MEM(gc_alloc_table_byte_len) + 1; #endif size_t gc_pool_block_len = MP_STATE_MEM(gc_alloc_table_byte_len) * BLOCKS_PER_ATB; From ada178893dfda6a15166057612f39fddc8757e20 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Fri, 27 Aug 2021 09:02:49 -0600 Subject: [PATCH 302/418] updated PID as per OpenMoko PR --- .../boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk index 5eacfd5b15..d8d5129b33 100644 --- a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x1d50 -USB_PID = 0x616f +USB_PID = 0x6154 USB_PRODUCT = "EncoderPad RP2040" USB_MANUFACTURER = "JPConstantineau" From 29ae444dc643aa5ff7c38438cf69f972d7f97fa1 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 27 Aug 2021 11:36:56 -0400 Subject: [PATCH 303/418] Fix usb_hid_gc_collect() --- shared-module/usb_hid/__init__.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-module/usb_hid/__init__.c b/shared-module/usb_hid/__init__.c index e61d01cc16..efe37662ee 100644 --- a/shared-module/usb_hid/__init__.c +++ b/shared-module/usb_hid/__init__.c @@ -252,8 +252,8 @@ void usb_hid_gc_collect(void) { // Collect all the report buffers for this device. for (size_t id_idx = 0; id_idx < hid_devices[device_idx].num_report_ids; id_idx++) { - gc_collect_ptr(hid_devices[id_idx].in_report_buffers[id_idx]); - gc_collect_ptr(hid_devices[id_idx].out_report_buffers[id_idx]); + gc_collect_ptr(hid_devices[device_idx].in_report_buffers[id_idx]); + gc_collect_ptr(hid_devices[device_idx].out_report_buffers[id_idx]); } } } From ca989c4357ba5e49c6702c96bac791c61e39390c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 27 Aug 2021 10:47:03 -0700 Subject: [PATCH 304/418] Update the idf to a newer 4.3 commit Also, make all port-level CIRCUITPY_ settings overridable. --- .gitmodules | 4 ++-- lib/libc/string0.c | 2 ++ ports/esp32s2/esp-idf | 2 +- ports/esp32s2/mpconfigport.mk | 38 +++++++++++++++++------------------ 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4712d87a8a..d1abf760d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -152,8 +152,8 @@ url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git [submodule "ports/esp32s2/esp-idf"] path = ports/esp32s2/esp-idf - url = https://github.com/adafruit/esp-idf.git - branch = circuitpython-v4.3 + url = https://github.com/espressif/esp-idf.git + branch = release/v4.3 [submodule "ports/esp32s2/certificates/nina-fw"] path = ports/esp32s2/certificates/nina-fw url = https://github.com/adafruit/nina-fw.git diff --git a/lib/libc/string0.c b/lib/libc/string0.c index 3ebb580989..fee2c017f8 100644 --- a/lib/libc/string0.c +++ b/lib/libc/string0.c @@ -27,7 +27,9 @@ #include #include +#ifndef likely #define likely(x) __builtin_expect((x), 1) +#endif #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" diff --git a/ports/esp32s2/esp-idf b/ports/esp32s2/esp-idf index d97b6863ba..48ae2309fd 160000 --- a/ports/esp32s2/esp-idf +++ b/ports/esp32s2/esp-idf @@ -1 +1 @@ -Subproject commit d97b6863badec4643bf8d1d1058a65d723572882 +Subproject commit 48ae2309fd9cea600ff960b61a029892be1fdc1b diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index 85b3b81910..206de09ab7 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -10,31 +10,31 @@ INTERNAL_LIBM = 1 LONGINT_IMPL = MPZ # These modules are implemented in ports//common-hal: -CIRCUITPY_FULL_BUILD = 1 -CIRCUITPY_ALARM = 1 -CIRCUITPY_AUDIOCORE = 1 -CIRCUITPY_AUDIOMP3 = 0 -CIRCUITPY_AUDIOBUSIO = 1 -CIRCUITPY_AUDIOBUSIO_PDMIN = 0 -CIRCUITPY_AUDIOBUSIO_I2SOUT = 1 -CIRCUITPY_AUDIOIO = 0 -CIRCUITPY_AUDIOMIXER = 1 -CIRCUITPY_CANIO = 1 -CIRCUITPY_COUNTIO = 1 -CIRCUITPY_DUALBANK = 1 -CIRCUITPY_FRAMEBUFFERIO = 1 -CIRCUITPY_FREQUENCYIO = 1 +CIRCUITPY_FULL_BUILD ?= 1 +CIRCUITPY_ALARM ?= 1 +CIRCUITPY_AUDIOCORE ?= 1 +CIRCUITPY_AUDIOMP3 ?= 0 +CIRCUITPY_AUDIOBUSIO ?= 1 +CIRCUITPY_AUDIOBUSIO_PDMIN ?= 0 +CIRCUITPY_AUDIOBUSIO_I2SOUT ?= 1 +CIRCUITPY_AUDIOIO ?= 0 +CIRCUITPY_AUDIOMIXER ?= 1 +CIRCUITPY_CANIO ?= 1 +CIRCUITPY_COUNTIO ?= 1 +CIRCUITPY_DUALBANK ?= 1 +CIRCUITPY_FRAMEBUFFERIO ?= 1 +CIRCUITPY_FREQUENCYIO ?= 1 CIRCUITPY_IMAGECAPTURE ?= 1 -CIRCUITPY_I2CPERIPHERAL = 0 -CIRCUITPY_RGBMATRIX = 1 -CIRCUITPY_ROTARYIO = 1 -CIRCUITPY_NVM = 1 +CIRCUITPY_I2CPERIPHERAL ?= 0 +CIRCUITPY_RGBMATRIX ?= 1 +CIRCUITPY_ROTARYIO ?= 1 +CIRCUITPY_NVM ?= 1 CIRCUITPY_PS2IO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 CIRCUITPY_WIFI ?= 1 CIRCUITPY_WATCHDOG ?= 1 -CIRCUITPY_ESPIDF = 1 +CIRCUITPY_ESPIDF ?= 1 CIRCUITPY_MODULE ?= none From a8dd881ee56bf3208ae5755e8cc4aaf937d8f839 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 27 Aug 2021 14:24:31 -0700 Subject: [PATCH 305/418] Fix GPIOTE crashes by checking everything is ok Fixes #5240 and fixes #5211 --- ports/nrf/common-hal/alarm/pin/PinAlarm.c | 11 ++--------- ports/nrf/common-hal/countio/Counter.c | 10 ++++++++-- ports/nrf/common-hal/microcontroller/Processor.c | 8 ++++++++ ports/nrf/common-hal/pulseio/PulseIn.c | 10 ++++------ ports/nrf/common-hal/rotaryio/IncrementalEncoder.c | 11 +++++++++-- ports/nrf/supervisor/port.c | 7 +++++++ supervisor/shared/bluetooth/file_transfer.c | 2 +- 7 files changed, 39 insertions(+), 20 deletions(-) diff --git a/ports/nrf/common-hal/alarm/pin/PinAlarm.c b/ports/nrf/common-hal/alarm/pin/PinAlarm.c index 300369bb36..4bf412d85b 100644 --- a/ports/nrf/common-hal/alarm/pin/PinAlarm.c +++ b/ports/nrf/common-hal/alarm/pin/PinAlarm.c @@ -141,14 +141,6 @@ void alarm_pin_pinalarm_reset(void) { } static void configure_pins_for_sleep(void) { - nrfx_err_t err; - if (nrfx_gpiote_is_init()) { - nrfx_gpiote_uninit(); - } - err = nrfx_gpiote_init(NRFX_GPIOTE_CONFIG_IRQ_PRIORITY); - assert(err == NRFX_SUCCESS); - (void)err; // to suppress unused warning - _pinhandler_gpiote_count = 0; nrfx_gpiote_in_config_t cfg = { @@ -176,9 +168,10 @@ static void configure_pins_for_sleep(void) { cfg.sense = NRF_GPIOTE_POLARITY_TOGGLE; cfg.pull = NRF_GPIO_PIN_NOPULL; } - err = nrfx_gpiote_in_init((nrfx_gpiote_pin_t)i, &cfg, + nrfx_err_t err = nrfx_gpiote_in_init((nrfx_gpiote_pin_t)i, &cfg, pinalarm_gpiote_handler); assert(err == NRFX_SUCCESS); + (void)err; // In case the assert doesn't use err. nrfx_gpiote_in_event_enable((nrfx_gpiote_pin_t)i, true); if (((high_alarms & mask) != 0) && ((low_alarms & mask) == 0)) { nrf_gpio_cfg_sense_set((uint32_t)i, NRF_GPIO_PIN_SENSE_HIGH); diff --git a/ports/nrf/common-hal/countio/Counter.c b/ports/nrf/common-hal/countio/Counter.c index e863f5475a..452c9d9c83 100644 --- a/ports/nrf/common-hal/countio/Counter.c +++ b/ports/nrf/common-hal/countio/Counter.c @@ -1,5 +1,8 @@ #include "common-hal/countio/Counter.h" + +#include "py/runtime.h" + #include "nrfx_gpiote.h" // obj array to map pin number -> self since nrfx hide the mapping @@ -29,11 +32,14 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, .skip_gpio_setup = false }; - nrfx_gpiote_in_init(self->pin_a, &cfg, _intr_handler); + + nrfx_err_t err = nrfx_gpiote_in_init(self->pin_a, &cfg, _intr_handler); + if (err != NRFX_SUCCESS) { + mp_raise_RuntimeError(translate("All channels in use")); + } nrfx_gpiote_in_event_enable(self->pin_a, true); claim_pin(pin_a); - } bool common_hal_countio_counter_deinited(countio_counter_obj_t *self) { diff --git a/ports/nrf/common-hal/microcontroller/Processor.c b/ports/nrf/common-hal/microcontroller/Processor.c index f59fc54972..14eaeee386 100644 --- a/ports/nrf/common-hal/microcontroller/Processor.c +++ b/ports/nrf/common-hal/microcontroller/Processor.c @@ -27,6 +27,8 @@ #include "py/runtime.h" #include "common-hal/microcontroller/Processor.h" + +#include "common-hal/alarm/__init__.h" #include "shared-bindings/microcontroller/ResetReason.h" #include "supervisor/shared/translate.h" @@ -136,6 +138,12 @@ mcu_reset_reason_t common_hal_mcu_processor_get_reset_reason(void) { r = RESET_REASON_WATCHDOG; } else if (reset_reason_saved & POWER_RESETREAS_SREQ_Msk) { r = RESET_REASON_SOFTWARE; + // Our "deep sleep" is still actually light sleep followed by a software + // reset. Adding this check here ensures we treat it as-if we're waking + // from deep sleep. + if (sleepmem_wakeup_event != SLEEPMEM_WAKEUP_BY_NONE) { + r = RESET_REASON_DEEP_SLEEP_ALARM; + } } else if ((reset_reason_saved & POWER_RESETREAS_OFF_Msk) || (reset_reason_saved & POWER_RESETREAS_LPCOMP_Msk) || (reset_reason_saved & POWER_RESETREAS_NFC_Msk) || diff --git a/ports/nrf/common-hal/pulseio/PulseIn.c b/ports/nrf/common-hal/pulseio/PulseIn.c index f8f877d965..84545f5293 100644 --- a/ports/nrf/common-hal/pulseio/PulseIn.c +++ b/ports/nrf/common-hal/pulseio/PulseIn.c @@ -112,11 +112,6 @@ static void _pulsein_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action } void pulsein_reset(void) { - if (nrfx_gpiote_is_init()) { - nrfx_gpiote_uninit(); - } - nrfx_gpiote_init(NRFX_GPIOTE_CONFIG_IRQ_PRIORITY); - if (timer != NULL) { nrf_peripherals_free_timer(timer); } @@ -178,7 +173,10 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, const mcu .hi_accuracy = true, .skip_gpio_setup = false }; - nrfx_gpiote_in_init(self->pin, &cfg, _pulsein_handler); + nrfx_err_t err = nrfx_gpiote_in_init(self->pin, &cfg, _pulsein_handler); + if (err != NRFX_SUCCESS) { + mp_raise_RuntimeError(translate("All channels in use")); + } nrfx_gpiote_in_event_enable(self->pin, true); } diff --git a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c index bc5851ccd4..425da9e6de 100644 --- a/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/nrf/common-hal/rotaryio/IncrementalEncoder.c @@ -64,8 +64,15 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode .hi_accuracy = true, .skip_gpio_setup = false }; - nrfx_gpiote_in_init(self->pin_a, &cfg, _intr_handler); - nrfx_gpiote_in_init(self->pin_b, &cfg, _intr_handler); + nrfx_err_t err = nrfx_gpiote_in_init(self->pin_a, &cfg, _intr_handler); + if (err != NRFX_SUCCESS) { + mp_raise_RuntimeError(translate("All channels in use")); + } + err = nrfx_gpiote_in_init(self->pin_b, &cfg, _intr_handler); + if (err != NRFX_SUCCESS) { + nrfx_gpiote_in_uninit(self->pin_a); + mp_raise_RuntimeError(translate("All channels in use")); + } nrfx_gpiote_in_event_enable(self->pin_a, true); nrfx_gpiote_in_event_enable(self->pin_b, true); diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index 6af6fff5b2..17e9817b5c 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -33,6 +33,7 @@ #include "nrfx/hal/nrf_clock.h" #include "nrfx/hal/nrf_power.h" +#include "nrfx/drivers/include/nrfx_gpiote.h" #include "nrfx/drivers/include/nrfx_power.h" #include "nrfx/drivers/include/nrfx_rtc.h" @@ -252,6 +253,12 @@ void reset_port(void) { watchdog_reset(); #endif + // Always reset GPIOTE because it is shared. + if (nrfx_gpiote_is_init()) { + nrfx_gpiote_uninit(); + } + nrfx_gpiote_init(NRFX_GPIOTE_CONFIG_IRQ_PRIORITY); + reset_all_pins(); } diff --git a/supervisor/shared/bluetooth/file_transfer.c b/supervisor/shared/bluetooth/file_transfer.c index d105892582..908cc958d6 100644 --- a/supervisor/shared/bluetooth/file_transfer.c +++ b/supervisor/shared/bluetooth/file_transfer.c @@ -404,7 +404,7 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; char *path = (char *)((uint8_t *)command) + header_size; path[command->path_length] = '\0'; - FRESULT result; + FRESULT result = FR_OK; FILINFO file; if (f_stat(fs, path, &file) == FR_OK) { if ((file.fattrib & AM_DIR) != 0) { From 6e7e703f89d30497aec24c94713213aa6433e186 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 27 Aug 2021 17:39:19 -0700 Subject: [PATCH 306/418] Fix RP2 countio reset Fixes #5251 --- ports/raspberrypi/common-hal/countio/Counter.c | 11 ++++++++++- ports/raspberrypi/common-hal/countio/Counter.h | 2 ++ ports/raspberrypi/supervisor/port.c | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/countio/Counter.c b/ports/raspberrypi/common-hal/countio/Counter.c index 2dcd1de123..3d2d291b99 100644 --- a/ports/raspberrypi/common-hal/countio/Counter.c +++ b/ports/raspberrypi/common-hal/countio/Counter.c @@ -1,4 +1,4 @@ -#include "common-hal/countio/Counter.h" +#include "shared-bindings/countio/Counter.h" #include "py/runtime.h" #include "py/mpstate.h" @@ -48,6 +48,15 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, pwm_set_enabled(self->slice_num, true); } + +void reset_countio(void) { + for (size_t i = 0; i < NUM_PWM_SLICES; i++) { + if (MP_STATE_PORT(counting)[i] != NULL) { + common_hal_countio_counter_deinit(MP_STATE_PORT(counting)[i]); + } + } +} + bool common_hal_countio_counter_deinited(countio_counter_obj_t *self) { return self->pin_a == 0; } diff --git a/ports/raspberrypi/common-hal/countio/Counter.h b/ports/raspberrypi/common-hal/countio/Counter.h index 201034cf46..78e00e0dd2 100644 --- a/ports/raspberrypi/common-hal/countio/Counter.h +++ b/ports/raspberrypi/common-hal/countio/Counter.h @@ -16,4 +16,6 @@ typedef struct { void counter_interrupt_handler(); +void reset_countio(void); + #endif // MICROPY_INCLUDED_RASPBERRRYPI_COMMON_HAL_COUNTIO_COUNTER_H diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index ef35c22518..68d1277046 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -36,6 +36,7 @@ #include "shared-bindings/audiopwmio/PWMAudioOut.h" #include "shared-bindings/busio/I2C.h" #include "shared-bindings/busio/SPI.h" +#include "shared-bindings/countio/Counter.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/rtc/__init__.h" #include "shared-bindings/pwmio/PWMOut.h" @@ -135,6 +136,10 @@ void reset_port(void) { reset_uart(); #endif + #if CIRCUITPY_COUNTIO + reset_countio(); + #endif + #if CIRCUITPY_PWMIO pwmout_reset(); #endif From d172b8dddbb99a9f25665176ef44ec9afeb23a2c Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Fri, 27 Aug 2021 01:17:57 +0000 Subject: [PATCH 307/418] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1021 of 1021 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 6db2786170..705f47b2f0 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-26 17:10+0000\n" +"PO-Revision-Date: 2021-08-28 01:34+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -116,7 +116,7 @@ msgstr "Os índices %q devem ser inteiros, e não %s" #: py/argcheck.c msgid "%q length must be %d-%d" -msgstr "" +msgstr "o comprimento %q deve ser %d-%d" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" From 7520feed1c0f5d113aacc2afb8a0d43b9382fd1b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 07:26:47 -0500 Subject: [PATCH 308/418] Move ParallelBus to its own module --- ports/atmel-samd/boards/pyportal/board.c | 6 +-- .../atmel-samd/boards/pyportal_titano/board.c | 6 +-- .../ParallelBus.c | 26 +++++----- .../ParallelBus.h | 8 +-- .../ParallelBus.c | 26 +++++----- .../ParallelBus.h | 8 +-- .../ParallelBus.c | 16 +++--- .../ParallelBus.h | 8 +-- .../ParallelBus.c | 26 +++++----- .../ParallelBus.h | 8 +-- .../ParallelBus.c | 26 +++++----- .../ParallelBus.h | 8 +-- .../ParallelBus.c | 16 +++--- .../ParallelBus.h | 8 +-- py/circuitpy_defns.mk | 5 +- py/circuitpy_mpconfig.h | 1 + py/circuitpy_mpconfig.mk | 7 +++ shared-bindings/displayio/__init__.c | 6 ++- .../ParallelBus.c | 44 ++++++++-------- .../ParallelBus.h | 24 ++++----- shared-bindings/paralleldisplay/__init__.h | 51 +++++++++++++++++++ shared-module/displayio/Display.c | 2 +- shared-module/displayio/EPaperDisplay.c | 2 +- shared-module/displayio/__init__.c | 6 ++- shared-module/displayio/__init__.h | 4 +- shared-module/displayio/display_core.c | 19 ++++--- 26 files changed, 218 insertions(+), 149 deletions(-) rename ports/atmel-samd/common-hal/{displayio => paralleldisplay}/ParallelBus.c (85%) rename ports/atmel-samd/common-hal/{displayio => paralleldisplay}/ParallelBus.h (96%) rename ports/esp32s2/common-hal/{displayio => paralleldisplay}/ParallelBus.c (90%) rename ports/esp32s2/common-hal/{displayio => paralleldisplay}/ParallelBus.h (91%) rename ports/mimxrt10xx/common-hal/{displayio => paralleldisplay}/ParallelBus.c (74%) rename ports/mimxrt10xx/common-hal/{displayio => paralleldisplay}/ParallelBus.h (95%) rename ports/nrf/common-hal/{displayio => paralleldisplay}/ParallelBus.c (85%) rename ports/nrf/common-hal/{displayio => paralleldisplay}/ParallelBus.h (87%) rename ports/raspberrypi/common-hal/{displayio => paralleldisplay}/ParallelBus.c (85%) rename ports/raspberrypi/common-hal/{displayio => paralleldisplay}/ParallelBus.h (96%) rename ports/stm/common-hal/{displayio => paralleldisplay}/ParallelBus.c (75%) rename ports/stm/common-hal/{displayio => paralleldisplay}/ParallelBus.h (88%) rename shared-bindings/{displayio => paralleldisplay}/ParallelBus.c (74%) rename shared-bindings/{displayio => paralleldisplay}/ParallelBus.h (67%) create mode 100644 shared-bindings/paralleldisplay/__init__.h diff --git a/ports/atmel-samd/boards/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c index 166b14fd5b..b46b176afc 100644 --- a/ports/atmel-samd/boards/pyportal/board.c +++ b/ports/atmel-samd/boards/pyportal/board.c @@ -61,9 +61,9 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - displayio_parallelbus_obj_t *bus = &displays[0].parallel_bus; - bus->base.type = &displayio_parallelbus_type; - common_hal_displayio_parallelbus_construct(bus, + paralleldisplay_parallelbus_obj_t *bus = &displays[0].parallel_bus; + bus->base.type = ¶lleldisplay_parallelbus_type; + common_hal_paralleldisplay_parallelbus_construct(bus, &pin_PA16, // Data0 &pin_PB05, // Command or data &pin_PB06, // Chip select diff --git a/ports/atmel-samd/boards/pyportal_titano/board.c b/ports/atmel-samd/boards/pyportal_titano/board.c index 6c05e47d92..138f94ebc8 100644 --- a/ports/atmel-samd/boards/pyportal_titano/board.c +++ b/ports/atmel-samd/boards/pyportal_titano/board.c @@ -78,9 +78,9 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - displayio_parallelbus_obj_t *bus = &displays[0].parallel_bus; - bus->base.type = &displayio_parallelbus_type; - common_hal_displayio_parallelbus_construct(bus, + paralleldisplay_parallelbus_obj_t *bus = &displays[0].parallel_bus; + bus->base.type = ¶lleldisplay_parallelbus_type; + common_hal_paralleldisplay_parallelbus_construct(bus, &pin_PA16, // Data0 &pin_PB05, // Command or data &pin_PB06, // Chip select diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c similarity index 85% rename from ports/atmel-samd/common-hal/displayio/ParallelBus.c rename to ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c index e5575f8dc2..490c595e74 100644 --- a/ports/atmel-samd/common-hal/displayio/ParallelBus.c +++ b/ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include @@ -33,7 +33,7 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, +void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { @@ -83,7 +83,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel common_hal_digitalio_digitalinout_construct(&self->reset, reset); common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); never_reset_pin_number(reset->number); - common_hal_displayio_parallelbus_reset(self); + common_hal_paralleldisplay_parallelbus_reset(self); } never_reset_pin_number(command->number); @@ -95,7 +95,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel } } -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) { +void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self) { for (uint8_t i = 0; i < 8; i++) { reset_pin_number(self->data0_pin + i); } @@ -107,8 +107,8 @@ void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) reset_pin_number(self->reset.pin->number); } -bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); if (self->reset.base.type == &mp_type_NoneType) { return false; } @@ -119,19 +119,19 @@ bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { return true; } -bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { return true; } -bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); return true; } -void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, +void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); uint32_t *clear_write = (uint32_t *)&self->write_group->OUTCLR.reg; uint32_t *set_write = (uint32_t *)&self->write_group->OUTSET.reg; @@ -143,7 +143,7 @@ void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byt } } -void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); } diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.h b/ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.h similarity index 96% rename from ports/atmel-samd/common-hal/displayio/ParallelBus.h rename to ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.h index ee19caddf6..4b6ec64b11 100644 --- a/ports/atmel-samd/common-hal/displayio/ParallelBus.h +++ b/ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELBUS_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H #include "common-hal/digitalio/DigitalInOut.h" @@ -40,6 +40,6 @@ typedef struct { uint8_t data0_pin; PortGroup *write_group; uint32_t write_mask; -} displayio_parallelbus_obj_t; +} paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H diff --git a/ports/esp32s2/common-hal/displayio/ParallelBus.c b/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c similarity index 90% rename from ports/esp32s2/common-hal/displayio/ParallelBus.c rename to ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c index cbe093164f..befd836247 100644 --- a/ports/esp32s2/common-hal/displayio/ParallelBus.c +++ b/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include @@ -38,7 +38,7 @@ * - data0 pin must be byte aligned */ -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, +void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { @@ -120,7 +120,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel common_hal_digitalio_digitalinout_construct(&self->reset, reset); common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); never_reset_pin_number(reset->number); - common_hal_displayio_parallelbus_reset(self); + common_hal_paralleldisplay_parallelbus_reset(self); } never_reset_pin_number(command->number); @@ -133,7 +133,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel } -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) { +void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self) { /* SNIP - same as from SAMD and NRF ports */ for (uint8_t i = 0; i < 8; i++) { reset_pin_number(self->data0_pin + i); @@ -146,9 +146,9 @@ void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) reset_pin_number(self->reset.pin->number); } -bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t obj) { /* SNIP - same as from SAMD and NRF ports */ - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); if (self->reset.base.type == &mp_type_NoneType) { return false; } @@ -160,21 +160,21 @@ bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { } -bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { /* SNIP - same as from SAMD and NRF ports */ return true; } -bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { /* SNIP - same as from SAMD and NRF ports */ - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); return true; } -void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, +void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); uint32_t *clear_write = self->write_clear_register; @@ -220,8 +220,8 @@ void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byt } -void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { +void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t obj) { /* SNIP - same as from SAMD and NRF ports */ - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); } diff --git a/ports/esp32s2/common-hal/displayio/ParallelBus.h b/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h similarity index 91% rename from ports/esp32s2/common-hal/displayio/ParallelBus.h rename to ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h index 59eb64f34d..adf5d6226f 100644 --- a/ports/esp32s2/common-hal/displayio/ParallelBus.h +++ b/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELBUS_H -#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H #include "common-hal/digitalio/DigitalInOut.h" @@ -42,6 +42,6 @@ typedef struct { uint32_t *write_set_register; // pointer to the write group for setting the write bit to latch the data on the LCD uint32_t *write_clear_register; // pointer to the write group for clearing the write bit to latch the data on the LCD uint32_t write_mask; // bit mask for the single bit for the write pin register -} displayio_parallelbus_obj_t; +} paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H diff --git a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c b/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.c similarity index 74% rename from ports/mimxrt10xx/common-hal/displayio/ParallelBus.c rename to ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.c index f7889c70f4..6d0c8a9476 100644 --- a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c +++ b/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include @@ -33,35 +33,35 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, +void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); } -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) { +void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self) { } -bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t obj) { return false; } -bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { return false; } -bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { return false; } -void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, +void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { } -void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { +void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t obj) { } diff --git a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.h b/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.h similarity index 95% rename from ports/mimxrt10xx/common-hal/displayio/ParallelBus.h rename to ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.h index 845e44df06..8034e1132c 100644 --- a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.h +++ b/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.h @@ -24,13 +24,13 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELBUS_H -#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#ifndef MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H #include "common-hal/digitalio/DigitalInOut.h" typedef struct { mp_obj_base_t base; -} displayio_parallelbus_obj_t; +} paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/paralleldisplay/ParallelBus.c similarity index 85% rename from ports/nrf/common-hal/displayio/ParallelBus.c rename to ports/nrf/common-hal/paralleldisplay/ParallelBus.c index 7e0aea0d63..6f84ceb214 100644 --- a/ports/nrf/common-hal/displayio/ParallelBus.c +++ b/ports/nrf/common-hal/paralleldisplay/ParallelBus.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include @@ -33,7 +33,7 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, +void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { @@ -94,7 +94,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel common_hal_digitalio_digitalinout_construct(&self->reset, reset); common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); never_reset_pin_number(reset->number); - common_hal_displayio_parallelbus_reset(self); + common_hal_paralleldisplay_parallelbus_reset(self); } never_reset_pin_number(command->number); @@ -106,7 +106,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel } } -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) { +void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self) { for (uint8_t i = 0; i < 8; i++) { reset_pin_number(self->data0_pin + i); } @@ -118,8 +118,8 @@ void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) reset_pin_number(self->reset.pin->number); } -bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); if (self->reset.base.type == &mp_type_NoneType) { return false; } @@ -130,20 +130,20 @@ bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { return true; } -bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { return true; } -bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); return true; } // This ignores chip_select behaviour because data is clocked in by the write line toggling. -void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, +void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); uint32_t *clear_write = (uint32_t *)&self->write_group->OUTCLR; uint32_t *set_write = (uint32_t *)&self->write_group->OUTSET; @@ -155,7 +155,7 @@ void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byt } } -void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); } diff --git a/ports/nrf/common-hal/displayio/ParallelBus.h b/ports/nrf/common-hal/paralleldisplay/ParallelBus.h similarity index 87% rename from ports/nrf/common-hal/displayio/ParallelBus.h rename to ports/nrf/common-hal/paralleldisplay/ParallelBus.h index 30a0c7e61e..3a3f71e3c9 100644 --- a/ports/nrf/common-hal/displayio/ParallelBus.h +++ b/ports/nrf/common-hal/paralleldisplay/ParallelBus.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H -#define MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#define MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H #include "common-hal/digitalio/DigitalInOut.h" @@ -40,6 +40,6 @@ typedef struct { uint8_t data0_pin; NRF_GPIO_Type *write_group; uint32_t write_mask; -} displayio_parallelbus_obj_t; +} paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.c b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c similarity index 85% rename from ports/raspberrypi/common-hal/displayio/ParallelBus.c rename to ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c index 93477e2453..9971474042 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.c +++ b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include @@ -43,7 +43,7 @@ static const uint16_t parallel_program[] = { // .wrap }; -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, +void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { @@ -80,7 +80,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel common_hal_digitalio_digitalinout_construct(&self->reset, reset); common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL); never_reset_pin_number(reset->number); - common_hal_displayio_parallelbus_reset(self); + common_hal_paralleldisplay_parallelbus_reset(self); } never_reset_pin_number(command->number); @@ -110,7 +110,7 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *sel common_hal_rp2pio_statemachine_never_reset(&self->state_machine); } -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) { +void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self) { common_hal_rp2pio_statemachine_deinit(&self->state_machine); for (uint8_t i = 0; i < 8; i++) { @@ -124,8 +124,8 @@ void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) reset_pin_number(self->reset.pin->number); } -bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); if (self->reset.base.type == &mp_type_NoneType) { return false; } @@ -136,26 +136,26 @@ bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { return true; } -bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { return true; } -bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); return true; } -void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, +void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA); common_hal_rp2pio_statemachine_write(&self->state_machine, data, data_length, 1); } -void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { - displayio_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); +void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t obj) { + paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); } diff --git a/ports/raspberrypi/common-hal/displayio/ParallelBus.h b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.h similarity index 96% rename from ports/raspberrypi/common-hal/displayio/ParallelBus.h rename to ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.h index 3d83c8fca7..c93034da18 100644 --- a/ports/raspberrypi/common-hal/displayio/ParallelBus.h +++ b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELBUS_H -#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H #include "common-hal/digitalio/DigitalInOut.h" #include "bindings/rp2pio/StateMachine.h" @@ -40,6 +40,6 @@ typedef struct { uint8_t write; uint8_t data0_pin; rp2pio_statemachine_obj_t state_machine; -} displayio_parallelbus_obj_t; +} paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H diff --git a/ports/stm/common-hal/displayio/ParallelBus.c b/ports/stm/common-hal/paralleldisplay/ParallelBus.c similarity index 75% rename from ports/stm/common-hal/displayio/ParallelBus.c rename to ports/stm/common-hal/paralleldisplay/ParallelBus.c index d36d8ad64a..b6b658bb39 100644 --- a/ports/stm/common-hal/displayio/ParallelBus.c +++ b/ports/stm/common-hal/paralleldisplay/ParallelBus.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include @@ -33,35 +33,35 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/microcontroller/__init__.h" -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, +void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); } -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self) { +void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self) { } -bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t obj) { return false; } -bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { return false; } -bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) { +bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { return false; } -void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, +void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { } -void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) { +void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t obj) { } diff --git a/ports/stm/common-hal/displayio/ParallelBus.h b/ports/stm/common-hal/paralleldisplay/ParallelBus.h similarity index 88% rename from ports/stm/common-hal/displayio/ParallelBus.h rename to ports/stm/common-hal/paralleldisplay/ParallelBus.h index 85d100715e..f637fa5a28 100644 --- a/ports/stm/common-hal/displayio/ParallelBus.h +++ b/ports/stm/common-hal/paralleldisplay/ParallelBus.h @@ -24,13 +24,13 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELBUS_H -#define MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#ifndef MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#define MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H #include "common-hal/digitalio/DigitalInOut.h" typedef struct { mp_obj_base_t base; -} displayio_parallelbus_obj_t; +} paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELBUS_H +#endif // MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 78fb255801..ae701cd201 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -175,6 +175,9 @@ endif ifeq ($(CIRCUITPY_DISPLAYIO),1) SRC_PATTERNS += displayio/% endif +ifeq ($(CIRCUITPY_PARALLELDISPLAY),1) +SRC_PATTERNS += paralleldisplay/% +endif ifeq ($(CIRCUITPY_VECTORIO),1) SRC_PATTERNS += vectorio/% endif @@ -385,7 +388,6 @@ SRC_COMMON_HAL_ALL = \ countio/__init__.c \ digitalio/DigitalInOut.c \ digitalio/__init__.c \ - displayio/ParallelBus.c \ dualbank/__init__.c \ frequencyio/FrequencyIn.c \ frequencyio/__init__.c \ @@ -404,6 +406,7 @@ SRC_COMMON_HAL_ALL = \ nvm/ByteArray.c \ nvm/__init__.c \ os/__init__.c \ + paralleldisplay/ParallelBus.c \ ps2io/Ps2.c \ ps2io/__init__.c \ pulseio/PulseIn.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 1db489b953..1590ddcbf0 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -330,6 +330,7 @@ extern const struct _mp_obj_module_t canio_module; // CIRCUITPY_COUNTIO uses MP_REGISTER_MODULE // CIRCUITPY_DIGITALIO uses MP_REGISTER_MODULE // CIRCUITPY_DISPLAYIO uses MP_REGISTER_MODULE +// CIRCUITPY_PARALLELDISPLAY uses MP_REGISTER_MODULE // CIRCUITPY_TERMINALIO uses MP_REGISTER_MODULE // CIRCUITPY_FONTIO uses MP_REGISTER_MODULE diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 53030aec2c..1bb8ea3200 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -154,6 +154,13 @@ CFLAGS += -DCIRCUITPY_COUNTIO=$(CIRCUITPY_COUNTIO) CIRCUITPY_DISPLAYIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_DISPLAYIO=$(CIRCUITPY_DISPLAYIO) +ifeq ($(CIRCUITPY_DISPLAYIO),1) +CIRCUITPY_PARALLELDISPLAY ?= $(CIRCUITPY_FULL_BUILD) +else +CIRCUITPY_PARALLELDISPLAY = 0 +endif +CFLAGS += -DCIRCUITPY_PARALLELDISPLAY=$(CIRCUITPY_PARALLELDISPLAY) + # bitmaptools and framebufferio rely on displayio ifeq ($(CIRCUITPY_DISPLAYIO),1) CIRCUITPY_BITMAPTOOLS ?= $(CIRCUITPY_FULL_BUILD) diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index 89d18d9609..a9aa49cdbf 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -40,7 +40,7 @@ #include "shared-bindings/displayio/I2CDisplay.h" #include "shared-bindings/displayio/OnDiskBitmap.h" #include "shared-bindings/displayio/Palette.h" -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include "shared-bindings/displayio/Shape.h" #include "shared-bindings/displayio/TileGrid.h" @@ -125,7 +125,9 @@ STATIC const mp_rom_map_elem_t displayio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_FourWire), MP_ROM_PTR(&displayio_fourwire_type) }, { MP_ROM_QSTR(MP_QSTR_I2CDisplay), MP_ROM_PTR(&displayio_i2cdisplay_type) }, - { MP_ROM_QSTR(MP_QSTR_ParallelBus), MP_ROM_PTR(&displayio_parallelbus_type) }, + #if CIRCUITPY_PARALLELDISPLAY + { MP_ROM_QSTR(MP_QSTR_ParallelBus), MP_ROM_PTR(¶lleldisplay_parallelbus_type) }, + #endif { MP_ROM_QSTR(MP_QSTR_release_displays), MP_ROM_PTR(&displayio_release_displays_obj) }, }; diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/paralleldisplay/ParallelBus.c similarity index 74% rename from shared-bindings/displayio/ParallelBus.c rename to shared-bindings/paralleldisplay/ParallelBus.c index efa64dddf4..22d0b9393b 100644 --- a/shared-bindings/displayio/ParallelBus.c +++ b/shared-bindings/paralleldisplay/ParallelBus.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include @@ -59,7 +59,7 @@ //| :param microcontroller.Pin reset: Reset pin""" //| ... //| -STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +STATIC mp_obj_t paralleldisplay_parallelbus_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_data0, ARG_command, ARG_chip_select, ARG_write, ARG_read, ARG_reset, ARG_frequency }; static const mp_arg_t allowed_args[] = { { MP_QSTR_data0, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED }, @@ -80,10 +80,10 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t mcu_pin_obj_t *read = validate_obj_is_free_pin(args[ARG_read].u_obj); mcu_pin_obj_t *reset = validate_obj_is_free_pin(args[ARG_reset].u_obj); - displayio_parallelbus_obj_t *self = &allocate_display_bus_or_raise()->parallel_bus; - self->base.type = &displayio_parallelbus_type; + paralleldisplay_parallelbus_obj_t *self = &allocate_display_bus_or_raise()->parallel_bus; + self->base.type = ¶lleldisplay_parallelbus_type; - common_hal_displayio_parallelbus_construct(self, data0, command, chip_select, write, read, reset, args[ARG_frequency].u_int); + common_hal_paralleldisplay_parallelbus_construct(self, data0, command, chip_select, write, read, reset, args[ARG_frequency].u_int); return self; } @@ -93,22 +93,22 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t //| ... //| -STATIC mp_obj_t displayio_parallelbus_obj_reset(mp_obj_t self_in) { - displayio_parallelbus_obj_t *self = self_in; +STATIC mp_obj_t paralleldisplay_parallelbus_obj_reset(mp_obj_t self_in) { + paralleldisplay_parallelbus_obj_t *self = self_in; - if (!common_hal_displayio_parallelbus_reset(self)) { + if (!common_hal_paralleldisplay_parallelbus_reset(self)) { mp_raise_RuntimeError(translate("no reset pin available")); } return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_1(displayio_parallelbus_reset_obj, displayio_parallelbus_obj_reset); +MP_DEFINE_CONST_FUN_OBJ_1(paralleldisplay_parallelbus_reset_obj, paralleldisplay_parallelbus_obj_reset); //| def send(self, command: int, data: ReadableBuffer) -> None: //| """Sends the given command value followed by the full set of data. Display state, such as //| vertical scroll, set via ``send`` may or may not be reset once the code is done.""" //| ... //| -STATIC mp_obj_t displayio_parallelbus_obj_send(mp_obj_t self, mp_obj_t command_obj, mp_obj_t data_obj) { +STATIC mp_obj_t paralleldisplay_parallelbus_obj_send(mp_obj_t self, mp_obj_t command_obj, mp_obj_t data_obj) { mp_int_t command_int = MP_OBJ_SMALL_INT_VALUE(command_obj); if (!mp_obj_is_small_int(command_obj) || command_int > 255 || command_int < 0) { mp_raise_ValueError(translate("Command must be an int between 0 and 255")); @@ -118,26 +118,26 @@ STATIC mp_obj_t displayio_parallelbus_obj_send(mp_obj_t self, mp_obj_t command_o mp_get_buffer_raise(data_obj, &bufinfo, MP_BUFFER_READ); // Wait for display bus to be available. - while (!common_hal_displayio_parallelbus_begin_transaction(self)) { + while (!common_hal_paralleldisplay_parallelbus_begin_transaction(self)) { RUN_BACKGROUND_TASKS; } - common_hal_displayio_parallelbus_send(self, DISPLAY_COMMAND, CHIP_SELECT_UNTOUCHED, &command, 1); - common_hal_displayio_parallelbus_send(self, DISPLAY_DATA, CHIP_SELECT_UNTOUCHED, ((uint8_t *)bufinfo.buf), bufinfo.len); - common_hal_displayio_parallelbus_end_transaction(self); + common_hal_paralleldisplay_parallelbus_send(self, DISPLAY_COMMAND, CHIP_SELECT_UNTOUCHED, &command, 1); + common_hal_paralleldisplay_parallelbus_send(self, DISPLAY_DATA, CHIP_SELECT_UNTOUCHED, ((uint8_t *)bufinfo.buf), bufinfo.len); + common_hal_paralleldisplay_parallelbus_end_transaction(self); return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_3(displayio_parallelbus_send_obj, displayio_parallelbus_obj_send); +MP_DEFINE_CONST_FUN_OBJ_3(paralleldisplay_parallelbus_send_obj, paralleldisplay_parallelbus_obj_send); -STATIC const mp_rom_map_elem_t displayio_parallelbus_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&displayio_parallelbus_reset_obj) }, - { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&displayio_parallelbus_send_obj) }, +STATIC const mp_rom_map_elem_t paralleldisplay_parallelbus_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(¶lleldisplay_parallelbus_reset_obj) }, + { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(¶lleldisplay_parallelbus_send_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(displayio_parallelbus_locals_dict, displayio_parallelbus_locals_dict_table); +STATIC MP_DEFINE_CONST_DICT(paralleldisplay_parallelbus_locals_dict, paralleldisplay_parallelbus_locals_dict_table); -const mp_obj_type_t displayio_parallelbus_type = { +const mp_obj_type_t paralleldisplay_parallelbus_type = { { &mp_type_type }, .name = MP_QSTR_ParallelBus, - .make_new = displayio_parallelbus_make_new, - .locals_dict = (mp_obj_dict_t *)&displayio_parallelbus_locals_dict, + .make_new = paralleldisplay_parallelbus_make_new, + .locals_dict = (mp_obj_dict_t *)¶lleldisplay_parallelbus_locals_dict, }; diff --git a/shared-bindings/displayio/ParallelBus.h b/shared-bindings/paralleldisplay/ParallelBus.h similarity index 67% rename from shared-bindings/displayio/ParallelBus.h rename to shared-bindings/paralleldisplay/ParallelBus.h index 1a61aae0af..2f9c8d10e3 100644 --- a/shared-bindings/displayio/ParallelBus.h +++ b/shared-bindings/paralleldisplay/ParallelBus.h @@ -24,31 +24,31 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELBUS_H -#define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELBUS_H +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELDISPLAY_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELDISPLAY_H -#include "common-hal/displayio/ParallelBus.h" +#include "common-hal/paralleldisplay/ParallelBus.h" #include "common-hal/microcontroller/Pin.h" #include "shared-bindings/displayio/__init__.h" #include "shared-module/displayio/Group.h" -extern const mp_obj_type_t displayio_parallelbus_type; +extern const mp_obj_type_t paralleldisplay_parallelbus_type; -void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t *self, +void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency); -void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t *self); +void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self); -bool common_hal_displayio_parallelbus_reset(mp_obj_t self); -bool common_hal_displayio_parallelbus_bus_free(mp_obj_t self); +bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t self); +bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t self); -bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t self); +bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t self); -void common_hal_displayio_parallelbus_send(mp_obj_t self, display_byte_type_t byte_type, +void common_hal_paralleldisplay_parallelbus_send(mp_obj_t self, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length); -void common_hal_displayio_parallelbus_end_transaction(mp_obj_t self); +void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t self); -#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELBUS_H +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELDISPLAY_H diff --git a/shared-bindings/paralleldisplay/__init__.h b/shared-bindings/paralleldisplay/__init__.h new file mode 100644 index 0000000000..e87479a9f9 --- /dev/null +++ b/shared-bindings/paralleldisplay/__init__.h @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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 + +#include "py/enum.h" +#include "py/obj.h" +#include "py/runtime.h" + +#include "shared-bindings/paralleldisplay/__init__.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" + +//| """Native helpers for driving parallel displays""" + + +STATIC const mp_rom_map_elem_t paralleldisplay_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_paralleldisplay) }, + { MP_ROM_QSTR(MP_QSTR_ParallelBus), MP_ROM_PTR(¶lleldisplay_parallelbus_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(paralleldisplay_module_globals, paralleldisplay_module_globals_table); + +const mp_obj_module_t paralleldisplay_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)¶lleldisplay_module_globals, +}; + +MP_REGISTER_MODULE(MP_QSTR_paralleldisplay, paralleldisplay_module, CIRCUITPY_PARALLELDISPLAY); diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 4c30a85970..40a2e31feb 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -29,7 +29,7 @@ #include "py/runtime.h" #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/I2CDisplay.h" -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/time/__init__.h" #include "shared-module/displayio/__init__.h" diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c index 8de7d4e45f..9731aa90f0 100644 --- a/shared-module/displayio/EPaperDisplay.c +++ b/shared-module/displayio/EPaperDisplay.c @@ -31,7 +31,7 @@ #include "shared-bindings/displayio/ColorConverter.h" #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/I2CDisplay.h" -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/time/__init__.h" #include "shared-module/displayio/__init__.h" diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 8fda1b5cb0..d264531c99 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -109,8 +109,10 @@ void common_hal_displayio_release_displays(void) { common_hal_displayio_fourwire_deinit(&displays[i].fourwire_bus); } else if (bus_type == &displayio_i2cdisplay_type) { common_hal_displayio_i2cdisplay_deinit(&displays[i].i2cdisplay_bus); - } else if (bus_type == &displayio_parallelbus_type) { - common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); + #if CIRCUITPY_PARALLELDISPLAY + } else if (bus_type == ¶lleldisplay_parallelbus_type) { + common_hal_paralleldisplay_parallelbus_deinit(&displays[i].parallel_bus); + #endif #if CIRCUITPY_RGBMATRIX } else if (bus_type == &rgbmatrix_RGBMatrix_type) { common_hal_rgbmatrix_rgbmatrix_deinit(&displays[i].rgbmatrix); diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index 4a74b0e0e0..09f2f7ae08 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -35,7 +35,7 @@ #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/I2CDisplay.h" -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #if CIRCUITPY_RGBMATRIX #include "shared-bindings/rgbmatrix/RGBMatrix.h" #endif @@ -48,7 +48,7 @@ typedef struct { mp_obj_base_t bus_base; displayio_fourwire_obj_t fourwire_bus; displayio_i2cdisplay_obj_t i2cdisplay_bus; - displayio_parallelbus_obj_t parallel_bus; + paralleldisplay_parallelbus_obj_t parallel_bus; #if CIRCUITPY_RGBMATRIX rgbmatrix_rgbmatrix_obj_t rgbmatrix; #endif diff --git a/shared-module/displayio/display_core.c b/shared-module/displayio/display_core.c index 234c0a096b..d1efbf7ddc 100644 --- a/shared-module/displayio/display_core.c +++ b/shared-module/displayio/display_core.c @@ -30,7 +30,7 @@ #include "py/runtime.h" #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/I2CDisplay.h" -#include "shared-bindings/displayio/ParallelBus.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/time/__init__.h" #include "shared-module/displayio/__init__.h" @@ -61,13 +61,16 @@ void displayio_display_core_construct(displayio_display_core_t *self, // (framebufferdisplay already validated its 'bus' is a buffer-protocol object) if (bus) { - if (mp_obj_is_type(bus, &displayio_parallelbus_type)) { - self->bus_reset = common_hal_displayio_parallelbus_reset; - self->bus_free = common_hal_displayio_parallelbus_bus_free; - self->begin_transaction = common_hal_displayio_parallelbus_begin_transaction; - self->send = common_hal_displayio_parallelbus_send; - self->end_transaction = common_hal_displayio_parallelbus_end_transaction; - } else if (mp_obj_is_type(bus, &displayio_fourwire_type)) { + #if CIRCUITPY_PARALLELDISPLAY + if (mp_obj_is_type(bus, ¶lleldisplay_parallelbus_type)) { + self->bus_reset = common_hal_paralleldisplay_parallelbus_reset; + self->bus_free = common_hal_paralleldisplay_parallelbus_bus_free; + self->begin_transaction = common_hal_paralleldisplay_parallelbus_begin_transaction; + self->send = common_hal_paralleldisplay_parallelbus_send; + self->end_transaction = common_hal_paralleldisplay_parallelbus_end_transaction; + } else + #endif + if (mp_obj_is_type(bus, &displayio_fourwire_type)) { self->bus_reset = common_hal_displayio_fourwire_reset; self->bus_free = common_hal_displayio_fourwire_bus_free; self->begin_transaction = common_hal_displayio_fourwire_begin_transaction; From 468558896cf178815a0f35d5fd7271e413093730 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 07:29:32 -0500 Subject: [PATCH 309/418] remove paralleldisplay from ports where it was unimplemented --- .../common-hal/paralleldisplay/ParallelBus.c | 67 ------------------- .../common-hal/paralleldisplay/ParallelBus.h | 36 ---------- ports/mimxrt10xx/mpconfigport.mk | 1 + .../common-hal/paralleldisplay/ParallelBus.c | 67 ------------------- .../common-hal/paralleldisplay/ParallelBus.h | 36 ---------- ports/stm/mpconfigport.mk | 2 + 6 files changed, 3 insertions(+), 206 deletions(-) delete mode 100644 ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.c delete mode 100644 ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.h delete mode 100644 ports/stm/common-hal/paralleldisplay/ParallelBus.c delete mode 100644 ports/stm/common-hal/paralleldisplay/ParallelBus.h diff --git a/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.c b/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.c deleted file mode 100644 index 6d0c8a9476..0000000000 --- a/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2020 Artur Pacholec - * - * 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 "shared-bindings/paralleldisplay/ParallelBus.h" - -#include - -#include "common-hal/microcontroller/Pin.h" -#include "py/runtime.h" -#include "shared-bindings/digitalio/DigitalInOut.h" -#include "shared-bindings/microcontroller/__init__.h" - -void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, - const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, - const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { - - mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); -} - -void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self) { - -} - -bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t obj) { - return false; -} - -bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { - return false; -} - -bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { - - return false; -} - -void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, - display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { - -} - -void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t obj) { - -} diff --git a/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.h b/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.h deleted file mode 100644 index 8034e1132c..0000000000 --- a/ports/mimxrt10xx/common-hal/paralleldisplay/ParallelBus.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2020 Artur Pacholec - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H -#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H - -#include "common-hal/digitalio/DigitalInOut.h" - -typedef struct { - mp_obj_base_t base; -} paralleldisplay_parallelbus_obj_t; - -#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H diff --git a/ports/mimxrt10xx/mpconfigport.mk b/ports/mimxrt10xx/mpconfigport.mk index 3f4d9d4b7f..ed9446d0e7 100644 --- a/ports/mimxrt10xx/mpconfigport.mk +++ b/ports/mimxrt10xx/mpconfigport.mk @@ -28,6 +28,7 @@ CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NVM = 0 +CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_PULSEIO = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_USB_MIDI = 1 diff --git a/ports/stm/common-hal/paralleldisplay/ParallelBus.c b/ports/stm/common-hal/paralleldisplay/ParallelBus.c deleted file mode 100644 index b6b658bb39..0000000000 --- a/ports/stm/common-hal/paralleldisplay/ParallelBus.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2019 Lucian Copeland for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "shared-bindings/paralleldisplay/ParallelBus.h" - -#include - -#include "common-hal/microcontroller/Pin.h" -#include "py/runtime.h" -#include "shared-bindings/digitalio/DigitalInOut.h" -#include "shared-bindings/microcontroller/__init__.h" - -void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbus_obj_t *self, - const mcu_pin_obj_t *data0, const mcu_pin_obj_t *command, const mcu_pin_obj_t *chip_select, - const mcu_pin_obj_t *write, const mcu_pin_obj_t *read, const mcu_pin_obj_t *reset, uint32_t frequency) { - - mp_raise_NotImplementedError(translate("ParallelBus not yet supported")); -} - -void common_hal_paralleldisplay_parallelbus_deinit(paralleldisplay_parallelbus_obj_t *self) { - -} - -bool common_hal_paralleldisplay_parallelbus_reset(mp_obj_t obj) { - return false; -} - -bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { - return false; -} - -bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { - - return false; -} - -void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, - display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) { - -} - -void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t obj) { - -} diff --git a/ports/stm/common-hal/paralleldisplay/ParallelBus.h b/ports/stm/common-hal/paralleldisplay/ParallelBus.h deleted file mode 100644 index f637fa5a28..0000000000 --- a/ports/stm/common-hal/paralleldisplay/ParallelBus.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2019 Lucian Copeland for Adafruit Industries - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H -#define MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H - -#include "common-hal/digitalio/DigitalInOut.h" - -typedef struct { - mp_obj_base_t base; -} paralleldisplay_parallelbus_obj_t; - -#endif // MICROPY_INCLUDED_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H diff --git a/ports/stm/mpconfigport.mk b/ports/stm/mpconfigport.mk index c68a5077ee..16c098841c 100644 --- a/ports/stm/mpconfigport.mk +++ b/ports/stm/mpconfigport.mk @@ -61,3 +61,5 @@ ifeq ($(MCU_SERIES),F7) USB_NUM_ENDPOINT_PAIRS = 6 endif + +CIRCUITPY_PARALLELDISPLAY := 0 From 8f024316ad844f080a331d0ac8fc95b2d78892ac Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 07:33:41 -0500 Subject: [PATCH 310/418] explicitly disable paralleldisplay on a few boards --- .../boards/circuitplayground_express_displayio/mpconfigboard.mk | 1 + ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk | 1 + ports/atmel-samd/boards/ugame10/mpconfigboard.mk | 1 + 3 files changed, 3 insertions(+) diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk index 3a97c39830..fd9e6cc2e6 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk @@ -20,6 +20,7 @@ CIRCUITPY_USB_MIDI = 0 # So not all of displayio, sorry! CIRCUITPY_VECTORIO = 0 CIRCUITPY_BITMAPTOOLS = 0 +CIRCUITPY_PARALLELDISPLAY = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground diff --git a/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk b/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk index 2a4d58f134..7c3e7eb3ed 100644 --- a/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk @@ -20,6 +20,7 @@ CIRCUITPY_BITBANG_APA102 = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 +CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_PIXELBUF = 0 CIRCUITPY_PS2IO = 0 CIRCUITPY_PULSEIO = 0 diff --git a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk index 225b37fb20..f942490f29 100644 --- a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk @@ -24,6 +24,7 @@ CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 +CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_PIXELBUF = 0 CIRCUITPY_RTC = 0 CIRCUITPY_TOUCHIO = 0 From d7193dcf7c04260e574f570f8cc5bebda55ba940 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 11:15:38 -0500 Subject: [PATCH 311/418] remove debug print --- ports/unix/variants/coverage/mpconfigvariant.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/unix/variants/coverage/mpconfigvariant.mk b/ports/unix/variants/coverage/mpconfigvariant.mk index e9674a3ec2..e5d0f7e2d3 100644 --- a/ports/unix/variants/coverage/mpconfigvariant.mk +++ b/ports/unix/variants/coverage/mpconfigvariant.mk @@ -22,7 +22,6 @@ FROZEN_DIR=variants/coverage/frzstr FROZEN_MPY_DIR=variants/coverage/frzmpy SRC_QRIO := $(patsubst ../../%,%,$(wildcard ../../shared-bindings/qrio/*.c ../../shared-module/qrio/*.c ../../lib/quirc/lib/*.c)) -$(info SRC_QRIO = $(SRC_QRIO)) SRC_C += $(SRC_QRIO) CFLAGS += -DCIRCUITPY_QRIO=1 From 266b6a1dd9062c349800df5af3a6c0584cec340e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 11:26:37 -0500 Subject: [PATCH 312/418] mkrules: Fix warning preprocessing C++ files Messages like 'command-line option is [not valid] for C++' can result from the way the preprocessor is invoked by `genlast`. Instead, cause the files to be preprocessed as though their content is "C". This should generally be OK, as they'll eventually be _compiled_ as C++. When preprocessed as C, the file simply needs to generate all the same QSTRS and TRANSLATEs. --- py/mkrules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/mkrules.mk b/py/mkrules.mk index 81dd961ac6..50f35ffb22 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -65,7 +65,7 @@ vpath %.cpp . $(TOP) $(USER_C_MODULES) $(BUILD)/%.o: %.cpp $(call compile_cxx) -QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR +QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR -x c # frozen.c and frozen_mpy.c are created in $(BUILD), so use our rule # for those as well. From 68af5fd040e0446b46d36a5c6711cf14dedabed6 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 11:27:21 -0500 Subject: [PATCH 313/418] unix: Filter out -std=gnu11 On Debian Bullseye, it is an error to include this flag when building a C++ file, which caused the unix coverage build to fail. --- ports/unix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/unix/Makefile b/ports/unix/Makefile index d966e71327..ec60d8d2ad 100644 --- a/ports/unix/Makefile +++ b/ports/unix/Makefile @@ -213,7 +213,7 @@ ifeq ($(HASCPP17), 1) else CXXFLAGS += -std=c++11 endif -CXXFLAGS += $(filter-out -Wmissing-prototypes -Wold-style-definition -std=gnu99,$(CFLAGS) $(CXXFLAGS_MOD)) +CXXFLAGS += $(filter-out -Wmissing-prototypes -Wold-style-definition -std=gnu99 -std=gnu11,$(CFLAGS) $(CXXFLAGS_MOD)) ifeq ($(MICROPY_FORCE_32BIT),1) RUN_TESTS_MPY_CROSS_FLAGS = --mpy-cross-flags='-mcache-lookup-bc -march=x86' From db3945edfefd343496b5e674e2eeed140410eff2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 11:14:19 -0500 Subject: [PATCH 314/418] Make %p include the 0x prefix .. and modify some messages where 0x was specified "manually". This involves updating some tests to expect the new 0x to appear. --- py/mpprint.c | 7 ++++++- py/objfun.c | 2 +- py/profile.c | 6 +++--- tests/extmod/uctypes_print.py.exp | 8 ++++---- tests/unix/extra_coverage.py.exp | 4 ++-- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/py/mpprint.c b/py/mpprint.c index af485a50f2..df73587449 100644 --- a/py/mpprint.c +++ b/py/mpprint.c @@ -545,7 +545,12 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) { case 'p': case 'P': // don't bother to handle upcase for 'P' // Use unsigned long int to work on both ILP32 and LP64 systems - chrs += mp_print_int(print, va_arg(args, unsigned long int), 0, 16, 'a', flags, fill, width); + #if SUPPORT_INT_BASE_PREFIX + chrs += mp_print_int(print, va_arg(args, unsigned long int), 0, 16, 'a', flags | PF_FLAG_SHOW_PREFIX, fill, width); + #else + print->print_strn(print->data, "0x", 2); + chrs += mp_print_int(print, va_arg(args, unsigned long int), 0, 16, 'a', flags, fill, width) + 2; + #endif break; #if MICROPY_PY_BUILTINS_FLOAT case 'e': diff --git a/py/objfun.c b/py/objfun.c index 115957e09c..23698ad95c 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -182,7 +182,7 @@ qstr mp_obj_fun_get_name(mp_const_obj_t fun_in) { STATIC void fun_bc_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) { (void)kind; mp_obj_fun_bc_t *o = MP_OBJ_TO_PTR(o_in); - mp_printf(print, "", mp_obj_fun_get_name(o_in), o); + mp_printf(print, "", mp_obj_fun_get_name(o_in), o); } #endif diff --git a/py/profile.c b/py/profile.c index e5fb35f0ed..2e59b97703 100644 --- a/py/profile.c +++ b/py/profile.c @@ -68,7 +68,7 @@ STATIC void code_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t k const mp_raw_code_t *rc = o->rc; const mp_bytecode_prelude_t *prelude = &rc->prelude; mp_printf(print, - "", + "", prelude->qstr_block_name, o, prelude->qstr_source_file, @@ -202,7 +202,7 @@ STATIC void frame_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t const mp_raw_code_t *rc = code->rc; const mp_bytecode_prelude_t *prelude = &rc->prelude; mp_printf(print, - "", + "", frame, prelude->qstr_source_file, frame->lineno, @@ -950,7 +950,7 @@ void mp_prof_print_instr(const byte *ip, mp_code_state_t *code_state) { /* long path */ if (1) { mp_printf(&mp_plat_print, - "@0x%p:%q:%q+0x%04x:%d", + "@%p:%q:%q+0x%04x:%d", ip, prelude->qstr_source_file, prelude->qstr_block_name, diff --git a/tests/extmod/uctypes_print.py.exp b/tests/extmod/uctypes_print.py.exp index 63daefc848..b1c730d44f 100644 --- a/tests/extmod/uctypes_print.py.exp +++ b/tests/extmod/uctypes_print.py.exp @@ -1,4 +1,4 @@ - - - - + + + + diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index 57f4b139f9..2cf48de142 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -15,8 +15,8 @@ false true abc % # GC -0 -0 +0x0 +0x0 # vstr tests sts From f4bb3cc2c86ef321f4c20b2398150a46c79cee1b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 11:43:51 -0500 Subject: [PATCH 315/418] Fix stubs & doc redirects --- docs/redirects.txt | 2 +- shared-bindings/displayio/Display.c | 4 ++-- shared-bindings/displayio/EPaperDisplay.c | 4 ++-- shared-bindings/displayio/__init__.c | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/redirects.txt b/docs/redirects.txt index d8fc46b358..248a042e7a 100644 --- a/docs/redirects.txt +++ b/docs/redirects.txt @@ -71,7 +71,7 @@ shared-bindings/displayio/Group.rst shared-bindings/displayio/#displayio.Group shared-bindings/displayio/I2CDisplay.rst shared-bindings/displayio/#displayio.I2CDisplay shared-bindings/displayio/OnDiskBitmap.rst shared-bindings/displayio/#displayio.OnDiskBitmap shared-bindings/displayio/Palette.rst shared-bindings/displayio/#displayio.Palette -shared-bindings/displayio/ParallelBus.rst shared-bindings/displayio/#displayio.ParallelBus +shared-bindings/paralleldisplay/ParallelBus.rst shared-bindings/paralleldisplay/#paralleldisplay.ParallelBus shared-bindings/displayio/Shape.rst shared-bindings/displayio/#displayio.Shape shared-bindings/displayio/TileGrid.rst shared-bindings/displayio/#displayio.TileGrid shared-bindings/displayio/__init__.rst shared-bindings/displayio/ diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 3dcc26f691..b5c8868de5 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -39,8 +39,8 @@ #include "shared-module/displayio/__init__.h" #include "supervisor/shared/translate.h" -//| _DisplayBus = Union['FourWire', 'ParallelBus', 'I2CDisplay'] -//| """:py:class:`FourWire`, :py:class:`ParallelBus` or :py:class:`I2CDisplay`""" +//| _DisplayBus = Union['FourWire', 'paralleldisplay.ParallelBus', 'I2CDisplay'] +//| """:py:class:`FourWire`, :py:class:`paralleldisplay.ParallelBus` or :py:class:`I2CDisplay`""" //| //| diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index 689ac413eb..afe1321251 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -64,7 +64,7 @@ //| busy_pin: Optional[microcontroller.Pin] = None, busy_state: bool = True, //| seconds_per_frame: float = 180, always_toggle_chip_select: bool = False, //| grayscale: bool = False) -> None: -//| """Create a EPaperDisplay object on the given display bus (`displayio.FourWire` or `displayio.ParallelBus`). +//| """Create a EPaperDisplay object on the given display bus (`displayio.FourWire` or `paralleldisplay.ParallelBus`). //| //| The ``start_sequence`` and ``stop_sequence`` are bitpacked to minimize the ram impact. Every //| command begins with a command byte followed by a byte to determine the parameter count and @@ -75,7 +75,7 @@ //| extra long 500 ms delay instead of 255 ms. The next byte will begin a new command definition. //| //| :param display_bus: The bus that the display is connected to -//| :type _DisplayBus: displayio.FourWire or displayio.ParallelBus +//| :type _DisplayBus: displayio.FourWire or paralleldisplay.ParallelBus //| :param ~_typing.ReadableBuffer start_sequence: Byte-packed initialization sequence. //| :param ~_typing.ReadableBuffer stop_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index a9aa49cdbf..d0d3e5ae14 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -50,6 +50,8 @@ //| including synchronizing with refresh rates and partial updating.""" //| +//| import paralleldisplay + //| def release_displays() -> None: //| """Releases any actively used displays so their busses and pins can be used again. This will also //| release the builtin display on boards that have one. You will need to reinitialize it yourself From 83120eb1b299949ae5bf0f2aef410f3b6ace9a10 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 29 Aug 2021 11:49:47 -0500 Subject: [PATCH 316/418] Actually fix building ports without parallel displays --- shared-bindings/displayio/__init__.c | 2 ++ shared-bindings/paralleldisplay/ParallelBus.h | 5 +---- shared-module/displayio/Display.c | 2 ++ shared-module/displayio/EPaperDisplay.c | 2 ++ shared-module/displayio/__init__.h | 4 ++++ shared-module/displayio/display_core.c | 2 ++ 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index d0d3e5ae14..27f6c88ed1 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -40,7 +40,9 @@ #include "shared-bindings/displayio/I2CDisplay.h" #include "shared-bindings/displayio/OnDiskBitmap.h" #include "shared-bindings/displayio/Palette.h" +#if CIRCUITPY_PARALLELBUS #include "shared-bindings/paralleldisplay/ParallelBus.h" +#endif #include "shared-bindings/displayio/Shape.h" #include "shared-bindings/displayio/TileGrid.h" diff --git a/shared-bindings/paralleldisplay/ParallelBus.h b/shared-bindings/paralleldisplay/ParallelBus.h index 2f9c8d10e3..cd9e32f9be 100644 --- a/shared-bindings/paralleldisplay/ParallelBus.h +++ b/shared-bindings/paralleldisplay/ParallelBus.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELDISPLAY_H -#define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELDISPLAY_H +#pragma once #include "common-hal/paralleldisplay/ParallelBus.h" @@ -50,5 +49,3 @@ void common_hal_paralleldisplay_parallelbus_send(mp_obj_t self, display_byte_typ display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length); void common_hal_paralleldisplay_parallelbus_end_transaction(mp_obj_t self); - -#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYBUSIO_PARALLELDISPLAY_H diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 40a2e31feb..f74b472bf4 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -29,7 +29,9 @@ #include "py/runtime.h" #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/I2CDisplay.h" +#if CIRCUITPY_PARALLELDISPLAY #include "shared-bindings/paralleldisplay/ParallelBus.h" +#endif #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/time/__init__.h" #include "shared-module/displayio/__init__.h" diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c index 9731aa90f0..b1d06fbd72 100644 --- a/shared-module/displayio/EPaperDisplay.c +++ b/shared-module/displayio/EPaperDisplay.c @@ -31,7 +31,9 @@ #include "shared-bindings/displayio/ColorConverter.h" #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/I2CDisplay.h" +#if CIRCUITPY_PARALLELDISPLAY #include "shared-bindings/paralleldisplay/ParallelBus.h" +#endif #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/time/__init__.h" #include "shared-module/displayio/__init__.h" diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index 09f2f7ae08..5bfee4d67d 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -35,7 +35,9 @@ #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/I2CDisplay.h" +#if CIRCUITPY_PARALLELDISPLAY #include "shared-bindings/paralleldisplay/ParallelBus.h" +#endif #if CIRCUITPY_RGBMATRIX #include "shared-bindings/rgbmatrix/RGBMatrix.h" #endif @@ -48,7 +50,9 @@ typedef struct { mp_obj_base_t bus_base; displayio_fourwire_obj_t fourwire_bus; displayio_i2cdisplay_obj_t i2cdisplay_bus; + #if CIRCUITPY_PARALLELDISPLAY paralleldisplay_parallelbus_obj_t parallel_bus; + #endif #if CIRCUITPY_RGBMATRIX rgbmatrix_rgbmatrix_obj_t rgbmatrix; #endif diff --git a/shared-module/displayio/display_core.c b/shared-module/displayio/display_core.c index d1efbf7ddc..114b274fd1 100644 --- a/shared-module/displayio/display_core.c +++ b/shared-module/displayio/display_core.c @@ -30,7 +30,9 @@ #include "py/runtime.h" #include "shared-bindings/displayio/FourWire.h" #include "shared-bindings/displayio/I2CDisplay.h" +#if CIRCUITPY_PARALLELDISPLAY #include "shared-bindings/paralleldisplay/ParallelBus.h" +#endif #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/time/__init__.h" #include "shared-module/displayio/__init__.h" From d50dc064ee76ada3619e2a14ef010d608602dacb Mon Sep 17 00:00:00 2001 From: lady ada Date: Sun, 29 Aug 2021 17:53:57 -0400 Subject: [PATCH 317/418] fix i2c --- .../nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h | 4 ++-- ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h b/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h index 7b6a61d797..e82d6ceed9 100644 --- a/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/mpconfigboard.h @@ -26,5 +26,5 @@ // Board does not have a 32kHz crystal. It does have a 32MHz crystal, in the module. #define BOARD_HAS_32KHZ_XTAL (0) -#define DEFAULT_I2C_BUS_SCL (&pin_P0_14) -#define DEFAULT_I2C_BUS_SDA (&pin_P0_16) +#define DEFAULT_I2C_BUS_SCL (&pin_P0_08) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_06) diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c index f387c27611..c96a5c6fcf 100644 --- a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c @@ -13,7 +13,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_31) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_08) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; From 02ada0af5f819bba17eacb2b643e7bb0fd8e462d Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Sun, 29 Aug 2021 23:42:14 +0200 Subject: [PATCH 318/418] Update stage library to use keypad module on pygamer and pybadge --- frozen/circuitpython-stage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frozen/circuitpython-stage b/frozen/circuitpython-stage index b014aa045d..275c03e340 160000 --- a/frozen/circuitpython-stage +++ b/frozen/circuitpython-stage @@ -1 +1 @@ -Subproject commit b014aa045d9014b86a4ae583f452c6b8282a61b9 +Subproject commit 275c03e340c3853ab1c53fc15b6df07ceb672bdc From 80cadc6ec194bf8630b7c15d6333f1a6bb9015ae Mon Sep 17 00:00:00 2001 From: Durapensa Date: Mon, 30 Aug 2021 06:31:20 -0400 Subject: [PATCH 319/418] Added Espressif-assigned PID for "Lolin S2 Mini - CircuitPython" --- ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk index 2aec4db287..ce434873cc 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x303A -USB_PID = 0x8002 -USB_PRODUCT = "S2Mini" +USB_PID = 0x80C3 +USB_PRODUCT = "S2 Mini" USB_MANUFACTURER = "Lolin" INTERNAL_FLASH_FILESYSTEM = 1 From ec3dfed06668f277dc6199c3df31af470987ae92 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 31 Aug 2021 00:28:29 +0700 Subject: [PATCH 320/418] update tinyusb to commit https://github.com/hathach/tinyusb/commit/38f5aee9c31299874dcda1758cb98e4404c6ad9d --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tinyusb b/lib/tinyusb index 3a248951e2..38f5aee9c3 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 3a248951e2744ba89f5fb96eda85a971001115f0 +Subproject commit 38f5aee9c31299874dcda1758cb98e4404c6ad9d From 89fc1890af46fbe871e06654e4b1bcd2738f6521 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Mon, 30 Aug 2021 19:03:29 +0200 Subject: [PATCH 321/418] stm32: Add support for Stage games to Meowbit This enables the _stage library and adds stage and ugame modules to the frozen modules, so that all Stage games should work. I had to do several hacks: * Since displayio.release_displays doesn't release the pins, I couldn't re-initialize the display inside the ugame module. Instead I changed the default display initialization for the board to match what Stage expects. * I wanted to make the MENU key works as K_Z, but when I try to use it with the keypad module, I get "pin in use" error. So for now only the A and B buttons are used. --- frozen/circuitpython-stage | 2 +- ports/stm/boards/meowbit_v121/board.c | 4 ++-- ports/stm/boards/meowbit_v121/mpconfigboard.mk | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frozen/circuitpython-stage b/frozen/circuitpython-stage index 275c03e340..d0f1c46d7f 160000 --- a/frozen/circuitpython-stage +++ b/frozen/circuitpython-stage @@ -1 +1 @@ -Subproject commit 275c03e340c3853ab1c53fc15b6df07ceb672bdc +Subproject commit d0f1c46d7f879cd60562ee69900d619499d4d206 diff --git a/ports/stm/boards/meowbit_v121/board.c b/ports/stm/boards/meowbit_v121/board.c index 150325556e..7330809a88 100644 --- a/ports/stm/boards/meowbit_v121/board.c +++ b/ports/stm/boards/meowbit_v121/board.c @@ -53,7 +53,7 @@ uint8_t display_init_sequence[] = { 0xc4, 2, 0x8a, 0xee, 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0x20, 0, // _INVOFF //MISMATCh 0x2a vs 0x20 - 0x36, 1, 0x18, // _MADCTL bottom to top refresh + 0x36, 1, 0x60, // _MADCTL bottom to top refresh // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // fix on VTL 0x3a, 1, 0x05, // COLMOD - 16bit color @@ -90,7 +90,7 @@ void board_init(void) { 128, // Height 0, // column start 0, // row start - 90, // rotation + 0, // rotation 16, // Color depth false, // Grayscale false, // Pixels in a byte share a row. Only used for depth < 8 diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk index d846755c28..62846dbc84 100644 --- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk +++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk @@ -22,3 +22,6 @@ LD_FILE = boards/STM32F401xe_boot.ld CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_ULAB = 0 +CIRCUITPY_STAGE = 1 + +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/meowbit From eabceb9fcef4dd12e6fd22aab456f24f1e758522 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 30 Aug 2021 14:09:36 -0700 Subject: [PATCH 322/418] Fix builds without alarm --- ports/nrf/common-hal/microcontroller/Processor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/nrf/common-hal/microcontroller/Processor.c b/ports/nrf/common-hal/microcontroller/Processor.c index 14eaeee386..f01b22fb47 100644 --- a/ports/nrf/common-hal/microcontroller/Processor.c +++ b/ports/nrf/common-hal/microcontroller/Processor.c @@ -138,12 +138,14 @@ mcu_reset_reason_t common_hal_mcu_processor_get_reset_reason(void) { r = RESET_REASON_WATCHDOG; } else if (reset_reason_saved & POWER_RESETREAS_SREQ_Msk) { r = RESET_REASON_SOFTWARE; + #if CIRCUITPY_ALARM // Our "deep sleep" is still actually light sleep followed by a software // reset. Adding this check here ensures we treat it as-if we're waking // from deep sleep. if (sleepmem_wakeup_event != SLEEPMEM_WAKEUP_BY_NONE) { r = RESET_REASON_DEEP_SLEEP_ALARM; } + #endif } else if ((reset_reason_saved & POWER_RESETREAS_OFF_Msk) || (reset_reason_saved & POWER_RESETREAS_LPCOMP_Msk) || (reset_reason_saved & POWER_RESETREAS_NFC_Msk) || From 558f9cdfc1374f690688d2e8a40bf7e71f987d4b Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 30 Aug 2021 14:23:11 -0700 Subject: [PATCH 323/418] Fix meminfo test --- tests/micropython/meminfo.py.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/micropython/meminfo.py.exp b/tests/micropython/meminfo.py.exp index a229a7fa4c..fb9eaa890a 100644 --- a/tests/micropython/meminfo.py.exp +++ b/tests/micropython/meminfo.py.exp @@ -6,7 +6,7 @@ mem: total=\\d\+, current=\\d\+, peak=\\d\+ stack: \\d\+ out of \\d\+ GC: total: \\d\+, used: \\d\+, free: \\d\+ No. of 1-blocks: \\d\+, 2-blocks: \\d\+, max blk sz: \\d\+, max free sz: \\d\+ -GC memory layout; from \[0-9a-f\]\+: +GC memory layout; from 0x\[0-9a-f\]\+: ######## qstr pool: n_pool=1, n_qstr=\\d, n_str_data_bytes=\\d\+, n_total_bytes=\\d\+ qstr pool: n_pool=1, n_qstr=\\d, n_str_data_bytes=\\d\+, n_total_bytes=\\d\+ From 838d30b3a4484b3fd9fe5663fc8874b0f0b16020 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 30 Aug 2021 14:40:14 -0700 Subject: [PATCH 324/418] Fix incorrect macros --- ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.h | 6 +++--- ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h | 6 +++--- ports/nrf/common-hal/paralleldisplay/ParallelBus.h | 6 +++--- ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.h | 6 +++--- shared-bindings/displayio/__init__.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.h b/ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.h index 4b6ec64b11..5ef7bcf195 100644 --- a/ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.h +++ b/ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H +#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H #include "common-hal/digitalio/DigitalInOut.h" @@ -42,4 +42,4 @@ typedef struct { uint32_t write_mask; } paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H diff --git a/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h b/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h index adf5d6226f..8758b8fcca 100644 --- a/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h +++ b/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H -#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H +#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H #include "common-hal/digitalio/DigitalInOut.h" @@ -44,4 +44,4 @@ typedef struct { uint32_t write_mask; // bit mask for the single bit for the write pin register } paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H diff --git a/ports/nrf/common-hal/paralleldisplay/ParallelBus.h b/ports/nrf/common-hal/paralleldisplay/ParallelBus.h index 3a3f71e3c9..14ba7bbc11 100644 --- a/ports/nrf/common-hal/paralleldisplay/ParallelBus.h +++ b/ports/nrf/common-hal/paralleldisplay/ParallelBus.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H -#define MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H +#define MICROPY_INCLUDED_NRF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H #include "common-hal/digitalio/DigitalInOut.h" @@ -42,4 +42,4 @@ typedef struct { uint32_t write_mask; } paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H diff --git a/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.h b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.h index c93034da18..87f149b9b8 100644 --- a/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.h +++ b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.h @@ -24,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H -#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H +#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H #include "common-hal/digitalio/DigitalInOut.h" #include "bindings/rp2pio/StateMachine.h" @@ -42,4 +42,4 @@ typedef struct { rp2pio_statemachine_obj_t state_machine; } paralleldisplay_parallelbus_obj_t; -#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_DISPLAYIO_PARALLELDISPLAY_H +#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_PARALLELDISPLAY_PARALLELBUS_H diff --git a/shared-bindings/displayio/__init__.c b/shared-bindings/displayio/__init__.c index 27f6c88ed1..7ac2a84903 100644 --- a/shared-bindings/displayio/__init__.c +++ b/shared-bindings/displayio/__init__.c @@ -40,7 +40,7 @@ #include "shared-bindings/displayio/I2CDisplay.h" #include "shared-bindings/displayio/OnDiskBitmap.h" #include "shared-bindings/displayio/Palette.h" -#if CIRCUITPY_PARALLELBUS +#if CIRCUITPY_PARALLELDISPLAY #include "shared-bindings/paralleldisplay/ParallelBus.h" #endif #include "shared-bindings/displayio/Shape.h" From 76cbd0d74ad98a4b73d56affefc2bbcfb1327eba Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 30 Aug 2021 15:09:12 -0700 Subject: [PATCH 325/418] Switch CircuitPython serial off Nordic UUIDs This will un-break examples that got confused by the presence of two Nordic UART Services. It also adds a version characteristic that gives the CircuitPython build tag back. Fixes #5252 --- supervisor/shared/bluetooth/bluetooth.c | 2 +- supervisor/shared/bluetooth/serial.c | 77 ++++++++++++++++--------- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/supervisor/shared/bluetooth/bluetooth.c b/supervisor/shared/bluetooth/bluetooth.c index 9b1a775f53..426aad9891 100644 --- a/supervisor/shared/bluetooth/bluetooth.c +++ b/supervisor/shared/bluetooth/bluetooth.c @@ -79,7 +79,7 @@ const uint8_t private_advertising_data[] = { 0x02, 0x01, 0x06, // 0-2 Flags uint8_t circuitpython_scan_response_data[] = { 0x0a, 0x09, 0x43, 0x49, 0x52, 0x50, 0x59, 0x00, 0x00, 0x00, 0x00, #if CIRCUITPY_SERIAL_BLE - 0x11, 0x06, 0x9e, 0xca, 0xdc, 0x24, 0x0e, 0xe5, 0xa9, 0xe0, 0x93, 0xf3, 0xa3, 0xb5, 0x01, 0x00, 0x40, 0x6e, + 0x11, 0x06, 0x6e, 0x68, 0x74, 0x79, 0x50, 0x74, 0x69, 0x75, 0x63, 0x72, 0x69, 0x43, 0x01, 0x00, 0xaf, 0xad #endif }; diff --git a/supervisor/shared/bluetooth/serial.c b/supervisor/shared/bluetooth/serial.c index 059f322649..901b2d9a61 100644 --- a/supervisor/shared/bluetooth/serial.c +++ b/supervisor/shared/bluetooth/serial.c @@ -26,6 +26,7 @@ #include +#include "genhdr/mpversion.h" #include "shared-bindings/_bleio/__init__.h" #include "shared-bindings/_bleio/Adapter.h" #include "shared-bindings/_bleio/Characteristic.h" @@ -39,15 +40,17 @@ #include "py/mpstate.h" -STATIC bleio_service_obj_t supervisor_ble_serial_service; -STATIC bleio_uuid_obj_t supervisor_ble_serial_service_uuid; -STATIC bleio_characteristic_obj_t supervisor_ble_rx_characteristic; -STATIC bleio_uuid_obj_t supervisor_ble_rx_uuid; -STATIC bleio_characteristic_obj_t supervisor_ble_tx_characteristic; -STATIC bleio_uuid_obj_t supervisor_ble_tx_uuid; +STATIC bleio_service_obj_t supervisor_ble_circuitpython_service; +STATIC bleio_uuid_obj_t supervisor_ble_circuitpython_service_uuid; +STATIC bleio_characteristic_obj_t supervisor_ble_circuitpython_rx_characteristic; +STATIC bleio_uuid_obj_t supervisor_ble_circuitpython_rx_uuid; +STATIC bleio_characteristic_obj_t supervisor_ble_circuitpython_tx_characteristic; +STATIC bleio_uuid_obj_t supervisor_ble_circuitpython_tx_uuid; +STATIC bleio_characteristic_obj_t supervisor_ble_circuitpython_version_characteristic; +STATIC bleio_uuid_obj_t supervisor_ble_circuitpython_version_uuid; -// This is the base UUID for the nordic uart service. -const uint8_t nordic_uart_base_uuid[16] = {0x9e, 0xca, 0xdc, 0x24, 0x0e, 0xe5, 0xa9, 0xe0, 0x93, 0xf3, 0xa3, 0xb5, 0x00, 0x00, 0x40, 0x6e }; +// This is the base UUID for the CircuitPython service. +const uint8_t circuitpython_base_uuid[16] = {0x6e, 0x68, 0x74, 0x79, 0x50, 0x74, 0x69, 0x75, 0x63, 0x72, 0x69, 0x43, 0x00, 0x00, 0xaf, 0xad }; STATIC mp_obj_list_t characteristic_list; STATIC mp_obj_t characteristic_list_items[2]; @@ -64,8 +67,8 @@ STATIC bleio_characteristic_buffer_obj_t _rx_buffer; STATIC bool _enabled; void supervisor_start_bluetooth_serial(void) { - supervisor_ble_serial_service_uuid.base.type = &bleio_uuid_type; - common_hal_bleio_uuid_construct(&supervisor_ble_serial_service_uuid, 0x0001, nordic_uart_base_uuid); + supervisor_ble_circuitpython_service_uuid.base.type = &bleio_uuid_type; + common_hal_bleio_uuid_construct(&supervisor_ble_circuitpython_service_uuid, 0x0001, circuitpython_base_uuid); // We know we'll only be N characteristics so we can statically allocate it. characteristic_list.base.type = &mp_type_list; @@ -74,50 +77,72 @@ void supervisor_start_bluetooth_serial(void) { characteristic_list.items = characteristic_list_items; mp_seq_clear(characteristic_list.items, 0, characteristic_list.alloc, sizeof(*characteristic_list.items)); - supervisor_ble_serial_service.base.type = &bleio_service_type; - _common_hal_bleio_service_construct(&supervisor_ble_serial_service, &supervisor_ble_serial_service_uuid, false /* is secondary */, &characteristic_list); + supervisor_ble_circuitpython_service.base.type = &bleio_service_type; + _common_hal_bleio_service_construct(&supervisor_ble_circuitpython_service, &supervisor_ble_circuitpython_service_uuid, false /* is secondary */, &characteristic_list); // RX - supervisor_ble_rx_uuid.base.type = &bleio_uuid_type; - common_hal_bleio_uuid_construct(&supervisor_ble_rx_uuid, 0x0002, nordic_uart_base_uuid); - common_hal_bleio_characteristic_construct(&supervisor_ble_rx_characteristic, - &supervisor_ble_serial_service, + supervisor_ble_circuitpython_rx_uuid.base.type = &bleio_uuid_type; + common_hal_bleio_uuid_construct(&supervisor_ble_circuitpython_rx_uuid, 0x0002, circuitpython_base_uuid); + common_hal_bleio_characteristic_construct(&supervisor_ble_circuitpython_rx_characteristic, + &supervisor_ble_circuitpython_service, 0, // handle (for remote only) - &supervisor_ble_rx_uuid, + &supervisor_ble_circuitpython_rx_uuid, CHAR_PROP_WRITE | CHAR_PROP_WRITE_NO_RESPONSE, SECURITY_MODE_NO_ACCESS, SECURITY_MODE_ENC_NO_MITM, BLE_GATTS_VAR_ATTR_LEN_MAX, // max length false, // fixed length NULL, // no initial value - "CircuitPython Serial"); + NULL); // TX - supervisor_ble_tx_uuid.base.type = &bleio_uuid_type; - common_hal_bleio_uuid_construct(&supervisor_ble_tx_uuid, 0x0003, nordic_uart_base_uuid); - common_hal_bleio_characteristic_construct(&supervisor_ble_tx_characteristic, - &supervisor_ble_serial_service, + supervisor_ble_circuitpython_tx_uuid.base.type = &bleio_uuid_type; + common_hal_bleio_uuid_construct(&supervisor_ble_circuitpython_tx_uuid, 0x0003, circuitpython_base_uuid); + common_hal_bleio_characteristic_construct(&supervisor_ble_circuitpython_tx_characteristic, + &supervisor_ble_circuitpython_service, 0, // handle (for remote only) - &supervisor_ble_tx_uuid, + &supervisor_ble_circuitpython_tx_uuid, CHAR_PROP_NOTIFY, SECURITY_MODE_ENC_NO_MITM, SECURITY_MODE_NO_ACCESS, BLE_GATTS_VAR_ATTR_LEN_MAX, // max length false, // fixed length NULL, // no initial value - "CircuitPython Serial"); + NULL); + + // Version number + const char *version = MICROPY_GIT_TAG; + mp_buffer_info_t bufinfo; + bufinfo.buf = (uint8_t *)version; + bufinfo.len = strlen(version); + + supervisor_ble_circuitpython_version_uuid.base.type = &bleio_uuid_type; + common_hal_bleio_uuid_construct(&supervisor_ble_circuitpython_version_uuid, 0x0100, circuitpython_base_uuid); + common_hal_bleio_characteristic_construct(&supervisor_ble_circuitpython_version_characteristic, + &supervisor_ble_circuitpython_service, + 0, // handle (for remote only) + &supervisor_ble_circuitpython_version_uuid, + CHAR_PROP_READ, + SECURITY_MODE_OPEN, + SECURITY_MODE_NO_ACCESS, + bufinfo.len, // max length + true, // fixed length + NULL, // no initial value + NULL); // no description + + common_hal_bleio_characteristic_set_value(&supervisor_ble_circuitpython_version_characteristic, &bufinfo); // Use a PacketBuffer to transmit so that we glom characters to transmit // together and save BLE overhead. _common_hal_bleio_packet_buffer_construct( - &_tx_packet_buffer, &supervisor_ble_tx_characteristic, + &_tx_packet_buffer, &supervisor_ble_circuitpython_tx_characteristic, NULL, 0, _outgoing1, _outgoing2, BLE_GATTS_VAR_ATTR_LEN_MAX, &tx_static_handler_entry); // Use a CharacteristicBuffer for rx so we can read a single character at a time. _common_hal_bleio_characteristic_buffer_construct(&_rx_buffer, - &supervisor_ble_rx_characteristic, + &supervisor_ble_circuitpython_rx_characteristic, 0.1f, (uint8_t *)_incoming, sizeof(_incoming) * sizeof(uint32_t), &rx_static_handler_entry); From a4246bcfa3b3305fed60732e46451cb3ca1c41b3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 30 Aug 2021 18:05:14 -0700 Subject: [PATCH 326/418] Fix two watchdog crashes Fixes a crash from trying to raise an exception when trying to deinit a RESET wdt by not raising an exception. Fixes a crash when raise a wdt exception in the REPL when waiting for input. We now catch and print any exceptions raised. Fixes #5261 --- lib/utils/pyexec.c | 16 +++++++++++++++- locale/circuitpython.pot | 1 + ports/nrf/common-hal/watchdog/WatchDogTimer.c | 7 ++++++- supervisor/shared/bluetooth/file_transfer.c | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index c1bb66aad1..a272eefbcb 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -650,7 +650,21 @@ friendly_repl_reset: } vstr_reset(&line); - int ret = readline(&line, ">>> "); + + nlr_buf_t nlr; + nlr.ret_val = NULL; + int ret = 0; + if (nlr_push(&nlr) == 0) { + ret = readline(&line, ">>> "); + } else { + // Uncaught exception + mp_handle_pending(false); // clear any pending exceptions (and run any callbacks) + + // Print exceptions but stay in the REPL. There are very few delayed + // exceptions. The WatchDogTimer can raise one though. + mp_hal_stdout_tx_str("\r\n"); + mp_obj_print_exception(&mp_plat_print, MP_OBJ_FROM_PTR(nlr.ret_val)); + } mp_parse_input_kind_t parse_input_kind = MP_PARSE_SINGLE_INPUT; if (ret == CHAR_CTRL_A) { diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index a614078beb..12b42cddf7 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -3939,6 +3939,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.c b/ports/nrf/common-hal/watchdog/WatchDogTimer.c index 3423d3466b..1798c52609 100644 --- a/ports/nrf/common-hal/watchdog/WatchDogTimer.c +++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.c @@ -28,6 +28,7 @@ #include #include +#include "py/gc.h" #include "py/obj.h" #include "py/objproperty.h" #include "py/runtime.h" @@ -94,7 +95,11 @@ void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) { void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { if (self->mode == WATCHDOGMODE_RESET) { - mp_raise_NotImplementedError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET")); + if (gc_alloc_possible()) { + mp_raise_NotImplementedError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET")); + } + // Don't change anything because RESET cannot be undone. + return; } if (timer) { timer_free(); diff --git a/supervisor/shared/bluetooth/file_transfer.c b/supervisor/shared/bluetooth/file_transfer.c index d105892582..908cc958d6 100644 --- a/supervisor/shared/bluetooth/file_transfer.c +++ b/supervisor/shared/bluetooth/file_transfer.c @@ -404,7 +404,7 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; char *path = (char *)((uint8_t *)command) + header_size; path[command->path_length] = '\0'; - FRESULT result; + FRESULT result = FR_OK; FILINFO file; if (f_stat(fs, path, &file) == FR_OK) { if ((file.fattrib & AM_DIR) != 0) { From fa9c2189d412328b3e86ef001bc34f7b932b8d69 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 30 Aug 2021 18:26:12 -0700 Subject: [PATCH 327/418] Fix nrf light_sleep when on usb Don't let pending serial input wake us up Fixes #5257 --- ports/nrf/common-hal/alarm/__init__.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/nrf/common-hal/alarm/__init__.c b/ports/nrf/common-hal/alarm/__init__.c index 117fa1168f..5006d726f0 100644 --- a/ports/nrf/common-hal/alarm/__init__.c +++ b/ports/nrf/common-hal/alarm/__init__.c @@ -147,7 +147,7 @@ STATIC void _setup_sleep_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t // TODO: this handles all possible types of wakeup, which is redundant with main. // revise to extract all parts essential to enabling sleep wakeup, but leave the // alarm/non-alarm sorting to the existing main loop. -void system_on_idle_until_alarm(int64_t timediff_ms, uint32_t prescaler) { +void system_on_idle_until_alarm(int64_t timediff_ms, bool wake_from_serial, uint32_t prescaler) { bool have_timeout = false; uint64_t start_tick = 0, end_tick = 0; int64_t tickdiff; @@ -179,7 +179,7 @@ void system_on_idle_until_alarm(int64_t timediff_ms, uint32_t prescaler) { if (mp_hal_is_interrupted()) { break; } - if (serial_connected() && serial_bytes_available()) { + if (wake_from_serial && serial_connected() && serial_bytes_available()) { break; } RUN_BACKGROUND_TASKS; @@ -220,7 +220,7 @@ mp_obj_t common_hal_alarm_light_sleep_until_alarms(size_t n_alarms, const mp_obj #endif int64_t timediff_ms = alarm_time_timealarm_get_wakeup_timediff_ms(); - system_on_idle_until_alarm(timediff_ms, 0); + system_on_idle_until_alarm(timediff_ms, false, 0); if (mp_hal_is_interrupted()) { wake_alarm = mp_const_none; @@ -262,7 +262,7 @@ void NORETURN common_hal_alarm_enter_deep_sleep(void) { #endif int64_t timediff_ms = alarm_time_timealarm_get_wakeup_timediff_ms(); tick_set_prescaler(PRESCALER_VALUE_IN_DEEP_SLEEP - 1); - system_on_idle_until_alarm(timediff_ms, PRESCALER_VALUE_IN_DEEP_SLEEP); + system_on_idle_until_alarm(timediff_ms, false, PRESCALER_VALUE_IN_DEEP_SLEEP); #ifdef NRF_DEBUG_PRINT mp_printf(&mp_plat_print, "RESET...\r\n\r\n"); @@ -285,7 +285,7 @@ void common_hal_alarm_pretending_deep_sleep(void) { #endif int64_t timediff_ms = alarm_time_timealarm_get_wakeup_timediff_ms(); - system_on_idle_until_alarm(timediff_ms, 0); + system_on_idle_until_alarm(timediff_ms, true, 0); alarm_reset(); } From 1c8828223f57f3b48c8e8bf66504c63aa8b5e3e6 Mon Sep 17 00:00:00 2001 From: Rob Capellini Date: Mon, 30 Aug 2021 22:29:51 -0400 Subject: [PATCH 328/418] Convert more modules to use MP_REGISTER_MODULE Convert neopixel_write, onewireio, ps2io, pulseio, pwmio, rainbowio, random, rgbmatrix, rotaryio, rtc, sdcardio, sharpdisplay, _stage, storage, struct, supervisor, synthio, touchio, traceback, usb_cdc, usb_hid, usb_midi, and vectorio modules to use MP_REGISTER_MODULE. Related to #5183. --- py/circuitpy_mpconfig.h | 200 +++------------------- shared-bindings/_stage/__init__.c | 2 + shared-bindings/neopixel_write/__init__.c | 2 + shared-bindings/onewireio/__init__.c | 2 + shared-bindings/ps2io/__init__.c | 2 + shared-bindings/pulseio/__init__.c | 2 + shared-bindings/pwmio/__init__.c | 2 + shared-bindings/rainbowio/__init__.c | 2 + shared-bindings/random/__init__.c | 2 + shared-bindings/rgbmatrix/__init__.c | 2 + shared-bindings/rotaryio/__init__.c | 2 + shared-bindings/rtc/__init__.c | 2 + shared-bindings/sdcardio/__init__.c | 2 + shared-bindings/sharpdisplay/__init__.c | 2 + shared-bindings/storage/__init__.c | 2 + shared-bindings/struct/__init__.c | 2 + shared-bindings/supervisor/__init__.c | 2 + shared-bindings/synthio/__init__.c | 2 + shared-bindings/touchio/__init__.c | 2 + shared-bindings/traceback/__init__.c | 2 + shared-bindings/usb_cdc/__init__.c | 2 + shared-bindings/usb_hid/__init__.c | 2 + shared-bindings/usb_midi/__init__.c | 2 + shared-bindings/vectorio/__init__.c | 2 + 24 files changed, 69 insertions(+), 177 deletions(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 1590ddcbf0..91e71078fb 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -374,13 +374,7 @@ extern const struct _mp_obj_module_t _eve_module; #endif // CIRCUITPY_FRAMEBUFFERIO uses MP_REGISTER_MODULE - -#if CIRCUITPY_VECTORIO -extern const struct _mp_obj_module_t vectorio_module; -#define VECTORIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_vectorio), (mp_obj_t)&vectorio_module }, -#else -#define VECTORIO_MODULE -#endif +// CIRCUITPY_VECTORIO uses MP_REGISTER_MODULE // CIRCUITPY_FREQUENCYIO uses MP_REGISTER_MODULE // CIRCUITPY_GAMEPADSHIFT uses MP_REGISTER_MODULE @@ -456,25 +450,14 @@ extern const struct _mp_obj_module_t memorymonitor_module; #endif // CIRCUITPY_MICROCONTROLLER uses MP_REGISTER_MODULE - -#if CIRCUITPY_NEOPIXEL_WRITE -extern const struct _mp_obj_module_t neopixel_write_module; -#define NEOPIXEL_WRITE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_neopixel_write),(mp_obj_t)&neopixel_write_module }, -#else -#define NEOPIXEL_WRITE_MODULE -#endif +// CIRCUITPY_NEOPIXEL_WRITE uses MP_REGISTER_MODULE // This is not a top-level module; it's microcontroller.nvm. #if CIRCUITPY_NVM extern const struct _mp_obj_module_t nvm_module; #endif -#if CIRCUITPY_ONEWIREIO -extern const struct _mp_obj_module_t onewireio_module; -#define ONEWIREIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_onewireio), (mp_obj_t)&onewireio_module }, -#else -#define ONEWIREIO_MODULE -#endif +// CIRCUITPY_ONEWIREIO_WRITE uses MP_REGISTER_MODULE #if CIRCUITPY_OS extern const struct _mp_obj_module_t os_module; @@ -493,43 +476,12 @@ extern const struct _mp_obj_module_t pew_module; #endif // CIRCUITPY_PIXELBUF (pixelbuf_module) uses MP_REGISTER_MODULE - -#if CIRCUITPY_PS2IO -extern const struct _mp_obj_module_t ps2io_module; -#define PS2IO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_ps2io), (mp_obj_t)&ps2io_module }, -#else -#define PS2IO_MODULE -#endif - -#if CIRCUITPY_PULSEIO -extern const struct _mp_obj_module_t pulseio_module; -#define PULSEIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_pulseio), (mp_obj_t)&pulseio_module }, -#else -#define PULSEIO_MODULE -#endif - -#if CIRCUITPY_PWMIO -extern const struct _mp_obj_module_t pwmio_module; -#define PWMIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_pwmio), (mp_obj_t)&pwmio_module }, -#else -#define PWMIO_MODULE -#endif - +// CIRCUITPY_PS2IO uses MP_REGISTER_MODULE +// CIRCUITPY_PULSEIO uses MP_REGISTER_MODULE +// CIRCUITPY_PWMIO uses MP_REGISTER_MODULE // CIRCUITPY_QRIO uses MP_REGISTER_MODULE - -#if CIRCUITPY_RAINBOWIO -extern const struct _mp_obj_module_t rainbowio_module; -#define RAINBOWIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rainbowio), (mp_obj_t)&rainbowio_module }, -#else -#define RAINBOWIO_MODULE -#endif - -#if CIRCUITPY_RANDOM -extern const struct _mp_obj_module_t random_module; -#define RANDOM_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_random), (mp_obj_t)&random_module }, -#else -#define RANDOM_MODULE -#endif +// CIRCUITPY_RAINBOWIO uses MP_REGISTER_MODULE +// CIRCUITPY_RANDOM uses MP_REGISTER_MODULE #if CIRCUITPY_RE #define MICROPY_PY_URE (1) @@ -538,19 +490,8 @@ extern const struct _mp_obj_module_t random_module; #define RE_MODULE #endif -#if CIRCUITPY_RGBMATRIX -extern const struct _mp_obj_module_t rgbmatrix_module; -#define RGBMATRIX_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rgbmatrix),(mp_obj_t)&rgbmatrix_module }, -#else -#define RGBMATRIX_MODULE -#endif - -#if CIRCUITPY_ROTARYIO -extern const struct _mp_obj_module_t rotaryio_module; -#define ROTARYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rotaryio), (mp_obj_t)&rotaryio_module }, -#else -#define ROTARYIO_MODULE -#endif +// CIRCUITPY_RGBMATRIX uses MP_REGISTER_MODULE +// CIRCUITPY_ROTARYIO uses MP_REGISTER_MODULE #if CIRCUITPY_RP2PIO extern const struct _mp_obj_module_t rp2pio_module; @@ -559,12 +500,7 @@ extern const struct _mp_obj_module_t rp2pio_module; #define RP2PIO_MODULE #endif -#if CIRCUITPY_RTC -extern const struct _mp_obj_module_t rtc_module; -#define RTC_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rtc), (mp_obj_t)&rtc_module }, -#else -#define RTC_MODULE -#endif +// CIRCUITPY_RTC uses MP_REGISTER_MODULE #if CIRCUITPY_SAMD extern const struct _mp_obj_module_t samd_module; @@ -573,12 +509,7 @@ extern const struct _mp_obj_module_t samd_module; #define SAMD_MODULE #endif -#if CIRCUITPY_SDCARDIO -extern const struct _mp_obj_module_t sdcardio_module; -#define SDCARDIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_sdcardio), (mp_obj_t)&sdcardio_module }, -#else -#define SDCARDIO_MODULE -#endif +// CIRCUITPY_SDCARDIO uses MP_REGISTER_MODULE #if CIRCUITPY_SDIOIO extern const struct _mp_obj_module_t sdioio_module; @@ -587,12 +518,7 @@ extern const struct _mp_obj_module_t sdioio_module; #define SDIOIO_MODULE #endif -#if CIRCUITPY_SHARPDISPLAY -extern const struct _mp_obj_module_t sharpdisplay_module; -#define SHARPDISPLAY_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_sharpdisplay),(mp_obj_t)&sharpdisplay_module }, -#else -#define SHARPDISPLAY_MODULE -#endif +// CIRCUITPY_SHARPDISPLAY uses MP_REGISTER_MODULE #if CIRCUITPY_SOCKETPOOL extern const struct _mp_obj_module_t socketpool_module; @@ -608,40 +534,11 @@ extern const struct _mp_obj_module_t ssl_module; #define SSL_MODULE #endif -#if CIRCUITPY_STAGE -extern const struct _mp_obj_module_t stage_module; -#define STAGE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__stage), (mp_obj_t)&stage_module }, -#else -#define STAGE_MODULE -#endif - -#if CIRCUITPY_STORAGE -extern const struct _mp_obj_module_t storage_module; -#define STORAGE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_storage), (mp_obj_t)&storage_module }, -#else -#define STORAGE_MODULE -#endif - -#if CIRCUITPY_STRUCT -extern const struct _mp_obj_module_t struct_module; -#define STRUCT_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_struct), (mp_obj_t)&struct_module }, -#else -#define STRUCT_MODULE -#endif - -#if CIRCUITPY_SUPERVISOR -extern const struct _mp_obj_module_t supervisor_module; -#define SUPERVISOR_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_supervisor), (mp_obj_t)&supervisor_module }, -#else -#define SUPERVISOR_MODULE -#endif - -#if CIRCUITPY_SYNTHIO -#define SYNTHIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_synthio), (mp_obj_t)&synthio_module }, -extern const struct _mp_obj_module_t synthio_module; -#else -#define SYNTHIO_MODULE -#endif +// CIRCUITPY_STAGE uses MP_REGISTER_MODULE +// CIRCUITPY_STORAGE uses MP_REGISTER_MODULE +// CIRCUITPY_STRUCT uses MP_REGISTER_MODULE +// CIRCUITPY_SUPERVISOR uses MP_REGISTER_MODULE +// CIRCUITPY_SYNTHIO uses MP_REGISTER_MODULE #if CIRCUITPY_TIME extern const struct _mp_obj_module_t time_module; @@ -652,19 +549,8 @@ extern const struct _mp_obj_module_t time_module; #define TIME_MODULE_ALT_NAME #endif -#if CIRCUITPY_TOUCHIO -extern const struct _mp_obj_module_t touchio_module; -#define TOUCHIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_touchio), (mp_obj_t)&touchio_module }, -#else -#define TOUCHIO_MODULE -#endif - -#if CIRCUITPY_TRACEBACK -extern const struct _mp_obj_module_t traceback_module; -#define TRACEBACK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_traceback), (mp_obj_t)&traceback_module }, -#else -#define TRACEBACK_MODULE -#endif +// CIRCUITPY_TOUCHIO uses MP_REGISTER_MODULE +// CIRCUITPY_TRACEBACK uses MP_REGISTER_MODULE #if CIRCUITPY_UHEAP extern const struct _mp_obj_module_t uheap_module; @@ -673,26 +559,9 @@ extern const struct _mp_obj_module_t uheap_module; #define UHEAP_MODULE #endif -#if CIRCUITPY_USB_CDC -extern const struct _mp_obj_module_t usb_cdc_module; -#define USB_CDC_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_usb_cdc),(mp_obj_t)&usb_cdc_module }, -#else -#define USB_CDC_MODULE -#endif - -#if CIRCUITPY_USB_HID -extern const struct _mp_obj_module_t usb_hid_module; -#define USB_HID_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_usb_hid),(mp_obj_t)&usb_hid_module }, -#else -#define USB_HID_MODULE -#endif - -#if CIRCUITPY_USB_MIDI -extern const struct _mp_obj_module_t usb_midi_module; -#define USB_MIDI_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_usb_midi),(mp_obj_t)&usb_midi_module }, -#else -#define USB_MIDI_MODULE -#endif +// CIRCUITPY_USB_CDC uses MP_REGISTER_MODULE +// CIRCUITPY_USB_HID uses MP_REGISTER_MODULE +// CIRCUITPY_USB_MIDI uses MP_REGISTER_MODULE #if CIRCUITPY_USTACK extern const struct _mp_obj_module_t ustack_module; @@ -756,7 +625,6 @@ extern const struct _mp_obj_module_t wifi_module; CAMERA_MODULE \ CANIO_MODULE \ DUALBANK_MODULE \ - VECTORIO_MODULE \ ERRNO_MODULE \ ESPIDF_MODULE \ _EVE_MODULE \ @@ -766,36 +634,14 @@ extern const struct _mp_obj_module_t wifi_module; IMAGECAPTURE_MODULE \ JSON_MODULE \ MEMORYMONITOR_MODULE \ - NEOPIXEL_WRITE_MODULE \ - ONEWIREIO_MODULE \ PEW_MODULE \ - PS2IO_MODULE \ - PULSEIO_MODULE \ - PWMIO_MODULE \ - RAINBOWIO_MODULE \ - RANDOM_MODULE \ RE_MODULE \ - RGBMATRIX_MODULE \ - ROTARYIO_MODULE \ RP2PIO_MODULE \ - RTC_MODULE \ SAMD_MODULE \ - SDCARDIO_MODULE \ SDIOIO_MODULE \ - SHARPDISPLAY_MODULE \ SOCKETPOOL_MODULE \ SSL_MODULE \ - STAGE_MODULE \ - STORAGE_MODULE \ - STRUCT_MODULE \ - SUPERVISOR_MODULE \ - SYNTHIO_MODULE \ - TOUCHIO_MODULE \ - TRACEBACK_MODULE \ UHEAP_MODULE \ - USB_CDC_MODULE \ - USB_HID_MODULE \ - USB_MIDI_MODULE \ USTACK_MODULE \ WATCHDOG_MODULE \ WIFI_MODULE \ diff --git a/shared-bindings/_stage/__init__.c b/shared-bindings/_stage/__init__.c index 9505c3a4de..1d5c06c862 100644 --- a/shared-bindings/_stage/__init__.c +++ b/shared-bindings/_stage/__init__.c @@ -111,3 +111,5 @@ const mp_obj_module_t stage_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&stage_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR__stage, stage_module, CIRCUITPY_STAGE); diff --git a/shared-bindings/neopixel_write/__init__.c b/shared-bindings/neopixel_write/__init__.c index a1f01e506f..ae30518bd1 100644 --- a/shared-bindings/neopixel_write/__init__.c +++ b/shared-bindings/neopixel_write/__init__.c @@ -81,3 +81,5 @@ const mp_obj_module_t neopixel_write_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&neopixel_write_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_neopixel_write, neopixel_write_module, CIRCUITPY_NEOPIXEL_WRITE); diff --git a/shared-bindings/onewireio/__init__.c b/shared-bindings/onewireio/__init__.c index 81baa99fab..45d78b250a 100644 --- a/shared-bindings/onewireio/__init__.c +++ b/shared-bindings/onewireio/__init__.c @@ -51,3 +51,5 @@ const mp_obj_module_t onewireio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&onewireio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_onewireio, onewireio_module, CIRCUITPY_ONEWIREIO); diff --git a/shared-bindings/ps2io/__init__.c b/shared-bindings/ps2io/__init__.c index a71ffd515f..517816dbcf 100644 --- a/shared-bindings/ps2io/__init__.c +++ b/shared-bindings/ps2io/__init__.c @@ -59,3 +59,5 @@ const mp_obj_module_t ps2io_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&ps2io_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_ps2io, ps2io_module, CIRCUITPY_PS2IO); diff --git a/shared-bindings/pulseio/__init__.c b/shared-bindings/pulseio/__init__.c index 12050c9d36..0dba6ffad6 100644 --- a/shared-bindings/pulseio/__init__.c +++ b/shared-bindings/pulseio/__init__.c @@ -58,3 +58,5 @@ const mp_obj_module_t pulseio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&pulseio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_pulseio, pulseio_module, CIRCUITPY_PULSEIO); diff --git a/shared-bindings/pwmio/__init__.c b/shared-bindings/pwmio/__init__.c index bf4ba31ddd..6c9e63a35f 100644 --- a/shared-bindings/pwmio/__init__.c +++ b/shared-bindings/pwmio/__init__.c @@ -71,3 +71,5 @@ const mp_obj_module_t pwmio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&pwmio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_pwmio, pwmio_module, CIRCUITPY_PWMIO); diff --git a/shared-bindings/rainbowio/__init__.c b/shared-bindings/rainbowio/__init__.c index 41a86deb60..12a33b7d0c 100644 --- a/shared-bindings/rainbowio/__init__.c +++ b/shared-bindings/rainbowio/__init__.c @@ -52,3 +52,5 @@ const mp_obj_module_t rainbowio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&rainbowio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_rainbowio, rainbowio_module, CIRCUITPY_RAINBOWIO); diff --git a/shared-bindings/random/__init__.c b/shared-bindings/random/__init__.c index e3ac4cdc69..d6aecbf322 100644 --- a/shared-bindings/random/__init__.c +++ b/shared-bindings/random/__init__.c @@ -184,3 +184,5 @@ const mp_obj_module_t random_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&mp_module_random_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_random, random_module, CIRCUITPY_RANDOM); diff --git a/shared-bindings/rgbmatrix/__init__.c b/shared-bindings/rgbmatrix/__init__.c index 451163dbec..a7da7089f5 100644 --- a/shared-bindings/rgbmatrix/__init__.c +++ b/shared-bindings/rgbmatrix/__init__.c @@ -45,3 +45,5 @@ const mp_obj_module_t rgbmatrix_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&rgbmatrix_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_rgbmatrix, rgbmatrix_module, CIRCUITPY_RGBMATRIX); diff --git a/shared-bindings/rotaryio/__init__.c b/shared-bindings/rotaryio/__init__.c index cdc7742bc1..43a884e9a1 100644 --- a/shared-bindings/rotaryio/__init__.c +++ b/shared-bindings/rotaryio/__init__.c @@ -56,3 +56,5 @@ const mp_obj_module_t rotaryio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&rotaryio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_rotaryio, rotaryio_module, CIRCUITPY_ROTARYIO); diff --git a/shared-bindings/rtc/__init__.c b/shared-bindings/rtc/__init__.c index 1071fa0eab..0220745c0f 100644 --- a/shared-bindings/rtc/__init__.c +++ b/shared-bindings/rtc/__init__.c @@ -86,3 +86,5 @@ const mp_obj_module_t rtc_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&rtc_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_rtc, rtc_module, CIRCUITPY_RTC); diff --git a/shared-bindings/sdcardio/__init__.c b/shared-bindings/sdcardio/__init__.c index e798ad0954..c64a8a38e4 100644 --- a/shared-bindings/sdcardio/__init__.c +++ b/shared-bindings/sdcardio/__init__.c @@ -45,3 +45,5 @@ const mp_obj_module_t sdcardio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&sdcardio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_sdcardio, sdcardio_module, CIRCUITPY_SDCARDIO); diff --git a/shared-bindings/sharpdisplay/__init__.c b/shared-bindings/sharpdisplay/__init__.c index d3d3e14919..8c01c8c98c 100644 --- a/shared-bindings/sharpdisplay/__init__.c +++ b/shared-bindings/sharpdisplay/__init__.c @@ -45,3 +45,5 @@ const mp_obj_module_t sharpdisplay_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&sharpdisplay_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_sharpdisplay, sharpdisplay_module, CIRCUITPY_SHARPDISPLAY); diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c index 4232b93bea..ddd2b9a1a9 100644 --- a/shared-bindings/storage/__init__.c +++ b/shared-bindings/storage/__init__.c @@ -270,3 +270,5 @@ const mp_obj_module_t storage_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&storage_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_storage, storage_module, CIRCUITPY_STORAGE); diff --git a/shared-bindings/struct/__init__.c b/shared-bindings/struct/__init__.c index 56371d3b9a..84654a3afe 100644 --- a/shared-bindings/struct/__init__.c +++ b/shared-bindings/struct/__init__.c @@ -179,3 +179,5 @@ const mp_obj_module_t struct_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&mp_module_struct_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_struct, struct_module, CIRCUITPY_STRUCT); diff --git a/shared-bindings/supervisor/__init__.c b/shared-bindings/supervisor/__init__.c index 05d3827489..a9b99ed87d 100644 --- a/shared-bindings/supervisor/__init__.c +++ b/shared-bindings/supervisor/__init__.c @@ -320,3 +320,5 @@ const mp_obj_module_t supervisor_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&supervisor_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_supervisor, supervisor_module, CIRCUITPY_SUPERVISOR); diff --git a/shared-bindings/synthio/__init__.c b/shared-bindings/synthio/__init__.c index 90055ff0e4..72fe2eb31f 100644 --- a/shared-bindings/synthio/__init__.c +++ b/shared-bindings/synthio/__init__.c @@ -134,3 +134,5 @@ const mp_obj_module_t synthio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&synthio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_synthio, synthio_module, CIRCUITPY_SYNTHIO); diff --git a/shared-bindings/touchio/__init__.c b/shared-bindings/touchio/__init__.c index 3c3413438e..e2a6ad9317 100644 --- a/shared-bindings/touchio/__init__.c +++ b/shared-bindings/touchio/__init__.c @@ -68,3 +68,5 @@ const mp_obj_module_t touchio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&touchio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_touchio, touchio_module, CIRCUITPY_TOUCHIO); diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index c12175f89b..37ef921cca 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -170,3 +170,5 @@ const mp_obj_module_t traceback_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&traceback_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_traceback, traceback_module, CIRCUITPY_TRACEBACK); diff --git a/shared-bindings/usb_cdc/__init__.c b/shared-bindings/usb_cdc/__init__.c index 18e8356e34..eabe26ad07 100644 --- a/shared-bindings/usb_cdc/__init__.c +++ b/shared-bindings/usb_cdc/__init__.c @@ -139,3 +139,5 @@ void usb_cdc_set_console(mp_obj_t serial_obj) { void usb_cdc_set_data(mp_obj_t serial_obj) { set_module_dict_entry(MP_ROM_QSTR(MP_QSTR_data), serial_obj); } + +MP_REGISTER_MODULE(MP_QSTR_usb_cdc, usb_cdc_module, CIRCUITPY_USB_CDC); diff --git a/shared-bindings/usb_hid/__init__.c b/shared-bindings/usb_hid/__init__.c index 1c8a45e4ea..d1b4357dc1 100644 --- a/shared-bindings/usb_hid/__init__.c +++ b/shared-bindings/usb_hid/__init__.c @@ -116,3 +116,5 @@ void usb_hid_set_devices(mp_obj_t devices) { elem->value = devices; } } + +MP_REGISTER_MODULE(MP_QSTR_usb_hid, usb_hid_module, CIRCUITPY_USB_HID); diff --git a/shared-bindings/usb_midi/__init__.c b/shared-bindings/usb_midi/__init__.c index 9c583fb78e..ec065d1e18 100644 --- a/shared-bindings/usb_midi/__init__.c +++ b/shared-bindings/usb_midi/__init__.c @@ -94,3 +94,5 @@ const mp_obj_module_t usb_midi_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&usb_midi_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_usb_midi, usb_midi_module, CIRCUITPY_USB_MIDI); diff --git a/shared-bindings/vectorio/__init__.c b/shared-bindings/vectorio/__init__.c index 5a3729573e..9bfa674a04 100644 --- a/shared-bindings/vectorio/__init__.c +++ b/shared-bindings/vectorio/__init__.c @@ -23,3 +23,5 @@ const mp_obj_module_t vectorio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&vectorio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_vectorio, vectorio_module, CIRCUITPY_VECTORIO); From e4baefc593941f064267ee51fd0d0572b9a3fee8 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Mon, 30 Aug 2021 23:05:00 +0200 Subject: [PATCH 329/418] Add a flag to skip waiting for safe mode Sometimes we don't want the delay in the device's startup. I used a simple flag, but now it also occurs to me that we could instead make the wait time a define, and set it to 0 to disable it. --- frozen/circuitpython-stage | 2 +- supervisor/shared/safe_mode.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frozen/circuitpython-stage b/frozen/circuitpython-stage index 275c03e340..d0f1c46d7f 160000 --- a/frozen/circuitpython-stage +++ b/frozen/circuitpython-stage @@ -1 +1 @@ -Subproject commit 275c03e340c3853ab1c53fc15b6df07ceb672bdc +Subproject commit d0f1c46d7f879cd60562ee69900d619499d4d206 diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 2e78ef4924..646467ce39 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -66,6 +66,9 @@ safe_mode_t wait_for_safe_mode_reset(void) { reset_reason != RESET_REASON_SOFTWARE) { return NO_SAFE_MODE; } + #ifdef CIRCUITPY_SKIP_SAFE_MODE_WAIT + return NO_SAFE_MODE; + #endif port_set_saved_word(SAFE_MODE_DATA_GUARD | (MANUAL_SAFE_MODE << 8)); // Wait for a while to allow for reset. From 3e543264a56789362391b7525de128781b6d3aac Mon Sep 17 00:00:00 2001 From: James Carr Date: Tue, 31 Aug 2021 15:26:28 +0100 Subject: [PATCH 330/418] Convert all_characters to a list before using extend() --- tools/gen_display_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index b51c8a40e0..5cd2e11696 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -13,7 +13,7 @@ sys.path.insert(0, "../../tools/bitmap_font") from adafruit_bitmap_font import bitmap_font -parser = argparse.ArgumentParser(description="Generate USB descriptors.") +parser = argparse.ArgumentParser(description="Generate displayio resources.") parser.add_argument("--font", type=str, help="Font path", required=True) parser.add_argument("--extra_characters", type=str, help="Unicode string of extra characters") parser.add_argument( @@ -49,7 +49,7 @@ if args.sample_file: # Merge visible ascii, sample characters and extra characters. visible_ascii = bytes(range(0x20, 0x7F)).decode("utf-8") -all_characters = visible_ascii +all_characters = list(visible_ascii) for c in sample_characters: if c not in all_characters: all_characters += c From 771b4c7464f0ca30fd5e225c758167a7d1b36dd2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 31 Aug 2021 13:02:34 -0700 Subject: [PATCH 331/418] Add two space saving knobs * Reduce the number of supported HID reports of IDs per descriptor. This saves ~200 bytes in the default HID objects. * (Not enabled) Compute QSTR attrs on init. This trades 1k RAM for flash. Flash is the default (1). --- ports/atmel-samd/mpconfigport.h | 3 +++ py/circuitpy_mpconfig.h | 17 +++++++++++++++++ py/qstr.c | 16 +++++++++++++++- shared-module/usb_hid/Device.c | 14 +++++++------- shared-module/usb_hid/Device.h | 15 +++++---------- 5 files changed, 47 insertions(+), 18 deletions(-) diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 6332c9d3fc..e200ce67db 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -61,6 +61,9 @@ #define MICROPY_FATFS_EXFAT 0 +// Only support simpler HID descriptors on SAMD21. +#define CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR (1) + #endif // SAMD21 //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 91e71078fb..8a34c346e4 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -717,6 +717,13 @@ void supervisor_run_background_tasks_if_tick(void); #define CIRCUITPY_VERBOSE_BLE 0 +// This trades ~1k flash space (1) for that much in RAM plus the cost to compute +// the values once on init (0). Only turn it off, when you really need the flash +// space and are willing to trade the RAM. +#ifndef CIRCUITPY_PRECOMPUTE_QSTR_ATTR +#define CIRCUITPY_PRECOMPUTE_QSTR_ATTR (1) +#endif + // USB settings // If the port requires certain USB endpoint numbers, define these in mpconfigport.h. @@ -761,6 +768,16 @@ void supervisor_run_background_tasks_if_tick(void); #define USB_HID_EP_NUM_IN (0) #endif +// The most complicated device currently known of is the head and eye tracker, which requires 5 +// report ids. +// https://usb.org/sites/default/files/hutrr74_-_usage_page_for_head_and_eye_trackers_0.pdf +// The default descriptors only use 1, so that is the minimum. +#ifndef CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR +#define CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR (6) +#elif CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR < 1 +#error "CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR must be at least 1" +#endif + #ifndef USB_MIDI_EP_NUM_OUT #define USB_MIDI_EP_NUM_OUT (0) #endif diff --git a/py/qstr.c b/py/qstr.c index 230a230909..9ea7ab83db 100644 --- a/py/qstr.c +++ b/py/qstr.c @@ -77,7 +77,8 @@ mp_uint_t qstr_compute_hash(const byte *data, size_t len) { return hash; } -const qstr_attr_t mp_qstr_const_attr[] = { +#if CIRCUITPY_PRECOMPUTE_QSTR_ATTR +const qstr_attr_t mp_qstr_const_attr[MP_QSTRnumber_of] = { #ifndef NO_QSTR #define QDEF(id, hash, len, str) { hash, len }, #define TRANSLATION(id, length, compressed ...) @@ -86,6 +87,9 @@ const qstr_attr_t mp_qstr_const_attr[] = { #undef QDEF #endif }; +#else +qstr_attr_t mp_qstr_const_attr[MP_QSTRnumber_of]; +#endif const qstr_pool_t mp_qstr_const_pool = { NULL, // no previous pool @@ -115,6 +119,16 @@ void qstr_init(void) { MP_STATE_VM(last_pool) = (qstr_pool_t *)&CONST_POOL; // we won't modify the const_pool since it has no allocated room left MP_STATE_VM(qstr_last_chunk) = NULL; + #if CIRCUITPY_PRECOMPUTE_QSTR_ATTR == 0 + if (mp_qstr_const_attr[MP_QSTR_circuitpython].len == 0) { + for (size_t i = 0; i < mp_qstr_const_pool.len; i++) { + size_t len = strlen(mp_qstr_const_pool.qstrs[i]); + mp_qstr_const_attr[i].hash = qstr_compute_hash((const byte *)mp_qstr_const_pool.qstrs[i], len); + mp_qstr_const_attr[i].len = len; + } + } + #endif + #if MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL mp_thread_mutex_init(&MP_STATE_VM(qstr_mutex)); #endif diff --git a/shared-module/usb_hid/Device.c b/shared-module/usb_hid/Device.c index e864b08873..71c6dea7af 100644 --- a/shared-module/usb_hid/Device.c +++ b/shared-module/usb_hid/Device.c @@ -81,7 +81,7 @@ const usb_hid_device_obj_t usb_hid_device_keyboard_obj = { .usage = 0x06, .num_report_ids = 1, .report_ids = { 0x01, }, - .in_report_lengths = { 8, 0, 0, 0, 0, 0, }, + .in_report_lengths = { 8, }, .out_report_lengths = { 1, }, }; @@ -131,7 +131,7 @@ const usb_hid_device_obj_t usb_hid_device_mouse_obj = { .usage = 0x02, .num_report_ids = 1, .report_ids = { 0x02, }, - .in_report_lengths = { 4, 0, 0, 0, 0, 0, }, + .in_report_lengths = { 4, }, .out_report_lengths = { 0, }, }; @@ -160,7 +160,7 @@ const usb_hid_device_obj_t usb_hid_device_consumer_control_obj = { .usage = 0x01, .num_report_ids = 1, .report_ids = { 0x03 }, - .in_report_lengths = { 2, 0, 0, 0, 0, 0, }, + .in_report_lengths = { 2, }, .out_report_lengths = { 0, }, }; @@ -170,7 +170,7 @@ STATIC size_t get_report_id_idx(usb_hid_device_obj_t *self, size_t report_id) { return i; } } - return MAX_REPORT_IDS_PER_DESCRIPTOR; + return CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR; } // See if report_id is used by this device. If it is -1, then return the sole report id used by this device, @@ -180,16 +180,16 @@ uint8_t common_hal_usb_hid_device_validate_report_id(usb_hid_device_obj_t *self, return self->report_ids[0]; } if (!(report_id_arg >= 0 && - get_report_id_idx(self, (size_t)report_id_arg) < MAX_REPORT_IDS_PER_DESCRIPTOR)) { + get_report_id_idx(self, (size_t)report_id_arg) < CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR)) { mp_raise_ValueError_varg(translate("Invalid %q"), MP_QSTR_report_id); } return (uint8_t)report_id_arg; } void common_hal_usb_hid_device_construct(usb_hid_device_obj_t *self, mp_obj_t report_descriptor, uint8_t usage_page, uint8_t usage, size_t num_report_ids, uint8_t *report_ids, uint8_t *in_report_lengths, uint8_t *out_report_lengths) { - if (num_report_ids > MAX_REPORT_IDS_PER_DESCRIPTOR) { + if (num_report_ids > CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR) { mp_raise_ValueError_varg(translate("More than %d report ids not supported"), - MAX_REPORT_IDS_PER_DESCRIPTOR); + CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR); } // report buffer pointers are NULL at start, and are created when USB is initialized. diff --git a/shared-module/usb_hid/Device.h b/shared-module/usb_hid/Device.h index a3c523acd5..5a09d19526 100644 --- a/shared-module/usb_hid/Device.h +++ b/shared-module/usb_hid/Device.h @@ -32,21 +32,16 @@ #include "py/obj.h" -// The most complicated device currently known of is the head and eye tracker, which requires 5 -// report ids. -// https://usb.org/sites/default/files/hutrr74_-_usage_page_for_head_and_eye_trackers_0.pdf -#define MAX_REPORT_IDS_PER_DESCRIPTOR (6) - typedef struct { mp_obj_base_t base; // Python buffer object whose contents are the descriptor. const uint8_t *report_descriptor; - uint8_t *in_report_buffers[MAX_REPORT_IDS_PER_DESCRIPTOR]; - uint8_t *out_report_buffers[MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t *in_report_buffers[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t *out_report_buffers[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR]; uint16_t report_descriptor_length; - uint8_t report_ids[MAX_REPORT_IDS_PER_DESCRIPTOR]; - uint8_t in_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; - uint8_t out_report_lengths[MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t report_ids[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t in_report_lengths[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR]; + uint8_t out_report_lengths[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR]; uint8_t usage_page; uint8_t usage; uint8_t num_report_ids; From 92a43192f81c7bb36f122112c632c6b42eb3a311 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 31 Aug 2021 13:38:37 -0700 Subject: [PATCH 332/418] Fix mpy-cross by providing default --- py/qstr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/py/qstr.c b/py/qstr.c index 9ea7ab83db..d7b05930f7 100644 --- a/py/qstr.c +++ b/py/qstr.c @@ -76,8 +76,10 @@ mp_uint_t qstr_compute_hash(const byte *data, size_t len) { } return hash; } - -#if CIRCUITPY_PRECOMPUTE_QSTR_ATTR +#ifndef CIRCUITPY_PRECOMPUTE_QSTR_ATTR +#define CIRCUITPY_PRECOMPUTE_QSTR_ATTR (1) +#endif +#if CIRCUITPY_PRECOMPUTE_QSTR_ATTR == 1 const qstr_attr_t mp_qstr_const_attr[MP_QSTRnumber_of] = { #ifndef NO_QSTR #define QDEF(id, hash, len, str) { hash, len }, From 44212707bebcd62ed580966c59fc7fc39a962e9d Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 1 Sep 2021 00:55:05 +0200 Subject: [PATCH 333/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 1 + locale/cs.po | 1 + locale/de_DE.po | 1 + locale/el.po | 1 + locale/en_GB.po | 1 + locale/es.po | 1 + locale/fil.po | 1 + locale/fr.po | 1 + locale/hi.po | 1 + locale/it_IT.po | 1 + locale/ja.po | 1 + locale/ko.po | 1 + locale/nl.po | 1 + locale/pl.po | 1 + locale/pt_BR.po | 1 + locale/sv.po | 1 + locale/zh_Latn_pinyin.po | 1 + 17 files changed, 17 insertions(+) diff --git a/locale/ID.po b/locale/ID.po index f691a4a5c2..8c2f5db74d 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -3982,6 +3982,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/cs.po b/locale/cs.po index b45f2769b8..b79e56617e 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -3942,6 +3942,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/de_DE.po b/locale/de_DE.po index 4d7665deb6..eda73776ba 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -4011,6 +4011,7 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/el.po b/locale/el.po index 56cc2db84c..b1c936bf8e 100644 --- a/locale/el.po +++ b/locale/el.po @@ -3939,6 +3939,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/en_GB.po b/locale/en_GB.po index fc5e153abe..d65b3788ed 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -3974,6 +3974,7 @@ msgstr "pow() with 3 arguments requires integers" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/es.po b/locale/es.po index 8c594a9ce6..eb744a34fb 100644 --- a/locale/es.po +++ b/locale/es.po @@ -4028,6 +4028,7 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/fil.po b/locale/fil.po index 217effed03..0a8352ac27 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -3988,6 +3988,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/fr.po b/locale/fr.po index b92494f808..a7f950cfef 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -4039,6 +4039,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/hi.po b/locale/hi.po index 902c73c088..2d652a7922 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -3939,6 +3939,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/it_IT.po b/locale/it_IT.po index 4801402fa0..1ce312db86 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -4004,6 +4004,7 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/ja.po b/locale/ja.po index 476739c694..cce70415e8 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -3961,6 +3961,7 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/ko.po b/locale/ko.po index 0d45524948..ffb73ab281 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -3943,6 +3943,7 @@ msgstr "" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/nl.po b/locale/nl.po index d7ff5308ce..2f5644be26 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -3985,6 +3985,7 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/pl.po b/locale/pl.po index 513f7f5e4f..f4dbf0c1c7 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -3958,6 +3958,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 705f47b2f0..84c1b36d44 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -4042,6 +4042,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/sv.po b/locale/sv.po index f5aff4c856..9a014fe9da 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -4001,6 +4001,7 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index c5959e399b..cfc5290654 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -3998,6 +3998,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h #: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h #: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h From 736b592d2db17368d16de8f1ffb927098b429d64 Mon Sep 17 00:00:00 2001 From: Bruce Segal Date: Tue, 31 Aug 2021 16:50:50 -0700 Subject: [PATCH 334/418] Add IO9 / VBAT_SENSE to lilygo-t8-s2-st7789 --- ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c index 097b1f055d..714bad85d9 100644 --- a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c +++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c @@ -13,6 +13,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, @@ -54,5 +55,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // Peripheral Power control { MP_ROM_QSTR(MP_QSTR_PE_POWER), MP_ROM_PTR(&pin_GPIO14) }, + + // Battery Sense + { MP_ROM_QSTR(MP_QSTR_VBAT_SENSE), MP_ROM_PTR(&pin_GPIO9) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From b1d7b6efd24f25e305efb800bb14a9d69f2c0a67 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Tue, 31 Aug 2021 19:52:43 -0500 Subject: [PATCH 335/418] update TileGrid docstrings to include Shape --- shared-bindings/displayio/TileGrid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/displayio/TileGrid.c b/shared-bindings/displayio/TileGrid.c index 9503e0a33c..5b381c7f46 100644 --- a/shared-bindings/displayio/TileGrid.c +++ b/shared-bindings/displayio/TileGrid.c @@ -48,14 +48,14 @@ //| //| A single tile grid is also known as a Sprite.""" //| -//| def __init__(self, bitmap: Bitmap, *, pixel_shader: Union[ColorConverter, Palette], width: int = 1, height: int = 1, tile_width: Optional[int] = None, tile_height: Optional[int] = None, default_tile: int = 0, x: int = 0, y: int = 0) -> None: +//| def __init__(self, bitmap: Union[Bitmap, Shape], *, pixel_shader: Union[ColorConverter, Palette], width: int = 1, height: int = 1, tile_width: Optional[int] = None, tile_height: Optional[int] = None, default_tile: int = 0, x: int = 0, y: int = 0) -> None: //| """Create a TileGrid object. The bitmap is source for 2d pixels. The pixel_shader is used to //| convert the value and its location to a display native pixel color. This may be a simple color //| palette lookup, a gradient, a pattern or a color transformer. //| //| tile_width and tile_height match the height of the bitmap by default. //| -//| :param Bitmap bitmap: The bitmap storing one or more tiles. +//| :param Bitmap,Shape bitmap: The bitmap storing one or more tiles. //| :param ColorConverter,Palette pixel_shader: The pixel shader that produces colors from values //| :param int width: Width of the grid in tiles. //| :param int height: Height of the grid in tiles. From cd5acae4f429dbad649f0c10b72fd483c2294feb Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 31 Aug 2021 18:04:01 -0700 Subject: [PATCH 336/418] Sort .text section to reduce fill --- ports/atmel-samd/boards/common.template.ld | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ports/atmel-samd/boards/common.template.ld b/ports/atmel-samd/boards/common.template.ld index 53c4cf5eec..b5faf7f458 100644 --- a/ports/atmel-samd/boards/common.template.ld +++ b/ports/atmel-samd/boards/common.template.ld @@ -27,8 +27,12 @@ SECTIONS . = ALIGN(4); _sfixed = .; KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ + + /* Sort text sections so that they have fewer *fill* bytes needed. */ + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.text)) /* .text sections (code) */ + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*)) /* .text* sections (code) */ + + /* Don't sort rodata because it impacts codegen size. */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ @@ -62,8 +66,8 @@ SECTIONS _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialize the .data section in RAM */ *(.ramfunc) *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.data)) /* .data sections */ + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*)) /* .data* sections */ . = ALIGN(4); _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialize the .data section in RAM */ @@ -76,7 +80,7 @@ SECTIONS _sbss = .; _szero = .; /* define a global symbol at bss start; used by startup code */ *(.bss) - *(.bss*) + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*)) *(COMMON) . = ALIGN(4); From 0cffa6be81636565750f31714efbf7727768db86 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 31 Aug 2021 19:33:44 -0700 Subject: [PATCH 337/418] Sort .text section to reduce fill on nRF --- ports/nrf/boards/common.template.ld | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/nrf/boards/common.template.ld b/ports/nrf/boards/common.template.ld index 855d8522fc..3591f23976 100644 --- a/ports/nrf/boards/common.template.ld +++ b/ports/nrf/boards/common.template.ld @@ -62,8 +62,8 @@ SECTIONS .text : { . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.text)) /* .text sections (code) */ + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*)) /* .text* sections (code) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ /* *(.glue_7) */ /* glue arm to thumb code */ @@ -85,8 +85,8 @@ SECTIONS . = ALIGN(4); _sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ _ram_start = .; /* create a global symbol at ram start for garbage collector */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.data)) /* .data sections */ + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*)) /* .data* sections */ . = ALIGN(4); _edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ @@ -97,8 +97,8 @@ SECTIONS { . = ALIGN(4); _sbss = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss)) + *SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*)) *(COMMON) . = ALIGN(4); From bec7a6265a4c8d51ea2bb56c486f8680f2d5ee23 Mon Sep 17 00:00:00 2001 From: Bruce Segal Date: Tue, 31 Aug 2021 19:52:40 -0700 Subject: [PATCH 338/418] Change name VBAT_SENSE -> BATTERY --- ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c index 714bad85d9..bab3cfb669 100644 --- a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c +++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c @@ -57,6 +57,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_PE_POWER), MP_ROM_PTR(&pin_GPIO14) }, // Battery Sense - { MP_ROM_QSTR(MP_QSTR_VBAT_SENSE), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO9) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 9002f351b46f0dce620e2dcaf3c9550694c777dc Mon Sep 17 00:00:00 2001 From: Rob Capellini Date: Wed, 1 Sep 2021 00:12:00 -0400 Subject: [PATCH 339/418] Convert more modules to use MP_REGISTER_MODULE Convert _eve, _pew, aesio, alarm, audiopwmio, bitops, camera, canio, dualbank, gnss, i2cperipheral, imagecapture, ipaddress, memorymonitor, sdioio, socketpool, ssl, uheap, ustack, watchdog, and wifi modules to use MP_REGISTER_MODULE. Related to #5183. --- py/circuitpy_mpconfig.h | 315 ++++++----------------- shared-bindings/_eve/__init__.c | 2 + shared-bindings/_pew/__init__.c | 2 + shared-bindings/aesio/__init__.c | 2 + shared-bindings/alarm/__init__.c | 2 + shared-bindings/audiopwmio/__init__.c | 2 + shared-bindings/bitops/__init__.c | 2 + shared-bindings/camera/__init__.c | 2 + shared-bindings/canio/__init__.c | 3 + shared-bindings/dualbank/__init__.c | 2 + shared-bindings/gnss/__init__.c | 2 + shared-bindings/i2cperipheral/__init__.c | 2 + shared-bindings/imagecapture/__init__.c | 2 + shared-bindings/ipaddress/__init__.c | 2 + shared-bindings/memorymonitor/__init__.c | 2 + shared-bindings/sdioio/__init__.c | 2 + shared-bindings/socketpool/__init__.c | 2 + shared-bindings/ssl/__init__.c | 2 + shared-bindings/uheap/__init__.c | 2 + shared-bindings/ustack/__init__.c | 2 + shared-bindings/watchdog/__init__.c | 2 + shared-bindings/wifi/__init__.c | 2 + 22 files changed, 120 insertions(+), 238 deletions(-) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 8a34c346e4..3f998b7795 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -244,35 +244,6 @@ typedef long mp_off_t; // These CIRCUITPY_xxx values should all be defined in the *.mk files as being on or off. // So if any are not defined in *.mk, they'll throw an error here. -#if CIRCUITPY_AESIO -extern const struct _mp_obj_module_t aesio_module; -#define AESIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_aesio), (mp_obj_t)&aesio_module }, -#else -#define AESIO_MODULE -#endif - -#if CIRCUITPY_ALARM -extern const struct _mp_obj_module_t alarm_module; -#define ALARM_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_alarm), (mp_obj_t)&alarm_module }, -#else -#define ALARM_MODULE -#endif - -// CIRCUITPY_ANALOGIO uses MP_REGISTER_MODULE -// CIRCUITPY_ATEXIT uses MP_REGISTER_MODULE -// CIRCUITPY_AUDIOBUSIO uses MP_REGISTER_MODULE -// CIRCUITPY_AUDIOCORE uses MP_REGISTER_MODULE -// CIRCUITPY_AUDIOIO uses MP_REGISTER_MODULE -// CIRCUITPY_AUDIOMIXER uses MP_REGISTER_MODULE -// CIRCUITPY_AUDIOMP3 uses MP_REGISTER_MODULE - -#if CIRCUITPY_AUDIOPWMIO -#define AUDIOPWMIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_audiopwmio), (mp_obj_t)&audiopwmio_module }, -extern const struct _mp_obj_module_t audiopwmio_module; -#else -#define AUDIOPWMIO_MODULE -#endif - #if CIRCUITPY_BINASCII #define MICROPY_PY_UBINASCII CIRCUITPY_BINASCII #define BINASCII_MODULE { MP_ROM_QSTR(MP_QSTR_binascii), MP_ROM_PTR(&mp_module_ubinascii) }, @@ -280,19 +251,6 @@ extern const struct _mp_obj_module_t audiopwmio_module; #define BINASCII_MODULE #endif -// CIRCUITPY_BITBANGIO uses MP_REGISTER_MODULE -// CIRCUITPY_BITMAPTOOLS uses MP_REGISTER_MODULE - -#if CIRCUITPY_BITOPS -extern const struct _mp_obj_module_t bitops_module; -#define BITOPS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_bitops),(mp_obj_t)&bitops_module }, -#else -#define BITOPS_MODULE -#endif - -// CIRCUITPY_BLEIO uses MP_REGISTER_MODULE -// CIRCUITPY_BOARD uses MP_REGISTER_MODULE - #if CIRCUITPY_BOARD #define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL)) #define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI)) @@ -310,30 +268,6 @@ extern const struct _mp_obj_module_t bitops_module; #define BOARD_UART_ROOT_POINTER #endif -// CIRCUITPY_BUSDEVICE (adafruit_bus_device_module) uses MP_REGISTER_MODULE -// CIRCUITPY_BUSIO uses MP_REGISTER_MODULE - -#if CIRCUITPY_CAMERA -extern const struct _mp_obj_module_t camera_module; -#define CAMERA_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_camera), (mp_obj_t)&camera_module }, -#else -#define CAMERA_MODULE -#endif - -#if CIRCUITPY_CANIO -extern const struct _mp_obj_module_t canio_module; -#define CANIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_canio), (mp_obj_t)&canio_module }, -#else -#define CANIO_MODULE -#endif - -// CIRCUITPY_COUNTIO uses MP_REGISTER_MODULE -// CIRCUITPY_DIGITALIO uses MP_REGISTER_MODULE -// CIRCUITPY_DISPLAYIO uses MP_REGISTER_MODULE -// CIRCUITPY_PARALLELDISPLAY uses MP_REGISTER_MODULE -// CIRCUITPY_TERMINALIO uses MP_REGISTER_MODULE -// CIRCUITPY_FONTIO uses MP_REGISTER_MODULE - #if CIRCUITPY_DISPLAYIO #ifndef CIRCUITPY_DISPLAY_LIMIT #define CIRCUITPY_DISPLAY_LIMIT (1) @@ -342,13 +276,6 @@ extern const struct _mp_obj_module_t canio_module; #define CIRCUITPY_DISPLAY_LIMIT (0) #endif -#if CIRCUITPY_DUALBANK -extern const struct _mp_obj_module_t dualbank_module; -#define DUALBANK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_dualbank), (mp_obj_t)&dualbank_module }, -#else -#define DUALBANK_MODULE -#endif - #if CIRCUITPY_ERRNO #define MICROPY_PY_UERRNO (1) // Uses about 80 bytes. @@ -366,19 +293,6 @@ extern const struct _mp_obj_module_t espidf_module; #define ESPIDF_MODULE #endif -#if CIRCUITPY__EVE -extern const struct _mp_obj_module_t _eve_module; -#define _EVE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__eve), (mp_obj_t)&_eve_module }, -#else -#define _EVE_MODULE -#endif - -// CIRCUITPY_FRAMEBUFFERIO uses MP_REGISTER_MODULE -// CIRCUITPY_VECTORIO uses MP_REGISTER_MODULE - -// CIRCUITPY_FREQUENCYIO uses MP_REGISTER_MODULE -// CIRCUITPY_GAMEPADSHIFT uses MP_REGISTER_MODULE - #if CIRCUITPY_GAMEPADSHIFT // Scan gamepad every 32ms #define CIRCUITPY_GAMEPAD_TICKS 0x1f @@ -387,36 +301,6 @@ extern const struct _mp_obj_module_t _eve_module; #define GAMEPAD_ROOT_POINTERS #endif -// CIRCUITPY_GETPASS uses MP_REGISTER_MODULE - -#if CIRCUITPY_GNSS -extern const struct _mp_obj_module_t gnss_module; -#define GNSS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gnss), (mp_obj_t)&gnss_module }, -#else -#define GNSS_MODULE -#endif - -#if CIRCUITPY_I2CPERIPHERAL -extern const struct _mp_obj_module_t i2cperipheral_module; -#define I2CPERIPHERAL_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_i2cperipheral), (mp_obj_t)&i2cperipheral_module }, -#else -#define I2CPERIPHERAL_MODULE -#endif - -#if CIRCUITPY_IMAGECAPTURE -extern const struct _mp_obj_module_t imagecapture_module; -#define IMAGECAPTURE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_imagecapture), (mp_obj_t)&imagecapture_module }, -#else -#define IMAGECAPTURE_MODULE -#endif - -#if CIRCUITPY_IPADDRESS -extern const struct _mp_obj_module_t ipaddress_module; -#define IPADDRESS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_ipaddress), (mp_obj_t)&ipaddress_module }, -#else -#define IPADDRESS_MODULE -#endif - #if CIRCUITPY_JSON #define MICROPY_PY_UJSON (1) #define MICROPY_PY_IO (1) @@ -429,36 +313,24 @@ extern const struct _mp_obj_module_t ipaddress_module; #define JSON_MODULE #endif -// CIRCUITPY_KEYPAD uses MP_REGISTER_MODULE - #if CIRCUITPY_KEYPAD #define KEYPAD_ROOT_POINTERS mp_obj_t keypad_scanners_linked_list; #else #define KEYPAD_ROOT_POINTERS #endif -// CIRCUITPY_MATH uses MP_REGISTER_MODULE - #if CIRCUITPY_MEMORYMONITOR -extern const struct _mp_obj_module_t memorymonitor_module; -#define MEMORYMONITOR_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_memorymonitor), (mp_obj_t)&memorymonitor_module }, #define MEMORYMONITOR_ROOT_POINTERS mp_obj_t active_allocationsizes; \ mp_obj_t active_allocationalarms; #else -#define MEMORYMONITOR_MODULE #define MEMORYMONITOR_ROOT_POINTERS #endif -// CIRCUITPY_MICROCONTROLLER uses MP_REGISTER_MODULE -// CIRCUITPY_NEOPIXEL_WRITE uses MP_REGISTER_MODULE - // This is not a top-level module; it's microcontroller.nvm. #if CIRCUITPY_NVM extern const struct _mp_obj_module_t nvm_module; #endif -// CIRCUITPY_ONEWIREIO_WRITE uses MP_REGISTER_MODULE - #if CIRCUITPY_OS extern const struct _mp_obj_module_t os_module; #define OS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_os), (mp_obj_t)&os_module }, @@ -468,21 +340,6 @@ extern const struct _mp_obj_module_t os_module; #define OS_MODULE_ALT_NAME #endif -#if CIRCUITPY_PEW -extern const struct _mp_obj_module_t pew_module; -#define PEW_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__pew),(mp_obj_t)&pew_module }, -#else -#define PEW_MODULE -#endif - -// CIRCUITPY_PIXELBUF (pixelbuf_module) uses MP_REGISTER_MODULE -// CIRCUITPY_PS2IO uses MP_REGISTER_MODULE -// CIRCUITPY_PULSEIO uses MP_REGISTER_MODULE -// CIRCUITPY_PWMIO uses MP_REGISTER_MODULE -// CIRCUITPY_QRIO uses MP_REGISTER_MODULE -// CIRCUITPY_RAINBOWIO uses MP_REGISTER_MODULE -// CIRCUITPY_RANDOM uses MP_REGISTER_MODULE - #if CIRCUITPY_RE #define MICROPY_PY_URE (1) #define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) }, @@ -490,9 +347,6 @@ extern const struct _mp_obj_module_t pew_module; #define RE_MODULE #endif -// CIRCUITPY_RGBMATRIX uses MP_REGISTER_MODULE -// CIRCUITPY_ROTARYIO uses MP_REGISTER_MODULE - #if CIRCUITPY_RP2PIO extern const struct _mp_obj_module_t rp2pio_module; #define RP2PIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rp2pio),(mp_obj_t)&rp2pio_module }, @@ -500,8 +354,6 @@ extern const struct _mp_obj_module_t rp2pio_module; #define RP2PIO_MODULE #endif -// CIRCUITPY_RTC uses MP_REGISTER_MODULE - #if CIRCUITPY_SAMD extern const struct _mp_obj_module_t samd_module; #define SAMD_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_samd),(mp_obj_t)&samd_module }, @@ -509,37 +361,6 @@ extern const struct _mp_obj_module_t samd_module; #define SAMD_MODULE #endif -// CIRCUITPY_SDCARDIO uses MP_REGISTER_MODULE - -#if CIRCUITPY_SDIOIO -extern const struct _mp_obj_module_t sdioio_module; -#define SDIOIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_sdioio), (mp_obj_t)&sdioio_module }, -#else -#define SDIOIO_MODULE -#endif - -// CIRCUITPY_SHARPDISPLAY uses MP_REGISTER_MODULE - -#if CIRCUITPY_SOCKETPOOL -extern const struct _mp_obj_module_t socketpool_module; -#define SOCKETPOOL_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_socketpool), (mp_obj_t)&socketpool_module }, -#else -#define SOCKETPOOL_MODULE -#endif - -#if CIRCUITPY_SSL -extern const struct _mp_obj_module_t ssl_module; -#define SSL_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_ssl), (mp_obj_t)&ssl_module }, -#else -#define SSL_MODULE -#endif - -// CIRCUITPY_STAGE uses MP_REGISTER_MODULE -// CIRCUITPY_STORAGE uses MP_REGISTER_MODULE -// CIRCUITPY_STRUCT uses MP_REGISTER_MODULE -// CIRCUITPY_SUPERVISOR uses MP_REGISTER_MODULE -// CIRCUITPY_SYNTHIO uses MP_REGISTER_MODULE - #if CIRCUITPY_TIME extern const struct _mp_obj_module_t time_module; #define TIME_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&time_module }, @@ -549,27 +370,6 @@ extern const struct _mp_obj_module_t time_module; #define TIME_MODULE_ALT_NAME #endif -// CIRCUITPY_TOUCHIO uses MP_REGISTER_MODULE -// CIRCUITPY_TRACEBACK uses MP_REGISTER_MODULE - -#if CIRCUITPY_UHEAP -extern const struct _mp_obj_module_t uheap_module; -#define UHEAP_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module }, -#else -#define UHEAP_MODULE -#endif - -// CIRCUITPY_USB_CDC uses MP_REGISTER_MODULE -// CIRCUITPY_USB_HID uses MP_REGISTER_MODULE -// CIRCUITPY_USB_MIDI uses MP_REGISTER_MODULE - -#if CIRCUITPY_USTACK -extern const struct _mp_obj_module_t ustack_module; -#define USTACK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_ustack),(mp_obj_t)&ustack_module }, -#else -#define USTACK_MODULE -#endif - #if defined(CIRCUITPY_ULAB) && CIRCUITPY_ULAB // ulab requires reverse special methods #if defined(MICROPY_PY_REVERSE_SPECIAL_METHODS) && !MICROPY_PY_REVERSE_SPECIAL_METHODS @@ -581,23 +381,6 @@ extern const struct _mp_obj_module_t ustack_module; #define ULAB_MODULE #endif -// This is not a top-level module; it's microcontroller.watchdog. -#if CIRCUITPY_WATCHDOG -extern const struct _mp_obj_module_t watchdog_module; -#define WATCHDOG_MODULE { MP_ROM_QSTR(MP_QSTR_watchdog), MP_ROM_PTR(&watchdog_module) }, -#else -#define WATCHDOG_MODULE -#endif - -#if CIRCUITPY_WIFI -extern const struct _mp_obj_module_t wifi_module; -#define WIFI_MODULE { MP_ROM_QSTR(MP_QSTR_wifi), MP_ROM_PTR(&wifi_module) }, -#else -#define WIFI_MODULE -#endif - -// CIRCUITPY_MSGPACK uses MP_REGISTER_MODULE - // Define certain native modules with weak links so they can be replaced with Python // implementations. This list may grow over time. #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \ @@ -616,35 +399,91 @@ extern const struct _mp_obj_module_t wifi_module; // including dependencies. // Some of these definitions will be blank depending on what is turned on and off. // Some are omitted because they're in MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS above. + #define MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \ - AESIO_MODULE \ - ALARM_MODULE \ - AUDIOPWMIO_MODULE \ BINASCII_MODULE \ - BITOPS_MODULE \ - CAMERA_MODULE \ - CANIO_MODULE \ - DUALBANK_MODULE \ ERRNO_MODULE \ ESPIDF_MODULE \ - _EVE_MODULE \ - GNSS_MODULE \ - I2CPERIPHERAL_MODULE \ - IPADDRESS_MODULE \ - IMAGECAPTURE_MODULE \ JSON_MODULE \ - MEMORYMONITOR_MODULE \ - PEW_MODULE \ RE_MODULE \ RP2PIO_MODULE \ SAMD_MODULE \ - SDIOIO_MODULE \ - SOCKETPOOL_MODULE \ - SSL_MODULE \ - UHEAP_MODULE \ - USTACK_MODULE \ - WATCHDOG_MODULE \ - WIFI_MODULE \ + +// The following modules are defined in their respective __init__.c file in the +// shared-bindings directory using MP_REGISTER_MODULE. +// +// CIRCUITPY_AESIO +// CIRCUITPY_ANALOGIO +// CIRCUITPY_ATEXIT +// CIRCUITPY_AUDIOBUSIO +// CIRCUITPY_AUDIOCORE +// CIRCUITPY_AUDIOIO +// CIRCUITPY_AUDIOMIXER +// CIRCUITPY_AUDIOMP3 +// CIRCUITPY_AUDIOPWMIO +// CIRCUITPY_BITBANGIO +// CIRCUITPY_BITMAPTOOLS +// CIRCUITPY_BITOPS +// CIRCUITPY_BLEIO +// CIRCUITPY_BOARD +// CIRCUITPY_BUSDEVICE +// CIRCUITPY_BUSIO +// CIRCUITPY_CAMERA +// CIRCUITPY_CANIO +// CIRCUITPY_COUNTIO +// CIRCUITPY_DIGITALIO +// CIRCUITPY_DISPLAYIO +// CIRCUITPY_DUALBANK +// CIRCUITPY__EVE +// CIRCUITPY_FONTIO +// CIRCUITPY_FRAMEBUFFERIO +// CIRCUITPY_FREQUENCYIO +// CIRCUITPY_GAMEPADSHIFT +// CIRCUITPY_GETPASS +// CIRCUITPY_GNSS +// CIRCUITPY_I2CPERIPHERAL +// CIRCUITPY_IMAGECAPTURE +// CIRCUITPY_IPADDRESS +// CIRCUITPY_KEYPAD +// CIRCUITPY_MATH +// CIRCUITPY_MEMORYMONITOR +// CIRCUITPY_MICROCONTROLLER +// CIRCUITPY_MSGPACK +// CIRCUITPY_NEOPIXEL_WRITE +// CIRCUITPY_ONEWIREIO_WRITE +// CIRCUITPY_PARALLELDISPLAY +// CIRCUITPY_PEW +// CIRCUITPY_PIXELBUF +// CIRCUITPY_PS2IO +// CIRCUITPY_PULSEIO +// CIRCUITPY_PWMIO +// CIRCUITPY_QRIO +// CIRCUITPY_RAINBOWIO +// CIRCUITPY_RANDOM +// CIRCUITPY_RGBMATRIX +// CIRCUITPY_ROTARYIO +// CIRCUITPY_RTC +// CIRCUITPY_SDCARDIO +// CIRCUITPY_SDIOIO +// CIRCUITPY_SHARPDISPLAY +// CIRCUITPY_SOCKETPOOL +// CIRCUITPY_SSL +// CIRCUITPY_STAGE +// CIRCUITPY_STORAGE +// CIRCUITPY_STRUCT +// CIRCUITPY_SUPERVISOR +// CIRCUITPY_SYNTHIO +// CIRCUITPY_TERMINALIO +// CIRCUITPY_TOUCHIO +// CIRCUITPY_TRACEBACK +// CIRCUITPY_UHEAP +// CIRCUITPY_USB_CDC +// CIRCUITPY_USB_HID +// CIRCUITPY_USB_MIDI +// CIRCUITPY_USTACK +// CIRCUITPY_VECTORIO +// CIRCUITPY_WATCHDOG +// CIRCUITPY_WIFI // If weak links are enabled, just include strong links in the main list of modules, // and also include the underscore alternate names. diff --git a/shared-bindings/_eve/__init__.c b/shared-bindings/_eve/__init__.c index dc68c946de..001c1d3197 100644 --- a/shared-bindings/_eve/__init__.c +++ b/shared-bindings/_eve/__init__.c @@ -1105,3 +1105,5 @@ const mp_obj_module_t _eve_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&mp_module__eve_globals, }; + +MP_REGISTER_MODULE(MP_QSTR__eve, _eve_module, CIRCUITPY__EVE); diff --git a/shared-bindings/_pew/__init__.c b/shared-bindings/_pew/__init__.c index 2ecf341900..e338869d18 100644 --- a/shared-bindings/_pew/__init__.c +++ b/shared-bindings/_pew/__init__.c @@ -63,3 +63,5 @@ const mp_obj_module_t pew_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&pew_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR__pew, pew_module, CIRCUITPY_PEW); diff --git a/shared-bindings/aesio/__init__.c b/shared-bindings/aesio/__init__.c index 80913b70ad..716d20393e 100644 --- a/shared-bindings/aesio/__init__.c +++ b/shared-bindings/aesio/__init__.c @@ -63,3 +63,5 @@ const mp_obj_module_t aesio_module = { .base = {&mp_type_module}, .globals = (mp_obj_dict_t *)&aesio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_aesio, aesio_module, CIRCUITPY_AESIO); diff --git a/shared-bindings/alarm/__init__.c b/shared-bindings/alarm/__init__.c index ca84d4878c..2f5e36148b 100644 --- a/shared-bindings/alarm/__init__.c +++ b/shared-bindings/alarm/__init__.c @@ -248,3 +248,5 @@ extern void port_idle_until_interrupt(void); MP_WEAK void common_hal_alarm_pretending_deep_sleep(void) { port_idle_until_interrupt(); } + +MP_REGISTER_MODULE(MP_QSTR_alarm, alarm_module, CIRCUITPY_ALARM); diff --git a/shared-bindings/audiopwmio/__init__.c b/shared-bindings/audiopwmio/__init__.c index 2bafb608a4..41a756e8b6 100644 --- a/shared-bindings/audiopwmio/__init__.c +++ b/shared-bindings/audiopwmio/__init__.c @@ -57,3 +57,5 @@ const mp_obj_module_t audiopwmio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&audiopwmio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_audiopwmio, audiopwmio_module, CIRCUITPY_AUDIOPWMIO); diff --git a/shared-bindings/bitops/__init__.c b/shared-bindings/bitops/__init__.c index 89f32f1dc2..d9849da917 100644 --- a/shared-bindings/bitops/__init__.c +++ b/shared-bindings/bitops/__init__.c @@ -99,3 +99,5 @@ const mp_obj_module_t bitops_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&bitops_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_bitops, bitops_module, CIRCUITPY_BITOPS); diff --git a/shared-bindings/camera/__init__.c b/shared-bindings/camera/__init__.c index dfe1093a40..12cebae7db 100644 --- a/shared-bindings/camera/__init__.c +++ b/shared-bindings/camera/__init__.c @@ -48,3 +48,5 @@ const mp_obj_module_t camera_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&camera_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_camera, camera_module, CIRCUITPY_CAMERA); diff --git a/shared-bindings/canio/__init__.c b/shared-bindings/canio/__init__.c index 7f367ee791..ef1b90df97 100644 --- a/shared-bindings/canio/__init__.c +++ b/shared-bindings/canio/__init__.c @@ -108,6 +108,7 @@ MAKE_PRINTER(canio, canio_bus_state); MAKE_ENUM_TYPE(canio, BusState, canio_bus_state); STATIC const mp_rom_map_elem_t canio_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_canio) }, { MP_ROM_QSTR(MP_QSTR_BusState), MP_ROM_PTR(&canio_bus_state_type) }, { MP_ROM_QSTR(MP_QSTR_CAN), MP_ROM_PTR(&canio_can_type) }, { MP_ROM_QSTR(MP_QSTR_Listener), MP_ROM_PTR(&canio_listener_type) }, @@ -123,3 +124,5 @@ const mp_obj_module_t canio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&canio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_canio, canio_module, CIRCUITPY_CANIO); diff --git a/shared-bindings/dualbank/__init__.c b/shared-bindings/dualbank/__init__.c index 3b267a56fa..f907c91e0e 100644 --- a/shared-bindings/dualbank/__init__.c +++ b/shared-bindings/dualbank/__init__.c @@ -113,3 +113,5 @@ const mp_obj_module_t dualbank_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&dualbank_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_dualbank, dualbank_module, CIRCUITPY_DUALBANK); diff --git a/shared-bindings/gnss/__init__.c b/shared-bindings/gnss/__init__.c index 80901a8c5a..ab6cbf56cf 100644 --- a/shared-bindings/gnss/__init__.c +++ b/shared-bindings/gnss/__init__.c @@ -29,3 +29,5 @@ const mp_obj_module_t gnss_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&gnss_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_gnss, gnss_module, CIRCUITPY_GNSS); diff --git a/shared-bindings/i2cperipheral/__init__.c b/shared-bindings/i2cperipheral/__init__.c index 183b8511c0..fde7002daf 100644 --- a/shared-bindings/i2cperipheral/__init__.c +++ b/shared-bindings/i2cperipheral/__init__.c @@ -104,3 +104,5 @@ const mp_obj_module_t i2cperipheral_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&i2cperipheral_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_i2cperipheral, i2cperipheral_module, CIRCUITPY_I2CPERIPHERAL); diff --git a/shared-bindings/imagecapture/__init__.c b/shared-bindings/imagecapture/__init__.c index 8f7ce231a6..0e5092aee8 100644 --- a/shared-bindings/imagecapture/__init__.c +++ b/shared-bindings/imagecapture/__init__.c @@ -45,3 +45,5 @@ const mp_obj_module_t imagecapture_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&imagecapture_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_imagecapture, imagecapture_module, CIRCUITPY_IMAGECAPTURE); diff --git a/shared-bindings/ipaddress/__init__.c b/shared-bindings/ipaddress/__init__.c index 314c539c27..6da5a52299 100644 --- a/shared-bindings/ipaddress/__init__.c +++ b/shared-bindings/ipaddress/__init__.c @@ -111,3 +111,5 @@ const mp_obj_module_t ipaddress_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&ipaddress_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_ipaddress, ipaddress_module, CIRCUITPY_IPADDRESS); diff --git a/shared-bindings/memorymonitor/__init__.c b/shared-bindings/memorymonitor/__init__.c index f6546c25d5..64a3a6a77f 100644 --- a/shared-bindings/memorymonitor/__init__.c +++ b/shared-bindings/memorymonitor/__init__.c @@ -74,3 +74,5 @@ const mp_obj_module_t memorymonitor_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&memorymonitor_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_memorymonitor, memorymonitor_module, CIRCUITPY_MEMORYMONITOR); diff --git a/shared-bindings/sdioio/__init__.c b/shared-bindings/sdioio/__init__.c index 98867fc121..0bf523a6e2 100644 --- a/shared-bindings/sdioio/__init__.c +++ b/shared-bindings/sdioio/__init__.c @@ -45,3 +45,5 @@ const mp_obj_module_t sdioio_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&sdioio_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_sdio, sdioio_module, CIRCUITPY_SDIOIO); diff --git a/shared-bindings/socketpool/__init__.c b/shared-bindings/socketpool/__init__.c index e6f36261aa..f10196ab0d 100644 --- a/shared-bindings/socketpool/__init__.c +++ b/shared-bindings/socketpool/__init__.c @@ -51,3 +51,5 @@ const mp_obj_module_t socketpool_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&socketpool_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_socketpool, socketpool_module, CIRCUITPY_SOCKETPOOL); diff --git a/shared-bindings/ssl/__init__.c b/shared-bindings/ssl/__init__.c index 151acfe80c..578c51dfbe 100644 --- a/shared-bindings/ssl/__init__.c +++ b/shared-bindings/ssl/__init__.c @@ -64,3 +64,5 @@ const mp_obj_module_t ssl_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&ssl_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_ssl, ssl_module, CIRCUITPY_SSL); diff --git a/shared-bindings/uheap/__init__.c b/shared-bindings/uheap/__init__.c index 8c9e2e81dc..40aa869225 100644 --- a/shared-bindings/uheap/__init__.c +++ b/shared-bindings/uheap/__init__.c @@ -57,3 +57,5 @@ const mp_obj_module_t uheap_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&uheap_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_uheap, uheap_module, CIRCUITPY_UHEAP); diff --git a/shared-bindings/ustack/__init__.c b/shared-bindings/ustack/__init__.c index e2a31e9c47..17bdcbb1c0 100644 --- a/shared-bindings/ustack/__init__.c +++ b/shared-bindings/ustack/__init__.c @@ -85,3 +85,5 @@ const mp_obj_module_t ustack_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&ustack_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_ustack, ustack_module, CIRCUITPY_USTACK); diff --git a/shared-bindings/watchdog/__init__.c b/shared-bindings/watchdog/__init__.c index dbe06d1323..ced56a781b 100644 --- a/shared-bindings/watchdog/__init__.c +++ b/shared-bindings/watchdog/__init__.c @@ -77,3 +77,5 @@ const mp_obj_module_t watchdog_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&watchdog_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_watchdog, watchdog_module, CIRCUITPY_WATCHDOG); diff --git a/shared-bindings/wifi/__init__.c b/shared-bindings/wifi/__init__.c index 0285b98a07..ef72dced1f 100644 --- a/shared-bindings/wifi/__init__.c +++ b/shared-bindings/wifi/__init__.c @@ -70,3 +70,5 @@ const mp_obj_module_t wifi_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&wifi_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_wifi, wifi_module, CIRCUITPY_WIFI); From 9c4c3e1780ac23d6f3d520459c7f7bb01f1578df Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 1 Sep 2021 08:57:18 -0700 Subject: [PATCH 340/418] Only sort .text for nrf --- ports/nrf/boards/common.template.ld | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/nrf/boards/common.template.ld b/ports/nrf/boards/common.template.ld index 3591f23976..306145e00c 100644 --- a/ports/nrf/boards/common.template.ld +++ b/ports/nrf/boards/common.template.ld @@ -73,32 +73,32 @@ SECTIONS _etext = .; /* define a global symbol at end of code */ } >FLASH_FIRMWARE - /* used by the startup to initialize data */ - _sidata = .; - /* This is the initialized data section The program executes knowing that the data is in the RAM but the loader puts the initial values in the FLASH (inidata). It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT (_sidata) + .data : { . = ALIGN(4); _sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ _ram_start = .; /* create a global symbol at ram start for garbage collector */ - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.data)) /* .data sections */ - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*)) /* .data* sections */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ . = ALIGN(4); _edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >APP_RAM + } >APP_RAM AT > FLASH_FIRMWARE + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); /* Zero-initialized data section */ .bss : { . = ALIGN(4); _sbss = .; /* define a global symbol at bss start; used by startup code */ - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss)) - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*)) + *(.bss) + *(.bss*) *(COMMON) . = ALIGN(4); From 9557ca89f24aec215c5bd01e4b266d9c8d5c2788 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 1 Sep 2021 10:50:48 -0700 Subject: [PATCH 341/418] Update USB PID --- ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk b/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk index a7542e9ae8..f9dbcfeee3 100644 --- a/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x303A -USB_PID = 0x80B9 +USB_PID = 0x7001 USB_PRODUCT = "ESP32-S2-HMI-DevKit-1" USB_MANUFACTURER = "Espressif" From 0d280fa83ca2377784efde217721f7cba2d5e4ce Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 1 Sep 2021 12:43:43 -0700 Subject: [PATCH 342/418] Two fixes, one for ble workflow, one for linking BLE workflow had an incorrect list size for characteristics Linking didn't advance . link it should have without extra (). --- ports/atmel-samd/boards/common.template.ld | 12 ++++++------ ports/nrf/boards/common.template.ld | 12 ++++++------ supervisor/shared/bluetooth/serial.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ports/atmel-samd/boards/common.template.ld b/ports/atmel-samd/boards/common.template.ld index b5faf7f458..05c0de4210 100644 --- a/ports/atmel-samd/boards/common.template.ld +++ b/ports/atmel-samd/boards/common.template.ld @@ -29,8 +29,8 @@ SECTIONS KEEP(*(.vectors)) /* isr vector table */ /* Sort text sections so that they have fewer *fill* bytes needed. */ - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.text)) /* .text sections (code) */ - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*)) /* .text* sections (code) */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text))) /* .text sections (code) */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*))) /* .text* sections (code) */ /* Don't sort rodata because it impacts codegen size. */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ @@ -66,8 +66,8 @@ SECTIONS _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialize the .data section in RAM */ *(.ramfunc) *(.ramfunc*) - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.data)) /* .data sections */ - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*)) /* .data* sections */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.data))) /* .data sections */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*))) /* .data* sections */ . = ALIGN(4); _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialize the .data section in RAM */ @@ -79,8 +79,8 @@ SECTIONS . = ALIGN(4); _sbss = .; _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*)) + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss))) + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))) *(COMMON) . = ALIGN(4); diff --git a/ports/nrf/boards/common.template.ld b/ports/nrf/boards/common.template.ld index 306145e00c..dda31e4fdc 100644 --- a/ports/nrf/boards/common.template.ld +++ b/ports/nrf/boards/common.template.ld @@ -62,8 +62,8 @@ SECTIONS .text : { . = ALIGN(4); - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.text)) /* .text sections (code) */ - *SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*)) /* .text* sections (code) */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text))) /* .text sections (code) */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*))) /* .text* sections (code) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ /* *(.glue_7) */ /* glue arm to thumb code */ @@ -82,8 +82,8 @@ SECTIONS . = ALIGN(4); _sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ _ram_start = .; /* create a global symbol at ram start for garbage collector */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.data))) /* .data sections */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*))) /* .data* sections */ . = ALIGN(4); _edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ @@ -97,8 +97,8 @@ SECTIONS { . = ALIGN(4); _sbss = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss))) + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))) *(COMMON) . = ALIGN(4); diff --git a/supervisor/shared/bluetooth/serial.c b/supervisor/shared/bluetooth/serial.c index 901b2d9a61..018acd5f4a 100644 --- a/supervisor/shared/bluetooth/serial.c +++ b/supervisor/shared/bluetooth/serial.c @@ -53,7 +53,7 @@ STATIC bleio_uuid_obj_t supervisor_ble_circuitpython_version_uuid; const uint8_t circuitpython_base_uuid[16] = {0x6e, 0x68, 0x74, 0x79, 0x50, 0x74, 0x69, 0x75, 0x63, 0x72, 0x69, 0x43, 0x00, 0x00, 0xaf, 0xad }; STATIC mp_obj_list_t characteristic_list; -STATIC mp_obj_t characteristic_list_items[2]; +STATIC mp_obj_t characteristic_list_items[3]; STATIC uint32_t _outgoing1[BLE_GATTS_VAR_ATTR_LEN_MAX / 4]; STATIC uint32_t _outgoing2[BLE_GATTS_VAR_ATTR_LEN_MAX / 4]; From 6af0038a84113bd51c3b8e22f4d96609bb662a01 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Wed, 1 Sep 2021 20:01:15 -0500 Subject: [PATCH 343/418] update TileGrid docstrings to include OnDiskBitmap --- shared-bindings/displayio/TileGrid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/displayio/TileGrid.c b/shared-bindings/displayio/TileGrid.c index 5b381c7f46..1c6e6efda3 100644 --- a/shared-bindings/displayio/TileGrid.c +++ b/shared-bindings/displayio/TileGrid.c @@ -48,14 +48,14 @@ //| //| A single tile grid is also known as a Sprite.""" //| -//| def __init__(self, bitmap: Union[Bitmap, Shape], *, pixel_shader: Union[ColorConverter, Palette], width: int = 1, height: int = 1, tile_width: Optional[int] = None, tile_height: Optional[int] = None, default_tile: int = 0, x: int = 0, y: int = 0) -> None: +//| def __init__(self, bitmap: Union[Bitmap, OnDiskBitmap, Shape], *, pixel_shader: Union[ColorConverter, Palette], width: int = 1, height: int = 1, tile_width: Optional[int] = None, tile_height: Optional[int] = None, default_tile: int = 0, x: int = 0, y: int = 0) -> None: //| """Create a TileGrid object. The bitmap is source for 2d pixels. The pixel_shader is used to //| convert the value and its location to a display native pixel color. This may be a simple color //| palette lookup, a gradient, a pattern or a color transformer. //| //| tile_width and tile_height match the height of the bitmap by default. //| -//| :param Bitmap,Shape bitmap: The bitmap storing one or more tiles. +//| :param Bitmap,OnDiskBitmap,Shape bitmap: The bitmap storing one or more tiles. //| :param ColorConverter,Palette pixel_shader: The pixel shader that produces colors from values //| :param int width: Width of the grid in tiles. //| :param int height: Height of the grid in tiles. From ebc44fad55122ac10a975e81f0a757f64cce8991 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 1 Sep 2021 18:22:57 -0700 Subject: [PATCH 344/418] Update tinyusb for samd and rp2040 improvements The improvements are based on the USB compliance tests. --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tinyusb b/lib/tinyusb index 38f5aee9c3..831a45f14b 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 38f5aee9c31299874dcda1758cb98e4404c6ad9d +Subproject commit 831a45f14bcc833d536cab39bef61cc67533fa73 From 24859ed5965415dec3821bbeac869846a502c235 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Thu, 2 Sep 2021 14:45:39 +1000 Subject: [PATCH 345/418] Added support for my new FeatherS2 Neo esp32s2 board --- .github/workflows/build.yml | 1 + .../unexpectedmaker_feathers2_neo/board.c | 61 +++++++++ .../mpconfigboard.h | 47 +++++++ .../mpconfigboard.mk | 20 +++ .../unexpectedmaker_feathers2_neo/pins.c | 119 ++++++++++++++++++ .../unexpectedmaker_feathers2_neo/sdkconfig | 39 ++++++ 6 files changed, 287 insertions(+) create mode 100644 ports/esp32s2/boards/unexpectedmaker_feathers2_neo/board.c create mode 100644 ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h create mode 100644 ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c create mode 100644 ports/esp32s2/boards/unexpectedmaker_feathers2_neo/sdkconfig diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d521b571b6..0b490ae416 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -533,6 +533,7 @@ jobs: - "targett_module_clip_wroom" - "targett_module_clip_wrover" - "unexpectedmaker_feathers2" + - "unexpectedmaker_feathers2_neo" - "unexpectedmaker_feathers2_prerelease" - "unexpectedmaker_tinys2" diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/board.c b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/board.c new file mode 100644 index 0000000000..a0e399b1ef --- /dev/null +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/board.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ + + // SPI Flash and RAM + common_hal_never_reset_pin(&pin_GPIO26); + common_hal_never_reset_pin(&pin_GPIO27); + common_hal_never_reset_pin(&pin_GPIO28); + common_hal_never_reset_pin(&pin_GPIO29); + common_hal_never_reset_pin(&pin_GPIO30); + common_hal_never_reset_pin(&pin_GPIO31); + common_hal_never_reset_pin(&pin_GPIO32); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h new file mode 100644 index 0000000000..e6abbf2339 --- /dev/null +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h @@ -0,0 +1,47 @@ +/* + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "FeatherS2 Neo" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO40) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO39) +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk new file mode 100644 index 0000000000..a2aca0fb38 --- /dev/null +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk @@ -0,0 +1,20 @@ +USB_VID = 0x239A +USB_PID = 0x80B5 +USB_PRODUCT = "FeatherS2 Neo" +USB_MANUFACTURER = "UnexpectedMaker" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=qio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_BITBANG_NEOPIXEL = 1 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c new file mode 100644 index 0000000000..b2e58cc118 --- /dev/null +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c @@ -0,0 +1,119 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_SDO), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_SDI), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO37) }, + + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO45) }, + + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO38) }, + + + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED + + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_VBAT), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_VBAT_SENSE), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO2) }, + + // 5V present sense pin + { MP_ROM_QSTR(MP_QSTR_VBUS), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_MATRIX_POWER), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_MATRIX), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + + { 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/esp32s2/boards/unexpectedmaker_feathers2_neo/sdkconfig b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/sdkconfig new file mode 100644 index 0000000000..453aeb1d2d --- /dev/null +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/sdkconfig @@ -0,0 +1,39 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO=y +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2Neo" +# end of LWIP From 4e869422d1deb6491180dae4a5ab30a041200bd1 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Thu, 2 Sep 2021 16:17:41 +1000 Subject: [PATCH 346/418] Move frozen neopixel lib to latest commit that supports try/carch on the power pin. --- frozen/Adafruit_CircuitPython_NeoPixel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frozen/Adafruit_CircuitPython_NeoPixel b/frozen/Adafruit_CircuitPython_NeoPixel index b2f21e6e42..0f4661c45a 160000 --- a/frozen/Adafruit_CircuitPython_NeoPixel +++ b/frozen/Adafruit_CircuitPython_NeoPixel @@ -1 +1 @@ -Subproject commit b2f21e6e42e681b2da91bf95d586ac8e4ad8266b +Subproject commit 0f4661c45a578d816323b5ad0f432aff73b5522f From 9bfa2a416d6fd8377a48869525a023794a96b916 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Thu, 2 Sep 2021 18:09:08 +1000 Subject: [PATCH 347/418] Added STAGE support for my TinyS2 board --- ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.mk b/ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.mk index 0d054c0cb0..91fa9dcbe3 100644 --- a/ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.mk +++ b/ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.mk @@ -16,5 +16,7 @@ CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_BITBANG_NEOPIXEL = 1 +CIRCUITPY_STAGE = 1 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel From 9fffb5badadeac75834ad0dba2f87cc04c5b3eb6 Mon Sep 17 00:00:00 2001 From: James Carr <70200140+lesamouraipourpre@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:01:15 +0100 Subject: [PATCH 348/418] Document missing 'frequency' parameter on ParallelBus.c --- shared-bindings/paralleldisplay/ParallelBus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared-bindings/paralleldisplay/ParallelBus.c b/shared-bindings/paralleldisplay/ParallelBus.c index 22d0b9393b..804886233a 100644 --- a/shared-bindings/paralleldisplay/ParallelBus.c +++ b/shared-bindings/paralleldisplay/ParallelBus.c @@ -42,7 +42,7 @@ //| protocol may be refered to as 8080-I Series Parallel Interface in datasheets. It doesn't handle //| display initialization.""" //| -//| def __init__(self, *, data0: microcontroller.Pin, command: microcontroller.Pin, chip_select: microcontroller.Pin, write: microcontroller.Pin, read: microcontroller.Pin, reset: microcontroller.Pin) -> None: +//| def __init__(self, *, data0: microcontroller.Pin, command: microcontroller.Pin, chip_select: microcontroller.Pin, write: microcontroller.Pin, read: microcontroller.Pin, reset: microcontroller.Pin, frequency: int = 30_000_000) -> None: //| """Create a ParallelBus object associated with the given pins. The bus is inferred from data0 //| by implying the next 7 additional pins on a given GPIO port. //| @@ -56,7 +56,8 @@ //| :param microcontroller.Pin chip_select: Chip select pin //| :param microcontroller.Pin write: Write pin //| :param microcontroller.Pin read: Read pin -//| :param microcontroller.Pin reset: Reset pin""" +//| :param microcontroller.Pin reset: Reset pin +//| :param int frequency: The communication frequency in Hz for the display on the bus""" //| ... //| STATIC mp_obj_t paralleldisplay_parallelbus_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { From 195e67f04fae292a9e4cccad59a03ac2444d9216 Mon Sep 17 00:00:00 2001 From: James Carr Date: Wed, 1 Sep 2021 09:34:49 +0000 Subject: [PATCH 349/418] Translated using Weblate (English (United Kingdom)) Currently translated at 88.3% (902 of 1021 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/en_GB/ --- locale/en_GB.po | 374 +++++++++++++++++++++++++++++++----------------- 1 file changed, 243 insertions(+), 131 deletions(-) diff --git a/locale/en_GB.po b/locale/en_GB.po index d65b3788ed..3f0adcbc07 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2021-04-11 01:30+0000\n" -"Last-Translator: Hugo Dahl \n" +"PO-Revision-Date: 2021-09-02 10:32+0000\n" +"Last-Translator: James Carr \n" "Language-Team: none\n" "Language: en_GB\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.6-dev\n" +"X-Generator: Weblate 4.8.1-dev\n" #: main.c msgid "" @@ -44,11 +44,15 @@ msgstr "" "https://github.com/adafruit/circuitpython/issues\n" #: lib/utils/pyexec.c +#, fuzzy msgid "" "\n" "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" "=== " msgstr "" +"\n" +"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +"=== " #: py/obj.c msgid " File \"%q\"" @@ -63,8 +67,9 @@ msgid " is of type %q\n" msgstr " is of type %q\n" #: main.c +#, fuzzy msgid " not found.\n" -msgstr "" +msgstr " not found.\n" #: main.c msgid " output:\n" @@ -83,12 +88,14 @@ msgstr "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" #: shared-bindings/microcontroller/Pin.c +#, fuzzy msgid "%q and %q contain duplicate pins" -msgstr "" +msgstr "%q and %q contain duplicate pins" #: shared-bindings/microcontroller/Pin.c +#, fuzzy msgid "%q contains duplicate pins" -msgstr "" +msgstr "%q contains duplicate pins" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" @@ -108,32 +115,38 @@ msgid "%q index out of range" msgstr "%q index out of range" #: py/obj.c +#, fuzzy msgid "%q indices must be integers, not %s" -msgstr "" +msgstr "%q indices must be integers, not %s" #: py/argcheck.c +#, fuzzy msgid "%q length must be %d-%d" -msgstr "" +msgstr "%q length must be %d-%d" #: shared-bindings/usb_hid/Device.c +#, fuzzy msgid "%q length must be >= 1" -msgstr "" +msgstr "%q length must be >= 1" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" msgstr "%q list must be a list" #: py/argcheck.c +#, fuzzy msgid "%q must <= %d" -msgstr "" +msgstr "%q must <= %d" #: py/argcheck.c +#, fuzzy msgid "%q must be %d-%d" -msgstr "" +msgstr "%q must be %d-%d" #: py/argcheck.c +#, fuzzy msgid "%q must be >= %d" -msgstr "" +msgstr "%q must be >= %d" #: py/argcheck.c shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" @@ -148,24 +161,28 @@ msgid "%q must be >= 1" msgstr "%q must be >= 1" #: py/argcheck.c +#, fuzzy msgid "%q must be a string" -msgstr "" +msgstr "%q must be a string" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" msgstr "%q must be a tuple of length 2" #: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#, fuzzy msgid "%q must be between %d and %d" -msgstr "" +msgstr "%q must be between %d and %d" #: ports/atmel-samd/common-hal/busio/UART.c +#, fuzzy msgid "%q must be power of 2" -msgstr "" +msgstr "%q must be power of 2" #: py/argcheck.c +#, fuzzy msgid "%q must of type %q" -msgstr "" +msgstr "%q must of type %q" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: shared-bindings/canio/Match.c @@ -185,8 +202,9 @@ msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() takes %d positional arguments but %d were given" #: shared-bindings/usb_hid/Device.c +#, fuzzy msgid "%q, %q, and %q must all be the same length" -msgstr "" +msgstr "%q, %q, and %q must all be the same length" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format @@ -254,33 +272,34 @@ msgid "'%s' expects {r0, r1, ...}" msgstr "'%s' expects {r0, r1, ...}" #: py/emitinlinextensa.c -#, c-format +#, c-format, fuzzy msgid "'%s' integer %d isn't within range %d..%d" -msgstr "" +msgstr "'%s' integer %d isn't within range %d..%d" #: py/emitinlinethumb.c -#, c-format +#, c-format, fuzzy msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" -msgstr "" +msgstr "'%s' integer 0x%x doesn't fit in mask 0x%x" #: py/obj.c -#, c-format +#, c-format, fuzzy msgid "'%s' object doesn't support item assignment" -msgstr "" +msgstr "'%s' object doesn't support item assignment" #: py/obj.c -#, c-format +#, c-format, fuzzy msgid "'%s' object doesn't support item deletion" -msgstr "" +msgstr "'%s' object doesn't support item deletion" #: py/runtime.c +#, fuzzy msgid "'%s' object has no attribute '%q'" -msgstr "" +msgstr "'%s' object has no attribute '%q'" #: py/obj.c -#, c-format +#, c-format, fuzzy msgid "'%s' object isn't subscriptable" -msgstr "" +msgstr "'%s' object isn't subscriptable" #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" @@ -339,8 +358,9 @@ msgid "'yield' outside function" msgstr "'yield' outside function" #: shared-module/vectorio/VectorShape.c +#, fuzzy msgid "(x,y) integers required" -msgstr "" +msgstr "(x,y) integers required" #: py/compile.c msgid "*x must be assignment target" @@ -484,8 +504,9 @@ msgid "AnalogOut not supported on given pin" msgstr "AnalogOut not supported on given pin" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +#, fuzzy msgid "Another PWMAudioOut is already active" -msgstr "" +msgstr "Another PWMAudioOut is already active" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -510,16 +531,19 @@ msgid "Attempt to allocate %d blocks" msgstr "Attempt to allocate %d blocks" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "Attempted heap allocation when VM not running." -msgstr "" +msgstr "Attempted heap allocation when VM not running." #: ports/raspberrypi/audio_dma.c +#, fuzzy msgid "Audio conversion not implemented" -msgstr "" +msgstr "Audio conversion not implemented" #: shared-bindings/wifi/Radio.c +#, fuzzy msgid "AuthMode.OPEN is not used with password" -msgstr "" +msgstr "AuthMode.OPEN is not used with password" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" @@ -680,8 +704,9 @@ msgstr "Can't set CCCD on local Characteristic" #: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c #: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c +#, fuzzy msgid "Cannot change USB devices now" -msgstr "" +msgstr "Cannot change USB devices now" #: shared-bindings/_bleio/Adapter.c msgid "Cannot create a new Adapter; use _bleio.adapter;" @@ -725,8 +750,9 @@ msgid "Cannot record to a file" msgstr "Cannot record to a file" #: shared-module/storage/__init__.c +#, fuzzy msgid "Cannot remount '/' when visible via USB." -msgstr "" +msgstr "Cannot remount '/' when visible via USB." #: ports/atmel-samd/common-hal/microcontroller/__init__.c #: ports/cxd56/common-hal/microcontroller/__init__.c @@ -906,16 +932,18 @@ msgid "Data chunk must follow fmt chunk" msgstr "Data chunk must follow fmt chunk" #: ports/nrf/common-hal/_bleio/Adapter.c +#, fuzzy msgid "Data not supported with directed advertising" -msgstr "" +msgstr "Data not supported with directed advertising" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Data too large for advertisement packet" msgstr "Data too large for advertisement packet" #: ports/stm/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Deep sleep pins must use a rising edge with pulldown" -msgstr "" +msgstr "Deep sleep pins must use a rising edge with pulldown" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." @@ -960,9 +988,9 @@ msgid "EXTINT channel already in use" msgstr "EXTINT channel already in use" #: shared-module/synthio/MidiTrack.c -#, c-format +#, c-format, fuzzy msgid "Error in MIDI stream at position %d" -msgstr "" +msgstr "Error in MIDI stream at position %d" #: extmod/modure.c msgid "Error in regex" @@ -1065,8 +1093,9 @@ msgid "Failed to allocate wifi scan memory" msgstr "Failed to allocate WiFi scan memory" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +#, fuzzy msgid "Failed to buffer the sample" -msgstr "" +msgstr "Failed to buffer the sample" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" @@ -1094,8 +1123,9 @@ msgid "Failed to write internal flash." msgstr "Failed to write internal flash." #: supervisor/shared/safe_mode.c +#, fuzzy msgid "Fatal error." -msgstr "" +msgstr "Fatal error." #: py/moduerrno.c msgid "File exists" @@ -1248,8 +1278,9 @@ msgid "Insufficient encryption" msgstr "Insufficient encryption" #: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c +#, fuzzy msgid "Internal audio buffer too small" -msgstr "" +msgstr "Internal audio buffer too small" #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" @@ -1282,12 +1313,14 @@ msgid "Invalid ADC Unit value" msgstr "Invalid ADC unit value" #: ports/esp32s2/common-hal/wifi/Radio.c +#, fuzzy msgid "Invalid AuthMode" -msgstr "" +msgstr "Invalid AuthMode" #: ports/nrf/common-hal/_bleio/__init__.c +#, fuzzy msgid "Invalid BLE parameter" -msgstr "" +msgstr "Invalid BLE parameter" #: shared-module/displayio/OnDiskBitmap.c msgid "Invalid BMP file" @@ -1303,8 +1336,9 @@ msgid "Invalid DAC pin supplied" msgstr "Invalid DAC pin supplied" #: shared-bindings/synthio/__init__.c +#, fuzzy msgid "Invalid MIDI file" -msgstr "" +msgstr "Invalid MIDI file" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c @@ -1347,14 +1381,14 @@ msgid "Invalid channel count" msgstr "Invalid channel count" #: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format +#, c-format, fuzzy msgid "Invalid data_count %d" -msgstr "" +msgstr "Invalid data_count %d" #: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format +#, c-format, fuzzy msgid "Invalid data_pins[%d]" -msgstr "" +msgstr "Invalid data_pins[%d]" #: shared-bindings/digitalio/DigitalInOut.c msgid "Invalid direction." @@ -1541,14 +1575,14 @@ msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "Missing first_set_pin. Instruction %d sets pin(s)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format +#, c-format, fuzzy msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" +msgstr "Missing jmp_pin. Instruction %d jumps on pin" #: shared-module/usb_hid/Device.c -#, c-format +#, c-format, fuzzy msgid "More than %d report ids not supported" -msgstr "" +msgstr "More than %d report ids not supported" #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." @@ -1564,8 +1598,9 @@ msgid "Must use a multiple of 6 rgb pins, not %d" msgstr "Must use a multiple of 6 rgb pins, not %d" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "NLR jump failed. Likely memory corruption." -msgstr "" +msgstr "NLR jump failed. Likely memory corruption." #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" @@ -1670,9 +1705,9 @@ msgid "No long integer support" msgstr "No long integer support" #: shared-module/usb_hid/__init__.c -#, c-format +#, c-format, fuzzy msgid "No more than %d HID devices allowed" -msgstr "" +msgstr "No more than %d HID devices allowed" #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" @@ -1705,12 +1740,14 @@ msgid "No timer available" msgstr "No timer available" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "Nordic system firmware failure assertion." -msgstr "" +msgstr "Nordic system firmware failure assertion." #: ports/nrf/common-hal/_bleio/__init__.c +#, fuzzy msgid "Nordic system firmware out of memory" -msgstr "" +msgstr "Nordic system firmware out of memory" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -1761,16 +1798,19 @@ msgstr "" "Only Windows format, uncompressed BMP supported: given header size is %d" #: shared-bindings/_bleio/Adapter.c +#, fuzzy msgid "Only connectable advertisements can be directed" -msgstr "" +msgstr "Only connectable advertisements can be directed" #: ports/stm/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Only edge detection is available on this hardware" -msgstr "" +msgstr "Only edge detection is available on this hardware" #: shared-bindings/ipaddress/__init__.c +#, fuzzy msgid "Only int or string supported for ip" -msgstr "" +msgstr "Only int or string supported for ip" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1863,8 +1903,9 @@ msgid "Permission denied" msgstr "Permission denied" #: ports/stm/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Pin cannot wake from Deep Sleep" -msgstr "" +msgstr "Pin cannot wake from Deep Sleep" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" @@ -1886,8 +1927,9 @@ msgstr "Pin does not have ADC capabilities" #: ports/stm/common-hal/alarm/pin/PinAlarm.c #: ports/stm/common-hal/pulseio/PulseIn.c +#, fuzzy msgid "Pin interrupt already in use" -msgstr "" +msgstr "Pin interrupt already in use" #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c @@ -2048,8 +2090,9 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Row entry must be digitalio. DigitalInOut" #: main.c +#, fuzzy msgid "Running in safe mode! Not running saved code.\n" -msgstr "" +msgstr "Running in safe mode! Not running saved code.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2074,8 +2117,9 @@ msgid "SPI Re-initialization error" msgstr "SPI reinitialisation error" #: ports/esp32s2/common-hal/busio/SPI.c +#, fuzzy msgid "SPI configuration failed" -msgstr "" +msgstr "SPI configuration failed" #: ports/raspberrypi/common-hal/busio/SPI.c msgid "SPI peripheral in use" @@ -2116,8 +2160,9 @@ msgid "Size not supported" msgstr "Size not supported" #: ports/raspberrypi/common-hal/alarm/SleepMemory.c +#, fuzzy msgid "Sleep Memory not available" -msgstr "" +msgstr "Sleep Memory not available" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." @@ -2175,27 +2220,37 @@ msgid "Temperature read timed out" msgstr "Temperature read timed out" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +"The CircuitPython heap was corrupted because the stack was too small.\n" +"Increase the stack size if you know how. If not:" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +"The `microcontroller` module was used to boot into safe mode. Press reset to " +"exit safe mode." #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "The length of rgb_pins must be 6, 12, 18, 24, or 30" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY)." msgstr "" +"The microcontroller's power dipped. Make sure your power supply provides\n" +"enough power for the whole circuit and press reset (after ejecting " +"CIRCUITPY)." #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2256,13 +2311,15 @@ msgid "Too many displays" msgstr "Too many displays" #: ports/nrf/common-hal/_bleio/PacketBuffer.c +#, fuzzy msgid "Total data to write is larger than %q" -msgstr "" +msgstr "Total data to write is larger than %q" #: ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.c #: ports/stm/common-hal/alarm/touch/TouchAlarm.c +#, fuzzy msgid "Touch alarms not available" -msgstr "" +msgstr "Touch alarms not available" #: py/obj.c msgid "Traceback (most recent call last):\n" @@ -2293,20 +2350,24 @@ msgid "UART write error" msgstr "UART write error" #: shared-module/usb_hid/Device.c +#, fuzzy msgid "USB busy" -msgstr "" +msgstr "USB busy" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "USB devices need more endpoints than are available." -msgstr "" +msgstr "USB devices need more endpoints than are available." #: supervisor/shared/safe_mode.c +#, fuzzy msgid "USB devices specify too many interface names." -msgstr "" +msgstr "USB devices specify too many interface names." #: shared-module/usb_hid/Device.c +#, fuzzy msgid "USB error" -msgstr "" +msgstr "USB error" #: shared-bindings/_bleio/UUID.c msgid "UUID integer value must be 0-0xffff" @@ -2386,9 +2447,9 @@ msgid "Unknown security error: 0x%04x" msgstr "Unknown security error: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c -#, c-format +#, c-format, fuzzy msgid "Unknown system firmware error: %04x" -msgstr "" +msgstr "Unknown system firmware error: %04x" #: shared-bindings/adafruit_pixelbuf/PixelBuf.c #, c-format @@ -2500,13 +2561,16 @@ msgid "Writes not supported on Characteristic" msgstr "Writes not supported on Characteristic" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "You are in safe mode because:\n" -msgstr "" +msgstr "You are in safe mode because:\n" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "" "You pressed the reset button during boot. Press again to exit safe mode." msgstr "" +"You pressed the reset button during boot. Press again to exit safe mode." #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2541,16 +2605,18 @@ msgid "addresses is empty" msgstr "addresses is empty" #: py/compile.c +#, fuzzy msgid "annotation must be an identifier" -msgstr "" +msgstr "annotation must be an identifier" #: py/modbuiltins.c msgid "arg is an empty sequence" msgstr "arg is an empty sequence" #: py/objobject.c +#, fuzzy msgid "arg must be user-type" -msgstr "" +msgstr "arg must be user-type" #: extmod/ulab/code/numpy/numerical.c msgid "argsort argument must be an ndarray" @@ -2565,8 +2631,9 @@ msgid "argument has wrong type" msgstr "argument has wrong type" #: py/compile.c +#, fuzzy msgid "argument name reused" -msgstr "" +msgstr "argument name reused" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c @@ -2615,8 +2682,9 @@ msgid "axis too long" msgstr "axis too long" #: shared-bindings/bitmaptools/__init__.c +#, fuzzy msgid "background value out of range of target" -msgstr "" +msgstr "background value out of range of target" #: py/builtinevex.c msgid "bad compile mode" @@ -2639,8 +2707,9 @@ msgid "binary op %q not implemented" msgstr "binary op %q not implemented" #: extmod/modurandom.c +#, fuzzy msgid "bits must be 32 or less" -msgstr "" +msgstr "bits must be 32 or less" #: shared-bindings/busio/UART.c msgid "bits must be in range 5 to 9" @@ -2729,8 +2798,9 @@ msgid "can't assign to expression" msgstr "Can't assign to expression" #: extmod/moduasyncio.c +#, fuzzy msgid "can't cancel self" -msgstr "" +msgstr "can't cancel self" #: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-module/adafruit_pixelbuf/PixelBuf.c @@ -2738,13 +2808,14 @@ msgid "can't convert %q to %q" msgstr "Can't convert %q to %q" #: py/runtime.c +#, fuzzy msgid "can't convert %q to int" -msgstr "" +msgstr "can't convert %q to int" #: py/obj.c -#, c-format +#, c-format, fuzzy msgid "can't convert %s to complex" -msgstr "" +msgstr "can't convert %s to complex" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" @@ -2755,12 +2826,14 @@ msgid "can't convert to %q" msgstr "Can't convert to %q" #: py/obj.c +#, fuzzy msgid "can't convert to complex" -msgstr "" +msgstr "can't convert to complex" #: py/runtime.c +#, fuzzy msgid "can't convert to int" -msgstr "" +msgstr "can't convert to int" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2839,8 +2912,9 @@ msgstr "" "can't switch from manual field specification to automatic field numbering" #: extmod/ulab/code/ndarray.c +#, fuzzy msgid "cannot assign new shape" -msgstr "" +msgstr "cannot assign new shape" #: extmod/ulab/code/ndarray_operators.c msgid "cannot cast output with casting rule" @@ -2863,8 +2937,9 @@ msgid "cannot perform relative import" msgstr "can't perform relative import" #: extmod/moductypes.c +#, fuzzy msgid "cannot unambiguously get sizeof scalar" -msgstr "" +msgstr "cannot unambiguously get sizeof scalar" #: py/emitnative.c msgid "casting" @@ -2915,8 +2990,9 @@ msgid "color should be an int" msgstr "colour should be an int" #: py/emitnative.c +#, fuzzy msgid "comparison of int and uint" -msgstr "" +msgstr "comparison of int and uint" #: py/objcomplex.c msgid "complex division by zero" @@ -2971,9 +3047,9 @@ msgid "data must be of equal length" msgstr "cata must be of equal length" #: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format +#, c-format, fuzzy msgid "data pin #%d in use" -msgstr "" +msgstr "data pin #%d in use" #: extmod/ulab/code/ndarray.c msgid "data type not understood" @@ -3022,12 +3098,14 @@ msgid "dimensions do not match" msgstr "dimensions do not match" #: py/emitnative.c +#, fuzzy msgid "div/mod not implemented for uint" -msgstr "" +msgstr "div/mod not implemented for uint" #: py/objfloat.c py/objint_mpz.c +#, fuzzy msgid "divide by zero" -msgstr "" +msgstr "divide by zero" #: py/modmath.c py/objint_longlong.c py/runtime.c #: shared-bindings/math/__init__.c @@ -3141,8 +3219,9 @@ msgid "file must be a file opened in byte mode" msgstr "file must be a file opened in byte mode" #: shared-bindings/traceback/__init__.c +#, fuzzy msgid "file write is not available" -msgstr "" +msgstr "file write is not available" #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" @@ -3169,8 +3248,9 @@ msgid "first argument to super() must be type" msgstr "first argument to super() must be type" #: extmod/ulab/code/scipy/linalg/linalg.c +#, fuzzy msgid "first two arguments must be ndarrays" -msgstr "" +msgstr "first two arguments must be ndarrays" #: extmod/ulab/code/ndarray.c msgid "flattening order must be either 'C', or 'F'" @@ -3185,8 +3265,9 @@ msgid "float too big" msgstr "float too big" #: py/nativeglue.c +#, fuzzy msgid "float unsupported" -msgstr "" +msgstr "float unsupported" #: shared-bindings/_stage/Text.c msgid "font must be 2048 bytes long" @@ -3201,8 +3282,9 @@ msgid "full" msgstr "full" #: py/argcheck.c +#, fuzzy msgid "function doesn't take keyword arguments" -msgstr "" +msgstr "function doesn't take keyword arguments" #: py/argcheck.c #, c-format @@ -3257,16 +3339,18 @@ msgid "generator ignored GeneratorExit" msgstr "generator ignored GeneratorExit" #: py/objgenerator.c py/runtime.c +#, fuzzy msgid "generator raised StopIteration" -msgstr "" +msgstr "generator raised StopIteration" #: shared-bindings/_stage/Layer.c msgid "graphic must be 2048 bytes long" msgstr "graphic must be 2048 bytes long" #: extmod/moduhashlib.c +#, fuzzy msgid "hash is final" -msgstr "" +msgstr "hash is final" #: extmod/moduheapq.c msgid "heap must be a list" @@ -3281,12 +3365,14 @@ msgid "identifier redefined as nonlocal" msgstr "identifier redefined as nonlocal" #: py/compile.c +#, fuzzy msgid "import * not at module level" -msgstr "" +msgstr "import * not at module level" #: py/persistentcode.c +#, fuzzy msgid "incompatible native .mpy architecture" -msgstr "" +msgstr "incompatible native .mpy architecture" #: py/objstr.c msgid "incomplete format" @@ -3400,8 +3486,9 @@ msgid "integer required" msgstr "integer required" #: extmod/ulab/code/numpy/approx.c +#, fuzzy msgid "interp is defined for 1D iterables of equal length" -msgstr "" +msgstr "interp is defined for 1D iterables of equal length" #: shared-bindings/_bleio/Adapter.c #, c-format @@ -3409,8 +3496,9 @@ msgid "interval must be in range %s-%s" msgstr "interval must be in range %s-%s" #: py/compile.c +#, fuzzy msgid "invalid architecture" -msgstr "" +msgstr "invalid architecture" #: lib/netutils/netutils.c msgid "invalid arguments" @@ -3432,8 +3520,9 @@ msgid "invalid element_size %d, must be, 1, 2, or 4" msgstr "invalid element_size %d, must be, 1, 2, or 4" #: shared-bindings/traceback/__init__.c +#, fuzzy msgid "invalid exception" -msgstr "" +msgstr "invalid exception" #: extmod/modframebuf.c msgid "invalid format" @@ -3474,8 +3563,9 @@ msgid "invalid syntax for number" msgstr "invalid syntax for number" #: py/objexcept.c shared-bindings/traceback/__init__.c +#, fuzzy msgid "invalid traceback" -msgstr "" +msgstr "invalid traceback" #: py/objtype.c msgid "issubclass() arg 1 must be a class" @@ -3601,8 +3691,9 @@ msgid "memoryview: length is not a multiple of itemsize" msgstr "memoryview: length is not a multiple of itemsize" #: extmod/ulab/code/numpy/linalg/linalg.c +#, fuzzy msgid "mode must be complete, or reduced" -msgstr "" +msgstr "mode must be complete, or reduced" #: py/builtinimport.c msgid "module not found" @@ -3641,8 +3732,9 @@ msgid "name not defined" msgstr "name not defined" #: py/asmthumb.c +#, fuzzy msgid "native method too big" -msgstr "" +msgstr "native method too big" #: py/emitnative.c msgid "native yield" @@ -3654,8 +3746,9 @@ msgid "need more than %d values to unpack" msgstr "need more than %d values to unpack" #: py/modmath.c +#, fuzzy msgid "negative factorial" -msgstr "" +msgstr "negative factorial" #: py/objint_longlong.c py/objint_mpz.c py/runtime.c msgid "negative power with no float support" @@ -3703,8 +3796,9 @@ msgid "no such attribute" msgstr "no such attribute" #: shared-bindings/usb_hid/__init__.c +#, fuzzy msgid "non-Device in %q" -msgstr "" +msgstr "non-Device in %q" #: ports/nrf/common-hal/_bleio/Connection.c msgid "non-UUID found in service_uuids_whitelist" @@ -3755,25 +3849,28 @@ msgid "object " msgstr "object " #: py/obj.c -#, c-format +#, c-format, fuzzy msgid "object '%s' isn't a tuple or list" -msgstr "" +msgstr "object '%s' isn't a tuple or list" #: py/obj.c +#, fuzzy msgid "object doesn't support item assignment" -msgstr "" +msgstr "object doesn't support item assignment" #: py/obj.c +#, fuzzy msgid "object doesn't support item deletion" -msgstr "" +msgstr "object doesn't support item deletion" #: py/obj.c msgid "object has no len" msgstr "object has no len" #: py/obj.c +#, fuzzy msgid "object isn't subscriptable" -msgstr "" +msgstr "object isn't subscriptable" #: py/runtime.c msgid "object not an iterator" @@ -3792,9 +3889,9 @@ msgid "object not iterable" msgstr "object not iterable" #: py/obj.c -#, c-format +#, c-format, fuzzy msgid "object of type '%s' has no len()" -msgstr "" +msgstr "object of type '%s' has no len()" #: py/obj.c msgid "object with buffer protocol required" @@ -3834,8 +3931,9 @@ msgid "only slices with step=1 (aka None) are supported" msgstr "only slices with step=1 (aka None) are supported" #: py/vm.c +#, fuzzy msgid "opcode" -msgstr "" +msgstr "opcode" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare.c #: extmod/ulab/code/numpy/vector.c @@ -3843,12 +3941,14 @@ msgid "operands could not be broadcast together" msgstr "operands could not be broadcast together" #: extmod/ulab/code/numpy/linalg/linalg.c +#, fuzzy msgid "operation is defined for 2D arrays only" -msgstr "" +msgstr "operation is defined for 2D arrays only" #: extmod/ulab/code/numpy/linalg/linalg.c +#, fuzzy msgid "operation is defined for ndarrays only" -msgstr "" +msgstr "operation is defined for ndarrays only" #: extmod/ulab/code/ndarray.c msgid "operation is implemented for 1D Boolean arrays only" @@ -3872,12 +3972,14 @@ msgid "ord() expected a character, but string of length %d found" msgstr "ord() expected a character, but string of length %d found" #: extmod/ulab/code/utils/utils.c +#, fuzzy msgid "out array is too small" -msgstr "" +msgstr "out array is too small" #: extmod/ulab/code/utils/utils.c +#, fuzzy msgid "out must be a float dense array" -msgstr "" +msgstr "out must be a float dense array" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" @@ -3997,8 +4099,9 @@ msgid "pressing both buttons at start up.\n" msgstr "pressing both buttons at start up.\n" #: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +#, fuzzy msgid "pressing the left button at start up\n" -msgstr "" +msgstr "pressing the left button at start up\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" @@ -4017,8 +4120,9 @@ msgid "queue overflow" msgstr "queue overflow" #: lib/utils/pyexec.c +#, fuzzy msgid "raw REPL; CTRL-B to exit\n" -msgstr "" +msgstr "raw REPL; CTRL-B to exit\n" #: py/parse.c msgid "raw f-strings are not implemented" @@ -4081,16 +4185,18 @@ msgid "sampling rate out of range" msgstr "sampling rate out of range" #: py/modmicropython.c +#, fuzzy msgid "schedule queue full" -msgstr "" +msgstr "schedule queue full" #: lib/utils/pyexec.c py/builtinimport.c msgid "script compilation not supported" msgstr "script compilation not supported" #: py/nativeglue.c +#, fuzzy msgid "set unsupported" -msgstr "" +msgstr "set unsupported" #: extmod/ulab/code/ndarray.c msgid "shape must be a tuple" @@ -4129,8 +4235,9 @@ msgid "slice step cannot be zero" msgstr "slice step cannot be zero" #: py/nativeglue.c +#, fuzzy msgid "slice unsupported" -msgstr "" +msgstr "slice unsupported" #: py/objint.c py/sequence.c msgid "small int overflow" @@ -4193,12 +4300,14 @@ msgid "string not supported; use bytes or bytearray" msgstr "string not supported; use bytes or bytearray" #: extmod/moductypes.c +#, fuzzy msgid "struct: can't index" -msgstr "" +msgstr "struct: can't index" #: extmod/moductypes.c +#, fuzzy msgid "struct: index out of range" -msgstr "" +msgstr "struct: index out of range" #: extmod/moductypes.c msgid "struct: no fields" @@ -4279,8 +4388,9 @@ msgid "too many indices" msgstr "too many indices" #: py/asmthumb.c +#, fuzzy msgid "too many locals for native method" -msgstr "" +msgstr "too many locals for native method" #: py/runtime.c #, c-format @@ -4292,8 +4402,9 @@ msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz is defined for 1D arrays of equal length" #: extmod/ulab/code/numpy/approx.c +#, fuzzy msgid "trapz is defined for 1D iterables" -msgstr "" +msgstr "trapz is defined for 1D iterables" #: py/obj.c msgid "tuple/list has wrong length" @@ -4426,8 +4537,9 @@ msgid "value must fit in %d byte(s)" msgstr "value must fit in %d byte(s)" #: shared-bindings/bitmaptools/__init__.c +#, fuzzy msgid "value out of range of target" -msgstr "" +msgstr "value out of range of target" #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" From b3aea212cb66ab27df1d1debda987f935de1f9fa Mon Sep 17 00:00:00 2001 From: James Carr <70200140+lesamouraipourpre@users.noreply.github.com> Date: Thu, 2 Sep 2021 14:00:23 +0100 Subject: [PATCH 350/418] Documentation update for Display.refresh() Update the documentation for `Display.refresh()` which had two paragraphs starting 'When auto refresh is off,' --- shared-bindings/displayio/Display.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index b5c8868de5..96ce284efa 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -230,22 +230,23 @@ STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in) MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show); //| def refresh(self, *, target_frames_per_second: Optional[int] = None, minimum_frames_per_second: int = 0) -> bool: -//| """When auto refresh is off, waits for the target frame rate and then refreshes the display, -//| returning True. If the call has taken too long since the last refresh call for the given -//| target frame rate, then the refresh returns False immediately without updating the screen to +//| """When auto_refresh is off, and :py:attr:`target_frames_per_second` is not `None` this waits +//| for the target frame rate and then refreshes the display, +//| returning `True`. If the call has taken too long since the last refresh call for the given +//| target frame rate, then the refresh returns `False` immediately without updating the screen to //| hopefully help getting caught up. //| //| If the time since the last successful refresh is below the minimum frame rate, then an -//| exception will be raised. The default ``minimum_frames_per_second`` of 0 disables this behavior. +//| exception will be raised. The default :py:attr:`minimum_frames_per_second` of 0 disables this behavior. //| -//| When auto refresh is off, ``display.refresh()`` or ``display.refresh(target_frames_per_second=None)`` +//| When auto_refresh is off, and :py:attr:`target_frames_per_second` is `None` this //| will update the display immediately. //| -//| When auto refresh is on, updates the display immediately. (The display will also update +//| When auto_refresh is on, updates the display immediately. (The display will also update //| without calls to this.) //| -//| :param int target_frames_per_second: How many times a second `refresh` should be called and the screen updated. -//| Set to `None` for immediate refresh. +//| :param Optional[int] target_frames_per_second: The target frame rate that :py:func:`refresh` should try to +//| achieve. Set to `None` for immediate refresh. //| :param int minimum_frames_per_second: The minimum number of times the screen should be updated per second.""" //| ... //| From d526925d4906b8411db4438a99edff3604915c3c Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 2 Sep 2021 15:55:51 +0530 Subject: [PATCH 351/418] make aesio module full build dependent --- ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk | 1 + ports/atmel-samd/boards/pybadge/mpconfigboard.mk | 1 + ports/atmel-samd/boards/pygamer/mpconfigboard.mk | 1 + ports/atmel-samd/mpconfigport.mk | 1 + ports/nrf/boards/pca10100/mpconfigboard.mk | 1 + ports/stm/boards/espruino_pico/mpconfigboard.mk | 1 + ports/stm/boards/meowbit_v121/mpconfigboard.mk | 1 + ports/stm/boards/thunderpack_v11/mpconfigboard.mk | 1 + py/circuitpy_mpconfig.mk | 2 +- 9 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk index 4d01e486dc..b9622c2faf 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk @@ -10,6 +10,7 @@ INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ # Not needed. +CIRCUITPY_AESIO = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_BLEIO_HCI = 0 diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk index 3043adc2ad..b5fda72f90 100644 --- a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk @@ -10,6 +10,7 @@ QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ +CIRCUITPY_AESIO = 0 CIRCUITPY_GAMEPADSHIFT = 1 CIRCUITPY_STAGE = 1 diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk index df504f2e98..5b5a84bb78 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk @@ -10,6 +10,7 @@ QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ +CIRCUITPY_AESIO = 0 CIRCUITPY_GAMEPADSHIFT = 1 CIRCUITPY_STAGE = 1 diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index d55f798a85..8994f0f52a 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -35,6 +35,7 @@ ifeq ($(CHIP_FAMILY),samd21) # Some of these are on by default with CIRCUITPY_FULL_BUILD, but don't # fit in 256kB of flash +CIRCUITPY_AESIO ?= 0 CIRCUITPY_AUDIOMIXER ?= 0 CIRCUITPY_BINASCII ?= 0 CIRCUITPY_BITBANGIO ?= 0 diff --git a/ports/nrf/boards/pca10100/mpconfigboard.mk b/ports/nrf/boards/pca10100/mpconfigboard.mk index c487753fa7..3d4fa496cc 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.mk +++ b/ports/nrf/boards/pca10100/mpconfigboard.mk @@ -7,6 +7,7 @@ MCU_CHIP = nrf52833 INTERNAL_FLASH_FILESYSTEM = 1 +CIRCUITPY_AESIO = 0 CIRCUITPY_ALARM = 0 CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_BINASCII = 0 diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.mk b/ports/stm/boards/espruino_pico/mpconfigboard.mk index 3f3e81d553..851357b4d6 100644 --- a/ports/stm/boards/espruino_pico/mpconfigboard.mk +++ b/ports/stm/boards/espruino_pico/mpconfigboard.mk @@ -17,6 +17,7 @@ LD_FILE = boards/STM32F401xd_fs.ld # INTERNAL_FLASH_FILESYSTEM. It can probably be reenabled if we enable # lto for this port, and if other stuff hasn't been added in the # meantime +CIRCUITPY_AESIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_BUSDEVICE = 0 diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk index 62846dbc84..ed96e99871 100644 --- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk +++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk @@ -20,6 +20,7 @@ LD_FILE = boards/STM32F401xe_boot.ld # For debugging - also comment BOOTLOADER_OFFSET and BOARD_VTOR_DEFER # LD_FILE = boards/STM32F401xe_fs.ld +CIRCUITPY_AESIO = 0 CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_ULAB = 0 CIRCUITPY_STAGE = 1 diff --git a/ports/stm/boards/thunderpack_v11/mpconfigboard.mk b/ports/stm/boards/thunderpack_v11/mpconfigboard.mk index 29f9b14ba8..9aa50c0225 100644 --- a/ports/stm/boards/thunderpack_v11/mpconfigboard.mk +++ b/ports/stm/boards/thunderpack_v11/mpconfigboard.mk @@ -16,6 +16,7 @@ MCU_PACKAGE = UFQFPN48 LD_COMMON = boards/common_nvm.ld LD_FILE = boards/STM32F411_nvm.ld +CIRCUITPY_AESIO = 0 CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_VECTORIO = 0 CIRCUITPY_ULAB = 0 diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 1bb8ea3200..763fdf37b8 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -36,7 +36,7 @@ CFLAGS += -DCIRCUITPY_FULL_BUILD=$(CIRCUITPY_FULL_BUILD) MICROPY_PY_ASYNC_AWAIT ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DMICROPY_PY_ASYNC_AWAIT=$(MICROPY_PY_ASYNC_AWAIT) -CIRCUITPY_AESIO ?= 0 +CIRCUITPY_AESIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_AESIO=$(CIRCUITPY_AESIO) # TODO: CIRCUITPY_ALARM will gradually be added to From bf5e8bf20b2e7c5f9ae8c2a0d61c430647a0c9a7 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 2 Sep 2021 10:17:38 -0700 Subject: [PATCH 352/418] Use Espressif PID --- .../boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk index a2aca0fb38..a3ec63eaf3 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk @@ -1,4 +1,4 @@ -USB_VID = 0x239A +USB_VID = 0x303A USB_PID = 0x80B5 USB_PRODUCT = "FeatherS2 Neo" USB_MANUFACTURER = "UnexpectedMaker" From a1e4105f1e5a131cc173010dba26620b298a8214 Mon Sep 17 00:00:00 2001 From: James Carr <70200140+lesamouraipourpre@users.noreply.github.com> Date: Thu, 2 Sep 2021 20:29:53 +0100 Subject: [PATCH 353/418] Documentation update for ColorConverter --- shared-bindings/displayio/ColorConverter.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c index 75ba43162a..7c1e87efeb 100644 --- a/shared-bindings/displayio/ColorConverter.c +++ b/shared-bindings/displayio/ColorConverter.c @@ -86,7 +86,7 @@ STATIC mp_obj_t displayio_colorconverter_obj_convert(mp_obj_t self_in, mp_obj_t MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_convert_obj, displayio_colorconverter_obj_convert); //| dither: bool -//| """When true the color converter dithers the output by adding random noise when +//| """When `True` the ColorConverter dithers the output by adding random noise when //| truncating to display bitdepth""" //| STATIC mp_obj_t displayio_colorconverter_obj_get_dither(mp_obj_t self_in) { @@ -111,8 +111,11 @@ const mp_obj_property_t displayio_colorconverter_dither_obj = { MP_ROM_NONE}, }; -//| def make_transparent(self, pixel: int) -> None: -//| """Sets a pixel to not opaque.""" +//| def make_transparent(self, color: int) -> None: +//| """Set the transparent color or index for the ColorConverter. This will +//| raise an Exception if there is already a selected transparent index. +//| +//| :param int color: The color to be transparent""" //| STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_obj_t transparent_color_obj) { displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in); @@ -123,8 +126,10 @@ STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_o } MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_transparent_obj, displayio_colorconverter_make_transparent); -//| def make_opaque(self, pixel: int) -> None: -//| """Sets a pixel to opaque.""" +//| def make_opaque(self, color: int) -> None: +//| """Make the ColorConverter be opaque and have no transparent pixels. +//| +//| :param int color: [IGNORED] Use any value""" //| STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in, mp_obj_t transparent_color_obj) { displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in); From 762c15535f72a7beaafeff8fb426fbf895b585e5 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Fri, 3 Sep 2021 09:12:14 -0400 Subject: [PATCH 354/418] Lolin S2 Mini pin assignment changes --- .../esp32s2/boards/lolin_s2_mini/mpconfigboard.h | 16 ++++++++-------- .../boards/lolin_s2_mini/mpconfigboard.mk | 2 +- ports/esp32s2/boards/lolin_s2_mini/pins.c | 10 ---------- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h index 4cf71911a9..411420d273 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h @@ -29,19 +29,19 @@ #define MICROPY_HW_BOARD_NAME "S2Mini" #define MICROPY_HW_MCU_NAME "ESP32S2" -#define MICROPY_HW_NEOPIXEL (&pin_GPIO1) +// #define MICROPY_HW_NEOPIXEL (&pin_GPIO1) // no NeoPixel on S2 Mini #define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO15) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") #define AUTORESET_DELAY_MS 500 -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) +// #define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) // no I2C labels on S2 Mini +// #define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) // no I2C labels on S2 Mini -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO37) -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO36) +// #define DEFAULT_SPI_BUS_SCK (&pin_GPIO37) // no SPI labels on S2 Mini +// #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) // no SPI labels on S2 Mini +// #define DEFAULT_SPI_BUS_MISO (&pin_GPIO36) // no SPI labels on S2 Mini -#define DEFAULT_UART_BUS_RX (&pin_GPIO44) -#define DEFAULT_UART_BUS_TX (&pin_GPIO43) +// #define DEFAULT_UART_BUS_RX (&pin_GPIO44) // no UART pins on S2 Mini +// #define DEFAULT_UART_BUS_TX (&pin_GPIO43) // no UART pins on S2 Mini diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk index ce434873cc..d95bd2fec1 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk @@ -14,7 +14,7 @@ CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB -CIRCUITPY_BITBANG_NEOPIXEL = 1 +# CIRCUITPY_BITBANG_NEOPIXEL = 1 # no NeoPixel on S2 Mini # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index 5c469879f9..cbf287ea96 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -6,11 +6,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, // RTC_GPIO0,GPIO0 - // mpconfigboard.h: GPIO1: MICROPY_HW_NEOPIXEL - left to user to solder on - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, // RTC_GPIO1,GPIO1,TOUCH1,ADC1_CH0 - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, // RTC_GPIO2,GPIO2,TOUCH2,ADC1_CH1 { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, // RTC_GPIO3,GPIO3,TOUCH3,ADC1_CH2 @@ -21,11 +18,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 @@ -55,15 +49,11 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },// SPIIO5,GPIO34,FSPICS0 // mpconfigboard.h: GPIO35/GPIO36/GPIO37: MOSI/MESO/SCK SPI - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },// GPIO38,FSPIWP - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },// MTCK,GPIO39,CLK_OUT3 { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },// MTDO,GPIO40,CLK_OUT2 From 765eee424ecb9dbd8fad1fb8710012a214bdd0ff Mon Sep 17 00:00:00 2001 From: Durapensa Date: Fri, 3 Sep 2021 10:08:38 -0400 Subject: [PATCH 355/418] Lolin S2 Mini added I2C & SPI defs from Espressif MicroPython --- ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h | 12 ++++++------ ports/esp32s2/boards/lolin_s2_mini/pins.c | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h index 411420d273..f72baabbd4 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h @@ -30,18 +30,18 @@ #define MICROPY_HW_MCU_NAME "ESP32S2" // #define MICROPY_HW_NEOPIXEL (&pin_GPIO1) // no NeoPixel on S2 Mini -#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO15) +// #define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO15) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") #define AUTORESET_DELAY_MS 500 -// #define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) // no I2C labels on S2 Mini -// #define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) // no I2C labels on S2 Mini +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO35) // no I2C labels on S2 Mini, def from Espressif MP +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) // no I2C labels on S2 Mini, def from Espressif MP -// #define DEFAULT_SPI_BUS_SCK (&pin_GPIO37) // no SPI labels on S2 Mini -// #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) // no SPI labels on S2 Mini -// #define DEFAULT_SPI_BUS_MISO (&pin_GPIO36) // no SPI labels on S2 Mini +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO7) // no SPI labels on S2 Mini, def from Espressif MP +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11) // no SPI labels on S2 Mini, def from Espressif MP +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO9) // no SPI labels on S2 Mini, def from Espressif MP // #define DEFAULT_UART_BUS_RX (&pin_GPIO44) // no UART pins on S2 Mini // #define DEFAULT_UART_BUS_TX (&pin_GPIO43) // no UART pins on S2 Mini diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index cbf287ea96..9f8874651b 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -16,13 +16,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPI7) }, // def from Espressif MP, D1 Mini pin D5 GPIO14 // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, // def from Espressif MP, D1 Mini pin D6 GPIO12 { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) },// def from Espressif MP, D1 Mini pin D7 GPIRO13 { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },// RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },// RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 @@ -46,10 +49,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },// def from Espressif MP, D1 Mini pin D2 GPIO4 { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },// SPIIO5,GPIO34,FSPICS0 // mpconfigboard.h: GPIO35/GPIO36/GPIO37: MOSI/MESO/SCK SPI { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO35) },// def from Espressif MP, D1 Mini pin D1 GPIO5 { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ From ef6d7fe731b707eaaf281705039fa8a4676cec00 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Fri, 3 Sep 2021 10:17:44 -0400 Subject: [PATCH 356/418] Lolin S2 Mini change 'Espressif' references to 'Wemos' --- ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h | 10 +++++----- ports/esp32s2/boards/lolin_s2_mini/pins.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h index f72baabbd4..4a20c178e8 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h @@ -36,12 +36,12 @@ #define AUTORESET_DELAY_MS 500 -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO35) // no I2C labels on S2 Mini, def from Espressif MP -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) // no I2C labels on S2 Mini, def from Espressif MP +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO35) // no I2C labels on S2 Mini, def from Wemos MP +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) // no I2C labels on S2 Mini, def from Wemos MP -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO7) // no SPI labels on S2 Mini, def from Espressif MP -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11) // no SPI labels on S2 Mini, def from Espressif MP -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO9) // no SPI labels on S2 Mini, def from Espressif MP +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO7) // no SPI labels on S2 Mini, def from Wemos MP +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11) // no SPI labels on S2 Mini, def from Wemos MP +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO9) // no SPI labels on S2 Mini, def from Wemos MP // #define DEFAULT_UART_BUS_RX (&pin_GPIO44) // no UART pins on S2 Mini // #define DEFAULT_UART_BUS_TX (&pin_GPIO43) // no UART pins on S2 Mini diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index 9f8874651b..4f8e0a9281 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -16,16 +16,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPI7) }, // def from Espressif MP, D1 Mini pin D5 GPIO14 + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPI7) }, // def from Wemos MP, D1 Mini pin D5 GPIO14 // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, // def from Espressif MP, D1 Mini pin D6 GPIO12 + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, // def from Wemos MP, D1 Mini pin D6 GPIO12 { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) },// def from Espressif MP, D1 Mini pin D7 GPIRO13 + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) },// def from Wemos MP, D1 Mini pin D7 GPIRO13 { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },// RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },// RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 @@ -49,12 +49,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },// def from Espressif MP, D1 Mini pin D2 GPIO4 + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },// def from Wemos MP, D1 Mini pin D2 GPIO4 { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },// SPIIO5,GPIO34,FSPICS0 // mpconfigboard.h: GPIO35/GPIO36/GPIO37: MOSI/MESO/SCK SPI { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO35) },// def from Espressif MP, D1 Mini pin D1 GPIO5 + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO35) },// def from Wemos MP, D1 Mini pin D1 GPIO5 { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ From 7dbf750dd0b0bde966e84da4543fd3a16f346d13 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Fri, 3 Sep 2021 20:44:03 +0530 Subject: [PATCH 357/418] add test for traceback module --- tests/circuitpython/traceback_test.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/circuitpython/traceback_test.py diff --git a/tests/circuitpython/traceback_test.py b/tests/circuitpython/traceback_test.py new file mode 100644 index 0000000000..cb7bf4b2aa --- /dev/null +++ b/tests/circuitpython/traceback_test.py @@ -0,0 +1,25 @@ +try: + import traceback +except ImportError: + print("SKIP") + raise SystemExit + + +def fun(): + raise Exception("test") + + +try: + fun() +except Exception as exc: + print("\nNo Trace:") + traceback.print_exception(None, exc, None) + print("\nDefault Trace:") + traceback.print_exception(None, exc, exc.__traceback__) + print("\nLimit=1 Trace:") + traceback.print_exception(None, exc, exc.__traceback__, limit=1) + print("\nLimit=0 Trace:") + traceback.print_exception(None, exc, exc.__traceback__, limit=0) + print("\nLimit=-1 Trace:") + traceback.print_exception(None, exc, exc.__traceback__, limit=-1) + print("") From c0f039da2927bf94935c80e48760be05254b1bae Mon Sep 17 00:00:00 2001 From: Durapensa Date: Fri, 3 Sep 2021 12:08:38 -0400 Subject: [PATCH 358/418] Lolin S2 Mini added pin definitions from Wemos/Lolin D1 Mini --- ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h | 2 +- ports/esp32s2/boards/lolin_s2_mini/pins.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h index 4a20c178e8..d7df2c80f5 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h @@ -27,7 +27,7 @@ // Micropython setup #define MICROPY_HW_BOARD_NAME "S2Mini" -#define MICROPY_HW_MCU_NAME "ESP32S2" +#define MICROPY_HW_MCU_NAME "ESP32S2-S2FN4R2" // from Wemos MP // #define MICROPY_HW_NEOPIXEL (&pin_GPIO1) // no NeoPixel on S2 Mini // #define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO15) diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index 4f8e0a9281..e08ff7ccd6 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -10,25 +10,31 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, // RTC_GPIO2,GPIO2,TOUCH2,ADC1_CH1 { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, // RTC_GPIO3,GPIO3,TOUCH3,ADC1_CH2 + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO3) }, // D1 mini pin A0 { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // RTC_GPIO4,GPIO4,TOUCH4,ADC1_CH3 { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, // RTC_GPIO5,GPIO5,TOUCH5,ADC1_CH4 + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO5) }, // D1 mini pin D0 GPIO16 { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPI7) }, // def from Wemos MP, D1 Mini pin D5 GPIO14 + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO7) }, // D1 mini pin D5 GPIO14 // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, // def from Wemos MP, D1 Mini pin D6 GPIO12 + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO9) }, // D1 mini pin D6 GPIO12 { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) },// def from Wemos MP, D1 Mini pin D7 GPIRO13 + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO11) },// D1 mini pin D7 GPIO13 { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },// RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },// RTC_GPIO13,GPIO13,TOUCH13,ADC2_CH2,FSPIQ,FSPIIO7 + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO13) },// D1 mini pin D8 GPIO15 { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },// RTC_GPIO14,GPIO14,TOUCH14,ADC2_CH3,FSPIWP,FSPIDQS @@ -38,9 +44,11 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },// XTAL_32K_P: RTC_GPIO15,GPIO15,U0RTS,ADC2_CH4,XTAL_32K_P { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },// XTAL_32K_N: RTC_GPIO16,GPIO16,U0CTS,ADC2_CH5,XTAL_32K_N + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO16) },// D1 mini pin D4 GPIO2 LED { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },// DAC_1: RTC_GPIO17,GPIO17,U1TXD,ADC2_CH6,DAC_1 { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },// DAC_2: RTC_GPIO18,GPIO18,U1RXD,ADC2_CH7,DAC_2,CLK_OUT3 + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO18) },// D1 mini pin D3 GPIO0 // skip GPIO19-GPIO20: USB_D-/USB_D+ { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },// RTC_GPIO21,GPIO21 @@ -49,12 +57,14 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },// def from Wemos MP, D1 Mini pin D2 GPIO4 + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },// def from Wemos MP + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO33) },// D1 mini pin D2 GPIO4 { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) },// SPIIO5,GPIO34,FSPICS0 // mpconfigboard.h: GPIO35/GPIO36/GPIO37: MOSI/MESO/SCK SPI { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) },// SPIIO6,GPIO35,FSPID - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO35) },// def from Wemos MP, D1 Mini pin D1 GPIO5 + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO35) },// def from Wemos MP + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO35) },// D1 mini pin D1 GPIO5 { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },// SPIIO7,GPIO36,FSPICLK { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) },// SPIDQS,GPIO37,FSPIQ From 32b9450e7f6af6e26a519af934e326fa351db5d3 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Fri, 3 Sep 2021 12:14:59 -0400 Subject: [PATCH 359/418] Lolin S2 Mini removed some redundant comments --- ports/esp32s2/boards/lolin_s2_mini/pins.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index e08ff7ccd6..eef6db4779 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -18,18 +18,18 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPI7) }, // def from Wemos MP, D1 Mini pin D5 GPIO14 + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPI7) }, // def from Wemos MP { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO7) }, // D1 mini pin D5 GPIO14 // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, // RTC_GPIO8,GPIO8,TOUCH8,ADC1_CH7 { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // RTC_GPIO9,GPIO9,TOUCH9,ADC1_CH8,FSPIHD - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, // def from Wemos MP, D1 Mini pin D6 GPIO12 + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, // def from Wemos MP { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO9) }, // D1 mini pin D6 GPIO12 { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },// RTC_GPIO10,GPIO10,TOUCH10,ADC1_CH9,FSPICS0,FSPIIO4 { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },// RTC_GPIO11,GPIO11,TOUCH11,ADC2_CH0,FSPID,FSPIIO5 - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) },// def from Wemos MP, D1 Mini pin D7 GPIRO13 + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) },// def from Wemos MP { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO11) },// D1 mini pin D7 GPIO13 { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },// RTC_GPIO12,GPIO12,TOUCH12,ADC2_CH1,FSPICLK,FSPIIO6 From 15fc44cab74e4a9bf5de9f5123e383d36a2e9f60 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Fri, 3 Sep 2021 12:20:07 -0400 Subject: [PATCH 360/418] Lolin S2 Mini fix typo in pin assignment --- ports/esp32s2/boards/lolin_s2_mini/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index eef6db4779..e665d09685 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -18,7 +18,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // RTC_GPIO6,GPIO6,TOUCH6,ADC1_CH5 { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // RTC_GPIO7,GPIO7,TOUCH7,ADC1_CH6 - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPI7) }, // def from Wemos MP + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO7) }, // def from Wemos MP { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO7) }, // D1 mini pin D5 GPIO14 // mpconfigboard.h: GPIO8/GPIO9: SCL/SDA I2C0 From 8625e53817302de4779f1741555366c10ad7e7d6 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Fri, 3 Sep 2021 15:16:33 +0200 Subject: [PATCH 361/418] change board dicts to include a common macro with __name__ --- ports/atmel-samd/boards/8086_commander/pins.c | 6 +++--- ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c | 6 +++--- .../atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c | 6 +++--- ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c | 6 +++--- ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c | 6 +++--- ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c | 6 +++--- ports/atmel-samd/boards/arduino_mkr1300/pins.c | 6 +++--- ports/atmel-samd/boards/arduino_mkrzero/pins.c | 6 +++--- ports/atmel-samd/boards/arduino_nano_33_iot/pins.c | 6 +++--- ports/atmel-samd/boards/arduino_zero/pins.c | 6 +++--- ports/atmel-samd/boards/bast_pro_mini_m0/pins.c | 6 +++--- ports/atmel-samd/boards/bdmicro_vina_d21/pins.c | 6 +++--- ports/atmel-samd/boards/bdmicro_vina_d51/pins.c | 6 +++--- ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c | 6 +++--- ports/atmel-samd/boards/blm_badge/pins.c | 6 +++--- ports/atmel-samd/boards/capablerobot_usbhub/pins.c | 6 +++--- ports/atmel-samd/boards/catwan_usbstick/pins.c | 6 +++--- ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c | 6 +++--- ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c | 6 +++--- ports/atmel-samd/boards/circuitplayground_express/pins.c | 6 +++--- .../boards/circuitplayground_express_crickit/pins.c | 6 +++--- .../boards/circuitplayground_express_displayio/pins.c | 6 +++--- ports/atmel-samd/boards/cp32-m4/pins.c | 6 +++--- ports/atmel-samd/boards/cp_sapling_m0/pins.c | 6 +++--- ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c | 6 +++--- ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c | 6 +++--- ports/atmel-samd/boards/datalore_ip_m4/pins.c | 6 +++--- ports/atmel-samd/boards/datum_distance/pins.c | 6 +++--- ports/atmel-samd/boards/datum_imu/pins.c | 6 +++--- ports/atmel-samd/boards/datum_light/pins.c | 6 +++--- ports/atmel-samd/boards/datum_weather/pins.c | 6 +++--- ports/atmel-samd/boards/dynalora_usb/pins.c | 6 +++--- ports/atmel-samd/boards/dynossat_edu_eps/pins.c | 6 +++--- ports/atmel-samd/boards/dynossat_edu_obc/pins.c | 6 +++--- ports/atmel-samd/boards/escornabot_makech/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m0_adalogger/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m0_basic/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m0_express/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m0_express_crickit/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m0_rfm69/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m0_rfm9x/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m0_supersized/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m4_can/pins.c | 6 +++--- ports/atmel-samd/boards/feather_m4_express/pins.c | 6 +++--- ports/atmel-samd/boards/fluff_m0/pins.c | 6 +++--- ports/atmel-samd/boards/gemma_m0/pins.c | 6 +++--- ports/atmel-samd/boards/grandcentral_m4_express/pins.c | 6 +++--- ports/atmel-samd/boards/hallowing_m0_express/pins.c | 6 +++--- ports/atmel-samd/boards/hallowing_m4_express/pins.c | 6 +++--- ports/atmel-samd/boards/huntercat_nfc/pins.c | 6 +++--- ports/atmel-samd/boards/itsybitsy_m0_express/pins.c | 6 +++--- ports/atmel-samd/boards/itsybitsy_m4_express/pins.c | 6 +++--- ports/atmel-samd/boards/kicksat-sprite/pins.c | 6 +++--- ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c | 6 +++--- ports/atmel-samd/boards/matrixportal_m4/pins.c | 6 +++--- ports/atmel-samd/boards/meowmeow/pins.c | 6 +++--- ports/atmel-samd/boards/metro_m0_express/pins.c | 6 +++--- ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c | 6 +++--- ports/atmel-samd/boards/metro_m4_express/pins.c | 6 +++--- ports/atmel-samd/boards/mini_sam_m4/pins.c | 6 +++--- ports/atmel-samd/boards/monster_m4sk/pins.c | 6 +++--- ports/atmel-samd/boards/ndgarage_ndbit6/pins.c | 6 +++--- ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c | 6 +++--- ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c | 6 +++--- ports/atmel-samd/boards/nfc_copy_cat/pins.c | 6 +++--- ports/atmel-samd/boards/openbook_m4/pins.c | 6 +++--- ports/atmel-samd/boards/pewpew10/pins.c | 6 +++--- ports/atmel-samd/boards/pewpew_m4/pins.c | 6 +++--- ports/atmel-samd/boards/picoplanet/pins.c | 6 +++--- ports/atmel-samd/boards/pybadge/pins.c | 6 +++--- ports/atmel-samd/boards/pycubed/pins.c | 6 +++--- ports/atmel-samd/boards/pycubed_mram/pins.c | 6 +++--- ports/atmel-samd/boards/pygamer/pins.c | 6 +++--- ports/atmel-samd/boards/pyportal/pins.c | 6 +++--- ports/atmel-samd/boards/pyportal_titano/pins.c | 6 +++--- ports/atmel-samd/boards/pyruler/pins.c | 6 +++--- ports/atmel-samd/boards/qtpy_m0/pins.c | 6 +++--- ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c | 6 +++--- ports/atmel-samd/boards/robohatmm1_m4/pins.c | 6 +++--- ports/atmel-samd/boards/sam32/pins.c | 6 +++--- ports/atmel-samd/boards/same54_xplained/pins.c | 6 +++--- ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c | 6 +++--- ports/atmel-samd/boards/seeeduino_xiao/pins.c | 6 +++--- ports/atmel-samd/boards/sensebox_mcu/pins.c | 6 +++--- ports/atmel-samd/boards/serpente/pins.c | 6 +++--- ports/atmel-samd/boards/shirtty/pins.c | 6 +++--- ports/atmel-samd/boards/silicognition-m4-shim/pins.c | 6 +++--- ports/atmel-samd/boards/snekboard/pins.c | 6 +++--- ports/atmel-samd/boards/sparkfun_lumidrive/pins.c | 6 +++--- .../atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c | 6 +++--- .../boards/sparkfun_qwiic_micro_with_flash/pins.c | 6 +++--- ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c | 6 +++--- ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c | 6 +++--- ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c | 6 +++--- ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c | 6 +++--- ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c | 6 +++--- ports/atmel-samd/boards/stackrduino_m0_pro/pins.c | 6 +++--- ports/atmel-samd/boards/stringcar_m0_express/pins.c | 6 +++--- ports/atmel-samd/boards/trellis_m4_express/pins.c | 6 +++--- ports/atmel-samd/boards/trinket_m0/pins.c | 6 +++--- ports/atmel-samd/boards/trinket_m0_haxpress/pins.c | 6 +++--- ports/atmel-samd/boards/uartlogger2/pins.c | 6 +++--- ports/atmel-samd/boards/uchip/pins.c | 6 +++--- ports/atmel-samd/boards/ugame10/pins.c | 6 +++--- .../atmel-samd/boards/winterbloom_big_honking_button/pins.c | 6 +++--- ports/atmel-samd/boards/winterbloom_sol/pins.c | 6 +++--- ports/atmel-samd/boards/xinabox_cc03/pins.c | 6 +++--- ports/atmel-samd/boards/xinabox_cs11/pins.c | 6 +++--- ports/cxd56/boards/spresense/pins.c | 2 +- .../esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c | 6 +++--- .../boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c | 6 +++--- ports/esp32s2/boards/adafruit_funhouse/pins.c | 6 +++--- ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c | 6 +++--- ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c | 6 +++--- ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c | 6 +++--- ports/esp32s2/boards/artisense_rd00/pins.c | 6 +++--- ports/esp32s2/boards/atmegazero_esp32s2/pins.c | 6 +++--- ports/esp32s2/boards/crumpspace_crumps2/pins.c | 6 +++--- ports/esp32s2/boards/electroniccats_bastwifi/pins.c | 6 +++--- ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c | 6 ++++-- ports/esp32s2/boards/espressif_kaluga_1.3/pins.c | 6 +++--- ports/esp32s2/boards/espressif_kaluga_1/pins.c | 6 +++--- ports/esp32s2/boards/espressif_saola_1_wroom/pins.c | 6 +++--- ports/esp32s2/boards/espressif_saola_1_wrover/pins.c | 6 +++--- ports/esp32s2/boards/franzininho_wifi_wroom/pins.c | 6 +++--- ports/esp32s2/boards/franzininho_wifi_wrover/pins.c | 6 +++--- ports/esp32s2/boards/gravitech_cucumber_m/pins.c | 6 +++--- ports/esp32s2/boards/gravitech_cucumber_ms/pins.c | 6 +++--- ports/esp32s2/boards/gravitech_cucumber_r/pins.c | 6 +++--- ports/esp32s2/boards/gravitech_cucumber_rs/pins.c | 6 +++--- ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c | 6 +++--- ports/esp32s2/boards/lolin_s2_mini/pins.c | 6 ++++-- ports/esp32s2/boards/microdev_micro_s2/pins.c | 6 +++--- ports/esp32s2/boards/morpheans_morphesp-240/pins.c | 6 +++--- ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c | 6 +++--- ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c | 6 +++--- ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c | 6 +++--- ports/esp32s2/boards/targett_module_clip_wroom/pins.c | 6 +++--- ports/esp32s2/boards/targett_module_clip_wrover/pins.c | 6 +++--- ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c | 6 +++--- ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c | 6 ++++-- .../boards/unexpectedmaker_feathers2_prerelease/pins.c | 6 +++--- ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c | 6 +++--- ports/litex/boards/fomu/pins.c | 6 +++--- ports/mimxrt10xx/boards/feather_m7_1011/pins.c | 6 +++--- ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c | 6 +++--- ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c | 6 +++--- ports/mimxrt10xx/boards/imxrt1010_evk/pins.c | 6 +++--- ports/mimxrt10xx/boards/imxrt1020_evk/pins.c | 6 +++--- ports/mimxrt10xx/boards/imxrt1060_evk/pins.c | 6 +++--- ports/mimxrt10xx/boards/metro_m7_1011/pins.c | 6 +++--- ports/mimxrt10xx/boards/teensy40/pins.c | 6 +++--- ports/mimxrt10xx/boards/teensy41/pins.c | 6 +++--- ports/nrf/boards/ADM_B_NRF52840_1/pins.c | 2 +- ports/nrf/boards/TG-Watch/pins.c | 2 +- ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c | 2 +- ports/nrf/boards/aramcon2_badge/pins.c | 2 +- ports/nrf/boards/aramcon_badge_2019/pins.c | 2 +- ports/nrf/boards/arduino_nano_33_ble/pins.c | 2 +- ports/nrf/boards/bastble/pins.c | 2 +- ports/nrf/boards/bless_dev_board_multi_sensor/pins.c | 2 +- ports/nrf/boards/bluemicro840/pins.c | 2 +- ports/nrf/boards/circuitplayground_bluefruit/pins.c | 2 +- ports/nrf/boards/clue_nrf52840_express/pins.c | 2 +- ports/nrf/boards/electronut_labs_blip/pins.c | 2 +- ports/nrf/boards/electronut_labs_papyr/pins.c | 2 +- ports/nrf/boards/feather_bluefruit_sense/pins.c | 2 +- ports/nrf/boards/feather_nrf52840_express/pins.c | 2 +- ports/nrf/boards/hiibot_bluefi/pins.c | 2 +- ports/nrf/boards/ikigaisense_vita/pins.c | 2 +- ports/nrf/boards/itsybitsy_nrf52840_express/pins.c | 2 +- ports/nrf/boards/makerdiary_m60_keyboard/pins.c | 2 +- ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c | 2 +- ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c | 2 +- ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c | 2 +- ports/nrf/boards/metro_nrf52840_express/pins.c | 2 +- ports/nrf/boards/microbit_v2/pins.c | 2 +- ports/nrf/boards/nice_nano/pins.c | 2 +- ports/nrf/boards/ohs2020_badge/pins.c | 2 +- ports/nrf/boards/particle_argon/pins.c | 2 +- ports/nrf/boards/particle_boron/pins.c | 2 +- ports/nrf/boards/particle_xenon/pins.c | 2 +- ports/nrf/boards/pca10056/pins.c | 2 +- ports/nrf/boards/pca10059/pins.c | 2 +- ports/nrf/boards/pca10100/pins.c | 2 +- ports/nrf/boards/pitaya_go/pins.c | 2 +- ports/nrf/boards/raytac_mdbt50q-db-40/pins.c | 2 +- ports/nrf/boards/raytac_mdbt50q-rx/pins.c | 2 +- ports/nrf/boards/simmel/pins.c | 2 +- ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c | 2 +- ports/nrf/boards/sparkfun_nrf52840_mini/pins.c | 2 +- ports/nrf/boards/teknikio_bluebird/pins.c | 2 +- ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c | 2 +- ports/nrf/boards/warmbit_bluepixel/pins.c | 2 ++ ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c | 6 +++--- ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c | 6 +++--- ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c | 6 +++--- ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c | 6 +++--- ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c | 6 +++--- ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c | 6 +++--- ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c | 6 +++--- .../boards/jpconstantineau_encoderpad_rp2040/pins.c | 6 +++--- ports/raspberrypi/boards/pimoroni_interstate75/pins.c | 6 +++--- ports/raspberrypi/boards/pimoroni_keybow2040/pins.c | 6 +++--- ports/raspberrypi/boards/pimoroni_pga2040/pins.c | 6 +++--- ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c | 6 +++--- ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c | 6 +++--- ports/raspberrypi/boards/pimoroni_picosystem/pins.c | 6 +++--- ports/raspberrypi/boards/pimoroni_plasma2040/pins.c | 6 +++--- ports/raspberrypi/boards/pimoroni_tiny2040/pins.c | 6 +++--- ports/raspberrypi/boards/raspberry_pi_pico/pins.c | 6 +++--- ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c | 6 +++--- ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c | 6 +++--- ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c | 6 +++--- ports/stm/boards/espruino_pico/pins.c | 2 +- ports/stm/boards/espruino_wifi/pins.c | 2 +- ports/stm/boards/feather_stm32f405_express/pins.c | 2 +- ports/stm/boards/meowbit_v121/pins.c | 2 +- ports/stm/boards/nucleo_f746zg/pins.c | 2 +- ports/stm/boards/nucleo_f767zi/pins.c | 2 +- ports/stm/boards/nucleo_h743zi_2/pins.c | 2 +- ports/stm/boards/openmv_h7/pins.c | 2 +- ports/stm/boards/pyb_nano_v2/pins.c | 2 +- ports/stm/boards/pyboard_v11/pins.c | 2 +- ports/stm/boards/sparkfun_stm32f405_micromod/pins.c | 2 +- ports/stm/boards/stm32f411ce_blackpill/pins.c | 2 +- ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c | 2 +- ports/stm/boards/stm32f411ve_discovery/pins.c | 2 +- ports/stm/boards/stm32f412zg_discovery/pins.c | 2 +- ports/stm/boards/stm32f4_discovery/pins.c | 2 +- ports/stm/boards/stm32f746g_discovery/pins.c | 2 +- ports/stm/boards/thunderpack_v11/pins.c | 2 +- ports/stm/boards/thunderpack_v12/pins.c | 2 +- shared-bindings/board/__init__.h | 4 ++++ 234 files changed, 585 insertions(+), 573 deletions(-) diff --git a/ports/atmel-samd/boards/8086_commander/pins.c b/ports/atmel-samd/boards/8086_commander/pins.c index 810534642b..d9c68cc0bc 100644 --- a/ports/atmel-samd/boards/8086_commander/pins.c +++ b/ports/atmel-samd/boards/8086_commander/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Serial @@ -62,4 +62,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c index 26f5ccf475..7b0f72e283 100644 --- a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/pins.c @@ -1,10 +1,10 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) }, { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_PA28) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c index a8f4e40927..55e7d8466f 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_INTERRUPT), MP_ROM_PTR(&pin_PA00) }, @@ -14,4 +14,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c index 0387835f7b..49e9853a57 100644 --- a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_ROTA), MP_ROM_PTR(&pin_PA04) }, @@ -9,4 +9,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_PA27) }, { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA06) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c index 6391fba733..eaf80401d5 100644 --- a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA04) }, @@ -10,4 +10,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c b/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c index 73df4e9db7..35cc41b557 100644 --- a/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c +++ b/ports/atmel-samd/boards/aloriumtech_evo_m51/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, @@ -59,4 +59,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA_1), MP_ROM_PTR(&pin_PD09) }, { MP_ROM_QSTR(MP_QSTR_SCL_1), MP_ROM_PTR(&pin_PD08) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/arduino_mkr1300/pins.c b/ports/atmel-samd/boards/arduino_mkr1300/pins.c index 1c6fe272db..21476a3561 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/pins.c +++ b/ports/atmel-samd/boards/arduino_mkr1300/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, @@ -45,4 +45,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/arduino_mkrzero/pins.c b/ports/atmel-samd/boards/arduino_mkrzero/pins.c index 574feb98d2..7c0e2f42af 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/pins.c +++ b/ports/atmel-samd/boards/arduino_mkrzero/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, @@ -48,4 +48,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c b/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c index 43f840927b..f85145fd3a 100644 --- a/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c +++ b/ports/atmel-samd/boards/arduino_nano_33_iot/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, @@ -57,4 +57,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), MP_ROM_PTR(&pin_PA27) }, { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PA28) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/arduino_zero/pins.c b/ports/atmel-samd/boards/arduino_zero/pins.c index cebdb2ffd8..02f51aa1e8 100644 --- a/ports/atmel-samd/boards/arduino_zero/pins.c +++ b/ports/atmel-samd/boards/arduino_zero/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -41,4 +41,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c b/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c index 46c9b97b28..6360150e70 100644 --- a/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c +++ b/ports/atmel-samd/boards/bast_pro_mini_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA04) }, @@ -35,4 +35,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c index d0d69ce058..d84e46d726 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d21/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -37,4 +37,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index f4c2a90f63..3a9dbc929c 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -3,8 +3,8 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, @@ -118,4 +118,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c index 72980176b5..6f57a0d7be 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51_pcb7/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, @@ -89,4 +89,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/blm_badge/pins.c b/ports/atmel-samd/boards/blm_badge/pins.c index 2b37a2519b..6da6f0e9db 100644 --- a/ports/atmel-samd/boards/blm_badge/pins.c +++ b/ports/atmel-samd/boards/blm_badge/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA01) }, // pad 1 @@ -45,4 +45,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/pins.c b/ports/atmel-samd/boards/capablerobot_usbhub/pins.c index 1c6ede1d51..02bb347fe0 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/pins.c +++ b/ports/atmel-samd/boards/capablerobot_usbhub/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_ANMB), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_ANVLIM), MP_ROM_PTR(&pin_PA04) }, @@ -36,4 +36,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/catwan_usbstick/pins.c b/ports/atmel-samd/boards/catwan_usbstick/pins.c index 12ffa853ea..a0f44fc6f4 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/pins.c +++ b/ports/atmel-samd/boards/catwan_usbstick/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA30) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA31) }, @@ -19,4 +19,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c b/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c index d54c5dea3d..ee2b947077 100644 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, @@ -36,4 +36,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c index 79b30b696d..55001af5f7 100755 --- a/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c +++ b/ports/atmel-samd/boards/circuitbrains_deluxe_m4/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB04) }, @@ -59,4 +59,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/circuitplayground_express/pins.c b/ports/atmel-samd/boards/circuitplayground_express/pins.c index e290715104..ea00f85c70 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, @@ -63,4 +63,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c index e290715104..ea00f85c70 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, @@ -63,4 +63,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c b/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c index e290715104..ea00f85c70 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA02) }, @@ -63,4 +63,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/cp32-m4/pins.c b/ports/atmel-samd/boards/cp32-m4/pins.c index 7d9ca6d451..2f8e7ad1c5 100644 --- a/ports/atmel-samd/boards/cp32-m4/pins.c +++ b/ports/atmel-samd/boards/cp32-m4/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_P), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER_N), MP_ROM_PTR(&pin_PA05) }, @@ -50,4 +50,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/cp_sapling_m0/pins.c b/ports/atmel-samd/boards/cp_sapling_m0/pins.c index 6d6829ab07..c830f86aa8 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) }, @@ -37,4 +37,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c b/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c index 208ca6f703..93eefbdf8f 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0_revb/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA19) }, @@ -53,4 +53,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c index 6d6829ab07..c830f86aa8 100644 --- a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c +++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) }, @@ -37,4 +37,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/datalore_ip_m4/pins.c b/ports/atmel-samd/boards/datalore_ip_m4/pins.c index 4ace176893..8e52b20769 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/pins.c +++ b/ports/atmel-samd/boards/datalore_ip_m4/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -45,4 +45,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/datum_distance/pins.c b/ports/atmel-samd/boards/datum_distance/pins.c index 7f91771fa4..e09bf14c7e 100644 --- a/ports/atmel-samd/boards/datum_distance/pins.c +++ b/ports/atmel-samd/boards/datum_distance/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, @@ -31,4 +31,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/datum_imu/pins.c b/ports/atmel-samd/boards/datum_imu/pins.c index 8020d8ac48..7b62245070 100644 --- a/ports/atmel-samd/boards/datum_imu/pins.c +++ b/ports/atmel-samd/boards/datum_imu/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA03) }, @@ -33,4 +33,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/datum_light/pins.c b/ports/atmel-samd/boards/datum_light/pins.c index 7f91771fa4..e09bf14c7e 100644 --- a/ports/atmel-samd/boards/datum_light/pins.c +++ b/ports/atmel-samd/boards/datum_light/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, @@ -31,4 +31,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/datum_weather/pins.c b/ports/atmel-samd/boards/datum_weather/pins.c index 46d062025f..19934f84c9 100644 --- a/ports/atmel-samd/boards/datum_weather/pins.c +++ b/ports/atmel-samd/boards/datum_weather/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, @@ -30,4 +30,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/dynalora_usb/pins.c b/ports/atmel-samd/boards/dynalora_usb/pins.c index 34da109622..d9965d665b 100644 --- a/ports/atmel-samd/boards/dynalora_usb/pins.c +++ b/ports/atmel-samd/boards/dynalora_usb/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA01) }, @@ -40,4 +40,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c index b7b99068c7..68ee80b307 100644 --- a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c +++ b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, @@ -43,4 +43,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c index 8089588e9e..7978e6e738 100644 --- a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c +++ b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, @@ -50,4 +50,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/escornabot_makech/pins.c b/ports/atmel-samd/boards/escornabot_makech/pins.c index d8906c558c..ad771dcb8e 100644 --- a/ports/atmel-samd/boards/escornabot_makech/pins.c +++ b/ports/atmel-samd/boards/escornabot_makech/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // LEDs { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, @@ -59,4 +59,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c index 6273daef79..29b060e597 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/pins.c +++ b/ports/atmel-samd/boards/feather_m0_adalogger/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -51,4 +51,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m0_basic/pins.c b/ports/atmel-samd/boards/feather_m0_basic/pins.c index aea2f5a756..bc10b1ca12 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/pins.c +++ b/ports/atmel-samd/boards/feather_m0_basic/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -32,4 +32,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m0_express/pins.c b/ports/atmel-samd/boards/feather_m0_express/pins.c index 5d28f01a0c..af33c3e0a0 100644 --- a/ports/atmel-samd/boards/feather_m0_express/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -33,4 +33,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c index 5d28f01a0c..af33c3e0a0 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -33,4 +33,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c index fcbe9f1f3a..d2e1ade1a0 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/pins.c +++ b/ports/atmel-samd/boards/feather_m0_rfm69/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -35,4 +35,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c index 04f6a49ad6..ef678fa399 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -35,4 +35,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m0_supersized/pins.c b/ports/atmel-samd/boards/feather_m0_supersized/pins.c index 5d28f01a0c..af33c3e0a0 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/pins.c +++ b/ports/atmel-samd/boards/feather_m0_supersized/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -33,4 +33,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m4_can/pins.c b/ports/atmel-samd/boards/feather_m4_can/pins.c index 2a4526b56d..8389b7e2ef 100644 --- a/ports/atmel-samd/boards/feather_m4_can/pins.c +++ b/ports/atmel-samd/boards/feather_m4_can/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, @@ -66,4 +66,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/feather_m4_express/pins.c b/ports/atmel-samd/boards/feather_m4_express/pins.c index 3e8f0a02e2..7484c2ef8e 100644 --- a/ports/atmel-samd/boards/feather_m4_express/pins.c +++ b/ports/atmel-samd/boards/feather_m4_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, @@ -58,4 +58,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/fluff_m0/pins.c b/ports/atmel-samd/boards/fluff_m0/pins.c index 2bd0ea8d26..7f11505281 100644 --- a/ports/atmel-samd/boards/fluff_m0/pins.c +++ b/ports/atmel-samd/boards/fluff_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, @@ -42,4 +42,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/gemma_m0/pins.c b/ports/atmel-samd/boards/gemma_m0/pins.c index 92545017fd..d89704c7d0 100644 --- a/ports/atmel-samd/boards/gemma_m0/pins.c +++ b/ports/atmel-samd/boards/gemma_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // pad 1 { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA05) }, @@ -29,4 +29,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c index 73f3b7ff01..b6ce037649 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c +++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c @@ -16,8 +16,8 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, @@ -151,4 +151,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_PA20) }, { MP_ROM_QSTR(MP_QSTR_SDIO_DATA), MP_ROM_PTR(&sdio_data_tuple) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/hallowing_m0_express/pins.c b/ports/atmel-samd/boards/hallowing_m0_express/pins.c index 18a256ef26..842832c392 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/pins.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/pins.c @@ -3,8 +3,8 @@ #include "supervisor/board.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, @@ -68,4 +68,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/hallowing_m4_express/pins.c b/ports/atmel-samd/boards/hallowing_m4_express/pins.c index 50b7c1109b..9c5a007be0 100644 --- a/ports/atmel-samd/boards/hallowing_m4_express/pins.c +++ b/ports/atmel-samd/boards/hallowing_m4_express/pins.c @@ -2,8 +2,8 @@ #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, @@ -72,4 +72,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/huntercat_nfc/pins.c b/ports/atmel-samd/boards/huntercat_nfc/pins.c index b0e1aa886c..ce0b112ede 100644 --- a/ports/atmel-samd/boards/huntercat_nfc/pins.c +++ b/ports/atmel-samd/boards/huntercat_nfc/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA00) }, @@ -29,4 +29,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c index 840f934e1c..848e8a9732 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, @@ -48,4 +48,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c index e87bc70e9c..89cf966b11 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -46,4 +46,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/kicksat-sprite/pins.c b/ports/atmel-samd/boards/kicksat-sprite/pins.c index d0d6478f30..aaf48fd43c 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/pins.c +++ b/ports/atmel-samd/boards/kicksat-sprite/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA07) }, @@ -37,4 +37,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c b/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c index baf8ead6ca..b9c1034a73 100644 --- a/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c +++ b/ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -50,4 +50,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/matrixportal_m4/pins.c b/ports/atmel-samd/boards/matrixportal_m4/pins.c index f33cdebe16..09957ba682 100644 --- a/ports/atmel-samd/boards/matrixportal_m4/pins.c +++ b/ports/atmel-samd/boards/matrixportal_m4/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -61,4 +61,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/meowmeow/pins.c b/ports/atmel-samd/boards/meowmeow/pins.c index 35dc87582a..1c86b3149c 100644 --- a/ports/atmel-samd/boards/meowmeow/pins.c +++ b/ports/atmel-samd/boards/meowmeow/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA03) }, @@ -48,4 +48,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/metro_m0_express/pins.c b/ports/atmel-samd/boards/metro_m0_express/pins.c index 39556b889d..d8f970ac35 100644 --- a/ports/atmel-samd/boards/metro_m0_express/pins.c +++ b/ports/atmel-samd/boards/metro_m0_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -36,4 +36,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c b/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c index 24e53357d0..4af8871ff0 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -54,4 +54,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/metro_m4_express/pins.c b/ports/atmel-samd/boards/metro_m4_express/pins.c index 7297e8e24b..1f96885cc1 100644 --- a/ports/atmel-samd/boards/metro_m4_express/pins.c +++ b/ports/atmel-samd/boards/metro_m4_express/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/mini_sam_m4/pins.c b/ports/atmel-samd/boards/mini_sam_m4/pins.c index a10f8a0a90..0f7a3adb24 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/pins.c +++ b/ports/atmel-samd/boards/mini_sam_m4/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -41,4 +41,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/monster_m4sk/pins.c b/ports/atmel-samd/boards/monster_m4sk/pins.c index 6de4686f04..8de94e2d70 100644 --- a/ports/atmel-samd/boards/monster_m4sk/pins.c +++ b/ports/atmel-samd/boards/monster_m4sk/pins.c @@ -3,8 +3,8 @@ #include "supervisor/board.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_HEADPHONE_LEFT), MP_ROM_PTR(&pin_PA02) }, @@ -52,4 +52,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, { MP_ROM_QSTR(MP_QSTR_RIGHT_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c index 5267c44ad8..ed573fde1b 100644 --- a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c +++ b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA08) }, @@ -39,4 +39,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c index 344cd8e0bc..e75e6e9208 100644 --- a/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c +++ b/ports/atmel-samd/boards/ndgarage_ndbit6_v2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA04) }, @@ -36,4 +36,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c b/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c index 14ed7e4472..b48764518e 100644 --- a/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c @@ -1,11 +1,11 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_TOUCH1), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_TOUCH2), MP_ROM_PTR(&pin_PA07) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/nfc_copy_cat/pins.c b/ports/atmel-samd/boards/nfc_copy_cat/pins.c index 17a382440b..cbf25ce4e9 100644 --- a/ports/atmel-samd/boards/nfc_copy_cat/pins.c +++ b/ports/atmel-samd/boards/nfc_copy_cat/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA02) }, // IRQ { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA06) }, // IN_A @@ -19,4 +19,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PA18) }, // CS { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/openbook_m4/pins.c b/ports/atmel-samd/boards/openbook_m4/pins.c index 72285a1727..750c687bb2 100644 --- a/ports/atmel-samd/boards/openbook_m4/pins.c +++ b/ports/atmel-samd/boards/openbook_m4/pins.c @@ -3,8 +3,8 @@ #include "supervisor/board.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, // A0 = audio right channel { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // A1 = audio left channel @@ -77,4 +77,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pewpew10/pins.c b/ports/atmel-samd/boards/pewpew10/pins.c index 5506c5ecbe..fd36aba00f 100644 --- a/ports/atmel-samd/boards/pewpew10/pins.c +++ b/ports/atmel-samd/boards/pewpew10/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Pins for internal use. { MP_ROM_QSTR(MP_QSTR__R1), MP_ROM_PTR(&pin_PA05) }, @@ -50,4 +50,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pewpew_m4/pins.c b/ports/atmel-samd/boards/pewpew_m4/pins.c index fa5c27aef9..ad0685e896 100644 --- a/ports/atmel-samd/boards/pewpew_m4/pins.c +++ b/ports/atmel-samd/boards/pewpew_m4/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LEFT), MP_ROM_PTR(&pin_PB23) }, { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_RIGHT), MP_ROM_PTR(&pin_PB22) }, @@ -44,4 +44,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/picoplanet/pins.c b/ports/atmel-samd/boards/picoplanet/pins.c index 9e2d24745d..5a6abec10a 100644 --- a/ports/atmel-samd/boards/picoplanet/pins.c +++ b/ports/atmel-samd/boards/picoplanet/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, @@ -37,4 +37,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) } }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pybadge/pins.c b/ports/atmel-samd/boards/pybadge/pins.c index 54920cdc37..eb8aa81241 100644 --- a/ports/atmel-samd/boards/pybadge/pins.c +++ b/ports/atmel-samd/boards/pybadge/pins.c @@ -3,8 +3,8 @@ #include "supervisor/board.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -71,4 +71,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pycubed/pins.c b/ports/atmel-samd/boards/pycubed/pins.c index 6f1d9b2d4e..8beb8d0cd6 100644 --- a/ports/atmel-samd/boards/pycubed/pins.c +++ b/ports/atmel-samd/boards/pycubed/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, @@ -54,4 +54,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pycubed_mram/pins.c b/ports/atmel-samd/boards/pycubed_mram/pins.c index 6f1d9b2d4e..8beb8d0cd6 100644 --- a/ports/atmel-samd/boards/pycubed_mram/pins.c +++ b/ports/atmel-samd/boards/pycubed_mram/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, @@ -54,4 +54,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pygamer/pins.c b/ports/atmel-samd/boards/pygamer/pins.c index c184f95221..f81b306a48 100644 --- a/ports/atmel-samd/boards/pygamer/pins.c +++ b/ports/atmel-samd/boards/pygamer/pins.c @@ -3,8 +3,8 @@ #include "supervisor/board.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -76,4 +76,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c index 68f87e29aa..d2c7589ee1 100644 --- a/ports/atmel-samd/boards/pyportal/pins.c +++ b/ports/atmel-samd/boards/pyportal/pins.c @@ -6,8 +6,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), MP_ROM_PTR(&pin_PA02) }, @@ -82,4 +82,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pyportal_titano/pins.c b/ports/atmel-samd/boards/pyportal_titano/pins.c index 68f87e29aa..d2c7589ee1 100644 --- a/ports/atmel-samd/boards/pyportal_titano/pins.c +++ b/ports/atmel-samd/boards/pyportal_titano/pins.c @@ -6,8 +6,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), MP_ROM_PTR(&pin_PA02) }, @@ -82,4 +82,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/pyruler/pins.c b/ports/atmel-samd/boards/pyruler/pins.c index 6a8e43f10c..e8f8d64b3d 100644 --- a/ports/atmel-samd/boards/pyruler/pins.c +++ b/ports/atmel-samd/boards/pyruler/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA08) }, @@ -52,4 +52,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/qtpy_m0/pins.c b/ports/atmel-samd/boards/qtpy_m0/pins.c index 67f44fd81a..0796838437 100644 --- a/ports/atmel-samd/boards/qtpy_m0/pins.c +++ b/ports/atmel-samd/boards/qtpy_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, @@ -48,4 +48,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c b/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c index 67f44fd81a..0796838437 100644 --- a/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c +++ b/ports/atmel-samd/boards/qtpy_m0_haxpress/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, @@ -48,4 +48,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/robohatmm1_m4/pins.c b/ports/atmel-samd/boards/robohatmm1_m4/pins.c index 31ce1ffc4b..f56c0ed8a8 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/pins.c +++ b/ports/atmel-samd/boards/robohatmm1_m4/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" // Version 2.4 -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // SERVO Pins { MP_ROM_QSTR(MP_QSTR_SERVO1), MP_ROM_PTR(&pin_PA18) }, @@ -90,4 +90,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sam32/pins.c b/ports/atmel-samd/boards/sam32/pins.c index 67ad175ac0..68e4a13e95 100644 --- a/ports/atmel-samd/boards/sam32/pins.c +++ b/ports/atmel-samd/boards/sam32/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_PB09) }, @@ -65,4 +65,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PA06) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/same54_xplained/pins.c b/ports/atmel-samd/boards/same54_xplained/pins.c index 40db108eff..8df2ec5371 100644 --- a/ports/atmel-samd/boards/same54_xplained/pins.c +++ b/ports/atmel-samd/boards/same54_xplained/pins.c @@ -16,8 +16,8 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PD08) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PD09) }, @@ -116,4 +116,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_PA20) }, { MP_ROM_QSTR(MP_QSTR_SDIO_DATA), MP_ROM_PTR(&sdio_data_tuple) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c b/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c index c6ea5a7a54..0ff0f7b1ba 100644 --- a/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c +++ b/ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog pins @@ -113,4 +113,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/seeeduino_xiao/pins.c b/ports/atmel-samd/boards/seeeduino_xiao/pins.c index 947b825b1f..9dd92c8c40 100644 --- a/ports/atmel-samd/boards/seeeduino_xiao/pins.c +++ b/ports/atmel-samd/boards/seeeduino_xiao/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog pins @@ -53,4 +53,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sensebox_mcu/pins.c b/ports/atmel-samd/boards/sensebox_mcu/pins.c index f4ac58f02d..1f8633b177 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/pins.c +++ b/ports/atmel-samd/boards/sensebox_mcu/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog pins @@ -70,4 +70,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/serpente/pins.c b/ports/atmel-samd/boards/serpente/pins.c index fcd6588378..96d566e7a3 100644 --- a/ports/atmel-samd/boards/serpente/pins.c +++ b/ports/atmel-samd/boards/serpente/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA05) }, @@ -38,4 +38,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/shirtty/pins.c b/ports/atmel-samd/boards/shirtty/pins.c index 06418160cf..4ed0d37c67 100644 --- a/ports/atmel-samd/boards/shirtty/pins.c +++ b/ports/atmel-samd/boards/shirtty/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, @@ -35,4 +35,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c index bbcfd08d20..4753b42a81 100644 --- a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c +++ b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, @@ -55,4 +55,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/snekboard/pins.c b/ports/atmel-samd/boards/snekboard/pins.c index 2fa371a132..46269bf7d3 100644 --- a/ports/atmel-samd/boards/snekboard/pins.c +++ b/ports/atmel-samd/boards/snekboard/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB08) }, @@ -33,4 +33,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c b/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c index 4d45ae9cab..9557abac93 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, @@ -17,4 +17,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c index f67e348104..dee32d5f1a 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, @@ -44,4 +44,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) } }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c index f67e348104..dee32d5f1a 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, @@ -44,4 +44,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) } }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c b/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c index 1fece3b14f..de81d035d8 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c b/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c index 6552a936c6..d4c3ca6bb5 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd21_dev/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog pins @@ -57,4 +57,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c index 8281bc3790..5808af6e07 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog pins @@ -50,4 +50,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c b/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c index bfda5a0692..5a35a60e82 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd51_micromod/pins.c @@ -27,8 +27,8 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). @@ -222,4 +222,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, // CircuitPython SPI { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, // CircuitPython UART }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c index 021c7f78bb..be2b09848c 100644 --- a/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c +++ b/ports/atmel-samd/boards/sparkfun_samd51_thing_plus/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -36,4 +36,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c b/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c index 0397cd2cc1..b854982500 100644 --- a/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c +++ b/ports/atmel-samd/boards/stackrduino_m0_pro/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, @@ -46,4 +46,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/stringcar_m0_express/pins.c b/ports/atmel-samd/boards/stringcar_m0_express/pins.c index 8de45254cc..3e2a74786f 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/pins.c +++ b/ports/atmel-samd/boards/stringcar_m0_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_PIEZO), MP_ROM_PTR(&pin_PA08) }, @@ -22,4 +22,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/trellis_m4_express/pins.c b/ports/atmel-samd/boards/trellis_m4_express/pins.c index f408dc0dfc..9668d3b0dc 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/pins.c +++ b/ports/atmel-samd/boards/trellis_m4_express/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -46,4 +46,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/trinket_m0/pins.c b/ports/atmel-samd/boards/trinket_m0/pins.c index 4127439375..f9db8ff994 100644 --- a/ports/atmel-samd/boards/trinket_m0/pins.c +++ b/ports/atmel-samd/boards/trinket_m0/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) }, @@ -37,4 +37,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c index 4127439375..f9db8ff994 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) }, @@ -37,4 +37,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/uartlogger2/pins.c b/ports/atmel-samd/boards/uartlogger2/pins.c index 24e53357d0..4af8871ff0 100644 --- a/ports/atmel-samd/boards/uartlogger2/pins.c +++ b/ports/atmel-samd/boards/uartlogger2/pins.c @@ -3,8 +3,8 @@ // This mapping only includes functional names because pins broken // out on connectors are labeled with their MCU name available from // microcontroller.pin. -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -54,4 +54,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/uchip/pins.c b/ports/atmel-samd/boards/uchip/pins.c index 0ed3219ccc..7e5c9ceb27 100644 --- a/ports/atmel-samd/boards/uchip/pins.c +++ b/ports/atmel-samd/boards/uchip/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_BOOST_EN), MP_ROM_PTR(&pin_PA14) }, @@ -40,4 +40,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/ugame10/pins.c b/ports/atmel-samd/boards/ugame10/pins.c index 5795f88d6b..0a221644f3 100644 --- a/ports/atmel-samd/boards/ugame10/pins.c +++ b/ports/atmel-samd/boards/ugame10/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_X), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_O), MP_ROM_PTR(&pin_PA01) }, @@ -30,4 +30,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c b/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c index 162917d797..03b78aab7b 100644 --- a/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c +++ b/ports/atmel-samd/boards/winterbloom_big_honking_button/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_HONK_OUT), MP_ROM_PTR(&pin_PA02) }, @@ -11,4 +11,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { /* Board revisions starting from v5 have PB10 tied to ground. */ { MP_ROM_QSTR(MP_QSTR_V5), MP_ROM_PTR(&pin_PB10) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/winterbloom_sol/pins.c b/ports/atmel-samd/boards/winterbloom_sol/pins.c index 771963670a..c00390f95f 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/pins.c +++ b/ports/atmel-samd/boards/winterbloom_sol/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) }, @@ -14,4 +14,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB03) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/xinabox_cc03/pins.c b/ports/atmel-samd/boards/xinabox_cc03/pins.c index 23b66bf34a..61a2b0b139 100644 --- a/ports/atmel-samd/boards/xinabox_cc03/pins.c +++ b/ports/atmel-samd/boards/xinabox_cc03/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, @@ -19,4 +19,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/atmel-samd/boards/xinabox_cs11/pins.c b/ports/atmel-samd/boards/xinabox_cs11/pins.c index 468c250a46..a3d804397f 100644 --- a/ports/atmel-samd/boards/xinabox_cs11/pins.c +++ b/ports/atmel-samd/boards/xinabox_cs11/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, @@ -19,4 +19,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/cxd56/boards/spresense/pins.c b/ports/cxd56/boards/spresense/pins.c index 90f545013e..f3b6571a1e 100644 --- a/ports/cxd56/boards/spresense/pins.c +++ b/ports/cxd56/boards/spresense/pins.c @@ -40,7 +40,7 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { }; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_UART2_RXD) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_UART2_TXD) }, diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c index 07b6a5a87c..6d0167f5c2 100644 --- a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, @@ -63,4 +63,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c index 570249e96f..54b9051d73 100644 --- a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c @@ -2,8 +2,8 @@ #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, @@ -72,4 +72,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/adafruit_funhouse/pins.c b/ports/esp32s2/boards/adafruit_funhouse/pins.c index e71d300c85..1904150f35 100644 --- a/ports/esp32s2/boards/adafruit_funhouse/pins.c +++ b/ports/esp32s2/boards/adafruit_funhouse/pins.c @@ -2,8 +2,8 @@ #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO21) }, @@ -50,4 +50,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c index 18626b4d26..79b1feb40c 100644 --- a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c +++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c @@ -2,8 +2,8 @@ #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, @@ -58,4 +58,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_GPIO9) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c b/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c index c16077df0b..4c393b4f85 100644 --- a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c +++ b/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, @@ -67,4 +67,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c index 736df1baae..ee43af23df 100644 --- a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c +++ b/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/artisense_rd00/pins.c b/ports/esp32s2/boards/artisense_rd00/pins.c index 264b508e68..5833513d35 100644 --- a/ports/esp32s2/boards/artisense_rd00/pins.c +++ b/ports/esp32s2/boards/artisense_rd00/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO2) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c b/ports/esp32s2/boards/atmegazero_esp32s2/pins.c index 37fa9a8e4a..76dde3b583 100644 --- a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c +++ b/ports/esp32s2/boards/atmegazero_esp32s2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -79,4 +79,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/crumpspace_crumps2/pins.c b/ports/esp32s2/boards/crumpspace_crumps2/pins.c index 4e88d2ebb1..157ff2b8fc 100644 --- a/ports/esp32s2/boards/crumpspace_crumps2/pins.c +++ b/ports/esp32s2/boards/crumpspace_crumps2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -52,4 +52,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/electroniccats_bastwifi/pins.c b/ports/esp32s2/boards/electroniccats_bastwifi/pins.c index 4d5fdf0c8d..fdd4cd83c4 100644 --- a/ports/esp32s2/boards/electroniccats_bastwifi/pins.c +++ b/ports/esp32s2/boards/electroniccats_bastwifi/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO0) }, @@ -63,4 +63,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c b/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c index 1b4779f374..52ac5b53b3 100644 --- a/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c +++ b/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c @@ -24,7 +24,9 @@ STATIC const mp_rom_obj_tuple_t lcd_data_tuple = { } }; -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, { MP_ROM_QSTR(MP_QSTR_LCD_RS), MP_ROM_PTR(&pin_GPIO38) }, @@ -75,4 +77,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_BCLK_DAC2), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c b/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c index 1ec7ee599a..dff98ceeb9 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c +++ b/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c @@ -16,8 +16,8 @@ STATIC const mp_rom_obj_tuple_t camera_data_tuple = { } }; -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -141,4 +141,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_BCLK_DAC2), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/espressif_kaluga_1/pins.c b/ports/esp32s2/boards/espressif_kaluga_1/pins.c index c294067f58..c31a9fe42e 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1/pins.c +++ b/ports/esp32s2/boards/espressif_kaluga_1/pins.c @@ -16,8 +16,8 @@ STATIC const mp_rom_obj_tuple_t camera_data_tuple = { } }; -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -141,4 +141,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_AUDIO_I2S1_BCLK_DAC2), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c b/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c index e4e4c09220..08a9e08f32 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c index e4e4c09220..08a9e08f32 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c b/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c index e4e4c09220..08a9e08f32 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c +++ b/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c b/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c index e4e4c09220..08a9e08f32 100644 --- a/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c +++ b/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/pins.c b/ports/esp32s2/boards/gravitech_cucumber_m/pins.c index fe4420386c..a5dd609287 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_m/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_m/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -48,4 +48,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c b/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c index b40daa2211..a1bb25cf14 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -51,4 +51,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/pins.c b/ports/esp32s2/boards/gravitech_cucumber_r/pins.c index fe4420386c..a5dd609287 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_r/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_r/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -48,4 +48,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c b/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c index b40daa2211..a1bb25cf14 100644 --- a/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c +++ b/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -51,4 +51,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c index bab3cfb669..08e0fe0174 100644 --- a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c +++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -59,4 +59,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // Battery Sense { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO9) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/esp32s2/boards/lolin_s2_mini/pins.c index 5c469879f9..2bde684679 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/pins.c +++ b/ports/esp32s2/boards/lolin_s2_mini/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + // S2 Mini Board bottom, right, top-bottom // GPIO0-GPIO14: broken out as a bloc on ESP32-S2FN4R2 SoC // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON @@ -80,4 +82,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) },// GPIO46 */ }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/microdev_micro_s2/pins.c b/ports/esp32s2/boards/microdev_micro_s2/pins.c index e0607cea66..2f0bacc491 100644 --- a/ports/esp32s2/boards/microdev_micro_s2/pins.c +++ b/ports/esp32s2/boards/microdev_micro_s2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -67,4 +67,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c index d0dcc37958..427950b09e 100644 --- a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c +++ b/ports/esp32s2/boards/morpheans_morphesp-240/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -57,4 +57,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c b/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c index e4e4c09220..08a9e08f32 100644 --- a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c +++ b/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c b/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c index e4e4c09220..08a9e08f32 100644 --- a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c +++ b/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c index 0b6f27c13e..f547c28def 100644 --- a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c +++ b/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO21) }, @@ -13,4 +13,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/pins.c b/ports/esp32s2/boards/targett_module_clip_wroom/pins.c index 736df1baae..ee43af23df 100644 --- a/ports/esp32s2/boards/targett_module_clip_wroom/pins.c +++ b/ports/esp32s2/boards/targett_module_clip_wroom/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c index 736df1baae..ee43af23df 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c +++ b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { // { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c index 73b4c5c892..66657b2f4f 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, @@ -101,4 +101,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c index b2e58cc118..61bf1397a9 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO0) }, @@ -116,4 +118,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c index b61c5099d0..29ceffcdd5 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, @@ -99,4 +99,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c b/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c index 3fbfe36c98..d428e7c3c5 100644 --- a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO0) }, @@ -91,4 +91,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/litex/boards/fomu/pins.c b/ports/litex/boards/fomu/pins.c index 8bab4257a5..9744f5c73e 100644 --- a/ports/litex/boards/fomu/pins.c +++ b/ports/litex/boards/fomu/pins.c @@ -1,11 +1,11 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_TOUCH1), MP_ROM_PTR(&pin_TOUCH1) }, { MP_ROM_QSTR(MP_QSTR_TOUCH2), MP_ROM_PTR(&pin_TOUCH2) }, { MP_ROM_QSTR(MP_QSTR_TOUCH3), MP_ROM_PTR(&pin_TOUCH3) }, { MP_ROM_QSTR(MP_QSTR_TOUCH4), MP_ROM_PTR(&pin_TOUCH4) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/feather_m7_1011/pins.c b/ports/mimxrt10xx/boards/feather_m7_1011/pins.c index 1dbe02a5ce..4bd7f13668 100644 --- a/ports/mimxrt10xx/boards/feather_m7_1011/pins.c +++ b/ports/mimxrt10xx/boards/feather_m7_1011/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_11) }, @@ -45,4 +45,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c b/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c index 6536e52ff8..0014c4a145 100644 --- a/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c +++ b/ports/mimxrt10xx/boards/feather_mimxrt1011/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_14) }, @@ -54,4 +54,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c b/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c index 93a6d06c2d..2a333f7f46 100644 --- a/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c +++ b/ports/mimxrt10xx/boards/feather_mimxrt1062/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B0_13) }, @@ -47,4 +47,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c index e45b23003f..a78004d143 100644 --- a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_10) }, @@ -61,4 +61,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c index bdd15f75f9..d93a7de9f2 100644 --- a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B1_09) }, @@ -84,4 +84,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c index 27a0ad701b..9febc3dae8 100644 --- a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c +++ b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B1_07) }, @@ -128,4 +128,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c index 5f867932fb..0198ed90cc 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c +++ b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Analog { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_02) }, @@ -56,4 +56,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/teensy40/pins.c b/ports/mimxrt10xx/boards/teensy40/pins.c index 37d2a56178..2188c6c0e2 100644 --- a/ports/mimxrt10xx/boards/teensy40/pins.c +++ b/ports/mimxrt10xx/boards/teensy40/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // With USB on left. Bottom edge. { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, @@ -113,4 +113,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/teensy41/pins.c b/ports/mimxrt10xx/boards/teensy41/pins.c index fdf1116c2f..32e57b1a14 100644 --- a/ports/mimxrt10xx/boards/teensy41/pins.c +++ b/ports/mimxrt10xx/boards/teensy41/pins.c @@ -2,8 +2,8 @@ #include "supervisor/board.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // With USB on left. Bottom edge. { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) }, @@ -146,4 +146,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/nrf/boards/ADM_B_NRF52840_1/pins.c b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c index 5045e29e8c..6829bb9b59 100644 --- a/ports/nrf/boards/ADM_B_NRF52840_1/pins.c +++ b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P0_02) }, diff --git a/ports/nrf/boards/TG-Watch/pins.c b/ports/nrf/boards/TG-Watch/pins.c index 1a7ca117c5..0b2fe07aaa 100644 --- a/ports/nrf/boards/TG-Watch/pins.c +++ b/ports/nrf/boards/TG-Watch/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS /* default ports */ diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c index c96a5c6fcf..bdc110cba3 100644 --- a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_00) }, { MP_ROM_QSTR(MP_QSTR_MICROPHONE_DATA), MP_ROM_PTR(&pin_P0_27) }, diff --git a/ports/nrf/boards/aramcon2_badge/pins.c b/ports/nrf/boards/aramcon2_badge/pins.c index f46afcfe9f..43d2f7f1c6 100644 --- a/ports/nrf/boards/aramcon2_badge/pins.c +++ b/ports/nrf/boards/aramcon2_badge/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_UP_BUTTON), MP_ROM_PTR(&pin_P0_31) }, { MP_ROM_QSTR(MP_QSTR_LEFT_BUTTON), MP_ROM_PTR(&pin_P0_29) }, diff --git a/ports/nrf/boards/aramcon_badge_2019/pins.c b/ports/nrf/boards/aramcon_badge_2019/pins.c index 8fc2a482b7..789fd0dfee 100644 --- a/ports/nrf/boards/aramcon_badge_2019/pins.c +++ b/ports/nrf/boards/aramcon_badge_2019/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_LEFT_BUTTON), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_MIDDLE_BUTTON), MP_ROM_PTR(&pin_P0_29) }, diff --git a/ports/nrf/boards/arduino_nano_33_ble/pins.c b/ports/nrf/boards/arduino_nano_33_ble/pins.c index faef38a5f4..ca420dedf9 100644 --- a/ports/nrf/boards/arduino_nano_33_ble/pins.c +++ b/ports/nrf/boards/arduino_nano_33_ble/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_12) }, diff --git a/ports/nrf/boards/bastble/pins.c b/ports/nrf/boards/bastble/pins.c index f6bbdd2c6b..d6df28aebe 100644 --- a/ports/nrf/boards/bastble/pins.c +++ b/ports/nrf/boards/bastble/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_11) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_10) }, diff --git a/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c b/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c index 9095b8cb35..87ab3c4f98 100644 --- a/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c +++ b/ports/nrf/boards/bless_dev_board_multi_sensor/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_02) }, // TP7 { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P0_03) }, // TP6 diff --git a/ports/nrf/boards/bluemicro840/pins.c b/ports/nrf/boards/bluemicro840/pins.c index 9651faa6b8..368af9ea9c 100644 --- a/ports/nrf/boards/bluemicro840/pins.c +++ b/ports/nrf/boards/bluemicro840/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/circuitplayground_bluefruit/pins.c b/ports/nrf/boards/circuitplayground_bluefruit/pins.c index 74f7be2fe1..9c0b815a5b 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/pins.c +++ b/ports/nrf/boards/circuitplayground_bluefruit/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_AUDIO), MP_ROM_PTR(&pin_P0_26) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_26) }, diff --git a/ports/nrf/boards/clue_nrf52840_express/pins.c b/ports/nrf/boards/clue_nrf52840_express/pins.c index 654c0d414a..648477da4a 100644 --- a/ports/nrf/boards/clue_nrf52840_express/pins.c +++ b/ports/nrf/boards/clue_nrf52840_express/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/electronut_labs_blip/pins.c b/ports/nrf/boards/electronut_labs_blip/pins.c index 02fb2e4600..6018ca5d55 100644 --- a/ports/nrf/boards/electronut_labs_blip/pins.c +++ b/ports/nrf/boards/electronut_labs_blip/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/electronut_labs_papyr/pins.c b/ports/nrf/boards/electronut_labs_papyr/pins.c index ae06cd3339..6bfaf2f92d 100644 --- a/ports/nrf/boards/electronut_labs_papyr/pins.c +++ b/ports/nrf/boards/electronut_labs_papyr/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_06) }, diff --git a/ports/nrf/boards/feather_bluefruit_sense/pins.c b/ports/nrf/boards/feather_bluefruit_sense/pins.c index fd28834563..d0414c6b73 100644 --- a/ports/nrf/boards/feather_bluefruit_sense/pins.c +++ b/ports/nrf/boards/feather_bluefruit_sense/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/nrf/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c index 99f7cf4a09..89757e3b5c 100644 --- a/ports/nrf/boards/feather_nrf52840_express/pins.c +++ b/ports/nrf/boards/feather_nrf52840_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/nrf/boards/hiibot_bluefi/pins.c b/ports/nrf/boards/hiibot_bluefi/pins.c index d9774ff3a3..2a18996c72 100644 --- a/ports/nrf/boards/hiibot_bluefi/pins.c +++ b/ports/nrf/boards/hiibot_bluefi/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_28) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/ikigaisense_vita/pins.c b/ports/nrf/boards/ikigaisense_vita/pins.c index 25463eba36..4c8a45b9c9 100644 --- a/ports/nrf/boards/ikigaisense_vita/pins.c +++ b/ports/nrf/boards/ikigaisense_vita/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_29) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P1_15) }, diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c b/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c index 7bcb0d9eca..2895fc4684 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_30) }, diff --git a/ports/nrf/boards/makerdiary_m60_keyboard/pins.c b/ports/nrf/boards/makerdiary_m60_keyboard/pins.c index c1b4d34d02..9ee0a06e59 100644 --- a/ports/nrf/boards/makerdiary_m60_keyboard/pins.c +++ b/ports/nrf/boards/makerdiary_m60_keyboard/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_R1), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_R2), MP_ROM_PTR(&pin_P0_06) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c index cc066645b3..b5b88001b4 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_m2_devkit/pins.c @@ -4,7 +4,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c index 3005f6df27..00d2b394ac 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c index d4593194f8..da09d86648 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/metro_nrf52840_express/pins.c b/ports/nrf/boards/metro_nrf52840_express/pins.c index 46a2c9259b..44e353ea4a 100644 --- a/ports/nrf/boards/metro_nrf52840_express/pins.c +++ b/ports/nrf/boards/metro_nrf52840_express/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/nrf/boards/microbit_v2/pins.c b/ports/nrf/boards/microbit_v2/pins.c index d92939baf1..f7de5c33e4 100644 --- a/ports/nrf/boards/microbit_v2/pins.c +++ b/ports/nrf/boards/microbit_v2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_02) }, // RING0 { MP_ROM_QSTR(MP_QSTR_P1), MP_ROM_PTR(&pin_P0_03) }, // RING1 diff --git a/ports/nrf/boards/nice_nano/pins.c b/ports/nrf/boards/nice_nano/pins.c index b69b4acd46..1a8dcc101f 100644 --- a/ports/nrf/boards/nice_nano/pins.c +++ b/ports/nrf/boards/nice_nano/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/ohs2020_badge/pins.c b/ports/nrf/boards/ohs2020_badge/pins.c index 4ef7a37c69..ab895289d0 100644 --- a/ports/nrf/boards/ohs2020_badge/pins.c +++ b/ports/nrf/boards/ohs2020_badge/pins.c @@ -2,7 +2,7 @@ #include "shared-module/displayio/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_25) }, { MP_ROM_QSTR(MP_QSTR_MICROPHONE_DATA), MP_ROM_PTR(&pin_P0_28) }, diff --git a/ports/nrf/boards/particle_argon/pins.c b/ports/nrf/boards/particle_argon/pins.c index c094fa6120..6619266914 100644 --- a/ports/nrf/boards/particle_argon/pins.c +++ b/ports/nrf/boards/particle_argon/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/particle_boron/pins.c b/ports/nrf/boards/particle_boron/pins.c index 2cb87272e8..c16a1e8763 100644 --- a/ports/nrf/boards/particle_boron/pins.c +++ b/ports/nrf/boards/particle_boron/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/particle_xenon/pins.c b/ports/nrf/boards/particle_xenon/pins.c index 58d0856c44..4b0529be24 100644 --- a/ports/nrf/boards/particle_xenon/pins.c +++ b/ports/nrf/boards/particle_xenon/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/pca10056/pins.c b/ports/nrf/boards/pca10056/pins.c index 8bb4f4bf57..75b1c3ea6c 100644 --- a/ports/nrf/boards/pca10056/pins.c +++ b/ports/nrf/boards/pca10056/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0_00), MP_ROM_PTR(&pin_P0_00) }, { MP_ROM_QSTR(MP_QSTR_P0_01), MP_ROM_PTR(&pin_P0_01) }, diff --git a/ports/nrf/boards/pca10059/pins.c b/ports/nrf/boards/pca10059/pins.c index 883bc23927..f49a290ddf 100644 --- a/ports/nrf/boards/pca10059/pins.c +++ b/ports/nrf/boards/pca10059/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, diff --git a/ports/nrf/boards/pca10100/pins.c b/ports/nrf/boards/pca10100/pins.c index 11c34bcae7..68d87d0e8f 100644 --- a/ports/nrf/boards/pca10100/pins.c +++ b/ports/nrf/boards/pca10100/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, diff --git a/ports/nrf/boards/pitaya_go/pins.c b/ports/nrf/boards/pitaya_go/pins.c index 6778763274..40ab422714 100644 --- a/ports/nrf/boards/pitaya_go/pins.c +++ b/ports/nrf/boards/pitaya_go/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_AIN1), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c b/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c index 472d0832cb..0af7e6c6c1 100644 --- a/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c +++ b/ports/nrf/boards/raytac_mdbt50q-db-40/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, diff --git a/ports/nrf/boards/raytac_mdbt50q-rx/pins.c b/ports/nrf/boards/raytac_mdbt50q-rx/pins.c index 6add442df3..04ee337543 100644 --- a/ports/nrf/boards/raytac_mdbt50q-rx/pins.c +++ b/ports/nrf/boards/raytac_mdbt50q-rx/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_P0_15) }, diff --git a/ports/nrf/boards/simmel/pins.c b/ports/nrf/boards/simmel/pins.c index eaf0b4ec09..6ff455b628 100644 --- a/ports/nrf/boards/simmel/pins.c +++ b/ports/nrf/boards/simmel/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SPI_CSN), MP_ROM_PTR(&pin_P1_06) }, { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_P1_04) }, diff --git a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c index 4d4599f166..13a63831e8 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_micromod/pins.c @@ -28,7 +28,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c index 096e7aa2d3..a1e2e27cc1 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_15) }, // D1/TX { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_17) }, // D0/RX diff --git a/ports/nrf/boards/teknikio_bluebird/pins.c b/ports/nrf/boards/teknikio_bluebird/pins.c index d34b468971..3e05773b12 100644 --- a/ports/nrf/boards/teknikio_bluebird/pins.c +++ b/ports/nrf/boards/teknikio_bluebird/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, diff --git a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c index 43c850fc85..af26f8e71e 100644 --- a/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c +++ b/ports/nrf/boards/tinkeringtech_scoutmakes_azul/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_05) }, diff --git a/ports/nrf/boards/warmbit_bluepixel/pins.c b/ports/nrf/boards/warmbit_bluepixel/pins.c index 919b91164d..667eb31b72 100644 --- a/ports/nrf/boards/warmbit_bluepixel/pins.c +++ b/ports/nrf/boards/warmbit_bluepixel/pins.c @@ -1,6 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_29) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_31) }, diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c index 4143c9cd15..6afba676b4 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, @@ -35,4 +35,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c index f890677859..37ae364dc7 100644 --- a/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_itsybitsy_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, @@ -43,4 +43,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c index e24b623dac..470d4d5371 100644 --- a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_KEY1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_KEY2), MP_ROM_PTR(&pin_GPIO2) }, @@ -49,4 +49,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c b/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c index 9cd031b36e..98fd7cf56f 100644 --- a/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c +++ b/ports/raspberrypi/boards/adafruit_qt2040_trinkey/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO16) }, @@ -16,4 +16,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c index 5fe9ea01a3..0d6835f48b 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO29) }, @@ -48,4 +48,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c index 5ebce34a9b..dd77b185b0 100644 --- a/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c +++ b/ports/raspberrypi/boards/arduino_nano_rp2040_connect/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, @@ -62,4 +62,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c b/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c index 5f6b31a872..8aedbc928d 100644 --- a/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c +++ b/ports/raspberrypi/boards/cytron_maker_pi_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, @@ -61,4 +61,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_VBATT), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pins.c b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pins.c index 8ba0551250..36f33df443 100644 --- a/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_encoderpad_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_KEY1), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_KEY2), MP_ROM_PTR(&pin_GPIO18) }, @@ -36,4 +36,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) } }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c index fefaf70cfd..1244f63a22 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c +++ b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_R0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_G0), MP_ROM_PTR(&pin_GPIO1) }, @@ -51,4 +51,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c b/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c index d7b0b8f76c..c150de3044 100644 --- a/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_keybow2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, @@ -35,4 +35,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/pimoroni_pga2040/pins.c b/ports/raspberrypi/boards/pimoroni_pga2040/pins.c index 7d911385d7..40975c5ad2 100644 --- a/ports/raspberrypi/boards/pimoroni_pga2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_pga2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, @@ -46,4 +46,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c index fb2da2e598..577b29736e 100644 --- a/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picolipo_16mb/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, @@ -51,4 +51,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c index fb2da2e598..577b29736e 100644 --- a/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picolipo_4mb/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, @@ -51,4 +51,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/pins.c b/ports/raspberrypi/boards/pimoroni_picosystem/pins.c index 30587015b2..bfd51225fb 100644 --- a/ports/raspberrypi/boards/pimoroni_picosystem/pins.c +++ b/ports/raspberrypi/boards/pimoroni_picosystem/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, @@ -42,4 +42,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c index e7ba2a1546..5f685a3528 100644 --- a/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_plasma2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_SW_B), MP_ROM_PTR(&pin_GPIO13) }, @@ -40,4 +40,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c b/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c index d0c4bb9947..6dd90a90bb 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, @@ -34,4 +34,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c index e848ec53df..87ff27fa46 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c +++ b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, @@ -51,4 +51,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c index ac3ccdb340..2c8a217a25 100644 --- a/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_micromod_rp2040/pins.c @@ -27,8 +27,8 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the // peripheral name (e.g. "I2C" instead of "I2C0"). @@ -221,4 +221,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, // CircuitPython SPI { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, // CircuitPython UART }; -MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c index 9235963d65..bc7cb048de 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, @@ -43,4 +43,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c index 84b137fefc..a72342c86a 100644 --- a/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c +++ b/ports/raspberrypi/boards/sparkfun_thing_plus_rp2040/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" -STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Left side breakouts, top-to-bottom, as labeled { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, @@ -62,4 +62,4 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { 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); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/stm/boards/espruino_pico/pins.c b/ports/stm/boards/espruino_pico/pins.c index 7627146c96..fbd288e179 100644 --- a/ports/stm/boards/espruino_pico/pins.c +++ b/ports/stm/boards/espruino_pico/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_B15), MP_ROM_PTR(&pin_PB15) }, { MP_ROM_QSTR(MP_QSTR_B14), MP_ROM_PTR(&pin_PB14) }, diff --git a/ports/stm/boards/espruino_wifi/pins.c b/ports/stm/boards/espruino_wifi/pins.c index b4a3a6f8b8..216d5b4213 100644 --- a/ports/stm/boards/espruino_wifi/pins.c +++ b/ports/stm/boards/espruino_wifi/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // P1 { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA00) }, diff --git a/ports/stm/boards/feather_stm32f405_express/pins.c b/ports/stm/boards/feather_stm32f405_express/pins.c index f7824ea93c..b039b0af0c 100644 --- a/ports/stm/boards/feather_stm32f405_express/pins.c +++ b/ports/stm/boards/feather_stm32f405_express/pins.c @@ -13,7 +13,7 @@ STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { }; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, diff --git a/ports/stm/boards/meowbit_v121/pins.c b/ports/stm/boards/meowbit_v121/pins.c index 20a9ab3d7c..3de558d07e 100644 --- a/ports/stm/boards/meowbit_v121/pins.c +++ b/ports/stm/boards/meowbit_v121/pins.c @@ -7,7 +7,7 @@ extern audiopwmio_pwmaudioout_obj_t board_buzz_obj; STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_PB04) }, { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_PB05) }, diff --git a/ports/stm/boards/nucleo_f746zg/pins.c b/ports/stm/boards/nucleo_f746zg/pins.c index 1fcc49c3cf..fdb9575b57 100644 --- a/ports/stm/boards/nucleo_f746zg/pins.c +++ b/ports/stm/boards/nucleo_f746zg/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/nucleo_f767zi/pins.c b/ports/stm/boards/nucleo_f767zi/pins.c index 57bd675efa..79de1f87a7 100644 --- a/ports/stm/boards/nucleo_f767zi/pins.c +++ b/ports/stm/boards/nucleo_f767zi/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/nucleo_h743zi_2/pins.c b/ports/stm/boards/nucleo_h743zi_2/pins.c index c56e4c69e5..e36b2dba86 100644 --- a/ports/stm/boards/nucleo_h743zi_2/pins.c +++ b/ports/stm/boards/nucleo_h743zi_2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/openmv_h7/pins.c b/ports/stm/boards/openmv_h7/pins.c index 99d677a3a6..c7f435cef5 100644 --- a/ports/stm/boards/openmv_h7/pins.c +++ b/ports/stm/boards/openmv_h7/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_PB15) }, { MP_ROM_QSTR(MP_QSTR_P1), MP_ROM_PTR(&pin_PB14) }, diff --git a/ports/stm/boards/pyb_nano_v2/pins.c b/ports/stm/boards/pyb_nano_v2/pins.c index d61c0b51f1..28742378de 100644 --- a/ports/stm/boards/pyb_nano_v2/pins.c +++ b/ports/stm/boards/pyb_nano_v2/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_Y10), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_Y9), MP_ROM_PTR(&pin_PA13) }, diff --git a/ports/stm/boards/pyboard_v11/pins.c b/ports/stm/boards/pyboard_v11/pins.c index ac7e43c9a7..9c4505d037 100644 --- a/ports/stm/boards/pyboard_v11/pins.c +++ b/ports/stm/boards/pyboard_v11/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_Y1), MP_ROM_PTR(&pin_PC06) }, { MP_ROM_QSTR(MP_QSTR_Y2), MP_ROM_PTR(&pin_PC07) }, diff --git a/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c b/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c index 8f06a784a4..c864ad4dd5 100644 --- a/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c +++ b/ports/stm/boards/sparkfun_stm32f405_micromod/pins.c @@ -27,7 +27,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // The SparkFun MicroMod spec uses a zero-based peripheral numbering scheme. // The 0th peripheral is the default and the "0" is omitted from the diff --git a/ports/stm/boards/stm32f411ce_blackpill/pins.c b/ports/stm/boards/stm32f411ce_blackpill/pins.c index 9d1ed63c59..b21ae0da5e 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/pins.c +++ b/ports/stm/boards/stm32f411ce_blackpill/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_B12), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_PB13) }, diff --git a/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c b/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c index 9d1ed63c59..b21ae0da5e 100644 --- a/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c +++ b/ports/stm/boards/stm32f411ce_blackpill_with_flash/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_B12), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_PB13) }, diff --git a/ports/stm/boards/stm32f411ve_discovery/pins.c b/ports/stm/boards/stm32f411ve_discovery/pins.c index 32e13753f3..680985856b 100644 --- a/ports/stm/boards/stm32f411ve_discovery/pins.c +++ b/ports/stm/boards/stm32f411ve_discovery/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // P1 { MP_ROM_QSTR(MP_QSTR_PC00), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/stm32f412zg_discovery/pins.c b/ports/stm/boards/stm32f412zg_discovery/pins.c index 26c930ccb6..8fc2fc0ce0 100644 --- a/ports/stm/boards/stm32f412zg_discovery/pins.c +++ b/ports/stm/boards/stm32f412zg_discovery/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_PE02), MP_ROM_PTR(&pin_PE02) }, { MP_ROM_QSTR(MP_QSTR_PE03), MP_ROM_PTR(&pin_PE03) }, diff --git a/ports/stm/boards/stm32f4_discovery/pins.c b/ports/stm/boards/stm32f4_discovery/pins.c index 2427e1ab53..a3301b3057 100644 --- a/ports/stm/boards/stm32f4_discovery/pins.c +++ b/ports/stm/boards/stm32f4_discovery/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // P1 { MP_ROM_QSTR(MP_QSTR_PC00), MP_ROM_PTR(&pin_PC00) }, diff --git a/ports/stm/boards/stm32f746g_discovery/pins.c b/ports/stm/boards/stm32f746g_discovery/pins.c index 3b12f108bd..8c0a41569b 100644 --- a/ports/stm/boards/stm32f746g_discovery/pins.c +++ b/ports/stm/boards/stm32f746g_discovery/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PF10) }, diff --git a/ports/stm/boards/thunderpack_v11/pins.c b/ports/stm/boards/thunderpack_v11/pins.c index 2f6c2a471f..b37e37825a 100644 --- a/ports/stm/boards/thunderpack_v11/pins.c +++ b/ports/stm/boards/thunderpack_v11/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_PA0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_PA1), MP_ROM_PTR(&pin_PA01) }, diff --git a/ports/stm/boards/thunderpack_v12/pins.c b/ports/stm/boards/thunderpack_v12/pins.c index cc49a8ce42..f106c8a26b 100644 --- a/ports/stm/boards/thunderpack_v12/pins.c +++ b/ports/stm/boards/thunderpack_v12/pins.c @@ -1,7 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_PA0), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_PA1), MP_ROM_PTR(&pin_PA01) }, diff --git a/shared-bindings/board/__init__.h b/shared-bindings/board/__init__.h index 27faa51ed1..837608fa9e 100644 --- a/shared-bindings/board/__init__.h +++ b/shared-bindings/board/__init__.h @@ -47,4 +47,8 @@ mp_obj_t common_hal_board_get_uart(void); mp_obj_t common_hal_board_create_uart(void); MP_DECLARE_CONST_FUN_OBJ_0(board_uart_obj); +#define CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS \ + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_board) }, \ + { MP_ROM_QSTR(MP_QSTR_board_id), MP_ROM_PTR(&board_module_id_obj) }, + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_BOARD___INIT___H From 2fc372b9e198182419f6ca62a97ca5af4bc18982 Mon Sep 17 00:00:00 2001 From: durapensa <50685483+durapensa@users.noreply.github.com> Date: Fri, 3 Sep 2021 15:10:22 -0400 Subject: [PATCH 362/418] Lolin S2 Mini - Apply suggestions from code review Co-authored-by: Scott Shawcroft --- ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h | 4 ---- ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk | 1 - 2 files changed, 5 deletions(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h index d7df2c80f5..f8223f674d 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h @@ -29,8 +29,6 @@ #define MICROPY_HW_BOARD_NAME "S2Mini" #define MICROPY_HW_MCU_NAME "ESP32S2-S2FN4R2" // from Wemos MP -// #define MICROPY_HW_NEOPIXEL (&pin_GPIO1) // no NeoPixel on S2 Mini -// #define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO15) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") @@ -43,5 +41,3 @@ #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11) // no SPI labels on S2 Mini, def from Wemos MP #define DEFAULT_SPI_BUS_MISO (&pin_GPIO9) // no SPI labels on S2 Mini, def from Wemos MP -// #define DEFAULT_UART_BUS_RX (&pin_GPIO44) // no UART pins on S2 Mini -// #define DEFAULT_UART_BUS_TX (&pin_GPIO43) // no UART pins on S2 Mini diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk index d95bd2fec1..e4c7aacadd 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk @@ -14,7 +14,6 @@ CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB -# CIRCUITPY_BITBANG_NEOPIXEL = 1 # no NeoPixel on S2 Mini # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel From 7e10785ec70749e14531b8dd69be61f81524e7d9 Mon Sep 17 00:00:00 2001 From: Durapensa Date: Fri, 3 Sep 2021 16:46:50 -0400 Subject: [PATCH 363/418] Lolin S2 Mini - fix EOF issue caught by pre-commit --- ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h index f8223f674d..18d8234c72 100644 --- a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h +++ b/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h @@ -40,4 +40,3 @@ #define DEFAULT_SPI_BUS_SCK (&pin_GPIO7) // no SPI labels on S2 Mini, def from Wemos MP #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11) // no SPI labels on S2 Mini, def from Wemos MP #define DEFAULT_SPI_BUS_MISO (&pin_GPIO9) // no SPI labels on S2 Mini, def from Wemos MP - From ff807f8f19a991c1aba7504b8ba17023ee738fa6 Mon Sep 17 00:00:00 2001 From: Kamil Tomaszewski Date: Sat, 4 Sep 2021 11:17:39 +0200 Subject: [PATCH 364/418] Fix incorrect use of allocate_memory() --- main.c | 2 +- shared-bindings/supervisor/__init__.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index d6ed269809..d024717beb 100755 --- a/main.c +++ b/main.c @@ -236,7 +236,7 @@ STATIC void cleanup_after_vm(supervisor_allocation* heap, mp_obj_t exception) { size_t traceback_len = 0; mp_print_t print_count = {&traceback_len, count_strn}; mp_obj_print_exception(&print_count, exception); - prev_traceback_allocation = allocate_memory(align32_size(traceback_len + 1), false, true); + prev_traceback_allocation = allocate_memory(align32_size(traceback_len + 1), false, false); // Empirically, this never fails in practice - even when the heap is totally filled up // with single-block-sized objects referenced by a root pointer, exiting the VM frees // up several hundred bytes, sufficient for the traceback (which tends to be shortened diff --git a/shared-bindings/supervisor/__init__.c b/shared-bindings/supervisor/__init__.c index a9b99ed87d..8c581c9364 100644 --- a/shared-bindings/supervisor/__init__.c +++ b/shared-bindings/supervisor/__init__.c @@ -195,7 +195,7 @@ STATIC mp_obj_t supervisor_set_next_code_file(size_t n_args, const mp_obj_t *pos const char *filename = mp_obj_str_get_data(args.filename.u_obj, &len); free_memory(next_code_allocation); if (options != 0 || len != 0) { - next_code_allocation = allocate_memory(align32_size(sizeof(next_code_info_t) + len + 1), false, true); + next_code_allocation = allocate_memory(align32_size(sizeof(next_code_info_t) + len + 1), false, false); if (next_code_allocation == NULL) { m_malloc_fail(sizeof(next_code_info_t) + len + 1); } From b1e71aecb08fd94a596c9654b2c5c54dda8b4d6e Mon Sep 17 00:00:00 2001 From: hexthat Date: Fri, 3 Sep 2021 22:45:22 +0000 Subject: [PATCH 365/418] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (1021 of 1021 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 49 +++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index cfc5290654..1d05df7b4e 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-23 14:19+0000\n" -"Last-Translator: Jeff Epler \n" +"PO-Revision-Date: 2021-09-04 23:34+0000\n" +"Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" "MIME-Version: 1.0\n" @@ -49,6 +49,9 @@ msgid "" "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" "=== " msgstr "" +"\n" +"zhān tiē mó shì; Ctrl-C qǔ xiāo, Ctrl-D wán chéngh\n" +"=== " #: py/obj.c msgid " File \"%q\"" @@ -85,11 +88,11 @@ msgstr "" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" -msgstr "" +msgstr "%q hé %q bāo hán chóng fù yǐn jiǎo" #: shared-bindings/microcontroller/Pin.c msgid "%q contains duplicate pins" -msgstr "" +msgstr "%q bāo hán chóng fù de yǐn jiǎo" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" @@ -114,11 +117,11 @@ msgstr "%q suǒyǐn bìxū shì zhěngshù, ér bùshì %s" #: py/argcheck.c msgid "%q length must be %d-%d" -msgstr "" +msgstr "%q cháng dù bì xū wéi %d-%d" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" -msgstr "" +msgstr "%q cháng dù bì xū >= 1" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -162,7 +165,7 @@ msgstr "%q bì xū zài %d hé %d zhī jiān" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" -msgstr "" +msgstr "%q bì xū shì 2 de gōng lǜ" #: py/argcheck.c msgid "%q must of type %q" @@ -187,7 +190,7 @@ msgstr "%q() cǎiyòng %d wèizhì cānshù, dàn gěi chū %d" #: shared-bindings/usb_hid/Device.c msgid "%q, %q, and %q must all be the same length" -msgstr "" +msgstr "%q, %q, hé %q bì xū cháng dù xiāng tóng" #: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #, c-format @@ -341,7 +344,7 @@ msgstr "'yield' wàibù gōngnéng" #: shared-module/vectorio/VectorShape.c msgid "(x,y) integers required" -msgstr "" +msgstr "(x,y) suǒ xū de zhěng shù" #: py/compile.c msgid "*x must be assignment target" @@ -516,7 +519,7 @@ msgstr "dāng VM bú yùn xíng shí, cháng shì duī fēn pèi." #: ports/raspberrypi/audio_dma.c msgid "Audio conversion not implemented" -msgstr "" +msgstr "wèi shí xiàn yīn pín zhuǎn huàn" #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" @@ -1256,7 +1259,7 @@ msgstr "Jiāmì bùzú" #: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" -msgstr "" +msgstr "nèi bù yīn pín huǎn chōng qì tài xiǎo" #: ports/stm/common-hal/busio/UART.c msgid "Internal define error" @@ -1551,12 +1554,12 @@ msgstr "quē shǎo dì yī zǔ yǐn jiǎo. zhǐ lìng %d shè zhì yǐn jiǎo" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format msgid "Missing jmp_pin. Instruction %d jumps on pin" -msgstr "" +msgstr "shī zōng de jmp_pin. zhǐ lìng %d zài yǐn jiǎo shàng tiào yuè" #: shared-module/usb_hid/Device.c #, c-format msgid "More than %d report ids not supported" -msgstr "" +msgstr "chāo guò %d bào gào bù zhī chí de ID" #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." @@ -2637,7 +2640,7 @@ msgstr "zhóu tài cháng" #: shared-bindings/bitmaptools/__init__.c msgid "background value out of range of target" -msgstr "" +msgstr "bèi jǐng zhí tuō lí mù biāo fàn wéi" #: py/builtinevex.c msgid "bad compile mode" @@ -2859,7 +2862,7 @@ msgstr "wúfǎ cóng shǒudòng zìduàn guīgé qiēhuàn dào zìdòng zìduà #: extmod/ulab/code/ndarray.c msgid "cannot assign new shape" -msgstr "" +msgstr "wú fǎ fēn pèi xīn xíng zhuàng" #: extmod/ulab/code/ndarray_operators.c msgid "cannot cast output with casting rule" @@ -3166,7 +3169,7 @@ msgstr "wénjiàn bìxū shì zài zì jié móshì xià dǎkāi de wénjiàn" #: shared-bindings/traceback/__init__.c msgid "file write is not available" -msgstr "" +msgstr "wén jiàn biān xiě bù kě yòng" #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" @@ -3457,7 +3460,7 @@ msgstr "wú xiào element_size %d, bì xū shì, 1, 2, huò 4" #: shared-bindings/traceback/__init__.c msgid "invalid exception" -msgstr "" +msgstr "wú xiào lì wài" #: extmod/modframebuf.c msgid "invalid format" @@ -3498,7 +3501,7 @@ msgstr "wúxiào de hàomǎ yǔfǎ" #: py/objexcept.c shared-bindings/traceback/__init__.c msgid "invalid traceback" -msgstr "" +msgstr "wú xiào zhuī sù" #: py/objtype.c msgid "issubclass() arg 1 must be a class" @@ -3626,7 +3629,7 @@ msgstr "nèi cún shì tú: cháng dù bú shì xiàng mù huà de bèi shù" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "mode must be complete, or reduced" -msgstr "" +msgstr "mó shì bì xū wán chéng huò jiǎn shǎo" #: py/builtinimport.c msgid "module not found" @@ -3868,11 +3871,11 @@ msgstr "cāozuò shǔ bùnéng yīqǐ guǎngbò" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "operation is defined for 2D arrays only" -msgstr "" +msgstr "jǐn zhēn duì 2D zhèn liè dìng yì cāo zuò" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "operation is defined for ndarrays only" -msgstr "" +msgstr "cāo zuò jǐn dìng yì wéi ndarrays" #: extmod/ulab/code/ndarray.c msgid "operation is implemented for 1D Boolean arrays only" @@ -4042,7 +4045,7 @@ msgstr "duìliè yìchū" #: lib/utils/pyexec.c msgid "raw REPL; CTRL-B to exit\n" -msgstr "" +msgstr "yuán shǐ REPL; CTRL-B tuì chū\n" #: py/parse.c msgid "raw f-strings are not implemented" @@ -4451,7 +4454,7 @@ msgstr "Zhí bìxū fúhé %d zì jié" #: shared-bindings/bitmaptools/__init__.c msgid "value out of range of target" -msgstr "" +msgstr "zhí fàn wéi wài de mù biāo" #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" From 10706e93760526ac38202315dfcff861a089e1ea Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 5 Sep 2021 18:40:58 -0500 Subject: [PATCH 366/418] add frozen libraries to the board info --- tools/build_board_info.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 62a33e1dd2..eed136c545 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -109,11 +109,20 @@ def get_board_mapping(): extensions = extension_by_port[port] extensions = extension_by_board.get(board_path.name, extensions) aliases = aliases_by_board.get(board_path.name, []) + frozen_libraries = [] + with open(os.path.join(board_path, "mpconfigboard.mk")) as mpconfig: + frozen_lines = [ + line for line in mpconfig if line.startswith("FROZEN_MPY_DIRS") + ] + frozen_libraries.extend( + [line[line.rfind("/") + 1 :].strip() for line in frozen_lines] + ) boards[board_id] = { "port": port, "extensions": extensions, "download_count": 0, "aliases": aliases, + "frozen_libraries": frozen_libraries, } for alias in aliases: boards[alias] = { @@ -300,6 +309,7 @@ def generate_download_info(): "modules": support_matrix[alias], "languages": languages, "extensions": board_info["extensions"], + "frozen_libraries": board_info["frozen_libraries"], } current_info[alias]["downloads"] = alias_info["download_count"] current_info[alias]["versions"].append(new_version) From 791937b149626a4459af5b980b17cfc68c7f40be Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 5 Sep 2021 18:42:05 -0500 Subject: [PATCH 367/418] black formatted 'build_board_info.py' --- tools/build_board_info.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index eed136c545..ba6a44600f 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -139,7 +139,9 @@ def get_version_info(): version = None sha = git("rev-parse", "--short", "HEAD").stdout.decode("utf-8") try: - version = git("describe", "--tags", "--exact-match").stdout.decode("utf-8").strip() + version = ( + git("describe", "--tags", "--exact-match").stdout.decode("utf-8").strip() + ) except sh.ErrorReturnCode_128: # No exact match pass @@ -206,7 +208,9 @@ def create_pr(changes, updated, git_info, user): ) create_branch = {"ref": "refs/heads/" + branch_name, "sha": commit_sha} - response = github.post("/repos/{}/circuitpython-org/git/refs".format(user), json=create_branch) + response = github.post( + "/repos/{}/circuitpython-org/git/refs".format(user), json=create_branch + ) if not response.ok and response.json()["message"] != "Reference already exists": print("unable to create branch") print(response.text) @@ -220,7 +224,8 @@ def create_pr(changes, updated, git_info, user): } response = github.put( - "/repos/{}/circuitpython-org/contents/_data/files.json".format(user), json=update_file + "/repos/{}/circuitpython-org/contents/_data/files.json".format(user), + json=update_file, ) if not response.ok: print("unable to post new file") @@ -269,7 +274,9 @@ def generate_download_info(): languages = get_languages() - support_matrix = shared_bindings_matrix.support_matrix_by_board(use_branded_name=False) + support_matrix = shared_bindings_matrix.support_matrix_by_board( + use_branded_name=False + ) new_stable = "-" not in new_tag From cb586a40180b2f8ca01619033bdee4c22116c556 Mon Sep 17 00:00:00 2001 From: sommersoft Date: Sun, 5 Sep 2021 18:42:05 -0500 Subject: [PATCH 368/418] black formatted 'build_board_info.py' --- tools/build_board_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index eed136c545..1769e84e84 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -220,7 +220,8 @@ def create_pr(changes, updated, git_info, user): } response = github.put( - "/repos/{}/circuitpython-org/contents/_data/files.json".format(user), json=update_file + "/repos/{}/circuitpython-org/contents/_data/files.json".format(user), + json=update_file, ) if not response.ok: print("unable to post new file") From 86221b9895207dccf0667de119533b8ec94b43d2 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Mon, 6 Sep 2021 16:28:00 +0530 Subject: [PATCH 369/418] revert localization of repl messages --- lib/utils/pyexec.c | 6 +++--- locale/circuitpython.pot | 39 ++++++++++++++------------------------- py/builtinhelp.c | 2 +- 3 files changed, 18 insertions(+), 29 deletions(-) diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index a272eefbcb..fe52fc645b 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -370,7 +370,7 @@ STATIC int pyexec_raw_repl_process_char(int c) { } goto reset; } - serial_write_compressed(translate("raw REPL; CTRL-B to exit\n")); + mp_hal_stdout_tx_str("raw REPL; CTRL-B to exit\r\n"); goto reset; } else if (c == CHAR_CTRL_B) { // change to friendly REPL @@ -469,7 +469,7 @@ STATIC int pyexec_friendly_repl_process_char(int c) { return PYEXEC_FORCED_EXIT; } else if (ret == CHAR_CTRL_E) { // paste mode - serial_write_compressed(translate("\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\n=== ")); + mp_hal_stdout_tx_str("\r\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\r\n=== "); vstr_reset(MP_STATE_VM(repl_line)); repl.paste_mode = true; return 0; @@ -545,7 +545,7 @@ int pyexec_raw_repl(void) { vstr_init(&line, 32); raw_repl_reset: - serial_write_compressed(translate("raw REPL; CTRL-B to exit\n")); + mp_hal_stdout_tx_str("raw REPL; CTRL-B to exit\r\n"); for (;;) { vstr_reset(&line); diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 12b42cddf7..61cec6f617 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -35,13 +35,6 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -400,6 +393,9 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -623,10 +619,10 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -786,7 +782,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "" @@ -879,12 +875,12 @@ msgstr "" msgid "DAC already in use" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1828,11 +1824,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3655,7 +3646,7 @@ msgid "no module named '%q'" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3928,6 +3919,7 @@ msgstr "" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3948,6 +3940,7 @@ msgstr "" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3981,10 +3974,6 @@ msgstr "" msgid "queue overflow" msgstr "" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/py/builtinhelp.c b/py/builtinhelp.c index 8590c4beea..35bd3d3bca 100644 --- a/py/builtinhelp.c +++ b/py/builtinhelp.c @@ -131,7 +131,7 @@ STATIC void mp_help_print_modules(void) { #if MICROPY_ENABLE_EXTERNAL_IMPORT // let the user know there may be other modules available from the filesystem - mp_printf(MP_PYTHON_PRINTER, "%S", translate("Plus any modules on the filesystem\n")); + serial_write_compressed(translate("Plus any modules on the filesystem\n")); #endif } #endif From 8a023b04caf23b3b4b117ebc80df7e173e4ab2e1 Mon Sep 17 00:00:00 2001 From: Kamil Tomaszewski Date: Mon, 6 Sep 2021 08:46:16 +0200 Subject: [PATCH 370/418] Update TinyUSB --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tinyusb b/lib/tinyusb index 831a45f14b..582e5dbac5 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 831a45f14bcc833d536cab39bef61cc67533fa73 +Subproject commit 582e5dbac53aa2ac7c24249712081833986b3f27 From d2d0bd289f32bf2525bb05c5bfe443c92c631337 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 6 Sep 2021 21:23:17 -0400 Subject: [PATCH 371/418] Fix RP2040 I2S: always copy to output buffer --- ports/raspberrypi/audio_dma.c | 141 +++++++----------- .../common-hal/audiobusio/I2SOut.c | 13 +- 2 files changed, 66 insertions(+), 88 deletions(-) diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index 7850f09cdf..b7e5a0db44 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -49,92 +49,74 @@ void audio_dma_reset(void) { } -STATIC void audio_dma_convert_samples( - audio_dma_t *dma, - uint8_t *input, uint32_t input_length, - uint8_t *available_output_buffer, uint32_t available_output_buffer_length, - uint8_t **output, uint32_t *output_length) { - +STATIC size_t audio_dma_convert_samples(audio_dma_t *dma, uint8_t *input, uint32_t input_length, uint8_t *output, uint32_t output_length) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" - // Check whether a conversion is necessary - if (dma->signed_to_unsigned || - dma->unsigned_to_signed || - dma->sample_spacing > 1 || - (dma->sample_resolution != dma->output_resolution)) { + uint32_t output_length_used = input_length / dma->sample_spacing; - // Must convert. - // Write the conversion into the passed-in output buffer - *output = available_output_buffer; - *output_length = input_length / dma->sample_spacing; + if (output_length_used > output_length) { + mp_raise_RuntimeError(translate("Internal audio buffer too small")); + } - if (*output_length > available_output_buffer_length) { + uint32_t out_i = 0; + if (dma->sample_resolution <= 8 && dma->output_resolution > 8) { + // reading bytes, writing 16-bit words, so output buffer will be bigger. + + output_length_used = output_length * 2; + if (output_length_used > output_length) { mp_raise_RuntimeError(translate("Internal audio buffer too small")); } - uint32_t out_i = 0; - if (dma->sample_resolution <= 8 && dma->output_resolution > 8) { - // reading bytes, writing 16-bit words, so output buffer will be bigger. + size_t shift = dma->output_resolution - dma->sample_resolution; - *output_length = *output_length * 2; - if (*output_length > available_output_buffer_length) { - mp_raise_RuntimeError(translate("Internal audio buffer too small")); + for (uint32_t i = 0; i < input_length; i += dma->sample_spacing) { + if (dma->signed_to_unsigned) { + ((uint16_t *)output)[out_i] = ((uint16_t)((int8_t *)input)[i] + 0x80) << shift; + } else if (dma->unsigned_to_signed) { + ((int16_t *)output)[out_i] = ((int16_t)((uint8_t *)input)[i] - 0x80) << shift; + } else { + ((uint16_t *)output)[out_i] = ((uint16_t)((uint8_t *)input)[i]) << shift; } - - size_t shift = dma->output_resolution - dma->sample_resolution; - - for (uint32_t i = 0; i < input_length; i += dma->sample_spacing) { - if (dma->signed_to_unsigned) { - ((uint16_t *)*output)[out_i] = ((uint16_t)((int8_t *)input)[i] + 0x80) << shift; - } else if (dma->unsigned_to_signed) { - ((int16_t *)*output)[out_i] = ((int16_t)((uint8_t *)input)[i] - 0x80) << shift; + out_i += 1; + } + } else if (dma->sample_resolution <= 8 && dma->output_resolution <= 8) { + for (uint32_t i = 0; i < input_length; i += dma->sample_spacing) { + if (dma->signed_to_unsigned) { + ((uint8_t *)output)[out_i] = ((int8_t *)input)[i] + 0x80; + } else if (dma->unsigned_to_signed) { + ((int8_t *)output)[out_i] = ((uint8_t *)input)[i] - 0x80; + } else { + ((uint8_t *)output)[out_i] = ((uint8_t *)input)[i]; + } + out_i += 1; + } + } else if (dma->sample_resolution > 8 && dma->output_resolution > 8) { + size_t shift = 16 - dma->output_resolution; + for (uint32_t i = 0; i < input_length / 2; i += dma->sample_spacing) { + if (dma->signed_to_unsigned) { + ((uint16_t *)output)[out_i] = ((int16_t *)input)[i] + 0x8000; + } else if (dma->unsigned_to_signed) { + ((int16_t *)output)[out_i] = ((uint16_t *)input)[i] - 0x8000; + } else { + ((uint16_t *)output)[out_i] = ((uint16_t *)input)[i]; + } + if (dma->output_resolution < 16) { + if (dma->output_signed) { + ((int16_t *)output)[out_i] = ((int16_t *)output)[out_i] >> shift; } else { - ((uint16_t *)*output)[out_i] = ((uint16_t)((uint8_t *)input)[i]) << shift; + ((uint16_t *)output)[out_i] = ((uint16_t *)output)[out_i] >> shift; } - out_i += 1; } - } else if (dma->sample_resolution <= 8 && dma->output_resolution <= 8) { - for (uint32_t i = 0; i < input_length; i += dma->sample_spacing) { - if (dma->signed_to_unsigned) { - ((uint8_t *)*output)[out_i] = ((int8_t *)input)[i] + 0x80; - } else if (dma->unsigned_to_signed) { - ((int8_t *)*output)[out_i] = ((uint8_t *)input)[i] - 0x80; - } else { - ((uint8_t *)*output)[out_i] = ((uint8_t *)input)[i]; - } - out_i += 1; - } - } else if (dma->sample_resolution > 8 && dma->output_resolution > 8) { - size_t shift = 16 - dma->output_resolution; - for (uint32_t i = 0; i < input_length / 2; i += dma->sample_spacing) { - if (dma->signed_to_unsigned) { - ((uint16_t *)*output)[out_i] = ((int16_t *)input)[i] + 0x8000; - } else if (dma->unsigned_to_signed) { - ((int16_t *)*output)[out_i] = ((uint16_t *)input)[i] - 0x8000; - } else { - ((uint16_t *)*output)[out_i] = ((uint16_t *)input)[i]; - } - if (dma->output_resolution < 16) { - if (dma->output_signed) { - ((int16_t *)*output)[out_i] = ((int16_t *)*output)[out_i] >> shift; - } else { - ((uint16_t *)*output)[out_i] = ((uint16_t *)*output)[out_i] >> shift; - } - } - out_i += 1; - } - } else { - // (dma->sample_resolution > 8 && dma->output_resolution <= 8) - // Not currently used, but might be in the future. - mp_raise_RuntimeError(translate("Audio conversion not implemented")); + out_i += 1; } } else { - // No conversion necessary. Designate the input buffer as the output buffer. - *output = input; - *output_length = input_length; + // (dma->sample_resolution > 8 && dma->output_resolution <= 8) + // Not currently used, but might be in the future. + mp_raise_RuntimeError(translate("Audio conversion not implemented")); } #pragma GCC diagnostic pop + return output_length_used; } // buffer_idx is 0 or 1. @@ -154,21 +136,14 @@ STATIC void audio_dma_load_next_block(audio_dma_t *dma, size_t buffer_idx) { // Convert the sample format resolution and signedness, as necessary. // The input sample buffer is what was read from a file, Mixer, or a raw sample buffer. - // The output buffer is one of the DMA buffers (passed in), or if no conversion was done, - // the original sample buffer (to save copying). + // The output buffer is one of the DMA buffers (passed in). - // audio_dma_convert_samples() will write the converted samples into the given output - // buffer if necessary. If no conversion was needed, it will return the sample buffer - // as the output buffer. - uint8_t *output_buffer; - uint32_t output_buffer_length; + size_t output_length_used = audio_dma_convert_samples( + dma, sample_buffer, sample_buffer_length, + dma->buffer[buffer_idx], dma->buffer_length[buffer_idx]); - audio_dma_convert_samples(dma, sample_buffer, sample_buffer_length, - dma->buffer[buffer_idx], dma->buffer_length[buffer_idx], - &output_buffer, &output_buffer_length); - - dma_channel_set_read_addr(dma_channel, output_buffer, false /* trigger */); - dma_channel_set_trans_count(dma_channel, output_buffer_length / dma->output_size, false /* trigger */); + dma_channel_set_read_addr(dma_channel, dma->buffer[buffer_idx], false /* trigger */); + dma_channel_set_trans_count(dma_channel, output_length_used / dma->output_size, false /* trigger */); if (get_buffer_result == GET_BUFFER_DONE) { if (dma->loop) { @@ -180,7 +155,7 @@ STATIC void audio_dma_load_next_block(audio_dma_t *dma, size_t buffer_idx) { (c->al1_ctrl & ~DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS) | (dma_channel << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB); - if (output_buffer_length == 0 && + if (output_length_used == 0 && !dma_channel_is_busy(dma->channel[0]) && !dma_channel_is_busy(dma->channel[1])) { // No data has been read, and both DMA channels have now finished, so it's safe to stop. diff --git a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c index 0ac11c690f..da50e17f42 100644 --- a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c +++ b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -174,14 +174,19 @@ void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, uint16_t bits_per_sample_output = bits_per_sample * 2; size_t clocks_per_bit = 6; uint32_t frequency = bits_per_sample_output * audiosample_sample_rate(sample); - common_hal_rp2pio_statemachine_set_frequency(&self->state_machine, clocks_per_bit * frequency); - common_hal_rp2pio_statemachine_restart(&self->state_machine); - uint8_t channel_count = audiosample_channel_count(sample); if (channel_count > 2) { mp_raise_ValueError(translate("Too many channels in sample.")); } + common_hal_rp2pio_statemachine_set_frequency(&self->state_machine, clocks_per_bit * frequency); + common_hal_rp2pio_statemachine_restart(&self->state_machine); + + // On the RP2040, output registers are always written with a 32-bit write. + // If the write is 8 or 16 bits wide, the data will be replicated in upper bytes. + // See section 2.1.4 Narrow IO Register Writes in the RP2040 datasheet. + // This means that identical 16-bit audio data will be written in both halves of the incoming PIO + // FIFO register. Thus we get mono-to-stereo conversion for the I2S output for free. audio_dma_result result = audio_dma_setup_playback( &self->dma, sample, @@ -201,8 +206,6 @@ void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, mp_raise_RuntimeError(translate("Unable to allocate buffers for signed conversion")); } - // Turn on the state machine's clock. - self->playing = true; } From a874043e1b5bec7cef36885416f00c6cd377af3c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 7 Sep 2021 14:59:45 -0700 Subject: [PATCH 372/418] Selectively build boards based on changed files This uses a step output from the test job to set the build matrix for the board build jobs. The built boards depends on which files were changed. * Changes contained within ports/*/boards/ will build each board. * Changes contained within ports/* will build all boards from the port. * All other file changes will build all boards. All boards will be build for pushes in `adafruit/circuitpython` as well. A side-effect is that we no longer need to explicitly list the boards to build. It will automatically update as new folders are added. Related to #4009 --- .github/workflows/build.yml | 269 ++++----------------------------- tools/ci_changed_board_list.py | 94 ++++++++++++ tools/ci_new_boards_check.py | 57 ------- 3 files changed, 124 insertions(+), 296 deletions(-) create mode 100644 tools/ci_changed_board_list.py delete mode 100644 tools/ci_new_boards_check.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b490ae416..2971032018 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,10 @@ on: jobs: test: runs-on: ubuntu-20.04 + outputs: + arm-boards: ${{ steps.set-matrix.outputs.arm-boards }} + riscv-boards: ${{ steps.set-matrix.outputs.riscv-boards }} + xtensa-boards: ${{ steps.set-matrix.outputs.xtensa-boards }} steps: - name: Dump GitHub context env: @@ -43,9 +47,6 @@ jobs: run: | gcc --version python3 --version - - name: New boards check - run: python3 -u ci_new_boards_check.py - working-directory: tools - name: Duplicate USB VID/PID Check run: python3 -u -m tools.ci_check_duplicate_usb_vid_pid - name: Build and Validate Stubs @@ -139,6 +140,29 @@ jobs: # setup.py sdist was run by 'make stubs' [ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi" [ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/* + - uses: dorny/paths-filter@v2 + id: filter + with: + # Enable listing of files matching each filter. + # Paths to files will be available in `${FILTER_NAME}_files` output variable. + # Paths will be formatted as JSON array + list-files: json + + # Compare against this branch. (Ignored for PRs.) + base: ${{ github.ref }} + + # In this example all changed files are passed to the following action to do + # some custom processing. + filters: | + changed: + - '**' + - name: "Set boards to build" + id: set-matrix + working-directory: tools + env: + CHANGED_FILES: ${{ steps.filter.outputs.changed_files }} + run: | + python3 -u ci_changed_board_list.py mpy-cross-mac: runs-on: macos-10.15 @@ -203,205 +227,7 @@ jobs: strategy: fail-fast: false matrix: - board: - - "8086_commander" - - "ADM_B_NRF52840_1" - - "TG-Watch" - - "adafruit_feather_rp2040" - - "adafruit_itsybitsy_rp2040" - - "adafruit_led_glasses_nrf52840" - - "adafruit_macropad_rp2040" - - "adafruit_neokey_trinkey_m0" - - "adafruit_proxlight_trinkey_m0" - - "adafruit_qt2040_trinkey" - - "adafruit_qtpy_rp2040" - - "adafruit_rotary_trinkey_m0" - - "adafruit_slide_trinkey_m0" - - "aloriumtech_evo_m51" - - "aramcon2_badge" - - "aramcon_badge_2019" - - "arduino_mkr1300" - - "arduino_mkrzero" - - "arduino_nano_33_ble" - - "arduino_nano_33_iot" - - "arduino_nano_rp2040_connect" - - "arduino_zero" - - "bast_pro_mini_m0" - - "bastble" - - "bdmicro_vina_d21" - - "bdmicro_vina_d51" - - "bdmicro_vina_d51_pcb7" - - "bless_dev_board_multi_sensor" - - "blm_badge" - - "bluemicro840" - - "capablerobot_usbhub" - - "catwan_usbstick" - - "circuitbrains_basic_m0" - - "circuitbrains_deluxe_m4" - - "circuitplayground_bluefruit" - - "circuitplayground_express" - - "circuitplayground_express_crickit" - - "circuitplayground_express_displayio" - - "clue_nrf52840_express" - - "cp32-m4" - - "cp_sapling_m0" - - "cp_sapling_m0_revb" - - "cp_sapling_m0_spiflash" - - "cytron_maker_pi_rp2040" - - "datalore_ip_m4" - - "datum_distance" - - "datum_imu" - - "datum_light" - - "datum_weather" - - "dynalora_usb" - - "dynossat_edu_eps" - - "dynossat_edu_obc" - - "electronut_labs_blip" - - "electronut_labs_papyr" - - "escornabot_makech" - - "espruino_pico" - - "espruino_wifi" - - "feather_bluefruit_sense" - - "feather_m0_adalogger" - - "feather_m0_basic" - - "feather_m0_express" - - "feather_m0_express_crickit" - - "feather_m0_rfm69" - - "feather_m0_rfm9x" - - "feather_m0_supersized" - - "feather_m4_can" - - "feather_m4_express" - - "feather_m7_1011" - - "feather_mimxrt1011" - - "feather_mimxrt1062" - - "feather_nrf52840_express" - - "feather_stm32f405_express" - - "fluff_m0" - - "gemma_m0" - - "grandcentral_m4_express" - - "hallowing_m0_express" - - "hallowing_m4_express" - - "hiibot_bluefi" - - "huntercat_nfc" - - "ikigaisense_vita" - - "imxrt1010_evk" - - "imxrt1020_evk" - - "imxrt1060_evk" - - "itsybitsy_m0_express" - - "itsybitsy_m4_express" - - "itsybitsy_nrf52840_express" - - "jpconstantineau_encoderpad_rp2040" - - "kicksat-sprite" - - "loc_ber_m4_base_board" - - "makerdiary_m60_keyboard" - - "makerdiary_nrf52840_m2_devkit" - - "makerdiary_nrf52840_mdk" - - "makerdiary_nrf52840_mdk_usb_dongle" - - "matrixportal_m4" - - "meowbit_v121" - - "meowmeow" - - "metro_m0_express" - - "metro_m4_airlift_lite" - - "metro_m4_express" - - "metro_m7_1011" - - "metro_nrf52840_express" - - "microbit_v2" - - "mini_sam_m4" - - "monster_m4sk" - - "ndgarage_ndbit6" - - "ndgarage_ndbit6_v2" - - "neopixel_trinkey_m0" - - "nfc_copy_cat" - - "nice_nano" - - "nucleo_f746zg" - - "nucleo_f767zi" - - "nucleo_h743zi_2" - - "ohs2020_badge" - - "openbook_m4" - - "openmv_h7" - - "particle_argon" - - "particle_boron" - - "particle_xenon" - - "pca10056" - - "pca10059" - - "pca10100" - - "pewpew10" - - "pewpew_m4" - - "picoplanet" - - "pimoroni_interstate75" - - "pimoroni_keybow2040" - - "pimoroni_pga2040" - - "pimoroni_picolipo_16mb" - - "pimoroni_picolipo_4mb" - - "pimoroni_picosystem" - - "pimoroni_plasma2040" - - "pimoroni_tiny2040" - - "pitaya_go" - - "pyb_nano_v2" - - "pybadge" - - "pyboard_v11" - - "pycubed" - - "pycubed_mram" - - "pygamer" - - "pyportal" - - "pyportal_titano" - - "pyruler" - - "qtpy_m0" - - "qtpy_m0_haxpress" - - "raspberry_pi_pico" - - "raytac_mdbt50q-db-40" - - "raytac_mdbt50q-rx" - - "robohatmm1_m4" - - "sam32" - - "same54_xplained" - - "seeeduino_wio_terminal" - - "seeeduino_xiao" - - "sensebox_mcu" - - "serpente" - - "shirtty" - - "silicognition-m4-shim" - - "simmel" - - "snekboard" - - "sparkfun_lumidrive" - - "sparkfun_micromod_rp2040" - - "sparkfun_nrf52840_micromod" - - "sparkfun_nrf52840_mini" - - "sparkfun_pro_micro_rp2040" - - "sparkfun_qwiic_micro_no_flash" - - "sparkfun_qwiic_micro_with_flash" - - "sparkfun_redboard_turbo" - - "sparkfun_samd21_dev" - - "sparkfun_samd21_mini" - - "sparkfun_samd51_micromod" - - "sparkfun_samd51_thing_plus" - - "sparkfun_stm32f405_micromod" - - "sparkfun_thing_plus_rp2040" - - "spresense" - - "stackrduino_m0_pro" - - "stm32f411ce_blackpill" - - "stm32f411ce_blackpill_with_flash" - - "stm32f411ve_discovery" - - "stm32f412zg_discovery" - - "stm32f4_discovery" - - "stm32f746g_discovery" - - "stringcar_m0_express" - - "teensy40" - - "teensy41" - - "teknikio_bluebird" - - "thunderpack_v11" - - "thunderpack_v12" - - "tinkeringtech_scoutmakes_azul" - - "trellis_m4_express" - - "trinket_m0" - - "trinket_m0_haxpress" - - "uartlogger2" - - "uchip" - - "ugame10" - - "warmbit_bluepixel" - - "winterbloom_big_honking_button" - - "winterbloom_sol" - - "xinabox_cc03" - - "xinabox_cs11" + board: ${{ fromJSON(needs.test.outputs.arm-boards) }} steps: - name: Set up Python 3.8 @@ -451,8 +277,7 @@ jobs: strategy: fail-fast: false matrix: - board: - - "fomu" + board: ${{ fromJSON(needs.test.outputs.riscv-boards) }} steps: - name: Set up Python 3.8 @@ -501,41 +326,7 @@ jobs: strategy: fail-fast: false matrix: - board: - - "adafruit_feather_esp32s2_nopsram" - - "adafruit_feather_esp32s2_tftback_nopsram" - - "adafruit_funhouse" - - "adafruit_magtag_2.9_grayscale" - - "adafruit_metro_esp32s2" - - "ai_thinker_esp_12k_nodemcu" - - "artisense_rd00" - - "atmegazero_esp32s2" - - "crumpspace_crumps2" - - "electroniccats_bastwifi" - - "espressif_hmi_devkit_1" - - "espressif_kaluga_1" - - "espressif_kaluga_1.3" - - "espressif_saola_1_wroom" - - "espressif_saola_1_wrover" - - "franzininho_wifi_wroom" - - "franzininho_wifi_wrover" - - "gravitech_cucumber_m" - - "gravitech_cucumber_ms" - - "gravitech_cucumber_r" - - "gravitech_cucumber_rs" - - "lilygo_ttgo_t8_s2_st7789" - - "lolin_s2_mini" - - "microdev_micro_s2" - - "morpheans_morphesp-240" - - "muselab_nanoesp32_s2_wroom" - - "muselab_nanoesp32_s2_wrover" - - "odt_pixelwing_esp32_s2" - - "targett_module_clip_wroom" - - "targett_module_clip_wrover" - - "unexpectedmaker_feathers2" - - "unexpectedmaker_feathers2_neo" - - "unexpectedmaker_feathers2_prerelease" - - "unexpectedmaker_tinys2" + board: ${{ fromJSON(needs.test.outputs.xtensa-boards) }} steps: - name: Set up Python 3.8 diff --git a/tools/ci_changed_board_list.py b/tools/ci_changed_board_list.py new file mode 100644 index 0000000000..221b1ecaa3 --- /dev/null +++ b/tools/ci_changed_board_list.py @@ -0,0 +1,94 @@ +#! /usr/bin/env python3 + +"""This script is used in GitHub Actions to determine what boards are built + based on what files were changed. The base commit varies depending on the + event that triggered run. Pull request runs will compare to the base branch + while pushes will compare to the current ref. We override this for the + adafruit/circuitpython repo so we build all boards for pushes. + """ + +# SPDX-FileCopyrightText: 2021 Scott Shawcroft +# +# SPDX-License-Identifier: MIT + +import sys +import os +import json +import yaml +import re + +import build_board_info + +PORT_TO_ARCH = { + "atmel-samd": "arm", + "cxd56": "arm", + "esp32s2": "xtensa", + "litex": "riscv", + "mimxrt10xx": "arm", + "nrf": "arm", + "raspberrypi": "arm", + "stm": "arm", +} + +changed_files = json.loads(os.environ["CHANGED_FILES"]) +print("changed_files") +print(changed_files) + +# Get boards in json format +boards_info_json = build_board_info.get_board_mapping() +all_board_ids = set() +port_to_boards = {} +board_to_port = {} +for board_id in boards_info_json: + info = boards_info_json[board_id] + if info.get("alias", False): + continue + all_board_ids.add(board_id) + port = info["port"] + if port not in port_to_boards: + port_to_boards[port] = set() + port_to_boards[port].add(board_id) + board_to_port[board_id] = port + +# Build all boards if this is a push to an adafruit/circuitpython branch because we save the artifacts. +boards_to_build = all_board_ids +if not changed_files or ( + os.environ.get("GITHUB_EVENT_NAME", "") == "push" + and os.environ.get("GITHUB_REPOSITORY", "") == "adafruit/circuitpython" +): + print("Building all boards because of adafruit/circuitpython branch") +else: + print("Adding boards to build based on changed files") + boards_to_build = set() + board_pattern = re.compile(r"ports/\w+/boards/(\w+)/") + port_pattern = re.compile(r"ports/(\w+)/") + for p in changed_files: + # See if it is board specific + board_matches = board_pattern.search(p) + if board_matches: + board = board_matches.group(1) + boards_to_build.add(board) + continue + + # See if it is port specific + port_matches = port_pattern.search(p) + if port_matches: + port = port_matches.group(1) + boards_to_build.update(port_to_boards[port]) + continue + + # Otherwise build it all + boards_to_build = all_board_ids + break + +# Split boards by architecture. +print("Building boards:") +arch_to_boards = {"arm": [], "riscv": [], "xtensa": []} +for board in boards_to_build: + print(" ", board) + arch = PORT_TO_ARCH[board_to_port[board]] + arch_to_boards[arch].append(board) + +# Set the step outputs for each architecture +for arch in arch_to_boards: + print("::set-output name=" + arch + "-boards::" + json.dumps(sorted(arch_to_boards[arch]))) diff --git a/tools/ci_new_boards_check.py b/tools/ci_new_boards_check.py deleted file mode 100644 index 3b41c8d67b..0000000000 --- a/tools/ci_new_boards_check.py +++ /dev/null @@ -1,57 +0,0 @@ -#! /usr/bin/env python3 - -# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors) -# -# SPDX-License-Identifier: MIT - -import sys -import os -import json -import yaml - -import build_board_info - -workflow_file = ".github/workflows/build.yml" - -# Get boards in json format -boards_info_json = build_board_info.get_board_mapping() - -# Get all the boards out of the json format -info_boards = [ - board for board in boards_info_json.keys() if not boards_info_json[board].get("alias", False) -] - -# We need to know the path of the workflow file -base_path = os.path.dirname(__file__) -yml_path = os.path.abspath(os.path.join(base_path, "..", workflow_file)) - -# Loading board list based on build jobs in the workflow file. -ci_boards = [] -with open(yml_path, "r") as f: - workflow = yaml.safe_load(f) - -ok = True -for job in workflow["jobs"]: - if not job.startswith("build"): - continue - job_boards = workflow["jobs"][job]["strategy"]["matrix"]["board"] - if job_boards != sorted(job_boards): - print('Boards for job "{}" not sorted. Must be:'.format(job)) - print(' - "' + '"\n - "'.join(sorted(job_boards)) + '"') - ok = False - ci_boards.extend(job_boards) - -# All the travis_boards elements must be on info_boards -info_boards.sort() -ci_boards.sort() - -missing_boards = set(info_boards) - set(ci_boards) - -if missing_boards: - ok = False - print("Boards missing in {}:".format(workflow_file)) - for board in missing_boards: - print(board) - -if not ok: - sys.exit(1) From 3c8eca3ef9c3a92f21d74d15ba3ddcf66d381d1d Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 7 Sep 2021 18:23:19 -0400 Subject: [PATCH 373/418] Update frozen libraries for 7.0.0 --- frozen/Adafruit_CircuitPython_BLE | 2 +- frozen/Adafruit_CircuitPython_Display_Shapes | 2 +- frozen/Adafruit_CircuitPython_Display_Text | 2 +- frozen/Adafruit_CircuitPython_HID | 2 +- frozen/Adafruit_CircuitPython_MIDI | 2 +- frozen/Adafruit_CircuitPython_ST7789 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_BLE b/frozen/Adafruit_CircuitPython_BLE index ad4f2d32d3..9ae0e7f870 160000 --- a/frozen/Adafruit_CircuitPython_BLE +++ b/frozen/Adafruit_CircuitPython_BLE @@ -1 +1 @@ -Subproject commit ad4f2d32d3a35b412bab7c6c0ba3b7a46d5da5aa +Subproject commit 9ae0e7f870c0dd508d8a27c179b5d63b47567f85 diff --git a/frozen/Adafruit_CircuitPython_Display_Shapes b/frozen/Adafruit_CircuitPython_Display_Shapes index c6ea5d17c8..99bf9e741d 160000 --- a/frozen/Adafruit_CircuitPython_Display_Shapes +++ b/frozen/Adafruit_CircuitPython_Display_Shapes @@ -1 +1 @@ -Subproject commit c6ea5d17c8c7bd391b3977c0195cff60dddf3f25 +Subproject commit 99bf9e741dccd1271317e782eed49cbf42a4efae diff --git a/frozen/Adafruit_CircuitPython_Display_Text b/frozen/Adafruit_CircuitPython_Display_Text index c31c0ef2da..99a296fb3b 160000 --- a/frozen/Adafruit_CircuitPython_Display_Text +++ b/frozen/Adafruit_CircuitPython_Display_Text @@ -1 +1 @@ -Subproject commit c31c0ef2da48bfed7da2188039b59251f02110ea +Subproject commit 99a296fb3bdf2743f9b5f487649d7721c8f83c24 diff --git a/frozen/Adafruit_CircuitPython_HID b/frozen/Adafruit_CircuitPython_HID index 78b0fbbb00..1cb554987d 160000 --- a/frozen/Adafruit_CircuitPython_HID +++ b/frozen/Adafruit_CircuitPython_HID @@ -1 +1 @@ -Subproject commit 78b0fbbb00c0431042b460fe20a76bbc440c4793 +Subproject commit 1cb554987df86b008e5a0feaa56f0a24d806bf28 diff --git a/frozen/Adafruit_CircuitPython_MIDI b/frozen/Adafruit_CircuitPython_MIDI index 01ae093f1f..0f5651650c 160000 --- a/frozen/Adafruit_CircuitPython_MIDI +++ b/frozen/Adafruit_CircuitPython_MIDI @@ -1 +1 @@ -Subproject commit 01ae093f1f73c152941cde9f4f850b163d278df2 +Subproject commit 0f5651650c11a24e531e5dd1eadfc5654d84a478 diff --git a/frozen/Adafruit_CircuitPython_ST7789 b/frozen/Adafruit_CircuitPython_ST7789 index 9020acbab0..460e971e32 160000 --- a/frozen/Adafruit_CircuitPython_ST7789 +++ b/frozen/Adafruit_CircuitPython_ST7789 @@ -1 +1 @@ -Subproject commit 9020acbab070d5842dcba83a5b7f7b7c86dc7414 +Subproject commit 460e971e32ea53176b39ec093ae98fdac0d39d86 From 20d1ef27b943d8b3b41dc002c4d7b4c421c2f954 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 8 Sep 2021 21:35:28 +0200 Subject: [PATCH 374/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 42 ++++++++---------- locale/cs.po | 39 ++++++----------- locale/de_DE.po | 42 ++++++++---------- locale/el.po | 39 ++++++----------- locale/en_GB.po | 93 ++++++++++++++++++++-------------------- locale/es.po | 42 ++++++++---------- locale/fil.po | 39 ++++++----------- locale/fr.po | 42 ++++++++---------- locale/hi.po | 39 ++++++----------- locale/it_IT.po | 39 ++++++----------- locale/ja.po | 42 ++++++++---------- locale/ko.po | 39 ++++++----------- locale/nl.po | 42 ++++++++---------- locale/pl.po | 42 ++++++++---------- locale/pt_BR.po | 57 ++++++++++++------------ locale/sv.po | 57 ++++++++++++------------ locale/zh_Latn_pinyin.po | 57 ++++++++++++------------ 17 files changed, 337 insertions(+), 455 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 8c2f5db74d..ba0fe50025 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -42,13 +42,6 @@ msgstr "" "Harap ajukan masalah dengan konten drive CIRCUITPY Anda di\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -407,6 +400,9 @@ msgstr "Semua perangkat SPI sedang digunakan" msgid "All UART peripherals are in use" msgstr "Semua perangkat UART sedang digunakan" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -632,10 +628,10 @@ msgstr "Penyangga harus memiliki panjang setidaknya 1" msgid "Buffer too short by %d bytes" msgstr "Buffer terlalu pendek untuk %d byte" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Pin bus %d sudah digunakan" @@ -803,7 +799,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Entri kolom harus digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "Perintah harus berupa int di antara 0 dan 255" @@ -897,12 +893,12 @@ msgstr "Terjadi kesalahan saat menginisialisasi perangkat DAC" msgid "DAC already in use" msgstr "DAC sudah digunakan" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "Data 0 pin harus byte disejajarkan" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1855,11 +1851,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBus belum didukung" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Periferal sedang digunakan" @@ -3697,7 +3688,7 @@ msgid "no module named '%q'" msgstr "tidak ada modul yang bernama '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3971,6 +3962,7 @@ msgstr "" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3991,6 +3983,7 @@ msgstr "" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4024,10 +4017,6 @@ msgstr "" msgid "queue overflow" msgstr "antrian meluap (overflow)" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" @@ -4520,6 +4509,9 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBus belum didukung" + #~ msgid "Buffer too large and unable to allocate" #~ msgstr "Buffer terlalu besar dan tidak dapat dialokasikan" diff --git a/locale/cs.po b/locale/cs.po index b79e56617e..882e53be4f 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -38,13 +38,6 @@ msgstr "" "Založte prosím problém s obsahem vaší jednotky CIRCUITPY na adrese\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " Soubor \"%q\"" @@ -403,6 +396,9 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -626,10 +622,10 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -789,7 +785,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "" @@ -882,12 +878,12 @@ msgstr "" msgid "DAC already in use" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1831,11 +1827,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3658,7 +3649,7 @@ msgid "no module named '%q'" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3931,6 +3922,7 @@ msgstr "" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3951,6 +3943,7 @@ msgstr "" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3984,10 +3977,6 @@ msgstr "" msgid "queue overflow" msgstr "" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index eda73776ba..5424154193 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -41,13 +41,6 @@ msgstr "" "Bitte melden Sie ein Problem mit dem Inhalt Ihres CIRCUITPY-Laufwerks unter\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " Datei \"%q\"" @@ -409,6 +402,9 @@ msgstr "Alle SPI-Peripheriegeräte sind in Benutzung" msgid "All UART peripherals are in use" msgstr "Alle UART-Peripheriegeräte sind in Benutzung" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -634,10 +630,10 @@ msgstr "Der Puffer muss eine Mindestenslänge von 1 haben" msgid "Buffer too short by %d bytes" msgstr "Puffer um %d Bytes zu kurz" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d wird schon benutzt" @@ -799,7 +795,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Spalteneintrag muss digitalio.DigitalInOut sein" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "Der Befehl muss ein int zwischen 0 und 255 sein" @@ -894,12 +890,12 @@ msgstr "DAC Device Initialisierungs-Fehler" msgid "DAC already in use" msgstr "DAC wird schon benutzt" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "Data 0 pin muss am Byte ausgerichtet sein" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "Data 0 Pin muss Byte aligned sein." @@ -1855,11 +1851,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBus wird noch nicht unterstützt" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3723,7 +3714,7 @@ msgid "no module named '%q'" msgstr "Kein Modul mit dem Namen '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "kein Reset Pin verfügbar" @@ -4000,6 +3991,7 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -4020,6 +4012,7 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4053,10 +4046,6 @@ msgstr "" msgid "queue overflow" msgstr "Warteschlangenüberlauf" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "rohe F-Strings sind nicht implementiert" @@ -4556,6 +4545,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBus wird noch nicht unterstützt" + #~ msgid "%q must be 0-255" #~ msgstr "%q muss 0-255 sein" diff --git a/locale/el.po b/locale/el.po index b1c936bf8e..e876298ac3 100644 --- a/locale/el.po +++ b/locale/el.po @@ -35,13 +35,6 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -400,6 +393,9 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -623,10 +619,10 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -786,7 +782,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "" @@ -879,12 +875,12 @@ msgstr "" msgid "DAC already in use" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1828,11 +1824,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3655,7 +3646,7 @@ msgid "no module named '%q'" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3928,6 +3919,7 @@ msgstr "" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3948,6 +3940,7 @@ msgstr "" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3981,10 +3974,6 @@ msgstr "" msgid "queue overflow" msgstr "" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 3f0adcbc07..13f93ab640 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -43,17 +43,6 @@ msgstr "" "Please file an issue with the contents of your CIRCUITPY drive at \n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -#, fuzzy -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " - #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -272,22 +261,22 @@ msgid "'%s' expects {r0, r1, ...}" msgstr "'%s' expects {r0, r1, ...}" #: py/emitinlinextensa.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "'%s' integer %d isn't within range %d..%d" msgstr "'%s' integer %d isn't within range %d..%d" #: py/emitinlinethumb.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" msgstr "'%s' integer 0x%x doesn't fit in mask 0x%x" #: py/obj.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "'%s' object doesn't support item assignment" msgstr "'%s' object doesn't support item assignment" #: py/obj.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "'%s' object doesn't support item deletion" msgstr "'%s' object doesn't support item deletion" @@ -297,7 +286,7 @@ msgid "'%s' object has no attribute '%q'" msgstr "'%s' object has no attribute '%q'" #: py/obj.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "'%s' object isn't subscriptable" msgstr "'%s' object isn't subscriptable" @@ -429,6 +418,9 @@ msgstr "All SPI peripherals are in use" msgid "All UART peripherals are in use" msgstr "All UART peripherals are in use" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "All channels in use" @@ -658,10 +650,10 @@ msgstr "Buffer must be at least length 1" msgid "Buffer too short by %d bytes" msgstr "Buffer too short by %d bytes" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d is already in use" @@ -823,7 +815,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Column entry must be digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "Command must be an int between 0 and 255" @@ -918,12 +910,12 @@ msgstr "DAC device init error" msgid "DAC already in use" msgstr "DAC already in use" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "Data 0 pin must be byte aligned" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "Data 0 pin must be byte aligned." @@ -988,7 +980,7 @@ msgid "EXTINT channel already in use" msgstr "EXTINT channel already in use" #: shared-module/synthio/MidiTrack.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "Error in MIDI stream at position %d" msgstr "Error in MIDI stream at position %d" @@ -1381,12 +1373,12 @@ msgid "Invalid channel count" msgstr "Invalid channel count" #: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "Invalid data_count %d" msgstr "Invalid data_count %d" #: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "Invalid data_pins[%d]" msgstr "Invalid data_pins[%d]" @@ -1575,12 +1567,12 @@ msgid "Missing first_set_pin. Instruction %d sets pin(s)" msgstr "Missing first_set_pin. Instruction %d sets pin(s)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "Missing jmp_pin. Instruction %d jumps on pin" msgstr "Missing jmp_pin. Instruction %d jumps on pin" #: shared-module/usb_hid/Device.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "More than %d report ids not supported" msgstr "More than %d report ids not supported" @@ -1705,7 +1697,7 @@ msgid "No long integer support" msgstr "No long integer support" #: shared-module/usb_hid/__init__.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "No more than %d HID devices allowed" msgstr "No more than %d HID devices allowed" @@ -1889,11 +1881,6 @@ msgstr "PWM slice already in use" msgid "PWM slice channel A already in use" msgstr "PWM slice channel A already in use" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBus not yet supported" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Peripheral in use" @@ -2447,7 +2434,7 @@ msgid "Unknown security error: 0x%04x" msgstr "Unknown security error: 0x%04x" #: ports/nrf/common-hal/_bleio/__init__.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "Unknown system firmware error: %04x" msgstr "Unknown system firmware error: %04x" @@ -2813,7 +2800,7 @@ msgid "can't convert %q to int" msgstr "can't convert %q to int" #: py/obj.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "can't convert %s to complex" msgstr "can't convert %s to complex" @@ -3047,7 +3034,7 @@ msgid "data must be of equal length" msgstr "cata must be of equal length" #: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "data pin #%d in use" msgstr "data pin #%d in use" @@ -3783,7 +3770,7 @@ msgid "no module named '%q'" msgstr "no module named '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "no reset pin available" @@ -3849,7 +3836,7 @@ msgid "object " msgstr "object " #: py/obj.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "object '%s' isn't a tuple or list" msgstr "object '%s' isn't a tuple or list" @@ -3889,7 +3876,7 @@ msgid "object not iterable" msgstr "object not iterable" #: py/obj.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "object of type '%s' has no len()" msgstr "object of type '%s' has no len()" @@ -4065,6 +4052,7 @@ msgstr "pow() with 3 arguments requires integers" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -4085,6 +4073,7 @@ msgstr "pow() with 3 arguments requires integers" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4119,11 +4108,6 @@ msgstr "push_threshold must be between 1 and 32" msgid "queue overflow" msgstr "queue overflow" -#: lib/utils/pyexec.c -#, fuzzy -msgid "raw REPL; CTRL-B to exit\n" -msgstr "raw REPL; CTRL-B to exit\n" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "raw f-strings are not implemented" @@ -4626,6 +4610,23 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#, fuzzy +#~ msgid "" +#~ "\n" +#~ "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +#~ "=== " +#~ msgstr "" +#~ "\n" +#~ "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +#~ "=== " + +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBus not yet supported" + +#, fuzzy +#~ msgid "raw REPL; CTRL-B to exit\n" +#~ msgstr "raw REPL; CTRL-B to exit\n" + #~ msgid "no available NIC" #~ msgstr "no available NIC" diff --git a/locale/es.po b/locale/es.po index eb744a34fb..8907967d4b 100644 --- a/locale/es.po +++ b/locale/es.po @@ -44,13 +44,6 @@ msgstr "" "Presente un problema con el contenido de su unidad CIRCUITPY en\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " Archivo \"%q\"" @@ -411,6 +404,9 @@ msgstr "Todos los periféricos SPI están siendo usados" msgid "All UART peripherals are in use" msgstr "Todos los periféricos UART están siendo usados" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "Todos los canales esta en uso" @@ -639,10 +635,10 @@ msgstr "Buffer debe ser de longitud 1 como minimo" msgid "Buffer too short by %d bytes" msgstr "Búffer muy corto por %d bytes" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d ya está siendo utilizado" @@ -806,7 +802,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Entrada de columna debe ser digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "Command debe ser un int entre 0 y 255" @@ -901,12 +897,12 @@ msgstr "Error de inicio del dispositivo DAC" msgid "DAC already in use" msgstr "DAC ya está siendo utilizado" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "El pin Data 0 debe estar alineado a bytes" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "El pin de datos 0 debe ser alineado a byte." @@ -1873,11 +1869,6 @@ msgstr "Segmento PWM ya esta en uso" msgid "PWM slice channel A already in use" msgstr "Segmento del PWM canal A ya esta en uso" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBus todavía no soportado" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Periférico en uso" @@ -3741,7 +3732,7 @@ msgid "no module named '%q'" msgstr "ningún módulo se llama '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "no hay pin de reinicio disponible" @@ -4017,6 +4008,7 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -4037,6 +4029,7 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4070,10 +4063,6 @@ msgstr "push_threshold debe esta entre 1 y 32" msgid "queue overflow" msgstr "desbordamiento de cola(queue)" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "no está implementado cadenas-f sin procesar" @@ -4569,6 +4558,9 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBus todavía no soportado" + #~ msgid "%q length must be %q" #~ msgstr "el tamaño de %q debe ser %q" diff --git a/locale/fil.po b/locale/fil.po index 0a8352ac27..2e94810632 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -36,13 +36,6 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -405,6 +398,9 @@ msgstr "Lahat ng SPI peripherals ay ginagamit" msgid "All UART peripherals are in use" msgstr "Lahat ng I2C peripherals ginagamit" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -630,10 +626,10 @@ msgstr "Buffer dapat ay hindi baba sa 1 na haba" msgid "Buffer too short by %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, fuzzy, c-format msgid "Bus pin %d is already in use" msgstr "Ginagamit na ang DAC" @@ -795,7 +791,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c #, fuzzy msgid "Command must be an int between 0 and 255" msgstr "Sa gitna ng 0 o 255 dapat ang bytes." @@ -889,13 +885,13 @@ msgstr "" msgid "DAC already in use" msgstr "Ginagamit na ang DAC" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #, fuzzy msgid "Data 0 pin must be byte aligned" msgstr "graphic ay dapat 2048 bytes ang haba" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1849,11 +1845,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3702,7 +3693,7 @@ msgid "no module named '%q'" msgstr "walang module na '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3977,6 +3968,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3997,6 +3989,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4030,10 +4023,6 @@ msgstr "" msgid "queue overflow" msgstr "puno na ang pila (overflow)" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index a7f950cfef..2aab5490ca 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -44,13 +44,6 @@ msgstr "" "l'adresse\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " Fichier \"%q\"" @@ -411,6 +404,9 @@ msgstr "Tous les périphériques SPI sont utilisés" msgid "All UART peripherals are in use" msgstr "Tous les périphériques UART sont utilisés" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "Tout les canaux sont utilisés" @@ -640,10 +636,10 @@ msgstr "Le tampon doit être de longueur au moins 1" msgid "Buffer too short by %d bytes" msgstr "Tampon trop court de %d octets" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "La broche %d du bus est déjà utilisée" @@ -812,7 +808,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "L'entrée 'Column' doit être un digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "La commande doit être un chiffre entier entre 0 et 255" @@ -907,12 +903,12 @@ msgstr "Erreur d'initialisation du périphérique DAC" msgid "DAC already in use" msgstr "DAC déjà utilisé" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "La broche 'Data 0' doit être aligné sur l'octet" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "La broche Data 0 doit être aligné sur l'octet." @@ -1883,11 +1879,6 @@ msgstr "PWM slice déja utilisée" msgid "PWM slice channel A already in use" msgstr "Canal A de PWM slice est utilisé" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBus pas encore supporté" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Périphérique en utilisation" @@ -3750,7 +3741,7 @@ msgid "no module named '%q'" msgstr "pas de module '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "pas de broche de réinitialisation disponible" @@ -4028,6 +4019,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -4048,6 +4040,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4081,10 +4074,6 @@ msgstr "push_threshold doit être entre 1 et 32" msgid "queue overflow" msgstr "dépassement de file" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "les chaînes f brutes ne sont pas implémentées" @@ -4580,6 +4569,9 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBus pas encore supporté" + #~ msgid "%q length must be %q" #~ msgstr "La longueur de %q doit être de %q" diff --git a/locale/hi.po b/locale/hi.po index 2d652a7922..18d13e1d7c 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -35,13 +35,6 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -400,6 +393,9 @@ msgstr "" msgid "All UART peripherals are in use" msgstr "" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -623,10 +619,10 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -786,7 +782,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "" @@ -879,12 +875,12 @@ msgstr "" msgid "DAC already in use" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1828,11 +1824,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3655,7 +3646,7 @@ msgid "no module named '%q'" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3928,6 +3919,7 @@ msgstr "" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3948,6 +3940,7 @@ msgstr "" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3981,10 +3974,6 @@ msgstr "" msgid "queue overflow" msgstr "" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 1ce312db86..db2f1938e5 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -43,13 +43,6 @@ msgstr "" "Per favore, segnala il problema con il contenuto del tuo CIRCUITPY a\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -412,6 +405,9 @@ msgstr "Tutte le periferiche SPI sono in uso" msgid "All UART peripherals are in use" msgstr "Tutte le periferiche I2C sono in uso" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -638,10 +634,10 @@ msgstr "Il buffer deve essere lungo almeno 1" msgid "Buffer too short by %d bytes" msgstr "Buffer troppo piccolo di %d bytes" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d è già in uso" @@ -803,7 +799,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c #, fuzzy msgid "Command must be an int between 0 and 255" msgstr "I byte devono essere compresi tra 0 e 255" @@ -897,13 +893,13 @@ msgstr "" msgid "DAC already in use" msgstr "DAC già in uso" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #, fuzzy msgid "Data 0 pin must be byte aligned" msgstr "graphic deve essere lunga 2048 byte" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1865,11 +1861,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3714,7 +3705,7 @@ msgid "no module named '%q'" msgstr "nessun modulo chiamato '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3993,6 +3984,7 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -4013,6 +4005,7 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4046,10 +4039,6 @@ msgstr "" msgid "queue overflow" msgstr "overflow della coda" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index cce70415e8..8e16828164 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -40,13 +40,6 @@ msgstr "" "CIRCUITPYドライブの内容を添えて問題を以下で報告してください:\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " ファイル \"%q\"" @@ -405,6 +398,9 @@ msgstr "全てのSPI周辺機器が使用中" msgid "All UART peripherals are in use" msgstr "全てのUART周辺機器が使用中" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -630,10 +626,10 @@ msgstr "バッファ長は少なくとも1以上でなければなりません" msgid "Buffer too short by %d bytes" msgstr "バッファが %d バイト足りません" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Busピン%dはすでに使用中" @@ -795,7 +791,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Columnの要素は digitalio.DigitalInOut でなければなりません" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "commandは0から255の間の整数でなければなりません" @@ -888,12 +884,12 @@ msgstr "DACデバイス初期化エラー" msgid "DAC already in use" msgstr "DACはすでに使用中" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "Data 0 ピンは、バイト整列されていなければなりません" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1842,11 +1838,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBusにはまだ対応していません" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3675,7 +3666,7 @@ msgid "no module named '%q'" msgstr "'%q' という名前のモジュールはありません" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "利用可能なリセットピンがありません" @@ -3950,6 +3941,7 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3970,6 +3962,7 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4003,10 +3996,6 @@ msgstr "" msgid "queue overflow" msgstr "キューがオーバーフローしました" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "raw f-文字列は実装されていません" @@ -4500,6 +4489,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBusにはまだ対応していません" + #~ msgid "no available NIC" #~ msgstr "利用可能なNICがありません" diff --git a/locale/ko.po b/locale/ko.po index ffb73ab281..2da34c495c 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -36,13 +36,6 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " 파일 \"%q\"" @@ -401,6 +394,9 @@ msgstr "사용중인 모든 SPI주변 기기" msgid "All UART peripherals are in use" msgstr "사용중인 모든 UART주변 기기" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -626,10 +622,10 @@ msgstr "잘못된 크기의 버퍼. >1 여야합니다" msgid "Buffer too short by %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "" @@ -789,7 +785,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "명령은 0에서 255 사이의 정수(int) 여야합니다" @@ -882,12 +878,12 @@ msgstr "" msgid "DAC already in use" msgstr "DAC가 현재 사용 중입니다" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1831,11 +1827,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3659,7 +3650,7 @@ msgid "no module named '%q'" msgstr "" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3932,6 +3923,7 @@ msgstr "" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3952,6 +3944,7 @@ msgstr "" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3985,10 +3978,6 @@ msgstr "" msgid "queue overflow" msgstr "" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 2f5644be26..e89f2f0c09 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -38,13 +38,6 @@ msgstr "" "Meld een probleem met de inhoud van de CIRCUITPY drive op:\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " Bestand" @@ -403,6 +396,9 @@ msgstr "Alle SPI peripherals zijn in gebruik" msgid "All UART peripherals are in use" msgstr "Alle UART peripherals zijn in gebruik" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -628,10 +624,10 @@ msgstr "Buffer moet op zijn minst lengte 1 zijn" msgid "Buffer too short by %d bytes" msgstr "Buffer is %d bytes te klein" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Bus pin %d al in gebruik" @@ -793,7 +789,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Column entry moet digitalio.DigitalInOut zijn" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "Command moet een int tussen 0 en 255 zijn" @@ -888,12 +884,12 @@ msgstr "DAC Apparaat Init Fout" msgid "DAC already in use" msgstr "DAC al in gebruik" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "Data 0 pin moet byte uitgelijnd zijn" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1849,11 +1845,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBus nog niet ondersteund" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3700,7 +3691,7 @@ msgid "no module named '%q'" msgstr "geen module met naam '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "geen reset pin beschikbaar" @@ -3974,6 +3965,7 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3994,6 +3986,7 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4027,10 +4020,6 @@ msgstr "" msgid "queue overflow" msgstr "wachtrij overloop" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "ruwe f-strings zijn niet geïmplementeerd" @@ -4525,6 +4514,9 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBus nog niet ondersteund" + #~ msgid "no available NIC" #~ msgstr "geen netwerkadapter (NIC) beschikbaar" diff --git a/locale/pl.po b/locale/pl.po index f4dbf0c1c7..ef0e0cce33 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -40,13 +40,6 @@ msgstr "" "Zgłoś problem z zawartością dysku CIRCUITPY pod adresem\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" - #: py/obj.c msgid " File \"%q\"" msgstr " Plik \"%q\"" @@ -405,6 +398,9 @@ msgstr "Wszystkie peryferia SPI w użyciu" msgid "All UART peripherals are in use" msgstr "Wszystkie peryferia UART w użyciu" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "" @@ -630,10 +626,10 @@ msgstr "Bufor musi mieć długość 1 lub więcej" msgid "Buffer too short by %d bytes" msgstr "Bufor za krótki o %d bajtów" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Nóżka magistrali %d jest w użyciu" @@ -793,7 +789,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Kolumny muszą być typu digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "Komenda musi być int pomiędzy 0 a 255" @@ -888,12 +884,12 @@ msgstr "Błąd inicjowania urządzenia DAC" msgid "DAC already in use" msgstr "DAC w użyciu" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "Nóżka data 0 musi być wyrównana do bajtu" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -1839,11 +1835,6 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBus nie jest jeszcze obsługiwany" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -3673,7 +3664,7 @@ msgid "no module named '%q'" msgstr "brak modułu o nazwie '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "" @@ -3947,6 +3938,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3967,6 +3959,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4000,10 +3993,6 @@ msgstr "" msgid "queue overflow" msgstr "przepełnienie kolejki" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "" @@ -4497,6 +4486,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBus nie jest jeszcze obsługiwany" + #~ msgid "no available NIC" #~ msgstr "brak wolnego NIC" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 84c1b36d44..9c44b4cd93 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -42,16 +42,6 @@ msgstr "" "Registre um problema com o conteúdo do seu controlador no CIRCUITPY\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" -"\n" -"modo colar; Ctrl-C para cancelar, Ctrl-D para concluir\n" -"=== " - #: py/obj.c msgid " File \"%q\"" msgstr " Arquivo \"%q\"" @@ -416,6 +406,9 @@ msgstr "Todos os periféricos SPI estão em uso" msgid "All UART peripherals are in use" msgstr "Todos os periféricos UART estão em uso" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "Todos os canais estão em uso" @@ -644,10 +637,10 @@ msgstr "O comprimento do buffer deve ter pelo menos 1" msgid "Buffer too short by %d bytes" msgstr "O buffer é muito curto em %d bytes" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "O pino bus %d já está em uso" @@ -813,7 +806,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "A entrada da coluna deve ser digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "O comando deve ser um int entre 0 e 255" @@ -907,12 +900,12 @@ msgstr "Erro de Inicialização do Dispositivo DAC" msgid "DAC already in use" msgstr "DAC em uso" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "O pino de dados 0 deve ser alinhado por bytes" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "O pino de dados 0 deve ser alinhado por bytes." @@ -1876,11 +1869,6 @@ msgstr "A fatia do PWM já está em uso" msgid "PWM slice channel A already in use" msgstr "O canal A da fatia do PWM já está em uso" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "O ParallelBus ainda não é compatível" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "O periférico está em uso" @@ -3753,7 +3741,7 @@ msgid "no module named '%q'" msgstr "nenhum módulo chamado '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "nenhum pino de redefinição está disponível" @@ -4031,6 +4019,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -4051,6 +4040,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4084,10 +4074,6 @@ msgstr "O pull_threshold deve ser entre 1 e 32" msgid "queue overflow" msgstr "estouro de fila" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "REPL bruto; CTRL-B para encerrar\n" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "o f-strings bruto não estão implementados" @@ -4582,6 +4568,21 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "" +#~ "\n" +#~ "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +#~ "=== " +#~ msgstr "" +#~ "\n" +#~ "modo colar; Ctrl-C para cancelar, Ctrl-D para concluir\n" +#~ "=== " + +#~ msgid "ParallelBus not yet supported" +#~ msgstr "O ParallelBus ainda não é compatível" + +#~ msgid "raw REPL; CTRL-B to exit\n" +#~ msgstr "REPL bruto; CTRL-B para encerrar\n" + #~ msgid "%q length must be %q" #~ msgstr "o comprimento %q deve ser %q" diff --git a/locale/sv.po b/locale/sv.po index 9a014fe9da..02e273b352 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -42,16 +42,6 @@ msgstr "" "Vänligen skapa ett ärende med innehållet i din CIRCUITPY-enhet på\n" "https://github.com/adafruit/circuitpython/issues\n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" -"\n" -"klistra in-läge; Ctrl-C för att avbryta, Ctrl-D för att avsluta\n" -"=== " - #: py/obj.c msgid " File \"%q\"" msgstr " Filen \"%q\"" @@ -411,6 +401,9 @@ msgstr "All SPI-kringutrustning används" msgid "All UART peripherals are in use" msgstr "Alla UART-kringutrustning används" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "Alla kanaler används" @@ -636,10 +629,10 @@ msgstr "Bufferten måste ha minst längd 1" msgid "Buffer too short by %d bytes" msgstr "Buffert är %d bytes för kort" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Busspinne %d används redan" @@ -802,7 +795,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Kolumnposten måste vara digitalio. DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "Command must be an int between 0 and 255" msgstr "Kommandot måste vara en int mellan 0 och 255" @@ -897,12 +890,12 @@ msgstr "Initieringsfel för DAC-enhet" msgid "DAC already in use" msgstr "DAC används redan" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "Datapinne 0 måste vara bytejusterad" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "Datapinne 0 måste vara byte-justerad." @@ -1858,11 +1851,6 @@ msgstr "PWM-segment används redan" msgid "PWM slice channel A already in use" msgstr "PWM-segmentkanal A används redan" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "ParallelBus stöds ännu inte" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Periferi i bruk" @@ -3716,7 +3704,7 @@ msgid "no module named '%q'" msgstr "ingen modul med namnet '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "ingen reset-pinne tillgänglig" @@ -3990,6 +3978,7 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -4010,6 +3999,7 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4043,10 +4033,6 @@ msgstr "push_threshold måste vara mellan 1 och 32" msgid "queue overflow" msgstr "köstorlek överskreds" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "rå REPL. CTRL-B för att avsluta\n" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "råa f-strängar inte implementerade" @@ -4541,6 +4527,21 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "" +#~ "\n" +#~ "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +#~ "=== " +#~ msgstr "" +#~ "\n" +#~ "klistra in-läge; Ctrl-C för att avbryta, Ctrl-D för att avsluta\n" +#~ "=== " + +#~ msgid "ParallelBus not yet supported" +#~ msgstr "ParallelBus stöds ännu inte" + +#~ msgid "raw REPL; CTRL-B to exit\n" +#~ msgstr "rå REPL. CTRL-B för att avsluta\n" + #~ msgid "%q length must be %q" #~ msgstr "längden på %q måste vara %q" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 1d05df7b4e..2530d54950 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -43,16 +43,6 @@ msgstr "" "Qǐng tōngguò https://github.com/adafruit/circuitpython/issues\n" "tíjiāo yǒuguān nín de CIRCUITPY qūdòngqì nèiróng de wèntí \n" -#: lib/utils/pyexec.c -msgid "" -"\n" -"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" -"=== " -msgstr "" -"\n" -"zhān tiē mó shì; Ctrl-C qǔ xiāo, Ctrl-D wán chéngh\n" -"=== " - #: py/obj.c msgid " File \"%q\"" msgstr " Wénjiàn \"%q\"" @@ -413,6 +403,9 @@ msgstr "Suǒyǒu SPI wàiwéi qì zhèngzài shǐyòng" msgid "All UART peripherals are in use" msgstr "Suǒyǒu UART wàiwéi zhèngzài shǐyòng" +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" msgstr "suǒ yǒu shǐ yòng de tōng dào" @@ -638,10 +631,10 @@ msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù 1" msgid "Buffer too short by %d bytes" msgstr "Huǎn chōng qū tài duǎn , àn %d zì jié" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/esp32s2/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c -#: ports/raspberrypi/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" msgstr "Zǒngxiàn yǐn jiǎo %d yǐ zài shǐyòng zhōng" @@ -803,7 +796,7 @@ msgid "Column entry must be digitalio.DigitalInOut" msgstr "Liè tiáomù bìxū shì digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c 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" @@ -896,12 +889,12 @@ msgstr "DAC shèbèi chūshǐhuà cuòwù" msgid "DAC already in use" msgstr "Fā yuán huì yǐjīng shǐyòng" -#: ports/atmel-samd/common-hal/displayio/ParallelBus.c -#: ports/nrf/common-hal/displayio/ParallelBus.c +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned" msgstr "Shùjù 0 de yǐn jiǎo bìxū shì zì jié duìqí" -#: ports/esp32s2/common-hal/displayio/ParallelBus.c +#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "shù jù 0 yǐn jiǎo bì xū àn zì jié duì qí." @@ -1860,11 +1853,6 @@ msgstr "yǐ jīng zài shǐ yòng de PWM qiē piàn" msgid "PWM slice channel A already in use" msgstr "PWM qiē piàn tōng dào A yǐ zài shǐ yòng zhōng" -#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c -#: ports/stm/common-hal/displayio/ParallelBus.c -msgid "ParallelBus not yet supported" -msgstr "Shàng bù zhīchí ParallelBus" - #: ports/esp32s2/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "shǐ yòng zhōng de wài shè" @@ -3717,7 +3705,7 @@ msgid "no module named '%q'" msgstr "méiyǒu mókuài '%q'" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c -#: shared-bindings/displayio/ParallelBus.c +#: shared-bindings/paralleldisplay/ParallelBus.c msgid "no reset pin available" msgstr "Méiyǒu kěyòng de fùwèi yǐn jiǎo" @@ -3990,6 +3978,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -4010,6 +3999,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -4043,10 +4033,6 @@ msgstr "tuī sòng yù zhí bì xū jiè yú 1 hé 32 zhī jiān" msgid "queue overflow" msgstr "duìliè yìchū" -#: lib/utils/pyexec.c -msgid "raw REPL; CTRL-B to exit\n" -msgstr "yuán shǐ REPL; CTRL-B tuì chū\n" - #: py/parse.c msgid "raw f-strings are not implemented" msgstr "wèi zhíxíng yuánshǐ f-strings" @@ -4541,6 +4527,21 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "" +#~ "\n" +#~ "paste mode; Ctrl-C to cancel, Ctrl-D to finish\n" +#~ "=== " +#~ msgstr "" +#~ "\n" +#~ "zhān tiē mó shì; Ctrl-C qǔ xiāo, Ctrl-D wán chéngh\n" +#~ "=== " + +#~ msgid "ParallelBus not yet supported" +#~ msgstr "Shàng bù zhīchí ParallelBus" + +#~ msgid "raw REPL; CTRL-B to exit\n" +#~ msgstr "yuán shǐ REPL; CTRL-B tuì chū\n" + #~ msgid "%q length must be %q" #~ msgstr "%q cháng dù bì xū wéi %q" From f2de010059c526b2d989f3a6da7b5c0c2444999e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 8 Sep 2021 12:44:45 -0700 Subject: [PATCH 375/418] Fix the nRF builds with GCC 11.2 See adafruit/Adafruit_nRF52_Bootloader#221 for background on the flag. --- ports/nrf/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 66cf4e2008..01050324f5 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -103,6 +103,18 @@ CFLAGS += $(OPTIMIZATION_FLAGS) CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) +# Nordic Softdevice SDK header files contains inline assembler that has +# broken constraints. As a result the IPA-modref pass, introduced in gcc-11, +# is able to "prove" that arguments to wrapper functions generated with +# the SVCALL() macro are unused and, as a result, the optimizer will remove +# code within the callers that sets up these arguments (which results in +# a broken bootloader). The broken headers come from Nordic-supplied zip +# files and are not trivial to patch so, for now, we'll simply disable the +# new gcc-11 inter-procedural optimizations. +ifeq (,$(findstring unrecognized,$(shell $(CC) $(CFLAGS) -fno-ipa-modref 2>&1))) +CFLAGS += -fno-ipa-modref +endif + # Undo some warnings. # nrfx does casts that increase alignment requirements. CFLAGS += -Wno-cast-align From 5dd19938ed7342eb5c54fe4e5037592f61cbe3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 8 Sep 2021 23:48:50 +0200 Subject: [PATCH 376/418] Add required python packages to building docs Build fails almost silently without them. Syncs with instructions at https://learn.adafruit.com/building-circuitpython/build-circuitpython --- BUILDING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index 256996807d..0686df3c04 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -28,6 +28,12 @@ This project has a bunch of git submodules. You will need to update them regula git submodule sync git submodule update --init +### Required Python Packages + +Failing to install these will prevent from properly building. + + pip3 install -r requirements-dev.txt + ### mpy-cross As part of the build process, mpy-cross is needed to compile .py files into .mpy files. From 65f8804816172b7f8a60e0993db92183bd82f3d8 Mon Sep 17 00:00:00 2001 From: Robert Pafford <19439938+rjp5th@users.noreply.github.com> Date: Wed, 8 Sep 2021 18:34:34 -0400 Subject: [PATCH 377/418] Implement reset_reason for raspberrypi port --- .../common-hal/microcontroller/Processor.c | 36 ++++++++++++++++++- shared-bindings/microcontroller/ResetReason.c | 5 +++ shared-bindings/microcontroller/ResetReason.h | 1 + 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/microcontroller/Processor.c b/ports/raspberrypi/common-hal/microcontroller/Processor.c index e22286ca3d..68518d75b3 100644 --- a/ports/raspberrypi/common-hal/microcontroller/Processor.c +++ b/ports/raspberrypi/common-hal/microcontroller/Processor.c @@ -34,6 +34,11 @@ #include "src/rp2_common/hardware_adc/include/hardware/adc.h" #include "src/rp2_common/hardware_clocks/include/hardware/clocks.h" +#include "src/rp2040/hardware_regs/include/hardware/regs/vreg_and_chip_reset.h" +#include "src/rp2040/hardware_regs/include/hardware/regs/watchdog.h" +#include "src/rp2040/hardware_structs/include/hardware/structs/vreg_and_chip_reset.h" +#include "src/rp2040/hardware_structs/include/hardware/structs/watchdog.h" + float common_hal_mcu_processor_get_temperature(void) { adc_init(); adc_set_temp_sensor_enabled(true); @@ -60,5 +65,34 @@ void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) { } mcu_reset_reason_t common_hal_mcu_processor_get_reset_reason(void) { - return RESET_REASON_UNKNOWN; + mcu_reset_reason_t reason = RESET_REASON_UNKNOWN; + + uint32_t watchdog_reset_reg = watchdog_hw->reason; + uint32_t chip_reset_reg = vreg_and_chip_reset_hw->chip_reset; + + if (chip_reset_reg & VREG_AND_CHIP_RESET_CHIP_RESET_HAD_PSM_RESTART_BITS) { + reason = RESET_REASON_RESCUE_DEBUG; + } + + if (chip_reset_reg & VREG_AND_CHIP_RESET_CHIP_RESET_HAD_RUN_BITS) { + reason = RESET_REASON_RESET_PIN; + } + + if (chip_reset_reg & VREG_AND_CHIP_RESET_CHIP_RESET_HAD_POR_BITS) { + // NOTE: This register is also used for brownout, but there is no way to differentiate between power on and brown out + reason = RESET_REASON_POWER_ON; + } + + // Check watchdog after chip reset since watchdog doesn't clear chip_reset, while chip_reset clears the watchdog + + if (watchdog_reset_reg & WATCHDOG_REASON_TIMER_BITS) { + // This bit can also be set during a software reset because the pico-sdk performs a software reset by setting an extremely low timeout on the watchdog, rather than triggering a watchdog reset manually + reason = RESET_REASON_WATCHDOG; + } + + if (watchdog_reset_reg & WATCHDOG_REASON_FORCE_BITS) { + reason = RESET_REASON_SOFTWARE; + } + + return reason; } diff --git a/shared-bindings/microcontroller/ResetReason.c b/shared-bindings/microcontroller/ResetReason.c index 1750e55204..905c19f83f 100644 --- a/shared-bindings/microcontroller/ResetReason.c +++ b/shared-bindings/microcontroller/ResetReason.c @@ -36,6 +36,7 @@ MAKE_ENUM_VALUE(mcu_reset_reason_type, reset_reason, DEEP_SLEEP_ALARM, RESET_REA MAKE_ENUM_VALUE(mcu_reset_reason_type, reset_reason, RESET_PIN, RESET_REASON_RESET_PIN); MAKE_ENUM_VALUE(mcu_reset_reason_type, reset_reason, WATCHDOG, RESET_REASON_WATCHDOG); MAKE_ENUM_VALUE(mcu_reset_reason_type, reset_reason, UNKNOWN, RESET_REASON_UNKNOWN); +MAKE_ENUM_VALUE(mcu_reset_reason_type, reset_reason, RESCUE_DEBUG, RESET_REASON_RESCUE_DEBUG); //| class ResetReason: //| """The reason the microntroller was last reset""" @@ -61,6 +62,9 @@ MAKE_ENUM_VALUE(mcu_reset_reason_type, reset_reason, UNKNOWN, RESET_REASON_UNKNO //| UNKNOWN: object //| """The microntroller restarted for an unknown reason.""" //| +//| RESCUE_DEBUG: object +//| """The microntroller was reset by the rescue debug port.""" +//| MAKE_ENUM_MAP(mcu_reset_reason) { MAKE_ENUM_MAP_ENTRY(reset_reason, POWER_ON), MAKE_ENUM_MAP_ENTRY(reset_reason, BROWNOUT), @@ -69,6 +73,7 @@ MAKE_ENUM_MAP(mcu_reset_reason) { MAKE_ENUM_MAP_ENTRY(reset_reason, RESET_PIN), MAKE_ENUM_MAP_ENTRY(reset_reason, WATCHDOG), MAKE_ENUM_MAP_ENTRY(reset_reason, UNKNOWN), + MAKE_ENUM_MAP_ENTRY(reset_reason, RESCUE_DEBUG), }; STATIC MP_DEFINE_CONST_DICT(mcu_reset_reason_locals_dict, mcu_reset_reason_locals_table); diff --git a/shared-bindings/microcontroller/ResetReason.h b/shared-bindings/microcontroller/ResetReason.h index 8ed5e48315..7abc54c00b 100644 --- a/shared-bindings/microcontroller/ResetReason.h +++ b/shared-bindings/microcontroller/ResetReason.h @@ -38,6 +38,7 @@ typedef enum { RESET_REASON_RESET_PIN, RESET_REASON_WATCHDOG, RESET_REASON_UNKNOWN, + RESET_REASON_RESCUE_DEBUG, } mcu_reset_reason_t; extern const mp_obj_type_t mcu_reset_reason_type; From 2b4fdcdfa23c34601babab5b07643d5c0939a69a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 8 Sep 2021 16:58:53 -0700 Subject: [PATCH 378/418] Fix scanning after a peripheral bond has been made The BLE workflow will be advertising and the scan's load of identities conflicts with it. This change ensures scanning and advertising happens exclusively. This showed as an unknown error 3204. Fixes https://github.com/adafruit/Adafruit_CircuitPython_BLE/issues/134 --- ports/nrf/common-hal/_bleio/Adapter.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index f4302b839d..288cf2f217 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -507,6 +507,16 @@ mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t } self->scan_results = NULL; } + // Check to see if advertising is going already. + if (self->current_advertising_data != NULL && self->current_advertising_data == self->advertising_data) { + check_nrf_error(NRF_ERROR_BUSY); + } + + // If the current advertising data isn't owned by the adapter then it must be an internal + // advertisement that we should stop. + if (self->current_advertising_data != NULL) { + common_hal_bleio_adapter_stop_advertising(self); + } self->scan_results = shared_module_bleio_new_scanresults(buffer_size, prefixes, prefix_length, minimum_rssi); size_t max_packet_size = extended ? BLE_GAP_SCAN_BUFFER_EXTENDED_MAX_SUPPORTED : BLE_GAP_SCAN_BUFFER_MAX; uint8_t *raw_data = m_malloc(sizeof(ble_data_t) + max_packet_size, false); From 647eca6a81d210b4cf3cf2b3ea34e35015665a6c Mon Sep 17 00:00:00 2001 From: Pontus Oldberg Date: Thu, 9 Sep 2021 17:36:56 +0200 Subject: [PATCH 379/418] Added support for Challenger RP2040 WiFi --- .../boards/challenger_rp2040_wifi/board.c | 40 ++++++++++ .../challenger_rp2040_wifi/mpconfigboard.h | 10 +++ .../challenger_rp2040_wifi/mpconfigboard.mk | 11 +++ .../pico-sdk-configboard.h | 1 + .../boards/challenger_rp2040_wifi/pins.c | 73 +++++++++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 ports/raspberrypi/boards/challenger_rp2040_wifi/board.c create mode 100644 ports/raspberrypi/boards/challenger_rp2040_wifi/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/challenger_rp2040_wifi/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/challenger_rp2040_wifi/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/challenger_rp2040_wifi/pins.c diff --git a/ports/raspberrypi/boards/challenger_rp2040_wifi/board.c b/ports/raspberrypi/boards/challenger_rp2040_wifi/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/challenger_rp2040_wifi/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/challenger_rp2040_wifi/mpconfigboard.h b/ports/raspberrypi/boards/challenger_rp2040_wifi/mpconfigboard.h new file mode 100644 index 0000000000..8382822b29 --- /dev/null +++ b/ports/raspberrypi/boards/challenger_rp2040_wifi/mpconfigboard.h @@ -0,0 +1,10 @@ +#define MICROPY_HW_BOARD_NAME "Challenger RP2040 WiFi" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define DEFAULT_UART_BUS_TX (&pin_GPIO16) +#define DEFAULT_UART_BUS_RX (&pin_GPIO16) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO0) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO22) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO23) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO24) diff --git a/ports/raspberrypi/boards/challenger_rp2040_wifi/mpconfigboard.mk b/ports/raspberrypi/boards/challenger_rp2040_wifi/mpconfigboard.mk new file mode 100644 index 0000000000..1f1ff5a391 --- /dev/null +++ b/ports/raspberrypi/boards/challenger_rp2040_wifi/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x2e8a +USB_PID = 0x1006 +USB_PRODUCT = "Challenger RP2040 WiFi" +USB_MANUFACTURER = "Invector Labs" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/challenger_rp2040_wifi/pico-sdk-configboard.h b/ports/raspberrypi/boards/challenger_rp2040_wifi/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/challenger_rp2040_wifi/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/challenger_rp2040_wifi/pins.c b/ports/raspberrypi/boards/challenger_rp2040_wifi/pins.c new file mode 100644 index 0000000000..baec08eccb --- /dev/null +++ b/ports/raspberrypi/boards/challenger_rp2040_wifi/pins.c @@ -0,0 +1,73 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_WIFI_MODE), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_WIFI_RESET), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, + + { 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_module_globals_table); From 2ac0c0f686021d237fabfd1e49d3dc3513f5df06 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Thu, 9 Sep 2021 18:38:21 +0200 Subject: [PATCH 380/418] remove lingering reference to settings.py in docs --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 69acb8550b..b594174d5b 100644 --- a/README.rst +++ b/README.rst @@ -119,7 +119,7 @@ Behavior them. CircuitPython's goal is to clarify the role of each file and make each file independent from each other. - - ``boot.py`` (or ``settings.py``) runs only once on start up before + - ``boot.py`` runs only once on start up before USB is initialized. This lays the ground work for configuring USB at startup rather than it being fixed. Since serial is not available, output is written to ``boot_out.txt``. From 1f446916c3e053e33d389adf7a7cc90fb992d64f Mon Sep 17 00:00:00 2001 From: James Carr Date: Fri, 10 Sep 2021 09:24:33 +0100 Subject: [PATCH 381/418] Improve the bounds checking on the location (the x, y co-ordinates) of a VectorShape object so that it is consistent no matter where it is set from: * the constructor * the x and y setters * the location setter --- shared-bindings/vectorio/Circle.c | 4 +-- shared-bindings/vectorio/Polygon.c | 4 +-- shared-bindings/vectorio/Rectangle.c | 4 +-- shared-bindings/vectorio/VectorShape.c | 12 ++++++--- shared-bindings/vectorio/VectorShape.h | 8 +++--- shared-module/vectorio/VectorShape.c | 36 +++++++++++++++----------- 6 files changed, 40 insertions(+), 28 deletions(-) diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index c0cc0bbcc2..cdf8965e75 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -42,8 +42,8 @@ static mp_obj_t vectorio_circle_make_new(const mp_obj_type_t *type, size_t n_arg // VectorShape parts mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj; - int16_t x = args[ARG_x].u_int; - int16_t y = args[ARG_y].u_int; + int32_t x = args[ARG_x].u_int; + int32_t y = args[ARG_y].u_int; mp_obj_t vector_shape = vectorio_vector_shape_make_new(self, pixel_shader, x, y); self->draw_protocol_instance = vector_shape; diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index 5d493a30b6..17d293c7a3 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -47,8 +47,8 @@ static mp_obj_t vectorio_polygon_make_new(const mp_obj_type_t *type, size_t n_ar // VectorShape parts mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj; - int16_t x = args[ARG_x].u_int; - int16_t y = args[ARG_y].u_int; + int32_t x = args[ARG_x].u_int; + int32_t y = args[ARG_y].u_int; mp_obj_t vector_shape = vectorio_vector_shape_make_new(self, pixel_shader, x, y); self->draw_protocol_instance = vector_shape; diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index aa2c166a6d..c6f45874bd 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -46,8 +46,8 @@ static mp_obj_t vectorio_rectangle_make_new(const mp_obj_type_t *type, size_t n_ // VectorShape parts mp_obj_t pixel_shader = args[ARG_pixel_shader].u_obj; - int16_t x = args[ARG_x].u_int; - int16_t y = args[ARG_y].u_int; + int32_t x = args[ARG_x].u_int; + int32_t y = args[ARG_y].u_int; mp_obj_t vector_shape = vectorio_vector_shape_make_new(self, pixel_shader, x, y); self->draw_protocol_instance = vector_shape; diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index 6e4299a6d3..51c2679b83 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -23,7 +23,7 @@ // pixel_shader: The pixel shader that produces colors from values. The shader can be a displayio.Palette(1); it will be asked to color pixel value 0. // x: Initial x position of the center axis of the shape within the parent. // y: Initial y position of the center axis of the shape within the parent.""" -mp_obj_t vectorio_vector_shape_make_new(const mp_obj_t shape, const mp_obj_t pixel_shader, int16_t x, int16_t y) { +mp_obj_t vectorio_vector_shape_make_new(const mp_obj_t shape, const mp_obj_t pixel_shader, int32_t x, int32_t y) { if (!mp_obj_is_type(pixel_shader, &displayio_colorconverter_type) && !mp_obj_is_type(pixel_shader, &displayio_palette_type)) { mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_pixel_shader); @@ -99,7 +99,10 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_x(mp_obj_t wrapper_shape, mp_obj_t vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); mp_int_t x = mp_obj_get_int(x_obj); - common_hal_vectorio_vector_shape_set_x(self, x); + bool dirty = common_hal_vectorio_vector_shape_set_x(self, x); + if (dirty) { + common_hal_vectorio_vector_shape_set_dirty(self); + } return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_x_obj, vectorio_vector_shape_obj_set_x); @@ -130,7 +133,10 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_y(mp_obj_t wrapper_shape, mp_obj_t vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); mp_int_t y = mp_obj_get_int(y_obj); - common_hal_vectorio_vector_shape_set_y(self, y); + bool dirty = common_hal_vectorio_vector_shape_set_y(self, y); + if (dirty) { + common_hal_vectorio_vector_shape_set_dirty(self); + } return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_y_obj, vectorio_vector_shape_obj_set_y); diff --git a/shared-bindings/vectorio/VectorShape.h b/shared-bindings/vectorio/VectorShape.h index 9ac6906000..d11384e3eb 100644 --- a/shared-bindings/vectorio/VectorShape.h +++ b/shared-bindings/vectorio/VectorShape.h @@ -11,23 +11,23 @@ extern const mp_obj_type_t vectorio_vector_shape_type; // Python shared bindings constructor -mp_obj_t vectorio_vector_shape_make_new(const mp_obj_t shape, const mp_obj_t pixel_shader, int16_t x, int16_t y); +mp_obj_t vectorio_vector_shape_make_new(const mp_obj_t shape, const mp_obj_t pixel_shader, int32_t x, int32_t y); // C data constructor void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, vectorio_ishape_t ishape, - mp_obj_t pixel_shader, uint16_t x, uint16_t y); + mp_obj_t pixel_shader, int32_t x, int32_t y); void common_hal_vectorio_vector_shape_set_dirty(void *self); mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self); -void common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x); +bool common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x); mp_obj_tuple_t *common_hal_vectorio_vector_shape_get_location(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self, mp_obj_t xy); mp_int_t common_hal_vectorio_vector_shape_get_y(vectorio_vector_shape_t *self); -void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y); +bool common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y); mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_pixel_shader(vectorio_vector_shape_t *self, mp_obj_t pixel_shader); diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 9d0279cf14..eae2ea57b4 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -164,10 +164,10 @@ void common_hal_vectorio_vector_shape_set_dirty(void *vector_shape) { void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, vectorio_ishape_t ishape, - mp_obj_t pixel_shader, uint16_t x, uint16_t y) { + mp_obj_t pixel_shader, int32_t x, int32_t y) { VECTORIO_SHAPE_DEBUG("%p vector_shape_construct x:%3d, y:%3d\n", self, x, y); - self->x = x; - self->y = y; + common_hal_vectorio_vector_shape_set_x(self, x); + common_hal_vectorio_vector_shape_set_y(self, y); self->pixel_shader = pixel_shader; self->ishape = ishape; self->absolute_transform = &null_transform; // Critical to have a valid transform before getting screen area. @@ -184,13 +184,16 @@ mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self) { } -void common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x) { +bool common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x) { VECTORIO_SHAPE_DEBUG("%p set_x %d\n", self, x); if (self->x == x) { - return; + return false; // it's not dirty + } + if (x < SHRT_MIN || x > SHRT_MAX) { + mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point); } self->x = x; - common_hal_vectorio_vector_shape_set_dirty(self); + return true; // it's dirty } @@ -200,13 +203,16 @@ mp_int_t common_hal_vectorio_vector_shape_get_y(vectorio_vector_shape_t *self) { } -void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y) { +bool common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y) { VECTORIO_SHAPE_DEBUG("%p set_y %d\n", self, y); if (self->y == y) { - return; + return false; // it's not dirty + } + if (y < SHRT_MIN || y > SHRT_MAX) { + mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point); } self->y = y; - common_hal_vectorio_vector_shape_set_dirty(self); + return true; // it's dirty } mp_obj_tuple_t *common_hal_vectorio_vector_shape_get_location(vectorio_vector_shape_t *self) { @@ -230,14 +236,14 @@ void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self mp_int_t x; mp_int_t y; if (!mp_obj_get_int_maybe(tuple_items[ 0 ], &x) - || !mp_obj_get_int_maybe(tuple_items[ 1 ], &y) - || x < SHRT_MIN || x > SHRT_MAX || y < SHRT_MIN || y > SHRT_MAX - ) { + || !mp_obj_get_int_maybe(tuple_items[ 1 ], &y)) { mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point); } - self->x = (int16_t)x; - self->y = (int16_t)y; - common_hal_vectorio_vector_shape_set_dirty(self); + bool dirty = common_hal_vectorio_vector_shape_set_x(self, x); + dirty |= common_hal_vectorio_vector_shape_set_y(self, y); + if (dirty) { + common_hal_vectorio_vector_shape_set_dirty(self); + } } From c6f2dae5912faf7bb298aa62070ca6d835d5ddda Mon Sep 17 00:00:00 2001 From: James Carr Date: Fri, 10 Sep 2021 09:34:20 +0100 Subject: [PATCH 382/418] Remove unused varg part of Error calls. --- shared-module/vectorio/Polygon.c | 2 +- shared-module/vectorio/VectorShape.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-module/vectorio/Polygon.c b/shared-module/vectorio/Polygon.c index f7199c7f83..f0b241e351 100644 --- a/shared-module/vectorio/Polygon.c +++ b/shared-module/vectorio/Polygon.c @@ -22,7 +22,7 @@ static void _clobber_points_list(vectorio_polygon_t *self, mp_obj_t points_tuple VECTORIO_POLYGON_DEBUG(" self.len: %d, len: %d, ", self->len, len); if (len < 3) { - mp_raise_TypeError_varg(translate("Polygon needs at least 3 points")); + mp_raise_TypeError(translate("Polygon needs at least 3 points")); } if (self->len < 2 * len) { diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index eae2ea57b4..8fc62c43c5 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -230,7 +230,7 @@ void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self mp_obj_t *tuple_items; mp_obj_tuple_get(xy, &tuple_len, &tuple_items); if (tuple_len != 2) { - mp_raise_TypeError_varg(translate("(x,y) integers required")); + mp_raise_TypeError(translate("(x,y) integers required")); } mp_int_t x; From 832e608d3e64a35b6ee186eb3a0625ed1521d10f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 10 Sep 2021 07:30:29 -0700 Subject: [PATCH 383/418] Add if pre-condition to builds --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2971032018..5c743bdb91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -228,6 +228,7 @@ jobs: fail-fast: false matrix: board: ${{ fromJSON(needs.test.outputs.arm-boards) }} + if: ${{ needs.test.outputs.arm-boards != '[]' }} steps: - name: Set up Python 3.8 @@ -278,6 +279,7 @@ jobs: fail-fast: false matrix: board: ${{ fromJSON(needs.test.outputs.riscv-boards) }} + if: ${{ needs.test.outputs.riscv-boards != '[]' }} steps: - name: Set up Python 3.8 @@ -327,6 +329,7 @@ jobs: fail-fast: false matrix: board: ${{ fromJSON(needs.test.outputs.xtensa-boards) }} + if: ${{ needs.test.outputs.xtensa-boards != '[]' }} steps: - name: Set up Python 3.8 From 189efdf074f99f2de9e9d3acf51bffd226508e27 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 9 Sep 2021 23:17:44 -0400 Subject: [PATCH 384/418] Use NO_PIN, not 0, for PDMIn unset pins. Also: - Use NO_PIN, not 0xff for I2SOut (cosmetic fix only; no actual functional change) - Add VOLTAGE_MONITOR/BATTERY, ACCELEROMETER_INTERRUPT pins for LED Glasses Driver --- ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c | 5 +++++ ports/nrf/common-hal/audiobusio/I2SOut.c | 8 ++++---- ports/nrf/common-hal/audiobusio/PDMIn.c | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c index bdc110cba3..8bc4ead19b 100644 --- a/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c +++ b/ports/nrf/boards/adafruit_led_glasses_nrf52840/pins.c @@ -12,6 +12,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_P0_01) }, + + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_06) }, diff --git a/ports/nrf/common-hal/audiobusio/I2SOut.c b/ports/nrf/common-hal/audiobusio/I2SOut.c index ded03c07c2..8626ce714d 100644 --- a/ports/nrf/common-hal/audiobusio/I2SOut.c +++ b/ports/nrf/common-hal/audiobusio/I2SOut.c @@ -230,7 +230,7 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, } bool common_hal_audiobusio_i2sout_deinited(audiobusio_i2sout_obj_t *self) { - return self->data_pin_number == 0xff; + return self->data_pin_number == NO_PIN; } void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { @@ -240,11 +240,11 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { NRF_I2S->TASKS_STOP = 1; NRF_I2S->ENABLE = I2S_ENABLE_ENABLE_Disabled; reset_pin_number(self->bit_clock_pin_number); - self->bit_clock_pin_number = 0xff; + self->bit_clock_pin_number = NO_PIN; reset_pin_number(self->word_select_pin_number); - self->word_select_pin_number = 0xff; + self->word_select_pin_number = NO_PIN; reset_pin_number(self->data_pin_number); - self->data_pin_number = 0xff; + self->data_pin_number = NO_PIN; instance = NULL; supervisor_disable_tick(); } diff --git a/ports/nrf/common-hal/audiobusio/PDMIn.c b/ports/nrf/common-hal/audiobusio/PDMIn.c index 47d7365777..c34a4ebba9 100644 --- a/ports/nrf/common-hal/audiobusio/PDMIn.c +++ b/ports/nrf/common-hal/audiobusio/PDMIn.c @@ -69,16 +69,16 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self, } bool common_hal_audiobusio_pdmin_deinited(audiobusio_pdmin_obj_t *self) { - return !self->clock_pin_number; + return self->clock_pin_number == NO_PIN; } void common_hal_audiobusio_pdmin_deinit(audiobusio_pdmin_obj_t *self) { nrf_pdm->ENABLE = 0; reset_pin_number(self->clock_pin_number); - self->clock_pin_number = 0; + self->clock_pin_number = NO_PIN; reset_pin_number(self->data_pin_number); - self->data_pin_number = 0; + self->data_pin_number = NO_PIN; } uint8_t common_hal_audiobusio_pdmin_get_bit_depth(audiobusio_pdmin_obj_t *self) { From aa1d089cdb87a832d5cc46b2ca83aee62a2119e5 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 10 Sep 2021 14:50:09 -0400 Subject: [PATCH 385/418] proxlight: Freeze adafruit_adps9960 instead of adafruit_hid; enable usb_midi --- .gitmodules | 3 +++ frozen/Adafruit_CircuitPython_APDS9960 | 1 + .../boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk | 3 +-- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 160000 frozen/Adafruit_CircuitPython_APDS9960 diff --git a/.gitmodules b/.gitmodules index d1abf760d0..6089411280 100644 --- a/.gitmodules +++ b/.gitmodules @@ -191,3 +191,6 @@ [submodule "lib/quirc"] path = lib/quirc url = https://github.com/adafruit/quirc.git +[submodule "frozen/Adafruit_CircuitPython_APDS9960"] + path = frozen/Adafruit_CircuitPython_APDS9960 + url = https://github.com/adafruit/Adafruit_CircuitPython_APDS9960 diff --git a/frozen/Adafruit_CircuitPython_APDS9960 b/frozen/Adafruit_CircuitPython_APDS9960 new file mode 160000 index 0000000000..ee411d34df --- /dev/null +++ b/frozen/Adafruit_CircuitPython_APDS9960 @@ -0,0 +1 @@ +Subproject commit ee411d34dfa2fb70a35aa99945eca77f16456619 diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index 10a2f4ed37..688d3c0db4 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -19,7 +19,6 @@ CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 -CIRCUITPY_USB_MIDI = 0 CIRCUITPY_GETPASS = 0 CIRCUITPY_TRACEBACK = 0 @@ -28,5 +27,5 @@ CIRCUITPY_PIXELBUF = 1 CIRCUITPY_BUSDEVICE = 1 # Include these Python libraries in firmware. -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_APDS9960 FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel From 2bc260a102fd5943352f257ff2bbf22cbe6e2368 Mon Sep 17 00:00:00 2001 From: James Carr Date: Fri, 10 Sep 2021 21:48:01 +0100 Subject: [PATCH 386/418] Rework of changes to bounds checking of location in VectorShape, moving most of the code into shared-module. --- shared-bindings/vectorio/VectorShape.c | 10 +---- shared-bindings/vectorio/VectorShape.h | 4 +- shared-module/vectorio/VectorShape.c | 53 ++++++++++++++++++-------- shared-module/vectorio/VectorShape.h | 3 ++ 4 files changed, 44 insertions(+), 26 deletions(-) diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index 51c2679b83..c9cbf0a114 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -99,10 +99,7 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_x(mp_obj_t wrapper_shape, mp_obj_t vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); mp_int_t x = mp_obj_get_int(x_obj); - bool dirty = common_hal_vectorio_vector_shape_set_x(self, x); - if (dirty) { - common_hal_vectorio_vector_shape_set_dirty(self); - } + common_hal_vectorio_vector_shape_set_x(self, x); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_x_obj, vectorio_vector_shape_obj_set_x); @@ -133,10 +130,7 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_y(mp_obj_t wrapper_shape, mp_obj_t vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); mp_int_t y = mp_obj_get_int(y_obj); - bool dirty = common_hal_vectorio_vector_shape_set_y(self, y); - if (dirty) { - common_hal_vectorio_vector_shape_set_dirty(self); - } + common_hal_vectorio_vector_shape_set_y(self, y); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_y_obj, vectorio_vector_shape_obj_set_y); diff --git a/shared-bindings/vectorio/VectorShape.h b/shared-bindings/vectorio/VectorShape.h index d11384e3eb..12c7e628ad 100644 --- a/shared-bindings/vectorio/VectorShape.h +++ b/shared-bindings/vectorio/VectorShape.h @@ -21,13 +21,13 @@ void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, void common_hal_vectorio_vector_shape_set_dirty(void *self); mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self); -bool common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x); +void common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x); mp_obj_tuple_t *common_hal_vectorio_vector_shape_get_location(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self, mp_obj_t xy); mp_int_t common_hal_vectorio_vector_shape_get_y(vectorio_vector_shape_t *self); -bool common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y); +void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y); mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_pixel_shader(vectorio_vector_shape_t *self, mp_obj_t pixel_shader); diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 8fc62c43c5..d90e2715b3 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -166,8 +166,10 @@ void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, vectorio_ishape_t ishape, mp_obj_t pixel_shader, int32_t x, int32_t y) { VECTORIO_SHAPE_DEBUG("%p vector_shape_construct x:%3d, y:%3d\n", self, x, y); - common_hal_vectorio_vector_shape_set_x(self, x); - common_hal_vectorio_vector_shape_set_y(self, y); + vectorio_vector_shape_validate_x_bounds(x); + self->x = x; + vectorio_vector_shape_validate_y_bounds(y); + self->y = y; self->pixel_shader = pixel_shader; self->ishape = ishape; self->absolute_transform = &null_transform; // Critical to have a valid transform before getting screen area. @@ -184,16 +186,14 @@ mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self) { } -bool common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x) { +void common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_int_t x) { VECTORIO_SHAPE_DEBUG("%p set_x %d\n", self, x); if (self->x == x) { - return false; // it's not dirty - } - if (x < SHRT_MIN || x > SHRT_MAX) { - mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point); + return; } + vectorio_vector_shape_validate_x_bounds(x); self->x = x; - return true; // it's dirty + common_hal_vectorio_vector_shape_set_dirty(self); } @@ -203,16 +203,14 @@ mp_int_t common_hal_vectorio_vector_shape_get_y(vectorio_vector_shape_t *self) { } -bool common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y) { +void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y) { VECTORIO_SHAPE_DEBUG("%p set_y %d\n", self, y); if (self->y == y) { - return false; // it's not dirty - } - if (y < SHRT_MIN || y > SHRT_MAX) { - mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point); + return; } + vectorio_vector_shape_validate_y_bounds(y); self->y = y; - return true; // it's dirty + common_hal_vectorio_vector_shape_set_dirty(self); } mp_obj_tuple_t *common_hal_vectorio_vector_shape_get_location(vectorio_vector_shape_t *self) { @@ -239,14 +237,37 @@ void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self || !mp_obj_get_int_maybe(tuple_items[ 1 ], &y)) { mp_raise_ValueError_varg(translate("unsupported %q type"), MP_QSTR_point); } - bool dirty = common_hal_vectorio_vector_shape_set_x(self, x); - dirty |= common_hal_vectorio_vector_shape_set_y(self, y); + bool dirty = false; + if (self->x != x) { + vectorio_vector_shape_validate_x_bounds(x); + self->x = x; + dirty = true; + } + if (self->y != y) { + vectorio_vector_shape_validate_y_bounds(y); + self->y = y; + dirty = true; + } if (dirty) { common_hal_vectorio_vector_shape_set_dirty(self); } } +void vectorio_vector_shape_validate_x_bounds(mp_int_t x) { + if (x < SHRT_MIN || x > SHRT_MAX) { + mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_x, SHRT_MIN, SHRT_MAX); + } +} + + +void vectorio_vector_shape_validate_y_bounds(mp_int_t y) { + if (y < SHRT_MIN || y > SHRT_MAX) { + mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_y, SHRT_MIN, SHRT_MAX); + } +} + + mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self) { VECTORIO_SHAPE_DEBUG("%p get_pixel_shader\n", self); return self->pixel_shader; diff --git a/shared-module/vectorio/VectorShape.h b/shared-module/vectorio/VectorShape.h index fdbae964a8..cb12590e35 100644 --- a/shared-module/vectorio/VectorShape.h +++ b/shared-module/vectorio/VectorShape.h @@ -51,4 +51,7 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ bool vectorio_vector_shape_get_previous_area(vectorio_vector_shape_t *self, displayio_area_t *out_area); void vectorio_vector_shape_finish_refresh(vectorio_vector_shape_t *self); +void vectorio_vector_shape_validate_x_bounds(mp_int_t x); +void vectorio_vector_shape_validate_y_bounds(mp_int_t y); + #endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_SHAPE_H From 145836e7e5160eaba68b91712b6c083d8b7dec84 Mon Sep 17 00:00:00 2001 From: James Carr Date: Sat, 11 Sep 2021 17:10:21 +0100 Subject: [PATCH 387/418] Make the x and y bounds checking functions static --- shared-module/vectorio/VectorShape.c | 50 +++++++++++++--------------- shared-module/vectorio/VectorShape.h | 3 -- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index d90e2715b3..7899e2710c 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -125,6 +125,24 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou } +STATIC +void check_bounds_and_set_x(vectorio_vector_shape_t *self, mp_int_t x) { + if (x < SHRT_MIN || x > SHRT_MAX) { + mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_x, SHRT_MIN, SHRT_MAX); + } + self->x = x; +} + + +STATIC +void check_bounds_and_set_y(vectorio_vector_shape_t *self, mp_int_t y) { + if (y < SHRT_MIN || y > SHRT_MAX) { + mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_y, SHRT_MIN, SHRT_MAX); + } + self->y = y; +} + + // For use by Group to know where it needs to redraw on layer removal. bool vectorio_vector_shape_get_dirty_area(vectorio_vector_shape_t *self, displayio_area_t *out_area) { out_area->x1 = out_area->x2; @@ -166,10 +184,8 @@ void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, vectorio_ishape_t ishape, mp_obj_t pixel_shader, int32_t x, int32_t y) { VECTORIO_SHAPE_DEBUG("%p vector_shape_construct x:%3d, y:%3d\n", self, x, y); - vectorio_vector_shape_validate_x_bounds(x); - self->x = x; - vectorio_vector_shape_validate_y_bounds(y); - self->y = y; + check_bounds_and_set_x(self, x); + check_bounds_and_set_y(self, y); self->pixel_shader = pixel_shader; self->ishape = ishape; self->absolute_transform = &null_transform; // Critical to have a valid transform before getting screen area. @@ -191,8 +207,7 @@ void common_hal_vectorio_vector_shape_set_x(vectorio_vector_shape_t *self, mp_in if (self->x == x) { return; } - vectorio_vector_shape_validate_x_bounds(x); - self->x = x; + check_bounds_and_set_x(self, x); common_hal_vectorio_vector_shape_set_dirty(self); } @@ -208,8 +223,7 @@ void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_in if (self->y == y) { return; } - vectorio_vector_shape_validate_y_bounds(y); - self->y = y; + check_bounds_and_set_y(self, y); common_hal_vectorio_vector_shape_set_dirty(self); } @@ -239,13 +253,11 @@ void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self } bool dirty = false; if (self->x != x) { - vectorio_vector_shape_validate_x_bounds(x); - self->x = x; + check_bounds_and_set_x(self, x); dirty = true; } if (self->y != y) { - vectorio_vector_shape_validate_y_bounds(y); - self->y = y; + check_bounds_and_set_y(self, y); dirty = true; } if (dirty) { @@ -254,20 +266,6 @@ void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self } -void vectorio_vector_shape_validate_x_bounds(mp_int_t x) { - if (x < SHRT_MIN || x > SHRT_MAX) { - mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_x, SHRT_MIN, SHRT_MAX); - } -} - - -void vectorio_vector_shape_validate_y_bounds(mp_int_t y) { - if (y < SHRT_MIN || y > SHRT_MAX) { - mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_y, SHRT_MIN, SHRT_MAX); - } -} - - mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self) { VECTORIO_SHAPE_DEBUG("%p get_pixel_shader\n", self); return self->pixel_shader; diff --git a/shared-module/vectorio/VectorShape.h b/shared-module/vectorio/VectorShape.h index cb12590e35..fdbae964a8 100644 --- a/shared-module/vectorio/VectorShape.h +++ b/shared-module/vectorio/VectorShape.h @@ -51,7 +51,4 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ bool vectorio_vector_shape_get_previous_area(vectorio_vector_shape_t *self, displayio_area_t *out_area); void vectorio_vector_shape_finish_refresh(vectorio_vector_shape_t *self); -void vectorio_vector_shape_validate_x_bounds(mp_int_t x); -void vectorio_vector_shape_validate_y_bounds(mp_int_t y); - #endif // MICROPY_INCLUDED_SHARED_MODULE_VECTORIO_SHAPE_H From f35d1578ccbc60eaf3a11e69a1c9de518faf0602 Mon Sep 17 00:00:00 2001 From: James Carr Date: Sat, 11 Sep 2021 23:37:41 +0100 Subject: [PATCH 388/418] Update the docs for vectorio --- shared-bindings/vectorio/Circle.c | 23 +++++++++++++++++---- shared-bindings/vectorio/Polygon.c | 30 ++++++++++++++++++++++------ shared-bindings/vectorio/Rectangle.c | 26 +++++++++++++++++++----- shared-bindings/vectorio/__init__.c | 24 +++++++++++++++++++++- 4 files changed, 87 insertions(+), 16 deletions(-) diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index cdf8965e75..abcbccd856 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -15,10 +15,10 @@ //| def __init__(self, pixel_shader: Union[displayio.ColorConverter, displayio.Palette], radius: int, x: int, y: int) -> None: //| """Circle is positioned on screen by its center point. //| -//| :param pixel_shader: The pixel shader that produces colors from values -//| :param radius: The radius of the circle in pixels -//| :param x: Initial x position of the axis. -//| :param y: Initial y position of the axis.""" +//| :param Union[~displayio.ColorConverter,~displayio.Palette] pixel_shader: The pixel shader that produces colors from values +//| :param int radius: The radius of the circle in pixels +//| :param int x: Initial x position of the axis. +//| :param int y: Initial y position of the axis.""" //| static mp_obj_t vectorio_circle_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_pixel_shader, ARG_radius, ARG_x, ARG_y }; @@ -81,6 +81,21 @@ const mp_obj_property_t vectorio_circle_radius_obj = { }; +// Documentation for properties inherited from VectorShape. + +//| x : int +//| """X position of the center point of the circle in the parent.""" +//| +//| y : int +//| """Y position of the center point of the circle in the parent.""" +//| +//| location : Tuple[int,int] +//| """(X,Y) position of the center point of the circle in the parent.""" +//| +//| pixel_shader : Union[displayio.ColorConverter,displayio.Palette] +//| """The pixel shader of the circle.""" +//| + STATIC const mp_rom_map_elem_t vectorio_circle_locals_dict_table[] = { // Properties { MP_ROM_QSTR(MP_QSTR_radius), MP_ROM_PTR(&vectorio_circle_radius_obj) }, diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index 17d293c7a3..36e169569a 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -18,12 +18,14 @@ //| class Polygon: //| def __init__(self, pixel_shader: Union[displayio.ColorConverter, displayio.Palette], points: List[Tuple[int, int]], x: int, y: int) -> None: -//| """Represents a closed shape by ordered vertices +//| """Represents a closed shape by ordered vertices. The path will be treated as +//| 'closed', the last point will connect to the first point. //| -//| :param pixel_shader: The pixel shader that produces colors from values -//| :param points: Vertices for the polygon -//| :param x: Initial screen x position of the 0,0 origin in the points list. -//| :param y: Initial screen y position of the 0,0 origin in the points list.""" +//| :param Union[~displayio.ColorConverter,~displayio.Palette] pixel_shader: The pixel +//| shader that produces colors from values +//| :param List[Tuple[int,int]] points: Vertices for the polygon +//| :param int x: Initial screen x position of the 0,0 origin in the points list. +//| :param int y: Initial screen y position of the 0,0 origin in the points list.""" //| static mp_obj_t vectorio_polygon_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_pixel_shader, ARG_points_list, ARG_x, ARG_y }; @@ -63,7 +65,7 @@ STATIC const vectorio_draw_protocol_t polygon_draw_protocol = { //| points: List[Tuple[int, int]] -//| """Set a new look and shape for this polygon""" +//| """Vertices for the polygon.""" //| STATIC mp_obj_t vectorio_polygon_obj_get_points(mp_obj_t self_in) { vectorio_polygon_t *self = MP_OBJ_TO_PTR(self_in); @@ -86,6 +88,22 @@ const mp_obj_property_t vectorio_polygon_points_obj = { MP_ROM_NONE}, }; + +// Documentation for properties inherited from VectorShape. + +//| x : int +//| """Initial screen X position of the 0,0 origin in the points list.""" +//| +//| y : int +//| """Initial screen Y position of the 0,0 origin in the points list.""" +//| +//| location : Tuple[int,int] +//| """Initial screen (X,Y) position of the 0,0 origin in the points list.""" +//| +//| pixel_shader : Union[displayio.ColorConverter,displayio.Palette] +//| """The pixel shader of the polygon.""" +//| + STATIC const mp_rom_map_elem_t vectorio_polygon_locals_dict_table[] = { // Properties { MP_ROM_QSTR(MP_QSTR_points), MP_ROM_PTR(&vectorio_polygon_points_obj) }, diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index c6f45874bd..176cbaba7c 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -13,11 +13,11 @@ //| def __init__(self, pixel_shader: Union[displayio.ColorConverter, displayio.Palette], width: int, height: int, x: int, y: int) -> None: //| """Represents a rectangle by defining its bounds //| -//| :param pixel_shader: The pixel shader that produces colors from values -//| :param width: The number of pixels wide -//| :param height: The number of pixels high -//| :param x: Initial x position of the top left corner. -//| :param y: Initial y position of the top left corner.""" +//| :param Union[~displayio.ColorConverter,~displayio.Palette] pixel_shader: The pixel shader that produces colors from values +//| :param int width: The number of pixels wide +//| :param int height: The number of pixels high +//| :param int x: Initial x position of the top left corner. +//| :param int y: Initial y position of the top left corner.""" //| static mp_obj_t vectorio_rectangle_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_pixel_shader, ARG_width, ARG_height, ARG_x, ARG_y }; @@ -60,6 +60,22 @@ STATIC const vectorio_draw_protocol_t rectangle_draw_protocol = { .draw_protocol_impl = &vectorio_vector_shape_draw_protocol_impl }; + +// Documentation for properties inherited from VectorShape. + +//| x : int +//| """X position of the top left corner of the rectangle in the parent.""" +//| +//| y : int +//| """Y position of the top left corner of the rectangle in the parent.""" +//| +//| location : Tuple[int,int] +//| """(X,Y) position of the top left corner of the rectangle in the parent.""" +//| +//| pixel_shader : Union[displayio.ColorConverter,displayio.Palette] +//| """The pixel shader of the rectangle.""" +//| + STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = { // Properties { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, diff --git a/shared-bindings/vectorio/__init__.c b/shared-bindings/vectorio/__init__.c index 9bfa674a04..6e39f26591 100644 --- a/shared-bindings/vectorio/__init__.c +++ b/shared-bindings/vectorio/__init__.c @@ -7,7 +7,29 @@ #include "shared-bindings/vectorio/Polygon.h" #include "shared-bindings/vectorio/Rectangle.h" -//| """Lightweight 2d shapes for displays""" +//| """Lightweight 2D shapes for displays +//| +//| The :py:attr:`vectorio` module provide simple filled drawing primitives for +//| use with `displayio`. +//| +//| .. code-block:: python +//| +//| group = displayio.Group() +//| +//| palette = displayio.Palette(1) +//| palette[0] = 0x125690 +//| +//| circle = vectorio.Circle(pixel_shader=palette, radius=25, x=70, y=40) +//| group.append(circle) +//| +//| rectangle = vectorio.Rectangle(pixel_shader=palette, width=40, height=30, x=55, y=45) +//| group.append(rectangle) +//| +//| points=[(5, 5), (100, 20), (20, 20), (20, 100)] +//| polygon = vectorio.Polygon(pixel_shader=palette, points=points, x=0, y=0) +//| group.append(polygon) +//| +//| """ //| STATIC const mp_rom_map_elem_t vectorio_module_globals_table[] = { From 7316c742cf7f2854728f7a7e855d42885e47db56 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Sun, 12 Sep 2021 18:04:02 +0530 Subject: [PATCH 389/418] make `next_code_allocation` and `prev_traceback_allocation` movable --- main.c | 2 +- shared-bindings/supervisor/__init__.c | 2 +- supervisor/shared/memory.c | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index d024717beb..d6ed269809 100755 --- a/main.c +++ b/main.c @@ -236,7 +236,7 @@ STATIC void cleanup_after_vm(supervisor_allocation* heap, mp_obj_t exception) { size_t traceback_len = 0; mp_print_t print_count = {&traceback_len, count_strn}; mp_obj_print_exception(&print_count, exception); - prev_traceback_allocation = allocate_memory(align32_size(traceback_len + 1), false, false); + prev_traceback_allocation = allocate_memory(align32_size(traceback_len + 1), false, true); // Empirically, this never fails in practice - even when the heap is totally filled up // with single-block-sized objects referenced by a root pointer, exiting the VM frees // up several hundred bytes, sufficient for the traceback (which tends to be shortened diff --git a/shared-bindings/supervisor/__init__.c b/shared-bindings/supervisor/__init__.c index 8c581c9364..a9b99ed87d 100644 --- a/shared-bindings/supervisor/__init__.c +++ b/shared-bindings/supervisor/__init__.c @@ -195,7 +195,7 @@ STATIC mp_obj_t supervisor_set_next_code_file(size_t n_args, const mp_obj_t *pos const char *filename = mp_obj_str_get_data(args.filename.u_obj, &len); free_memory(next_code_allocation); if (options != 0 || len != 0) { - next_code_allocation = allocate_memory(align32_size(sizeof(next_code_info_t) + len + 1), false, false); + next_code_allocation = allocate_memory(align32_size(sizeof(next_code_info_t) + len + 1), false, true); if (next_code_allocation == NULL) { m_malloc_fail(sizeof(next_code_info_t) + len + 1); } diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index 04f2f571db..cf7dbf7ed7 100644 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -34,12 +34,9 @@ enum { CIRCUITPY_SUPERVISOR_IMMOVABLE_ALLOC_COUNT = + 0 // stack + heap - 2 - // next_code_allocation - + 1 - // prev_traceback_allocation - + 1 + + 2 #if INTERNAL_FLASH_FILESYSTEM == 0 + 1 @@ -59,6 +56,10 @@ enum { CIRCUITPY_SUPERVISOR_MOVABLE_ALLOC_COUNT = 0 + // next_code_allocation + + 1 + // prev_traceback_allocation + + 1 #if CIRCUITPY_DISPLAYIO #if CIRCUITPY_TERMINALIO + 1 From c4bea28446dd6141bfbb6efc6321647f83eb29e1 Mon Sep 17 00:00:00 2001 From: Bruce Segal Date: Sun, 12 Sep 2021 17:54:44 -0700 Subject: [PATCH 390/418] Update pins.c to match hmi devkit board --- .../boards/espressif_hmi_devkit_1/pins.c | 48 +++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c b/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c index 52ac5b53b3..7e201e163f 100644 --- a/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c +++ b/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c @@ -27,7 +27,49 @@ STATIC const mp_rom_obj_tuple_t lcd_data_tuple = { STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + +// Neopixel power is controlled by onboard TCA9554 + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_LCD_RS), MP_ROM_PTR(&pin_GPIO38) }, // LCD @@ -49,8 +91,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, // canbus (TWAI) - { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_GPIO41) }, - { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_GPIO42) }, // Audio { MP_ROM_QSTR(MP_QSTR_MIC_ADC_M), MP_ROM_PTR(&pin_GPIO9) }, From a0d960f2a1e31b9214f2b857ea7f070c600ec070 Mon Sep 17 00:00:00 2001 From: Kamil Tomaszewski Date: Fri, 3 Sep 2021 09:25:22 +0200 Subject: [PATCH 391/418] spresense: update SDK to 2.3.0 --- ports/cxd56/Makefile | 11 +- ports/cxd56/README.md | 2 +- ports/cxd56/common-hal/busio/SPI.c | 2 + ports/cxd56/common-hal/pulseio/PulseOut.c | 6 +- ports/cxd56/common-hal/sdioio/SDCard.c | 1 - ports/cxd56/configs/circuitpython/defconfig | 63 +- ports/cxd56/spresense-exported-sdk | 2 +- ports/cxd56/tools/flash_writer.py | 46 +- ports/cxd56/tools/requirements.txt | 2 + ports/cxd56/tools/xmodem.py | 808 -------------------- 10 files changed, 45 insertions(+), 898 deletions(-) create mode 100644 ports/cxd56/tools/requirements.txt delete mode 100644 ports/cxd56/tools/xmodem.py diff --git a/ports/cxd56/Makefile b/ports/cxd56/Makefile index ed5d2bedb1..73c9fe5822 100644 --- a/ports/cxd56/Makefile +++ b/ports/cxd56/Makefile @@ -128,7 +128,6 @@ OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions # option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk CFLAGS += $(OPTIMIZATION_FLAGS) - LIBM = "${shell "$(CC)" $(CFLAGS) -print-file-name=libm.a}" LIBGCC = "${shell "$(CC)" $(CFLAGS) -print-libgcc-file-name}" @@ -146,7 +145,15 @@ LDFLAGS = \ -u board_timerhook \ $(BUILD)/libmpy.a \ $(SPRESENSE_SDK)/nuttx/libs/libapps.a \ - $(SPRESENSE_SDK)/nuttx/libs/libnuttx.a \ + $(SPRESENSE_SDK)/nuttx/libs/libarch.a \ + $(SPRESENSE_SDK)/nuttx/libs/libbinfmt.a \ + $(SPRESENSE_SDK)/nuttx/libs/libboard.a \ + $(SPRESENSE_SDK)/nuttx/libs/libboards.a \ + $(SPRESENSE_SDK)/nuttx/libs/libc.a \ + $(SPRESENSE_SDK)/nuttx/libs/libdrivers.a \ + $(SPRESENSE_SDK)/nuttx/libs/libfs.a \ + $(SPRESENSE_SDK)/nuttx/libs/libmm.a \ + $(SPRESENSE_SDK)/nuttx/libs/libsched.a \ $(LIBM) \ $(LIBGCC) \ --end-group \ diff --git a/ports/cxd56/README.md b/ports/cxd56/README.md index c399b8a4d7..0656ad1f1a 100644 --- a/ports/cxd56/README.md +++ b/ports/cxd56/README.md @@ -75,7 +75,7 @@ Bootloader information: * You have to accept the End User License Agreement to be able to download and use the Spresense bootloader binary. -Download the spresense binaries zip archive from: [Spresense firmware v2-0-002](https://developer.sony.com/file/download/download-spresense-firmware-v2-0-002) +Download the spresense binaries zip archive from: [Spresense firmware v2-3-000](https://developer.sony.com/file/download/download-spresense-firmware-v2-3-000) Extract spresense binaries in your PC to ports/spresense/spresense-exported-sdk/firmware/ diff --git a/ports/cxd56/common-hal/busio/SPI.c b/ports/cxd56/common-hal/busio/SPI.c index ea481e136d..922a30f1c2 100644 --- a/ports/cxd56/common-hal/busio/SPI.c +++ b/ports/cxd56/common-hal/busio/SPI.c @@ -24,6 +24,8 @@ * THE SOFTWARE. */ +#include + #include #include #include diff --git a/ports/cxd56/common-hal/pulseio/PulseOut.c b/ports/cxd56/common-hal/pulseio/PulseOut.c index 5e296a1b1e..11bd5443bb 100644 --- a/ports/cxd56/common-hal/pulseio/PulseOut.c +++ b/ports/cxd56/common-hal/pulseio/PulseOut.c @@ -38,7 +38,7 @@ static uint16_t pulse_index = 0; static uint16_t pulse_length; static int pulse_fd = -1; -static bool pulseout_timer_handler(unsigned int *next_interval_us, void *arg) { +static bool pulseout_timer_handler(uint32_t *next_interval_us, void *arg) { uint8_t pwm_num = (uint8_t)(int)arg; pulse_index++; @@ -46,7 +46,7 @@ static bool pulseout_timer_handler(unsigned int *next_interval_us, void *arg) { return false; } - *next_interval_us = pulse_buffer[pulse_index] * 1000; + *next_interval_us = pulse_buffer[pulse_index]; if (pulse_index % 2 == 0) { pwmout_start(pwm_num); @@ -108,7 +108,7 @@ void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pu pulse_index = 0; pulse_length = len; - unsigned long timeout = pulse_buffer[0] * 1000; + unsigned long timeout = pulse_buffer[0]; ioctl(pulse_fd, TCIOC_SETTIMEOUT, timeout); diff --git a/ports/cxd56/common-hal/sdioio/SDCard.c b/ports/cxd56/common-hal/sdioio/SDCard.c index cf8986a4f8..58d786517b 100644 --- a/ports/cxd56/common-hal/sdioio/SDCard.c +++ b/ports/cxd56/common-hal/sdioio/SDCard.c @@ -130,7 +130,6 @@ int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t sta check_whole_block(bufinfo); return self->inode->u.i_bops->write(self->inode, bufinfo->buf, start_block, bufinfo->len / 512); - ; } void common_hal_sdioio_sdcard_never_reset(sdioio_sdcard_obj_t *self) { diff --git a/ports/cxd56/configs/circuitpython/defconfig b/ports/cxd56/configs/circuitpython/defconfig index 096b53b800..6a7c39cba8 100644 --- a/ports/cxd56/configs/circuitpython/defconfig +++ b/ports/cxd56/configs/circuitpython/defconfig @@ -12,8 +12,8 @@ # CONFIG_MMCSD_MMCSUPPORT is not set # CONFIG_MMCSD_SPI is not set # CONFIG_MTD_SMART_WEAR_LEVEL is not set -# CONFIG_NET_IPv4 is not set # CONFIG_NXFONTS_PACKEDMSFIRST is not set +# CONFIG_READLINE_ECHO is not set # CONFIG_STANDARD_SERIAL is not set CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="spresense" @@ -21,16 +21,8 @@ CONFIG_ARCH_BOARD_SPRESENSE=y CONFIG_ARCH_CHIP="cxd56xx" CONFIG_ARCH_CHIP_CXD56XX=y CONFIG_ARCH_INTERRUPTSTACK=2048 -CONFIG_ARCH_MATH_H=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_USEBASEPRI=y -CONFIG_ASMP=y -CONFIG_AUDIO=y -CONFIG_AUDIOUTILS_DSP_MOUNTPT="/mnt/sd0/BIN" -CONFIG_AUDIOUTILS_MANAGER=y -CONFIG_AUDIOUTILS_PLAYER=y -CONFIG_AUDIOUTILS_PLAYLIST=y -CONFIG_AUDIOUTILS_RECORDER=y CONFIG_BOARDCTL_IOCTL=y CONFIG_BOARDCTL_POWEROFF=y CONFIG_BOARDCTL_RESET=y @@ -41,13 +33,13 @@ CONFIG_BOARD_CRASHDUMP=y CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5434 CONFIG_BOOT_RUNFROMISRAM=y -CONFIG_BUILTIN=y CONFIG_CLOCK_MONOTONIC=y CONFIG_CXD56_ADC=y -CONFIG_CXD56_AUDIO=y CONFIG_CXD56_BINARY=y CONFIG_CXD56_CHARGER=y CONFIG_CXD56_CISIF=y +CONFIG_CXD56_DMAC_SPI4_RX=y +CONFIG_CXD56_DMAC_SPI4_TX=y CONFIG_CXD56_GAUGE=y CONFIG_CXD56_GNSS=y CONFIG_CXD56_HPADC0=y @@ -65,33 +57,13 @@ CONFIG_CXD56_PWM3=y CONFIG_CXD56_PWM=y CONFIG_CXD56_SDIO=y CONFIG_CXD56_SPI3=y +CONFIG_CXD56_SPI4=y CONFIG_CXD56_SPI5=y CONFIG_CXD56_SPI=y CONFIG_CXD56_UART2=y -CONFIG_DEBUG_FULLOPT=y -CONFIG_DEBUG_SYMBOLS=y -CONFIG_DNN_RT=y -CONFIG_DNN_RT_MP=y CONFIG_DRIVERS_VIDEO=y -CONFIG_EXTERNALS_CMSIS=y -CONFIG_FAT_LCNAMES=y -CONFIG_FAT_LFN=y -CONFIG_FAT_MAXFNAME=64 CONFIG_FS_FAT=y -CONFIG_FS_PROCFS=y -CONFIG_FS_PROCFS_REGISTER=y -CONFIG_FS_ROMFS=y -CONFIG_FS_SMARTFS=y -CONFIG_HAVE_CXX=y -CONFIG_HAVE_CXXINITIALIZE=y -CONFIG_LCD=y -CONFIG_LCD_NOGETRUN=y CONFIG_LIBC_FLOATINGPOINT=y -CONFIG_LIBC_IPv4_ADDRCONV=y -CONFIG_LIBC_IPv6_ADDRCONV=y -CONFIG_LIB_KBDCODEC=y -CONFIG_MAX_WDOGPARMS=2 -CONFIG_MEMUTILS=y CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MTD=y @@ -101,32 +73,12 @@ CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_FSCK=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=64 -CONFIG_NET=y -CONFIG_NETDEVICES=y -CONFIG_NETDEV_LATEINIT=y -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_TCP_NO_STACK=y -CONFIG_NET_UDP_NO_STACK=y -CONFIG_NET_USRSOCK=y -CONFIG_NET_USRSOCK_TCP=y -CONFIG_NET_USRSOCK_UDP=y -CONFIG_NFILE_STREAMS=8 -CONFIG_NSH_ARCHINIT=y -CONFIG_NSH_BUILTIN_APPS=y -CONFIG_NSH_DISABLE_LOSMART=y -CONFIG_NSH_LINELEN=160 -CONFIG_NSH_MAXARGUMENTS=14 CONFIG_NSH_READLINE=y CONFIG_PIPES=y -CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_PREALLOC_TIMERS=4 -CONFIG_PREALLOC_WDOGS=16 CONFIG_PWM=y CONFIG_RAM_SIZE=1572864 CONFIG_RAM_START=0x0d000000 -CONFIG_READLINE_CMD_HISTORY=y -CONFIG_READLINE_CMD_HISTORY_LINELEN=160 -CONFIG_READLINE_TABCOMPLETION=y CONFIG_RR_INTERVAL=200 CONFIG_RTC=y CONFIG_RTC_ALARM=y @@ -141,21 +93,14 @@ CONFIG_SCHED_LPWORK=y CONFIG_SCHED_WAITPID=y CONFIG_SDCLONE_DISABLE=y CONFIG_SDIO_MUXBUS=y -CONFIG_SDK_AUDIO=y CONFIG_SERIAL_TERMIOS=y -CONFIG_SMARTFS_ALIGNED_ACCESS=y -CONFIG_SMARTFS_MAXNAMLEN=30 -CONFIG_SMARTFS_MULTI_ROOT_DIRS=y -CONFIG_SPECIFIC_DRIVERS=y CONFIG_SPI=y CONFIG_SPRESENSE_EXTENSION=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 CONFIG_SYSTEMTICK_HOOK=y -CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_NSH=y -CONFIG_SYSTEM_NSH_CXXINITIALIZE=y CONFIG_UART1_RXBUFSIZE=1024 CONFIG_UART1_SERIAL_CONSOLE=y CONFIG_UART1_TXBUFSIZE=1024 diff --git a/ports/cxd56/spresense-exported-sdk b/ports/cxd56/spresense-exported-sdk index b575f1c48a..6a148be849 160000 --- a/ports/cxd56/spresense-exported-sdk +++ b/ports/cxd56/spresense-exported-sdk @@ -1 +1 @@ -Subproject commit b575f1c48afb5acca27a1281a9036287cf3d2868 +Subproject commit 6a148be8497704d4afb5d14c175a12a592813fac diff --git a/ports/cxd56/tools/flash_writer.py b/ports/cxd56/tools/flash_writer.py index a61342e3ea..fc15cf8c28 100755 --- a/ports/cxd56/tools/flash_writer.py +++ b/ports/cxd56/tools/flash_writer.py @@ -30,23 +30,20 @@ # POSSIBILITY OF SUCH DAMAGE. # -import time -import sys -import os -import struct -import glob -import fnmatch -import errno -import telnetlib import argparse -import shutil -import subprocess +import errno +import os import re +import subprocess +import sys +import telnetlib +import time + import xmodem import_serial_module = True -# When SDK release, plase set SDK_RELEASE as True. +# When SDK release, please set SDK_RELEASE as True. SDK_RELEASE = False if SDK_RELEASE: @@ -58,7 +55,7 @@ else: try: import serial -except: +except ImportError: import_serial_module = False # supported environment various @@ -71,6 +68,7 @@ PROTOCOL_TELNET = 1 MAX_DOT_COUNT = 70 + # configure parameters and default value class ConfigArgs: PROTOCOL_TYPE = None @@ -173,7 +171,10 @@ class ConfigArgsLoader: group = self.parser.add_argument_group() group.add_argument("-c", "--serial-port", dest="serial_port", help="the serial port") group.add_argument( - "-b", "--xmodem-baudrate", dest="xmodem_baud", help="Use the faster baudrate in xmodem" + "-b", + "--xmodem-baudrate", + dest="xmodem_baud", + help="Use the faster baudrate in xmodem", ) mutually_group = self.parser.add_mutually_exclusive_group() @@ -223,12 +224,12 @@ class ConfigArgsLoader: ConfigArgs.PKGUPD_NAME = args.pkgupd_name # Get serial port or telnet server ip etc - if args.serial_protocol == True: + if args.serial_protocol is True: ConfigArgs.PROTOCOL_TYPE = PROTOCOL_SERIAL - elif args.telnet_protocol == True: + elif args.telnet_protocol is True: ConfigArgs.PROTOCOL_TYPE = PROTOCOL_TELNET - if ConfigArgs.PROTOCOL_TYPE == None: + if ConfigArgs.PROTOCOL_TYPE is None: proto = os.environ.get("CXD56_PROTOCOL") if proto is not None: if "s" in proto: @@ -236,7 +237,7 @@ class ConfigArgsLoader: elif "t" in proto: ConfigArgs.PROTOCOL_TYPE = PROTOCOL_TELNET - if ConfigArgs.PROTOCOL_TYPE == None: + if ConfigArgs.PROTOCOL_TYPE is None: ConfigArgs.PROTOCOL_TYPE = PROTOCOL_SERIAL if ConfigArgs.PROTOCOL_TYPE == PROTOCOL_SERIAL: @@ -358,8 +359,7 @@ class TelnetDev: if MAX_DOT_COUNT < cur_count: cur_count = MAX_DOT_COUNT for idx in range(cur_count - self.count): - print("#", end="") - sys.stdout.flush() + print("#", end="", flush=True) self.count = cur_count if self.count == MAX_DOT_COUNT: print("\n") @@ -584,7 +584,7 @@ def main(): try: config_loader = ConfigArgsLoader() config_loader.update_config() - except: + except Exception: return errno.EINVAL # Wait to reset the board @@ -593,7 +593,7 @@ def main(): do_wait_reset = True if ConfigArgs.AUTO_RESET: if subprocess.call("cd " + sys.path[0] + "; ./reset_board.sh", shell=True) == 0: - print("auto reset board sucess!!") + print("auto reset board success!!") do_wait_reset = False bootrom_msg = writer.cancel_autoboot() @@ -601,7 +601,7 @@ def main(): do_wait_reset = False bootrom_msg = writer.cancel_autoboot() - if ConfigArgs.WAIT_RESET == False and do_wait_reset == True: + if ConfigArgs.WAIT_RESET is False and do_wait_reset is True: rx = writer.recv() time.sleep(1) for i in range(3): @@ -621,7 +621,7 @@ def main(): # Remove files if ConfigArgs.ERASE_NAME: - print(">>> Remove exisiting files ...") + print(">>> Remove existing files ...") writer.delete_files(ConfigArgs.ERASE_NAME) # Install files diff --git a/ports/cxd56/tools/requirements.txt b/ports/cxd56/tools/requirements.txt new file mode 100644 index 0000000000..b45f4ae0bd --- /dev/null +++ b/ports/cxd56/tools/requirements.txt @@ -0,0 +1,2 @@ +pyserial>=2.7 +xmodem>=0.3.2 diff --git a/ports/cxd56/tools/xmodem.py b/ports/cxd56/tools/xmodem.py deleted file mode 100644 index cf78338645..0000000000 --- a/ports/cxd56/tools/xmodem.py +++ /dev/null @@ -1,808 +0,0 @@ -""" -=============================== - XMODEM file transfer protocol -=============================== - -.. $Id$ - -This is a literal implementation of XMODEM.TXT_, XMODEM1K.TXT_ and -XMODMCRC.TXT_, support for YMODEM and ZMODEM is pending. YMODEM should -be fairly easy to implement as it is a hack on top of the XMODEM -protocol using sequence bytes ``0x00`` for sending file names (and some -meta data). - -.. _XMODEM.TXT: doc/XMODEM.TXT -.. _XMODEM1K.TXT: doc/XMODEM1K.TXT -.. _XMODMCRC.TXT: doc/XMODMCRC.TXT - -Data flow example including error recovery -========================================== - -Here is a sample of the data flow, sending a 3-block message. -It includes the two most common line hits - a garbaged block, -and an ``ACK`` reply getting garbaged. ``CRC`` or ``CSUM`` represents -the checksum bytes. - -XMODEM 128 byte blocks ----------------------- - -:: - - SENDER RECEIVER - - <-- NAK - SOH 01 FE Data[128] CSUM --> - <-- ACK - SOH 02 FD Data[128] CSUM --> - <-- ACK - SOH 03 FC Data[128] CSUM --> - <-- ACK - SOH 04 FB Data[128] CSUM --> - <-- ACK - SOH 05 FA Data[100] CPMEOF[28] CSUM --> - <-- ACK - EOT --> - <-- ACK - -XMODEM-1k blocks, CRC mode --------------------------- - -:: - - SENDER RECEIVER - - <-- C - STX 01 FE Data[1024] CRC CRC --> - <-- ACK - STX 02 FD Data[1024] CRC CRC --> - <-- ACK - STX 03 FC Data[1000] CPMEOF[24] CRC CRC --> - <-- ACK - EOT --> - <-- ACK - -Mixed 1024 and 128 byte Blocks ------------------------------- - -:: - - SENDER RECEIVER - - <-- C - STX 01 FE Data[1024] CRC CRC --> - <-- ACK - STX 02 FD Data[1024] CRC CRC --> - <-- ACK - SOH 03 FC Data[128] CRC CRC --> - <-- ACK - SOH 04 FB Data[100] CPMEOF[28] CRC CRC --> - <-- ACK - EOT --> - <-- ACK - -YMODEM Batch Transmission Session (1 file) ------------------------------------------- - -:: - - SENDER RECEIVER - <-- C (command:rb) - SOH 00 FF foo.c NUL[123] CRC CRC --> - <-- ACK - <-- C - SOH 01 FE Data[128] CRC CRC --> - <-- ACK - SOH 02 FC Data[128] CRC CRC --> - <-- ACK - SOH 03 FB Data[100] CPMEOF[28] CRC CRC --> - <-- ACK - EOT --> - <-- NAK - EOT --> - <-- ACK - <-- C - SOH 00 FF NUL[128] CRC CRC --> - <-- ACK - - -""" - -__author__ = "Wijnand Modderman " -__copyright__ = ["Copyright (c) 2010 Wijnand Modderman", "Copyright (c) 1981 Chuck Forsberg"] -__license__ = "MIT" -__version__ = "0.3.2" - -import logging -import time -import sys -from functools import partial -import collections - -# Loggerr -log = logging.getLogger("xmodem") - -# Protocol bytes -SOH = bytes([0x01]) -STX = bytes([0x02]) -EOT = bytes([0x04]) -ACK = bytes([0x06]) -DLE = bytes([0x10]) -NAK = bytes([0x15]) -CAN = bytes([0x18]) -CRC = bytes([0x43]) # C - - -class XMODEM(object): - """ - XMODEM Protocol handler, expects an object to read from and an object to - write to. - - >>> def getc(size, timeout=1): - ... return data or None - ... - >>> def putc(data, timeout=1): - ... return size or None - ... - >>> modem = XMODEM(getc, putc) - - - :param getc: Function to retreive bytes from a stream - :type getc: callable - :param putc: Function to transmit bytes to a stream - :type putc: callable - :param mode: XMODEM protocol mode - :type mode: string - :param pad: Padding character to make the packets match the packet size - :type pad: char - - """ - - # crctab calculated by Mark G. Mendel, Network Systems Corporation - crctable = [ - 0x0000, - 0x1021, - 0x2042, - 0x3063, - 0x4084, - 0x50A5, - 0x60C6, - 0x70E7, - 0x8108, - 0x9129, - 0xA14A, - 0xB16B, - 0xC18C, - 0xD1AD, - 0xE1CE, - 0xF1EF, - 0x1231, - 0x0210, - 0x3273, - 0x2252, - 0x52B5, - 0x4294, - 0x72F7, - 0x62D6, - 0x9339, - 0x8318, - 0xB37B, - 0xA35A, - 0xD3BD, - 0xC39C, - 0xF3FF, - 0xE3DE, - 0x2462, - 0x3443, - 0x0420, - 0x1401, - 0x64E6, - 0x74C7, - 0x44A4, - 0x5485, - 0xA56A, - 0xB54B, - 0x8528, - 0x9509, - 0xE5EE, - 0xF5CF, - 0xC5AC, - 0xD58D, - 0x3653, - 0x2672, - 0x1611, - 0x0630, - 0x76D7, - 0x66F6, - 0x5695, - 0x46B4, - 0xB75B, - 0xA77A, - 0x9719, - 0x8738, - 0xF7DF, - 0xE7FE, - 0xD79D, - 0xC7BC, - 0x48C4, - 0x58E5, - 0x6886, - 0x78A7, - 0x0840, - 0x1861, - 0x2802, - 0x3823, - 0xC9CC, - 0xD9ED, - 0xE98E, - 0xF9AF, - 0x8948, - 0x9969, - 0xA90A, - 0xB92B, - 0x5AF5, - 0x4AD4, - 0x7AB7, - 0x6A96, - 0x1A71, - 0x0A50, - 0x3A33, - 0x2A12, - 0xDBFD, - 0xCBDC, - 0xFBBF, - 0xEB9E, - 0x9B79, - 0x8B58, - 0xBB3B, - 0xAB1A, - 0x6CA6, - 0x7C87, - 0x4CE4, - 0x5CC5, - 0x2C22, - 0x3C03, - 0x0C60, - 0x1C41, - 0xEDAE, - 0xFD8F, - 0xCDEC, - 0xDDCD, - 0xAD2A, - 0xBD0B, - 0x8D68, - 0x9D49, - 0x7E97, - 0x6EB6, - 0x5ED5, - 0x4EF4, - 0x3E13, - 0x2E32, - 0x1E51, - 0x0E70, - 0xFF9F, - 0xEFBE, - 0xDFDD, - 0xCFFC, - 0xBF1B, - 0xAF3A, - 0x9F59, - 0x8F78, - 0x9188, - 0x81A9, - 0xB1CA, - 0xA1EB, - 0xD10C, - 0xC12D, - 0xF14E, - 0xE16F, - 0x1080, - 0x00A1, - 0x30C2, - 0x20E3, - 0x5004, - 0x4025, - 0x7046, - 0x6067, - 0x83B9, - 0x9398, - 0xA3FB, - 0xB3DA, - 0xC33D, - 0xD31C, - 0xE37F, - 0xF35E, - 0x02B1, - 0x1290, - 0x22F3, - 0x32D2, - 0x4235, - 0x5214, - 0x6277, - 0x7256, - 0xB5EA, - 0xA5CB, - 0x95A8, - 0x8589, - 0xF56E, - 0xE54F, - 0xD52C, - 0xC50D, - 0x34E2, - 0x24C3, - 0x14A0, - 0x0481, - 0x7466, - 0x6447, - 0x5424, - 0x4405, - 0xA7DB, - 0xB7FA, - 0x8799, - 0x97B8, - 0xE75F, - 0xF77E, - 0xC71D, - 0xD73C, - 0x26D3, - 0x36F2, - 0x0691, - 0x16B0, - 0x6657, - 0x7676, - 0x4615, - 0x5634, - 0xD94C, - 0xC96D, - 0xF90E, - 0xE92F, - 0x99C8, - 0x89E9, - 0xB98A, - 0xA9AB, - 0x5844, - 0x4865, - 0x7806, - 0x6827, - 0x18C0, - 0x08E1, - 0x3882, - 0x28A3, - 0xCB7D, - 0xDB5C, - 0xEB3F, - 0xFB1E, - 0x8BF9, - 0x9BD8, - 0xABBB, - 0xBB9A, - 0x4A75, - 0x5A54, - 0x6A37, - 0x7A16, - 0x0AF1, - 0x1AD0, - 0x2AB3, - 0x3A92, - 0xFD2E, - 0xED0F, - 0xDD6C, - 0xCD4D, - 0xBDAA, - 0xAD8B, - 0x9DE8, - 0x8DC9, - 0x7C26, - 0x6C07, - 0x5C64, - 0x4C45, - 0x3CA2, - 0x2C83, - 0x1CE0, - 0x0CC1, - 0xEF1F, - 0xFF3E, - 0xCF5D, - 0xDF7C, - 0xAF9B, - 0xBFBA, - 0x8FD9, - 0x9FF8, - 0x6E17, - 0x7E36, - 0x4E55, - 0x5E74, - 0x2E93, - 0x3EB2, - 0x0ED1, - 0x1EF0, - ] - - def __init__(self, getc, putc, mode="xmodem", pad=b"\x1a"): - self.getc = getc - self.putc = putc - self.mode = mode - self.pad = pad - - def abort(self, count=2, timeout=60): - """ - Send an abort sequence using CAN bytes. - """ - for counter in range(0, count): - self.putc(CAN, timeout) - - def send(self, stream, retry=32, timeout=360, quiet=0, callback=None): - """ - Send a stream via the XMODEM protocol. - - >>> stream = file('/etc/issue', 'rb') - >>> print modem.send(stream) - True - - Returns ``True`` upon succesful transmission or ``False`` in case of - failure. - - :param stream: The stream object to send data from. - :type stream: stream (file, etc.) - :param retry: The maximum number of times to try to resend a failed - packet before failing. - :type retry: int - :param timeout: The number of seconds to wait for a response before - timing out. - :type timeout: int - :param quiet: If 0, it prints info to stderr. If 1, it does not print any info. - :type quiet: int - :param callback: Reference to a callback function that has the - following signature. This is useful for - getting status updates while a xmodem - transfer is underway. - Expected callback signature: - def callback(total_packets, success_count, error_count) - :type callback: callable - """ - - # initialize protocol - try: - packet_size = dict(xmodem=128, xmodem1k=1024)[self.mode] - except AttributeError: - raise ValueError("An invalid mode was supplied") - - error_count = 0 - crc_mode = 0 - cancel = 0 - while True: - char = self.getc(1) - if char: - if char == NAK: - crc_mode = 0 - break - elif char == CRC: - crc_mode = 1 - break - elif char == CAN: - if not quiet: - print("received CAN", file=sys.stderr) - if cancel: - return False - else: - cancel = 1 - else: - log.error("send ERROR expected NAK/CRC, got %s" % (ord(char),)) - - error_count += 1 - if error_count >= retry: - self.abort(timeout=timeout) - return False - - # send data - error_count = 0 - success_count = 0 - total_packets = 0 - sequence = 1 - while True: - data = stream.read(packet_size) - if not data: - log.info("sending EOT") - # end of stream - break - total_packets += 1 - data = data.ljust(packet_size, self.pad) - if crc_mode: - crc = self.calc_crc(data) - else: - crc = self.calc_checksum(data) - - # emit packet - while True: - if packet_size == 128: - self.putc(SOH) - else: # packet_size == 1024 - self.putc(STX) - self.putc(bytes([sequence])) - self.putc(bytes([0xFF - sequence])) - self.putc(data) - if crc_mode: - self.putc(bytes([crc >> 8])) - self.putc(bytes([crc & 0xFF])) - else: - self.putc(bytes([crc])) - - char = self.getc(1, timeout) - if char == ACK: - success_count += 1 - if isinstance(callback, collections.Callable): - callback(total_packets, success_count, error_count) - break - if char == NAK: - error_count += 1 - if isinstance(callback, collections.Callable): - callback(total_packets, success_count, error_count) - if error_count >= retry: - # excessive amounts of retransmissions requested, - # abort transfer - self.abort(timeout=timeout) - log.warning("excessive NAKs, transfer aborted") - return False - - # return to loop and resend - continue - else: - log.error("Not ACK, Not NAK") - error_count += 1 - if isinstance(callback, collections.Callable): - callback(total_packets, success_count, error_count) - if error_count >= retry: - # excessive amounts of retransmissions requested, - # abort transfer - self.abort(timeout=timeout) - log.warning("excessive protocol errors, transfer aborted") - return False - - # return to loop and resend - continue - - # protocol error - self.abort(timeout=timeout) - log.error("protocol error") - return False - - # keep track of sequence - sequence = (sequence + 1) % 0x100 - - while True: - # end of transmission - self.putc(EOT) - - # An ACK should be returned - char = self.getc(1, timeout) - if char == ACK: - break - else: - error_count += 1 - if error_count >= retry: - self.abort(timeout=timeout) - log.warning("EOT was not ACKd, transfer aborted") - return False - - return True - - def recv(self, stream, crc_mode=1, retry=16, timeout=60, delay=1, quiet=0): - """ - Receive a stream via the XMODEM protocol. - - >>> stream = file('/etc/issue', 'wb') - >>> print modem.recv(stream) - 2342 - - Returns the number of bytes received on success or ``None`` in case of - failure. - """ - - # initiate protocol - error_count = 0 - char = 0 - cancel = 0 - while True: - # first try CRC mode, if this fails, - # fall back to checksum mode - if error_count >= retry: - self.abort(timeout=timeout) - return None - elif crc_mode and error_count < (retry / 2): - if not self.putc(CRC): - time.sleep(delay) - error_count += 1 - else: - crc_mode = 0 - if not self.putc(NAK): - time.sleep(delay) - error_count += 1 - - char = self.getc(1, timeout) - if not char: - error_count += 1 - continue - elif char == SOH: - # crc_mode = 0 - break - elif char == STX: - break - elif char == CAN: - if cancel: - return None - else: - cancel = 1 - else: - error_count += 1 - - # read data - error_count = 0 - income_size = 0 - packet_size = 128 - sequence = 1 - cancel = 0 - while True: - while True: - if char == SOH: - packet_size = 128 - break - elif char == STX: - packet_size = 1024 - break - elif char == EOT: - # We received an EOT, so send an ACK and return the received - # data length - self.putc(ACK) - return income_size - elif char == CAN: - # cancel at two consecutive cancels - if cancel: - return None - else: - cancel = 1 - else: - if not quiet: - print("recv ERROR expected SOH/EOT, got", ord(char), file=sys.stderr) - error_count += 1 - if error_count >= retry: - self.abort() - return None - # read sequence - error_count = 0 - cancel = 0 - seq1 = ord(self.getc(1)) - seq2 = 0xFF - ord(self.getc(1)) - if seq1 == sequence and seq2 == sequence: - # sequence is ok, read packet - # packet_size + checksum - data = self.getc(packet_size + 1 + crc_mode, timeout) - if crc_mode: - csum = (ord(data[-2]) << 8) + ord(data[-1]) - data = data[:-2] - log.debug("CRC (%04x <> %04x)" % (csum, self.calc_crc(data))) - valid = csum == self.calc_crc(data) - else: - csum = data[-1] - data = data[:-1] - log.debug( - "checksum (checksum(%02x <> %02x)" % (ord(csum), self.calc_checksum(data)) - ) - valid = ord(csum) == self.calc_checksum(data) - - # valid data, append chunk - if valid: - income_size += len(data) - stream.write(data) - self.putc(ACK) - sequence = (sequence + 1) % 0x100 - char = self.getc(1, timeout) - continue - else: - # consume data - self.getc(packet_size + 1 + crc_mode) - self.debug("expecting sequence %d, got %d/%d" % (sequence, seq1, seq2)) - - # something went wrong, request retransmission - self.putc(NAK) - - def calc_checksum(self, data, checksum=0): - """ - Calculate the checksum for a given block of data, can also be used to - update a checksum. - - >>> csum = modem.calc_checksum('hello') - >>> csum = modem.calc_checksum('world', csum) - >>> hex(csum) - '0x3c' - - """ - return (sum(map(ord, data)) + checksum) % 256 - - def calc_crc(self, data, crc=0): - """ - Calculate the Cyclic Redundancy Check for a given block of data, can - also be used to update a CRC. - - >>> crc = modem.calc_crc('hello') - >>> crc = modem.calc_crc('world', crc) - >>> hex(crc) - '0xd5e3' - - """ - for char in data: - crc = (crc << 8) ^ self.crctable[((crc >> 8) ^ int(char)) & 0xFF] - return crc & 0xFFFF - - -XMODEM1k = partial(XMODEM, mode="xmodem1k") - - -def run(): - import optparse - import subprocess - - parser = optparse.OptionParser(usage="%prog [] filename filename") - parser.add_option("-m", "--mode", default="xmodem", help="XMODEM mode (xmodem, xmodem1k)") - - options, args = parser.parse_args() - if len(args) != 3: - parser.error("invalid arguments") - return 1 - - elif args[0] not in ("send", "recv"): - parser.error("invalid mode") - return 1 - - def _func(so, si): - import select - import subprocess - - print("si", si) - print("so", so) - - def getc(size, timeout=3): - w, t, f = select.select([so], [], [], timeout) - if w: - data = so.read(size) - else: - data = None - - print("getc(", repr(data), ")") - return data - - def putc(data, timeout=3): - w, t, f = select.select([], [si], [], timeout) - if t: - si.write(data) - si.flush() - size = len(data) - else: - size = None - - print("putc(", repr(data), repr(size), ")") - return size - - return getc, putc - - def _pipe(*command): - pipe = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=subprocess.PIPE) - return pipe.stdout, pipe.stdin - - if args[0] == "recv": - import io - - getc, putc = _func(*_pipe("sz", "--xmodem", args[2])) - stream = open(args[1], "wb") - xmodem = XMODEM(getc, putc, mode=options.mode) - status = xmodem.recv(stream, retry=8) - stream.close() - - elif args[0] == "send": - getc, putc = _func(*_pipe("rz", "--xmodem", args[2])) - stream = open(args[1], "rb") - xmodem = XMODEM(getc, putc, mode=options.mode) - status = xmodem.send(stream, retry=8) - stream.close() - - -if __name__ == "__main__": - sys.exit(run()) From 5f519b8ba923fa5eb55b37a430a271d028fadb6c Mon Sep 17 00:00:00 2001 From: James Carr <70200140+lesamouraipourpre@users.noreply.github.com> Date: Mon, 13 Sep 2021 17:04:46 +0100 Subject: [PATCH 392/418] Update shared-bindings/vectorio/Polygon.c As per microDev1 Co-authored-by: microDev <70126934+microDev1@users.noreply.github.com> --- shared-bindings/vectorio/Polygon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index 36e169569a..8ce19eb8db 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -92,13 +92,13 @@ const mp_obj_property_t vectorio_polygon_points_obj = { // Documentation for properties inherited from VectorShape. //| x : int -//| """Initial screen X position of the 0,0 origin in the points list.""" +//| """X position of the 0,0 origin in the points list.""" //| //| y : int -//| """Initial screen Y position of the 0,0 origin in the points list.""" +//| """Y position of the 0,0 origin in the points list.""" //| //| location : Tuple[int,int] -//| """Initial screen (X,Y) position of the 0,0 origin in the points list.""" +//| """(X,Y) position of the 0,0 origin in the points list.""" //| //| pixel_shader : Union[displayio.ColorConverter,displayio.Palette] //| """The pixel shader of the polygon.""" From 8b3ce25ce0d4c523999003c51e12f1d6f4716ffd Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 13 Sep 2021 23:25:30 +0700 Subject: [PATCH 393/418] update tinyusb to have esp32sx, stm32 and imxrt passed compliance test suite --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tinyusb b/lib/tinyusb index 582e5dbac5..43aac7074b 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 582e5dbac53aa2ac7c24249712081833986b3f27 +Subproject commit 43aac7074be0d14e72cb04eaddcddf1a926c6a74 From 56ecdee5a02e9dcfb95f1276c42771f296db8dc9 Mon Sep 17 00:00:00 2001 From: James Carr Date: Mon, 13 Sep 2021 19:50:35 +0100 Subject: [PATCH 394/418] Correct the 24bit decoding in bitmaptools.readinto() --- shared-module/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 2bb062239a..b6e0764fdb 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -591,7 +591,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f break; case 24: - value = (rowdata8[x * 3] << 16) | (rowdata8[x * 3 + 1] << 8) | (rowdata8[x * 3 + 2] << 8); + value = (rowdata8[x * 3] << 16) | (rowdata8[x * 3 + 1] << 8) | rowdata8[x * 3 + 2]; break; case 32: From 5d90991745ae2c9fd368600439e07939336d19a3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 13 Sep 2021 11:26:19 -0700 Subject: [PATCH 395/418] Trade RAM for flash on pca10100 --- ports/nrf/boards/pca10100/mpconfigboard.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/nrf/boards/pca10100/mpconfigboard.h b/ports/nrf/boards/pca10100/mpconfigboard.h index 561a3b7ab3..20d9d9aeb3 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.h +++ b/ports/nrf/boards/pca10100/mpconfigboard.h @@ -39,6 +39,9 @@ #define CIRCUITPY_BLE_CONFIG_SIZE (12 * 1024) +// Take 1k RAM to save 1k flash. +#define CIRCUITPY_PRECOMPUTE_QSTR_ATTR (0) + // Reduce nRF SoftRadio memory usage #define BLEIO_VS_UUID_COUNT 10 #define BLEIO_HVN_TX_QUEUE_SIZE 2 From 64ff8d9e1911edad8b5778b0f25b5e645448b6fc Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 7 Sep 2021 18:03:42 -0700 Subject: [PATCH 396/418] v3 BLE file service: Add file modification times --- ports/nrf/fatfs_port.c | 8 ++ supervisor/fatfs_port.h | 34 +++++++ supervisor/shared/bluetooth/file_transfer.c | 91 +++++++++++++------ .../shared/bluetooth/file_transfer_protocol.h | 37 +++++--- 4 files changed, 130 insertions(+), 40 deletions(-) create mode 100644 supervisor/fatfs_port.h diff --git a/ports/nrf/fatfs_port.c b/ports/nrf/fatfs_port.c index 5347af4177..f2644adbd3 100644 --- a/ports/nrf/fatfs_port.c +++ b/ports/nrf/fatfs_port.c @@ -30,7 +30,11 @@ #include "shared-bindings/rtc/RTC.h" #include "shared-bindings/time/__init__.h" +DWORD _time_override = 0; DWORD get_fattime(void) { + if (_time_override > 0) { + return _time_override; + } #if CIRCUITPY_RTC timeutils_struct_time_t tm; common_hal_rtc_get_time(&tm); @@ -40,3 +44,7 @@ DWORD get_fattime(void) { return ((2016 - 1980) << 25) | ((9) << 21) | ((1) << 16) | ((16) << 11) | ((43) << 5) | (35 / 2); #endif } + +void override_fattime(DWORD time) { + _time_override = time; +} diff --git a/supervisor/fatfs_port.h b/supervisor/fatfs_port.h new file mode 100644 index 0000000000..e76ced524d --- /dev/null +++ b/supervisor/fatfs_port.h @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SUPERVISOR_FATFS_PORT_H +#define MICROPY_INCLUDED_SUPERVISOR_FATFS_PORT_H + +#include "lib/oofatfs/ff.h" + +void override_fattime(DWORD time); + +#endif // MICROPY_INCLUDED_SUPERVISOR_FATFS_PORT_H diff --git a/supervisor/shared/bluetooth/file_transfer.c b/supervisor/shared/bluetooth/file_transfer.c index 908cc958d6..eaebb3fbcb 100644 --- a/supervisor/shared/bluetooth/file_transfer.c +++ b/supervisor/shared/bluetooth/file_transfer.c @@ -28,6 +28,7 @@ #include "extmod/vfs.h" #include "extmod/vfs_fat.h" +#include "lib/timeutils/timeutils.h" #include "shared-bindings/_bleio/__init__.h" #include "shared-bindings/_bleio/Adapter.h" @@ -41,6 +42,7 @@ #include "common-hal/_bleio/__init__.h" +#include "supervisor/fatfs_port.h" #include "supervisor/shared/autoreload.h" #include "supervisor/shared/bluetooth/file_transfer_protocol.h" #include "supervisor/shared/tick.h" @@ -98,7 +100,7 @@ void supervisor_start_bluetooth_file_transfer(void) { NULL, // no initial value NULL); // no description - uint32_t version = 2; + uint32_t version = 3; mp_buffer_info_t bufinfo; bufinfo.buf = &version; bufinfo.len = sizeof(version); @@ -131,12 +133,23 @@ void supervisor_start_bluetooth_file_transfer(void) { #define ANY_COMMAND 0x00 #define THIS_COMMAND 0x01 +uint64_t truncate_time(uint64_t input_time, DWORD *fattime) { + timeutils_struct_time_t tm; + uint64_t seconds_since_epoch = timeutils_seconds_since_epoch_from_nanoseconds_since_1970(input_time); + timeutils_seconds_since_epoch_to_struct_time(seconds_since_epoch, &tm); + uint64_t truncated_time = timeutils_nanoseconds_since_epoch_to_nanoseconds_since_1970((seconds_since_epoch / 2) * 2 * 1000000000); + + *fattime = ((tm.tm_year - 1980) << 25) | (tm.tm_mon << 21) | (tm.tm_mday << 16) | + (tm.tm_hour << 11) | (tm.tm_min << 5) | (tm.tm_sec >> 1); + return truncated_time; +} + // Used by read and write. STATIC FIL active_file; STATIC uint8_t _process_read(const uint8_t *raw_buf, size_t command_len) { struct read_command *command = (struct read_command *)raw_buf; - size_t header_size = 12; - size_t response_size = 16; + size_t header_size = sizeof(struct read_command); + size_t response_size = sizeof(struct read_data); uint8_t data_buffer[response_size]; struct read_data response; response.command = READ_DATA; @@ -190,38 +203,38 @@ STATIC uint8_t _process_read(const uint8_t *raw_buf, size_t command_len) { return READ_PACING; } -STATIC uint8_t _process_read_pacing(const uint8_t *command, size_t command_len) { - size_t response_size = 4 * sizeof(uint32_t); - uint32_t response[response_size / sizeof(uint32_t)]; - uint8_t *response_bytes = (uint8_t *)response; - response_bytes[0] = READ_DATA; - response_bytes[1] = STATUS_OK; - uint32_t offset = ((uint32_t *)command)[1]; - uint32_t chunk_size = ((uint32_t *)command)[2]; +STATIC uint8_t _process_read_pacing(const uint8_t *raw_buf, size_t command_len) { + struct read_pacing *command = (struct read_pacing *)raw_buf; + struct read_data response; + response.command = READ_DATA; + response.status = STATUS_OK; + size_t response_size = sizeof(struct read_data); + uint32_t total_length = f_size(&active_file); // Write out the response header. - chunk_size = MIN(chunk_size, total_length - offset); - response[1] = offset; - response[2] = total_length; - response[3] = chunk_size; + uint32_t chunk_size = MIN(command->chunk_size, total_length - command->chunk_offset); + response.chunk_offset = command->chunk_offset; + response.total_length = total_length; + response.data_size = chunk_size; common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, response_size, NULL, 0); - f_lseek(&active_file, offset); + f_lseek(&active_file, command->chunk_offset); // Write out the chunk contents. We can do this in small pieces because PacketBuffer // will assemble them into larger packets of its own. size_t chunk_offset = 0; + uint8_t data[20]; while (chunk_offset < chunk_size) { size_t quantity_read; - size_t read_size = MIN(chunk_size - chunk_offset, response_size); - FRESULT result = f_read(&active_file, response, read_size, &quantity_read); + size_t read_size = MIN(chunk_size - chunk_offset, sizeof(data)); + FRESULT result = f_read(&active_file, &data, read_size, &quantity_read); if (quantity_read == 0 || result != FR_OK) { // TODO: If we can't read everything, then the file must have been shortened. Maybe we // should return 0s to pad it out. break; } - common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, quantity_read, NULL, 0); + common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&data, quantity_read, NULL, 0); chunk_offset += quantity_read; } - if ((offset + chunk_size) >= total_length) { + if ((chunk_offset + chunk_size) >= total_length) { f_close(&active_file); return ANY_COMMAND; } @@ -230,10 +243,11 @@ STATIC uint8_t _process_read_pacing(const uint8_t *command, size_t command_len) // Used by write and write data to know when the write is complete. STATIC size_t total_write_length; +STATIC uint64_t _truncated_time; STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { struct write_command *command = (struct write_command *)raw_buf; - size_t header_size = 12; + size_t header_size = sizeof(struct write_command); struct write_pacing response; response.command = WRITE_PACING; response.status = STATUS_OK; @@ -262,6 +276,9 @@ STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { #endif FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; + DWORD fattime; + _truncated_time = truncate_time(command->modification_time, &fattime); + override_fattime(fattime); FRESULT result = f_open(fs, &active_file, path, FA_WRITE | FA_OPEN_ALWAYS); if (result != FR_OK) { response.status = STATUS_ERROR; @@ -269,6 +286,7 @@ STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { #if CIRCUITPY_USB_MSC usb_msc_unlock(); #endif + override_fattime(0); return ANY_COMMAND; } // Write out the pacing response. @@ -281,12 +299,14 @@ STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { f_lseek(&active_file, offset); f_truncate(&active_file); f_close(&active_file); + override_fattime(0); #if CIRCUITPY_USB_MSC usb_msc_unlock(); #endif } response.offset = offset; response.free_space = chunk_size; + response.truncated_time = _truncated_time; common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct write_pacing), NULL, 0); if (chunk_size == 0) { // Don't reload until everything is written out of the packet buffer. @@ -301,7 +321,7 @@ STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { STATIC uint8_t _process_write_data(const uint8_t *raw_buf, size_t command_len) { struct write_data *command = (struct write_data *)raw_buf; - size_t header_size = 12; + size_t header_size = sizeof(struct write_data); struct write_pacing response; response.command = WRITE_PACING; response.status = STATUS_OK; @@ -312,6 +332,7 @@ STATIC uint8_t _process_write_data(const uint8_t *raw_buf, size_t command_len) { #if CIRCUITPY_USB_MSC usb_msc_unlock(); #endif + override_fattime(0); return ANY_COMMAND; } // We need to receive another packet to have the full path. @@ -329,6 +350,7 @@ STATIC uint8_t _process_write_data(const uint8_t *raw_buf, size_t command_len) { #if CIRCUITPY_USB_MSC usb_msc_unlock(); #endif + override_fattime(0); return ANY_COMMAND; } offset += command->data_size; @@ -336,10 +358,12 @@ STATIC uint8_t _process_write_data(const uint8_t *raw_buf, size_t command_len) { size_t chunk_size = MIN(total_write_length - offset, 512); response.offset = offset; response.free_space = chunk_size; + response.truncated_time = _truncated_time; common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct write_pacing), NULL, 0); if (total_write_length == offset) { f_truncate(&active_file); f_close(&active_file); + override_fattime(0); #if CIRCUITPY_USB_MSC usb_msc_unlock(); #endif @@ -387,7 +411,7 @@ STATIC FRESULT _delete_directory_contents(FATFS *fs, const TCHAR *path) { STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { const struct delete_command *command = (struct delete_command *)raw_buf; - size_t header_size = 4; + size_t header_size = sizeof(struct delete_command); struct delete_status response; response.command = DELETE_STATUS; response.status = STATUS_OK; @@ -423,7 +447,7 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { STATIC uint8_t _process_mkdir(const uint8_t *raw_buf, size_t command_len) { const struct mkdir_command *command = (struct mkdir_command *)raw_buf; - size_t header_size = 4; + size_t header_size = sizeof(struct mkdir_command); struct mkdir_status response; response.command = MKDIR_STATUS; response.status = STATUS_OK; @@ -438,10 +462,14 @@ STATIC uint8_t _process_mkdir(const uint8_t *raw_buf, size_t command_len) { return THIS_COMMAND; } FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; - char *path = (char *)((uint8_t *)command) + header_size; + char *path = (char *)command->path; // TODO: Check that the final character is a `/` path[command->path_length - 1] = '\0'; + DWORD fattime; + response.truncated_time = truncate_time(command->modification_time, &fattime); + override_fattime(fattime); FRESULT result = f_mkdir(fs, path); + override_fattime(0); if (result != FR_OK) { response.status = STATUS_ERROR; } @@ -452,8 +480,8 @@ STATIC uint8_t _process_mkdir(const uint8_t *raw_buf, size_t command_len) { STATIC uint8_t _process_listdir(uint8_t *raw_buf, size_t command_len) { const struct listdir_command *command = (struct listdir_command *)raw_buf; struct listdir_entry *entry = (struct listdir_entry *)raw_buf; - size_t header_size = 4; - size_t response_size = 5 * sizeof(uint32_t); + size_t header_size = sizeof(struct listdir_command); + size_t response_size = sizeof(struct listdir_entry); // We reuse the command buffer so that we can produce long packets without // making the stack large. if (command->path_length > (COMMAND_SIZE - header_size - 1)) { // -1 for the null we'll write @@ -469,7 +497,7 @@ STATIC uint8_t _process_listdir(uint8_t *raw_buf, size_t command_len) { } FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; - char *path = (char *)command->path; + char *path = (char *)&command->path; // -1 because fatfs doesn't want a trailing / path[command->path_length - 1] = '\0'; // mp_printf(&mp_plat_print, "list %s\n", path); @@ -502,6 +530,13 @@ STATIC uint8_t _process_listdir(uint8_t *raw_buf, size_t command_len) { for (size_t i = 0; i < total_entries; i++) { res = f_readdir(&dir, &file_info); entry->entry_number = i; + uint64_t truncated_time = timeutils_mktime(1980 + (file_info.fdate >> 9), + (file_info.fdate >> 5) & 0xf, + file_info.fdate & 0x1f, + file_info.ftime >> 11, + (file_info.ftime >> 5) & 0x1f, + (file_info.ftime & 0x1f) * 2) * 1000000000ULL; + entry->truncated_time = truncated_time; if ((file_info.fattrib & AM_DIR) != 0) { entry->flags = 1; // Directory entry->file_size = 0; diff --git a/supervisor/shared/bluetooth/file_transfer_protocol.h b/supervisor/shared/bluetooth/file_transfer_protocol.h index 2c8fe1e5e7..3de8716c3b 100644 --- a/supervisor/shared/bluetooth/file_transfer_protocol.h +++ b/supervisor/shared/bluetooth/file_transfer_protocol.h @@ -32,6 +32,11 @@ // See https://github.com/adafruit/Adafruit_CircuitPython_BLE_File_Transfer // for full protocol documentation and a Python client API. +// Each struct is packed so that no padding is added by the compiler. (structs +// may having padding at the end in order to align a particular element when in +// an array of the struct.) So, be careful that types added are aligned. Otherwise, +// the compiler may generate more code than necessary. + // 0x00 - 0x0f are never used by the protocol as a command #define READ 0x10 struct read_command { @@ -41,7 +46,7 @@ struct read_command { uint32_t chunk_offset; uint32_t chunk_size; uint8_t path[]; -}; +} __attribute__((packed)); #define READ_DATA 0x11 struct read_data { @@ -52,7 +57,7 @@ struct read_data { uint32_t total_length; uint32_t data_size; uint8_t data[]; -}; +} __attribute__((packed)); #define READ_PACING 0x12 struct read_pacing { @@ -61,7 +66,7 @@ struct read_pacing { uint16_t reserved; uint32_t chunk_offset; uint32_t chunk_size; -}; +} __attribute__((packed)); #define WRITE 0x20 struct write_command { @@ -69,9 +74,10 @@ struct write_command { uint8_t reserved; uint16_t path_length; uint32_t offset; + uint64_t modification_time; uint32_t total_length; uint8_t path[]; -}; +} __attribute__((packed)); #define WRITE_PACING 0x21 struct write_pacing { @@ -79,8 +85,9 @@ struct write_pacing { uint8_t status; uint16_t reserved; uint32_t offset; + uint64_t truncated_time; uint32_t free_space; -}; +} __attribute__((packed)); #define WRITE_DATA 0x22 struct write_data { @@ -90,7 +97,7 @@ struct write_data { uint32_t offset; uint32_t data_size; uint8_t data[]; -}; +} __attribute__((packed)); #define DELETE 0x30 struct delete_command { @@ -98,27 +105,32 @@ struct delete_command { uint8_t reserved; uint16_t path_length; uint8_t path[]; -}; +} __attribute__((packed)); #define DELETE_STATUS 0x31 struct delete_status { uint8_t command; uint8_t status; -}; +} __attribute__((packed)); #define MKDIR 0x40 struct mkdir_command { uint8_t command; uint8_t reserved; uint16_t path_length; + uint32_t reserved2; + uint64_t modification_time; uint8_t path[]; -}; +} __attribute__((packed)); #define MKDIR_STATUS 0x41 struct mkdir_status { uint8_t command; uint8_t status; -}; + uint16_t reserved; + uint32_t reserved2; + uint64_t truncated_time; +} __attribute__((packed)); #define LISTDIR 0x50 struct listdir_command { @@ -126,7 +138,7 @@ struct listdir_command { uint8_t reserved; uint16_t path_length; uint8_t path[]; -}; +} __attribute__((packed)); #define LISTDIR_ENTRY 0x51 struct listdir_entry { @@ -136,9 +148,10 @@ struct listdir_entry { uint32_t entry_number; uint32_t entry_count; uint32_t flags; + uint64_t truncated_time; uint32_t file_size; uint8_t path[]; -}; +} __attribute__((packed)); #define STATUS_OK 0x01 #define STATUS_ERROR 0x02 From b0adf65d94a260334d4cd906cef1e774731f748b Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 13 Sep 2021 14:44:05 -0700 Subject: [PATCH 397/418] Bump to v4 with move and dir path tweaks --- supervisor/shared/bluetooth/file_transfer.c | 111 ++++++++++++++++-- .../shared/bluetooth/file_transfer_protocol.h | 18 +++ 2 files changed, 122 insertions(+), 7 deletions(-) diff --git a/supervisor/shared/bluetooth/file_transfer.c b/supervisor/shared/bluetooth/file_transfer.c index eaebb3fbcb..342e69c66e 100644 --- a/supervisor/shared/bluetooth/file_transfer.c +++ b/supervisor/shared/bluetooth/file_transfer.c @@ -100,7 +100,7 @@ void supervisor_start_bluetooth_file_transfer(void) { NULL, // no initial value NULL); // no description - uint32_t version = 3; + uint32_t version = 4; mp_buffer_info_t bufinfo; bufinfo.buf = &version; bufinfo.len = sizeof(version); @@ -269,7 +269,7 @@ STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. #if CIRCUITPY_USB && CIRCUITPY_USB_MSC if (storage_usb_enabled() && !usb_msc_lock()) { - response.status = STATUS_ERROR; + response.status = STATUS_ERROR_READONLY; common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct write_pacing), NULL, 0); return ANY_COMMAND; } @@ -421,6 +421,14 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct delete_status), NULL, 0); return ANY_COMMAND; } + // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. + #if CIRCUITPY_USB && CIRCUITPY_USB_MSC + if (storage_usb_enabled() && !usb_msc_lock()) { + response.status = STATUS_ERROR_READONLY; + common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct delete_status), NULL, 0); + return ANY_COMMAND; + } + #endif // We need to receive another packet to have the full path. if (command_len < header_size + command->path_length) { return THIS_COMMAND; @@ -428,9 +436,9 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; char *path = (char *)((uint8_t *)command) + header_size; path[command->path_length] = '\0'; - FRESULT result = FR_OK; FILINFO file; - if (f_stat(fs, path, &file) == FR_OK) { + FRESULT result = f_stat(fs, path, &file); + if (result == FR_OK) { if ((file.fattrib & AM_DIR) != 0) { result = _delete_directory_contents(fs, path); } @@ -438,10 +446,19 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { result = f_unlink(fs, path); } } + #if CIRCUITPY_USB_MSC + usb_msc_unlock(); + #endif if (result != FR_OK) { response.status = STATUS_ERROR; } common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct delete_status), NULL, 0); + if (result == FR_OK) { + // Don't reload until everything is written out of the packet buffer. + common_hal_bleio_packet_buffer_flush(&_transfer_packet_buffer); + // Trigger an autoreload + autoreload_start(); + } return ANY_COMMAND; } @@ -457,23 +474,44 @@ STATIC uint8_t _process_mkdir(const uint8_t *raw_buf, size_t command_len) { common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct mkdir_status), NULL, 0); return ANY_COMMAND; } + // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. + #if CIRCUITPY_USB && CIRCUITPY_USB_MSC + if (storage_usb_enabled() && !usb_msc_lock()) { + response.status = STATUS_ERROR_READONLY; + common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct mkdir_status), NULL, 0); + return ANY_COMMAND; + } + #endif // We need to receive another packet to have the full path. if (command_len < header_size + command->path_length) { return THIS_COMMAND; } FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; char *path = (char *)command->path; - // TODO: Check that the final character is a `/` - path[command->path_length - 1] = '\0'; + // -1 because fatfs doesn't want a trailing / + if (path[command->path_length - 1] == '/') { + path[command->path_length - 1] = '\0'; + } else { + path[command->path_length] = '\0'; + } DWORD fattime; response.truncated_time = truncate_time(command->modification_time, &fattime); override_fattime(fattime); FRESULT result = f_mkdir(fs, path); override_fattime(0); + #if CIRCUITPY_USB_MSC + usb_msc_unlock(); + #endif if (result != FR_OK) { response.status = STATUS_ERROR; } common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct mkdir_status), NULL, 0); + if (result == FR_OK) { + // Don't reload until everything is written out of the packet buffer. + common_hal_bleio_packet_buffer_flush(&_transfer_packet_buffer); + // Trigger an autoreload + autoreload_start(); + } return ANY_COMMAND; } @@ -499,7 +537,11 @@ STATIC uint8_t _process_listdir(uint8_t *raw_buf, size_t command_len) { FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; char *path = (char *)&command->path; // -1 because fatfs doesn't want a trailing / - path[command->path_length - 1] = '\0'; + if (path[command->path_length - 1] == '/') { + path[command->path_length - 1] = '\0'; + } else { + path[command->path_length] = '\0'; + } // mp_printf(&mp_plat_print, "list %s\n", path); FF_DIR dir; FRESULT res = f_opendir(fs, &dir, path); @@ -564,6 +606,58 @@ STATIC uint8_t _process_listdir(uint8_t *raw_buf, size_t command_len) { return ANY_COMMAND; } +STATIC uint8_t _process_move(const uint8_t *raw_buf, size_t command_len) { + const struct move_command *command = (struct move_command *)raw_buf; + size_t header_size = sizeof(struct move_command); + struct move_status response; + response.command = MOVE_STATUS; + response.status = STATUS_OK; + // +2 for null terminators. + uint32_t total_path_length = command->old_path_length + command->new_path_length + 1; + if (total_path_length > (COMMAND_SIZE - header_size - 1)) { + // TODO: throw away any more packets of path. + response.status = STATUS_ERROR; + common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct move_status), NULL, 0); + return ANY_COMMAND; + } + // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. + #if CIRCUITPY_USB && CIRCUITPY_USB_MSC + if (storage_usb_enabled() && !usb_msc_lock()) { + response.status = STATUS_ERROR_READONLY; + common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct move_status), NULL, 0); + return ANY_COMMAND; + } + #endif + // We need to receive another packet to have the full path. + if (command_len < header_size + total_path_length) { + return THIS_COMMAND; + } + FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; + char *old_path = (char *)command->paths; + old_path[command->old_path_length] = '\0'; + + char *new_path = old_path + command->old_path_length + 1; + new_path[command->new_path_length] = '\0'; + + // mp_printf(&mp_plat_print, "move %s to %s\n", old_path, new_path); + + FRESULT result = f_rename(fs, old_path, new_path); + #if CIRCUITPY_USB_MSC + usb_msc_unlock(); + #endif + if (result != FR_OK) { + response.status = STATUS_ERROR; + } + common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct move_status), NULL, 0); + if (result == FR_OK) { + // Don't reload until everything is written out of the packet buffer. + common_hal_bleio_packet_buffer_flush(&_transfer_packet_buffer); + // Trigger an autoreload + autoreload_start(); + } + return ANY_COMMAND; +} + // Background state that must live across background calls. After the _process // helpers to force them to not use them. STATIC uint8_t current_command[COMMAND_SIZE] __attribute__ ((aligned(4))); @@ -625,6 +719,9 @@ void supervisor_bluetooth_file_transfer_background(void) { case LISTDIR: next_command = _process_listdir(current_command, current_offset); break; + case MOVE: + next_command = _process_move(current_command, current_offset); + break; } // Preserve the offset if we are waiting for more from this command. if (next_command != THIS_COMMAND) { diff --git a/supervisor/shared/bluetooth/file_transfer_protocol.h b/supervisor/shared/bluetooth/file_transfer_protocol.h index 3de8716c3b..3bc1f611c5 100644 --- a/supervisor/shared/bluetooth/file_transfer_protocol.h +++ b/supervisor/shared/bluetooth/file_transfer_protocol.h @@ -153,10 +153,28 @@ struct listdir_entry { uint8_t path[]; } __attribute__((packed)); +#define MOVE 0x60 +struct move_command { + uint8_t command; + uint8_t reserved; + uint16_t old_path_length; + uint16_t new_path_length; + // paths is two strings. The first is old_path and then a reserved byte. + // The last path is new_path. + uint8_t paths[]; +} __attribute__((packed)); + +#define MOVE_STATUS 0x61 +struct move_status { + uint8_t command; + uint8_t status; +} __attribute__((packed)); + #define STATUS_OK 0x01 #define STATUS_ERROR 0x02 #define STATUS_ERROR_NO_FILE 0x03 #define STATUS_ERROR_PROTOCOL 0x04 +#define STATUS_ERROR_READONLY 0x05 #endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_BLUETOOTH_FILE_TRANSFER_PROTOCOL_H From e5290a28864aadf6df4a6c6b31de11441584bc55 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Tue, 14 Sep 2021 01:09:15 +0300 Subject: [PATCH 398/418] Enable WFI for raspberrypi port See #5331 for details --- ports/raspberrypi/supervisor/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 68d1277046..1b72592172 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -238,8 +238,8 @@ void port_interrupt_after_ticks(uint32_t ticks) { void port_idle_until_interrupt(void) { common_hal_mcu_disable_interrupts(); if (!background_callback_pending()) { -// asm volatile ("dsb 0xF":::"memory"); -// __wfi(); + asm volatile ("dsb 0xF":::"memory"); + __wfi(); } common_hal_mcu_enable_interrupts(); } From 650ce17c0db07662c69c843b7dc32df415165e9b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 13 Sep 2021 19:12:21 -0400 Subject: [PATCH 399/418] Fix formatting --- ports/raspberrypi/supervisor/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 1b72592172..213084582b 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -238,7 +238,7 @@ void port_interrupt_after_ticks(uint32_t ticks) { void port_idle_until_interrupt(void) { common_hal_mcu_disable_interrupts(); if (!background_callback_pending()) { - asm volatile ("dsb 0xF":::"memory"); + asm volatile ("dsb 0xF" ::: "memory"); __wfi(); } common_hal_mcu_enable_interrupts(); From 4659102cfe447bfce6bb77ff880ac69b950dba83 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 13 Sep 2021 16:12:40 -0700 Subject: [PATCH 400/418] Factor out common code and comment it --- supervisor/shared/bluetooth/file_transfer.c | 74 ++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/supervisor/shared/bluetooth/file_transfer.c b/supervisor/shared/bluetooth/file_transfer.c index 342e69c66e..03806ca5e1 100644 --- a/supervisor/shared/bluetooth/file_transfer.c +++ b/supervisor/shared/bluetooth/file_transfer.c @@ -133,6 +133,9 @@ void supervisor_start_bluetooth_file_transfer(void) { #define ANY_COMMAND 0x00 #define THIS_COMMAND 0x01 +// FATFS has a two second timestamp resolution but the BLE API allows for nanosecond resolution. +// This function truncates the time the time to a resolution storable by FATFS and fills in the +// FATFS encoded version into fattime. uint64_t truncate_time(uint64_t input_time, DWORD *fattime) { timeutils_struct_time_t tm; uint64_t seconds_since_epoch = timeutils_seconds_since_epoch_from_nanoseconds_since_1970(input_time); @@ -245,6 +248,22 @@ STATIC uint8_t _process_read_pacing(const uint8_t *raw_buf, size_t command_len) STATIC size_t total_write_length; STATIC uint64_t _truncated_time; +// Returns true if usb is active and replies with an error if so. If not, it grabs +// the USB mass storage lock and returns false. Make sure to release the lock with +// usb_msc_unlock() when the transaction is complete. +STATIC bool _usb_active(void *response, size_t response_size) { + // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. + #if CIRCUITPY_USB && CIRCUITPY_USB_MSC + if (storage_usb_enabled() && !usb_msc_lock()) { + // Status is always the second byte of the response. + ((uint8_t *)response)[1] = STATUS_ERROR_READONLY; + common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)response, response_size, NULL, 0); + return true; + } + #endif + return false; +} + STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { struct write_command *command = (struct write_command *)raw_buf; size_t header_size = sizeof(struct write_command); @@ -265,15 +284,9 @@ STATIC uint8_t _process_write(const uint8_t *raw_buf, size_t command_len) { char *path = (char *)command->path; path[command->path_length] = '\0'; - - // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. - #if CIRCUITPY_USB && CIRCUITPY_USB_MSC - if (storage_usb_enabled() && !usb_msc_lock()) { - response.status = STATUS_ERROR_READONLY; - common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct write_pacing), NULL, 0); + if (_usb_active(&response, sizeof(struct write_pacing))) { return ANY_COMMAND; } - #endif FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; DWORD fattime; @@ -421,14 +434,9 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct delete_status), NULL, 0); return ANY_COMMAND; } - // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. - #if CIRCUITPY_USB && CIRCUITPY_USB_MSC - if (storage_usb_enabled() && !usb_msc_lock()) { - response.status = STATUS_ERROR_READONLY; - common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct delete_status), NULL, 0); + if (_usb_active(&response, sizeof(struct delete_status))) { return ANY_COMMAND; } - #endif // We need to receive another packet to have the full path. if (command_len < header_size + command->path_length) { return THIS_COMMAND; @@ -462,6 +470,17 @@ STATIC uint8_t _process_delete(const uint8_t *raw_buf, size_t command_len) { return ANY_COMMAND; } +// NULL-terminate the path and remove any trailing /. Older versions of the +// protocol require it but newer ones do not. +STATIC void _terminate_path(char *path, size_t path_length) { + // -1 because fatfs doesn't want a trailing / + if (path[path_length - 1] == '/') { + path[path_length - 1] = '\0'; + } else { + path[path_length] = '\0'; + } +} + STATIC uint8_t _process_mkdir(const uint8_t *raw_buf, size_t command_len) { const struct mkdir_command *command = (struct mkdir_command *)raw_buf; size_t header_size = sizeof(struct mkdir_command); @@ -474,26 +493,17 @@ STATIC uint8_t _process_mkdir(const uint8_t *raw_buf, size_t command_len) { common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct mkdir_status), NULL, 0); return ANY_COMMAND; } - // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. - #if CIRCUITPY_USB && CIRCUITPY_USB_MSC - if (storage_usb_enabled() && !usb_msc_lock()) { - response.status = STATUS_ERROR_READONLY; - common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct mkdir_status), NULL, 0); + if (_usb_active(&response, sizeof(struct mkdir_status))) { return ANY_COMMAND; } - #endif // We need to receive another packet to have the full path. if (command_len < header_size + command->path_length) { return THIS_COMMAND; } FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; char *path = (char *)command->path; - // -1 because fatfs doesn't want a trailing / - if (path[command->path_length - 1] == '/') { - path[command->path_length - 1] = '\0'; - } else { - path[command->path_length] = '\0'; - } + _terminate_path(path, command->path_length); + DWORD fattime; response.truncated_time = truncate_time(command->modification_time, &fattime); override_fattime(fattime); @@ -536,12 +546,7 @@ STATIC uint8_t _process_listdir(uint8_t *raw_buf, size_t command_len) { FATFS *fs = &((fs_user_mount_t *)MP_STATE_VM(vfs_mount_table)->obj)->fatfs; char *path = (char *)&command->path; - // -1 because fatfs doesn't want a trailing / - if (path[command->path_length - 1] == '/') { - path[command->path_length - 1] = '\0'; - } else { - path[command->path_length] = '\0'; - } + _terminate_path(path, command->path_length); // mp_printf(&mp_plat_print, "list %s\n", path); FF_DIR dir; FRESULT res = f_opendir(fs, &dir, path); @@ -620,14 +625,9 @@ STATIC uint8_t _process_move(const uint8_t *raw_buf, size_t command_len) { common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct move_status), NULL, 0); return ANY_COMMAND; } - // Check to see if USB has already been mounted. If not, then we "eject" from USB until we're done. - #if CIRCUITPY_USB && CIRCUITPY_USB_MSC - if (storage_usb_enabled() && !usb_msc_lock()) { - response.status = STATUS_ERROR_READONLY; - common_hal_bleio_packet_buffer_write(&_transfer_packet_buffer, (const uint8_t *)&response, sizeof(struct move_status), NULL, 0); + if (_usb_active(&response, sizeof(struct move_status))) { return ANY_COMMAND; } - #endif // We need to receive another packet to have the full path. if (command_len < header_size + total_path_length) { return THIS_COMMAND; From 973a90f2aac4dd3b61d5b1c1aa6f3b3680c01db5 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 13 Sep 2021 16:44:55 -0700 Subject: [PATCH 401/418] Rename esp32s2 port to espressif This is in preparation for ESP32-S3 support and potentially others. Related to #4363 --- .github/workflows/build.yml | 18 +- .github/workflows/ports_windows.yml | 4 +- .gitmodules | 4 +- Makefile | 14 +- README.rst | 2 +- WEBUSB_README.md | 2 +- conf.py | 8 +- docs/shared_bindings_matrix.py | 2 +- docs/supported_ports.rst | 2 +- locale/circuitpython.pot | 263 ++++---- ports/{esp32s2 => espressif}/.gitignore | 0 ports/{esp32s2 => espressif}/CMakeLists.txt | 0 ports/{esp32s2 => espressif}/Makefile | 0 ports/{esp32s2 => espressif}/README.rst | 0 ports/{esp32s2 => espressif}/background.c | 0 ports/{esp32s2 => espressif}/background.h | 0 .../bindings/espidf/__init__.c | 0 .../bindings/espidf/__init__.h | 0 .../adafruit_feather_esp32s2_nopsram/board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../adafruit_feather_esp32s2_nopsram/pins.c | 0 .../sdkconfig | 0 .../board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../pins.c | 0 .../sdkconfig | 0 .../boards/adafruit_funhouse/board.c | 0 .../boards/adafruit_funhouse/mpconfigboard.h | 0 .../boards/adafruit_funhouse/mpconfigboard.mk | 0 .../boards/adafruit_funhouse/pins.c | 0 .../boards/adafruit_funhouse/sdkconfig | 0 .../adafruit_magtag_2.9_grayscale/board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../adafruit_magtag_2.9_grayscale/pins.c | 0 .../adafruit_magtag_2.9_grayscale/sdkconfig | 0 .../boards/adafruit_metro_esp32s2/board.c | 0 .../adafruit_metro_esp32s2/mpconfigboard.h | 0 .../adafruit_metro_esp32s2/mpconfigboard.mk | 0 .../boards/adafruit_metro_esp32s2/pins.c | 0 .../boards/adafruit_metro_esp32s2/sdkconfig | 0 .../boards/ai_thinker_esp_12k_nodemcu/board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../boards/ai_thinker_esp_12k_nodemcu/pins.c | 0 .../ai_thinker_esp_12k_nodemcu/sdkconfig | 0 .../boards/artisense_rd00/board.c | 0 .../boards/artisense_rd00/mpconfigboard.h | 0 .../boards/artisense_rd00/mpconfigboard.mk | 0 .../boards/artisense_rd00/pins.c | 0 .../boards/artisense_rd00/sdkconfig | 0 .../boards/atmegazero_esp32s2/board.c | 0 .../boards/atmegazero_esp32s2/mpconfigboard.h | 0 .../atmegazero_esp32s2/mpconfigboard.mk | 0 .../boards/atmegazero_esp32s2/pins.c | 0 .../boards/atmegazero_esp32s2/sdkconfig | 0 .../boards/crumpspace_crumps2/board.c | 0 .../boards/crumpspace_crumps2/mpconfigboard.h | 0 .../crumpspace_crumps2/mpconfigboard.mk | 0 .../boards/crumpspace_crumps2/pins.c | 0 .../boards/crumpspace_crumps2/sdkconfig | 0 .../boards/electroniccats_bastwifi/board.c | 0 .../electroniccats_bastwifi/mpconfigboard.h | 0 .../electroniccats_bastwifi/mpconfigboard.mk | 0 .../boards/electroniccats_bastwifi/pins.c | 0 .../boards/electroniccats_bastwifi/sdkconfig | 0 .../boards/espressif_hmi_devkit_1/board.c | 0 .../espressif_hmi_devkit_1/mpconfigboard.h | 0 .../espressif_hmi_devkit_1/mpconfigboard.mk | 0 .../boards/espressif_hmi_devkit_1/pins.c | 0 .../boards/espressif_hmi_devkit_1/sdkconfig | 0 .../boards/espressif_kaluga_1.3/board.c | 0 .../espressif_kaluga_1.3/mpconfigboard.h | 0 .../espressif_kaluga_1.3/mpconfigboard.mk | 0 .../boards/espressif_kaluga_1.3/pins.c | 0 .../boards/espressif_kaluga_1.3/sdkconfig | 0 .../boards/espressif_kaluga_1/board.c | 0 .../boards/espressif_kaluga_1/mpconfigboard.h | 0 .../espressif_kaluga_1/mpconfigboard.mk | 0 .../boards/espressif_kaluga_1/pins.c | 0 .../boards/espressif_kaluga_1/sdkconfig | 0 .../boards/espressif_saola_1_wroom/board.c | 0 .../espressif_saola_1_wroom/mpconfigboard.h | 0 .../espressif_saola_1_wroom/mpconfigboard.mk | 0 .../boards/espressif_saola_1_wroom/pins.c | 0 .../boards/espressif_saola_1_wroom/sdkconfig | 0 .../boards/espressif_saola_1_wrover/board.c | 0 .../espressif_saola_1_wrover/mpconfigboard.h | 0 .../espressif_saola_1_wrover/mpconfigboard.mk | 0 .../boards/espressif_saola_1_wrover/pins.c | 0 .../boards/espressif_saola_1_wrover/sdkconfig | 0 .../boards/franzininho_wifi_wroom/board.c | 0 .../franzininho_wifi_wroom/mpconfigboard.h | 0 .../franzininho_wifi_wroom/mpconfigboard.mk | 0 .../boards/franzininho_wifi_wroom/pins.c | 0 .../boards/franzininho_wifi_wroom/sdkconfig | 0 .../boards/franzininho_wifi_wrover/board.c | 0 .../franzininho_wifi_wrover/mpconfigboard.h | 0 .../franzininho_wifi_wrover/mpconfigboard.mk | 0 .../boards/franzininho_wifi_wrover/pins.c | 0 .../boards/franzininho_wifi_wrover/sdkconfig | 0 .../boards/gravitech_cucumber_m/board.c | 0 .../gravitech_cucumber_m/mpconfigboard.h | 0 .../gravitech_cucumber_m/mpconfigboard.mk | 0 .../boards/gravitech_cucumber_m/pins.c | 0 .../boards/gravitech_cucumber_m/sdkconfig | 0 .../boards/gravitech_cucumber_ms/board.c | 0 .../gravitech_cucumber_ms/mpconfigboard.h | 0 .../gravitech_cucumber_ms/mpconfigboard.mk | 0 .../boards/gravitech_cucumber_ms/pins.c | 0 .../boards/gravitech_cucumber_ms/sdkconfig | 0 .../boards/gravitech_cucumber_r/board.c | 0 .../gravitech_cucumber_r/mpconfigboard.h | 0 .../gravitech_cucumber_r/mpconfigboard.mk | 0 .../boards/gravitech_cucumber_r/pins.c | 0 .../boards/gravitech_cucumber_r/sdkconfig | 0 .../boards/gravitech_cucumber_rs/board.c | 0 .../gravitech_cucumber_rs/mpconfigboard.h | 0 .../gravitech_cucumber_rs/mpconfigboard.mk | 0 .../boards/gravitech_cucumber_rs/pins.c | 0 .../boards/gravitech_cucumber_rs/sdkconfig | 0 .../boards/lilygo_ttgo_t8_s2_st7789/board.c | 0 .../lilygo_ttgo_t8_s2_st7789/mpconfigboard.h | 0 .../lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk | 0 .../boards/lilygo_ttgo_t8_s2_st7789/pins.c | 0 .../boards/lilygo_ttgo_t8_s2_st7789/sdkconfig | 0 .../boards/lolin_s2_mini/board.c | 0 .../boards/lolin_s2_mini/mpconfigboard.h | 0 .../boards/lolin_s2_mini/mpconfigboard.mk | 0 .../boards/lolin_s2_mini/pins.c | 0 .../boards/lolin_s2_mini/sdkconfig | 0 .../boards/microdev_micro_s2/board.c | 0 .../boards/microdev_micro_s2/mpconfigboard.h | 0 .../boards/microdev_micro_s2/mpconfigboard.mk | 0 .../boards/microdev_micro_s2/pins.c | 0 .../boards/microdev_micro_s2/sdkconfig | 0 .../boards/morpheans_morphesp-240/board.c | 0 .../morpheans_morphesp-240/mpconfigboard.h | 0 .../morpheans_morphesp-240/mpconfigboard.mk | 0 .../boards/morpheans_morphesp-240/pins.c | 0 .../boards/morpheans_morphesp-240/sdkconfig | 0 .../boards/muselab_nanoesp32_s2_wroom/board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../boards/muselab_nanoesp32_s2_wroom/pins.c | 0 .../muselab_nanoesp32_s2_wroom/sdkconfig | 0 .../muselab_nanoesp32_s2_wrover/board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../boards/muselab_nanoesp32_s2_wrover/pins.c | 0 .../muselab_nanoesp32_s2_wrover/sdkconfig | 0 .../boards/odt_pixelwing_esp32_s2/board.c | 0 .../odt_pixelwing_esp32_s2/mpconfigboard.h | 0 .../odt_pixelwing_esp32_s2/mpconfigboard.mk | 0 .../boards/odt_pixelwing_esp32_s2/pins.c | 0 .../boards/odt_pixelwing_esp32_s2/sdkconfig | 0 .../boards/targett_module_clip_wroom/board.c | 0 .../targett_module_clip_wroom/mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../boards/targett_module_clip_wroom/pins.c | 0 .../targett_module_clip_wroom/sdkconfig | 0 .../boards/targett_module_clip_wrover/board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../boards/targett_module_clip_wrover/pins.c | 0 .../targett_module_clip_wrover/sdkconfig | 0 .../boards/unexpectedmaker_feathers2/board.c | 0 .../unexpectedmaker_feathers2/mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../boards/unexpectedmaker_feathers2/pins.c | 0 .../unexpectedmaker_feathers2/sdkconfig | 0 .../unexpectedmaker_feathers2_neo/board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../unexpectedmaker_feathers2_neo/pins.c | 0 .../unexpectedmaker_feathers2_neo/sdkconfig | 0 .../board.c | 0 .../mpconfigboard.h | 0 .../mpconfigboard.mk | 0 .../pins.c | 0 .../sdkconfig | 0 .../boards/unexpectedmaker_tinys2/board.c | 0 .../unexpectedmaker_tinys2/mpconfigboard.h | 0 .../unexpectedmaker_tinys2/mpconfigboard.mk | 0 .../boards/unexpectedmaker_tinys2/pins.c | 0 .../boards/unexpectedmaker_tinys2/sdkconfig | 0 ports/{esp32s2 => espressif}/cam.c | 0 ports/{esp32s2 => espressif}/cam.h | 0 .../certificates/README.md | 0 .../certificates/nina-fw | 0 .../common-hal/alarm/SleepMemory.c | 0 .../common-hal/alarm/SleepMemory.h | 0 .../common-hal/alarm/__init__.c | 0 .../common-hal/alarm/__init__.h | 0 .../common-hal/alarm/pin/PinAlarm.c | 0 .../common-hal/alarm/pin/PinAlarm.h | 0 .../common-hal/alarm/time/TimeAlarm.c | 0 .../common-hal/alarm/time/TimeAlarm.h | 0 .../common-hal/alarm/touch/TouchAlarm.c | 0 .../common-hal/alarm/touch/TouchAlarm.h | 0 .../common-hal/analogio/AnalogIn.c | 0 .../common-hal/analogio/AnalogIn.h | 0 .../common-hal/analogio/AnalogOut.c | 0 .../common-hal/analogio/AnalogOut.h | 0 .../common-hal/analogio/__init__.c | 0 .../common-hal/audiobusio/I2SOut.c | 0 .../common-hal/audiobusio/I2SOut.h | 0 .../common-hal/audiobusio/PDMIn.c | 0 .../common-hal/audiobusio/PDMIn.h | 0 .../common-hal/audiobusio/__init__.c | 0 .../common-hal/audiobusio/__init__.h | 0 .../common-hal/board/__init__.c | 0 .../common-hal/busio/I2C.c | 0 .../common-hal/busio/I2C.h | 0 .../common-hal/busio/SPI.c | 0 .../common-hal/busio/SPI.h | 0 .../common-hal/busio/UART.c | 0 .../common-hal/busio/UART.h | 0 .../common-hal/busio/__init__.c | 0 .../common-hal/canio/CAN.c | 0 .../common-hal/canio/CAN.h | 0 .../common-hal/canio/Listener.c | 0 .../common-hal/canio/Listener.h | 0 .../common-hal/canio/__init__.c | 0 .../common-hal/canio/__init__.h | 0 .../common-hal/countio/Counter.c | 0 .../common-hal/countio/Counter.h | 0 .../common-hal/countio/__init__.c | 0 .../common-hal/digitalio/DigitalInOut.c | 0 .../common-hal/digitalio/DigitalInOut.h | 0 .../common-hal/digitalio/__init__.c | 0 .../common-hal/dualbank/__init__.c | 0 .../common-hal/dualbank/__init__.h | 0 .../common-hal/frequencyio/FrequencyIn.c | 0 .../common-hal/frequencyio/FrequencyIn.h | 0 .../common-hal/frequencyio/__init__.c | 0 .../imagecapture/ParallelImageCapture.c | 0 .../imagecapture/ParallelImageCapture.h | 0 .../common-hal/imagecapture/__init__.c | 0 .../common-hal/imagecapture/__init__.h | 0 .../common-hal/microcontroller/Pin.c | 0 .../common-hal/microcontroller/Pin.h | 0 .../common-hal/microcontroller/Processor.c | 0 .../common-hal/microcontroller/Processor.h | 0 .../common-hal/microcontroller/__init__.c | 0 .../common-hal/neopixel_write/__init__.c | 0 .../common-hal/nvm/ByteArray.c | 0 .../common-hal/nvm/ByteArray.h | 0 .../common-hal/nvm/__init__.c | 0 .../common-hal/os/__init__.c | 0 .../common-hal/paralleldisplay/ParallelBus.c | 0 .../common-hal/paralleldisplay/ParallelBus.h | 0 .../common-hal/ps2io/Ps2.c | 0 .../common-hal/ps2io/Ps2.h | 0 .../common-hal/ps2io/__init__.c | 0 .../common-hal/pulseio/PulseIn.c | 0 .../common-hal/pulseio/PulseIn.h | 0 .../common-hal/pulseio/PulseOut.c | 0 .../common-hal/pulseio/PulseOut.h | 0 .../common-hal/pulseio/__init__.c | 0 .../common-hal/pwmio/PWMOut.c | 0 .../common-hal/pwmio/PWMOut.h | 0 .../common-hal/pwmio/__init__.c | 0 .../common-hal/rgbmatrix/RGBMatrix.c | 0 .../common-hal/rgbmatrix/RGBMatrix.h | 0 .../common-hal/rgbmatrix/__init__.c | 0 .../common-hal/rgbmatrix/__init__.h | 0 .../common-hal/rotaryio/IncrementalEncoder.c | 0 .../common-hal/rotaryio/IncrementalEncoder.h | 0 .../common-hal/rotaryio/__init__.c | 0 .../common-hal/rtc/RTC.c | 0 .../common-hal/rtc/RTC.h | 0 .../common-hal/rtc/__init__.c | 0 .../common-hal/socketpool/Socket.c | 0 .../common-hal/socketpool/Socket.h | 0 .../common-hal/socketpool/SocketPool.c | 0 .../common-hal/socketpool/SocketPool.h | 0 .../common-hal/socketpool/__init__.c | 0 .../common-hal/socketpool/__init__.h | 0 .../common-hal/ssl/SSLContext.c | 0 .../common-hal/ssl/SSLContext.h | 0 .../common-hal/ssl/SSLSocket.c | 0 .../common-hal/ssl/SSLSocket.h | 0 .../common-hal/ssl/__init__.c | 0 .../common-hal/ssl/__init__.h | 0 .../common-hal/supervisor/Runtime.c | 0 .../common-hal/supervisor/Runtime.h | 0 .../common-hal/supervisor/__init__.c | 0 .../common-hal/time/__init__.c | 0 .../common-hal/touchio/TouchIn.c | 0 .../common-hal/touchio/TouchIn.h | 0 .../common-hal/touchio/__init__.c | 0 .../common-hal/watchdog/WatchDogMode.c | 0 .../common-hal/watchdog/WatchDogTimer.c | 0 .../common-hal/watchdog/WatchDogTimer.h | 0 .../common-hal/watchdog/__init__.c | 0 .../common-hal/wifi/Network.c | 0 .../common-hal/wifi/Network.h | 0 .../common-hal/wifi/Radio.c | 0 .../common-hal/wifi/Radio.h | 0 .../common-hal/wifi/ScannedNetworks.c | 0 .../common-hal/wifi/ScannedNetworks.h | 0 .../common-hal/wifi/__init__.c | 0 .../common-hal/wifi/__init__.h | 0 ports/{esp32s2 => espressif}/esp-idf | 0 .../esp-idf-config/partitions-16MB.csv | 0 .../esp-idf-config/partitions-4MB.csv | 0 .../esp-idf-config/partitions-8MB.csv | 0 .../esp-idf-config/sdkconfig-16MB.defaults | 0 .../esp-idf-config/sdkconfig-4MB.defaults | 0 .../esp-idf-config/sdkconfig-8MB.defaults | 0 .../esp-idf-config/sdkconfig-debug.defaults | 0 .../esp-idf-config/sdkconfig-opt.defaults | 0 .../esp-idf-config/sdkconfig.defaults | 0 .../esp32s2_peripherals_config.h | 0 ports/{esp32s2 => espressif}/esp_error.c | 0 ports/{esp32s2 => espressif}/fatfs_port.c | 0 ports/{esp32s2 => espressif}/modules/module.h | 0 ports/{esp32s2 => espressif}/modules/none.c | 0 ports/{esp32s2 => espressif}/modules/wroom.c | 0 ports/{esp32s2 => espressif}/modules/wrover.c | 0 ports/{esp32s2 => espressif}/mpconfigport.h | 0 ports/{esp32s2 => espressif}/mpconfigport.mk | 0 ports/{esp32s2 => espressif}/mphalport.c | 0 ports/{esp32s2 => espressif}/mphalport.h | 0 .../{esp32s2 => espressif}/peripherals/pcnt.c | 0 .../{esp32s2 => espressif}/peripherals/pcnt.h | 0 .../{esp32s2 => espressif}/peripherals/pins.c | 0 .../{esp32s2 => espressif}/peripherals/pins.h | 0 .../{esp32s2 => espressif}/peripherals/rmt.c | 0 .../{esp32s2 => espressif}/peripherals/rmt.h | 0 .../peripherals/timer.c | 0 .../peripherals/timer.h | 0 .../peripherals/touch.c | 0 .../peripherals/touch.h | 0 ports/{esp32s2 => espressif}/qstrdefsport.h | 0 .../supervisor/esp_port.h | 0 .../supervisor/internal_flash.c | 0 .../supervisor/internal_flash.h | 0 .../supervisor/internal_flash_root_pointers.h | 0 .../{esp32s2 => espressif}/supervisor/port.c | 0 ports/{esp32s2 => espressif}/supervisor/usb.c | 0 .../tools/build_memory_info.py | 0 .../tools/decode_backtrace.py | 0 py/circuitpy_mpconfig.mk | 2 +- tools/build_board_info.py | 2 +- tools/ci.sh | 584 ------------------ tools/ci_changed_board_list.py | 2 +- tools/merge_micropython.py | 2 +- 351 files changed, 166 insertions(+), 745 deletions(-) rename ports/{esp32s2 => espressif}/.gitignore (100%) rename ports/{esp32s2 => espressif}/CMakeLists.txt (100%) rename ports/{esp32s2 => espressif}/Makefile (100%) rename ports/{esp32s2 => espressif}/README.rst (100%) rename ports/{esp32s2 => espressif}/background.c (100%) rename ports/{esp32s2 => espressif}/background.h (100%) rename ports/{esp32s2 => espressif}/bindings/espidf/__init__.c (100%) rename ports/{esp32s2 => espressif}/bindings/espidf/__init__.h (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_nopsram/board.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_nopsram/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_nopsram/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_funhouse/board.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_funhouse/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_funhouse/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_funhouse/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_funhouse/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_magtag_2.9_grayscale/board.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_magtag_2.9_grayscale/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_magtag_2.9_grayscale/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_metro_esp32s2/board.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_metro_esp32s2/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_metro_esp32s2/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_metro_esp32s2/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/adafruit_metro_esp32s2/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/ai_thinker_esp_12k_nodemcu/board.c (100%) rename ports/{esp32s2 => espressif}/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/ai_thinker_esp_12k_nodemcu/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/ai_thinker_esp_12k_nodemcu/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/artisense_rd00/board.c (100%) rename ports/{esp32s2 => espressif}/boards/artisense_rd00/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/artisense_rd00/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/artisense_rd00/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/artisense_rd00/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/atmegazero_esp32s2/board.c (100%) rename ports/{esp32s2 => espressif}/boards/atmegazero_esp32s2/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/atmegazero_esp32s2/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/atmegazero_esp32s2/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/atmegazero_esp32s2/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/crumpspace_crumps2/board.c (100%) rename ports/{esp32s2 => espressif}/boards/crumpspace_crumps2/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/crumpspace_crumps2/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/crumpspace_crumps2/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/crumpspace_crumps2/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/electroniccats_bastwifi/board.c (100%) rename ports/{esp32s2 => espressif}/boards/electroniccats_bastwifi/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/electroniccats_bastwifi/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/electroniccats_bastwifi/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/electroniccats_bastwifi/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/espressif_hmi_devkit_1/board.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_hmi_devkit_1/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/espressif_hmi_devkit_1/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/espressif_hmi_devkit_1/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_hmi_devkit_1/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1.3/board.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1.3/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1.3/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1.3/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1.3/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1/board.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_kaluga_1/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wroom/board.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wroom/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wroom/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wroom/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wroom/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wrover/board.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wrover/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wrover/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wrover/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/espressif_saola_1_wrover/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wroom/board.c (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wroom/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wroom/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wroom/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wroom/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wrover/board.c (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wrover/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wrover/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wrover/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/franzininho_wifi_wrover/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_m/board.c (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_m/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_m/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_m/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_m/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_ms/board.c (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_ms/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_ms/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_ms/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_ms/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_r/board.c (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_r/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_r/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_r/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_r/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_rs/board.c (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_rs/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_rs/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_rs/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/gravitech_cucumber_rs/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/lilygo_ttgo_t8_s2_st7789/board.c (100%) rename ports/{esp32s2 => espressif}/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/lilygo_ttgo_t8_s2_st7789/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/lolin_s2_mini/board.c (100%) rename ports/{esp32s2 => espressif}/boards/lolin_s2_mini/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/lolin_s2_mini/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/lolin_s2_mini/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/lolin_s2_mini/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/microdev_micro_s2/board.c (100%) rename ports/{esp32s2 => espressif}/boards/microdev_micro_s2/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/microdev_micro_s2/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/microdev_micro_s2/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/microdev_micro_s2/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/morpheans_morphesp-240/board.c (100%) rename ports/{esp32s2 => espressif}/boards/morpheans_morphesp-240/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/morpheans_morphesp-240/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/morpheans_morphesp-240/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/morpheans_morphesp-240/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wroom/board.c (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wroom/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wroom/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wrover/board.c (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wrover/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/muselab_nanoesp32_s2_wrover/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/odt_pixelwing_esp32_s2/board.c (100%) rename ports/{esp32s2 => espressif}/boards/odt_pixelwing_esp32_s2/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/odt_pixelwing_esp32_s2/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/odt_pixelwing_esp32_s2/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wroom/board.c (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wroom/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wroom/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wroom/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wroom/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wrover/board.c (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wrover/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wrover/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wrover/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/targett_module_clip_wrover/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2/board.c (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_neo/board.c (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_neo/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_neo/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_prerelease/board.c (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_prerelease/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_feathers2_prerelease/sdkconfig (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_tinys2/board.c (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_tinys2/mpconfigboard.h (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_tinys2/mpconfigboard.mk (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_tinys2/pins.c (100%) rename ports/{esp32s2 => espressif}/boards/unexpectedmaker_tinys2/sdkconfig (100%) rename ports/{esp32s2 => espressif}/cam.c (100%) rename ports/{esp32s2 => espressif}/cam.h (100%) rename ports/{esp32s2 => espressif}/certificates/README.md (100%) rename ports/{esp32s2 => espressif}/certificates/nina-fw (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/SleepMemory.c (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/SleepMemory.h (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/__init__.h (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/pin/PinAlarm.c (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/pin/PinAlarm.h (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/time/TimeAlarm.c (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/time/TimeAlarm.h (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/touch/TouchAlarm.c (100%) rename ports/{esp32s2 => espressif}/common-hal/alarm/touch/TouchAlarm.h (100%) rename ports/{esp32s2 => espressif}/common-hal/analogio/AnalogIn.c (100%) rename ports/{esp32s2 => espressif}/common-hal/analogio/AnalogIn.h (100%) rename ports/{esp32s2 => espressif}/common-hal/analogio/AnalogOut.c (100%) rename ports/{esp32s2 => espressif}/common-hal/analogio/AnalogOut.h (100%) rename ports/{esp32s2 => espressif}/common-hal/analogio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/audiobusio/I2SOut.c (100%) rename ports/{esp32s2 => espressif}/common-hal/audiobusio/I2SOut.h (100%) rename ports/{esp32s2 => espressif}/common-hal/audiobusio/PDMIn.c (100%) rename ports/{esp32s2 => espressif}/common-hal/audiobusio/PDMIn.h (100%) rename ports/{esp32s2 => espressif}/common-hal/audiobusio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/audiobusio/__init__.h (100%) rename ports/{esp32s2 => espressif}/common-hal/board/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/busio/I2C.c (100%) rename ports/{esp32s2 => espressif}/common-hal/busio/I2C.h (100%) rename ports/{esp32s2 => espressif}/common-hal/busio/SPI.c (100%) rename ports/{esp32s2 => espressif}/common-hal/busio/SPI.h (100%) rename ports/{esp32s2 => espressif}/common-hal/busio/UART.c (100%) rename ports/{esp32s2 => espressif}/common-hal/busio/UART.h (100%) rename ports/{esp32s2 => espressif}/common-hal/busio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/canio/CAN.c (100%) rename ports/{esp32s2 => espressif}/common-hal/canio/CAN.h (100%) rename ports/{esp32s2 => espressif}/common-hal/canio/Listener.c (100%) rename ports/{esp32s2 => espressif}/common-hal/canio/Listener.h (100%) rename ports/{esp32s2 => espressif}/common-hal/canio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/canio/__init__.h (100%) rename ports/{esp32s2 => espressif}/common-hal/countio/Counter.c (100%) rename ports/{esp32s2 => espressif}/common-hal/countio/Counter.h (100%) rename ports/{esp32s2 => espressif}/common-hal/countio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/digitalio/DigitalInOut.c (100%) rename ports/{esp32s2 => espressif}/common-hal/digitalio/DigitalInOut.h (100%) rename ports/{esp32s2 => espressif}/common-hal/digitalio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/dualbank/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/dualbank/__init__.h (100%) rename ports/{esp32s2 => espressif}/common-hal/frequencyio/FrequencyIn.c (100%) rename ports/{esp32s2 => espressif}/common-hal/frequencyio/FrequencyIn.h (100%) rename ports/{esp32s2 => espressif}/common-hal/frequencyio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/imagecapture/ParallelImageCapture.c (100%) rename ports/{esp32s2 => espressif}/common-hal/imagecapture/ParallelImageCapture.h (100%) rename ports/{esp32s2 => espressif}/common-hal/imagecapture/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/imagecapture/__init__.h (100%) rename ports/{esp32s2 => espressif}/common-hal/microcontroller/Pin.c (100%) rename ports/{esp32s2 => espressif}/common-hal/microcontroller/Pin.h (100%) rename ports/{esp32s2 => espressif}/common-hal/microcontroller/Processor.c (100%) rename ports/{esp32s2 => espressif}/common-hal/microcontroller/Processor.h (100%) rename ports/{esp32s2 => espressif}/common-hal/microcontroller/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/neopixel_write/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/nvm/ByteArray.c (100%) rename ports/{esp32s2 => espressif}/common-hal/nvm/ByteArray.h (100%) rename ports/{esp32s2 => espressif}/common-hal/nvm/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/os/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/paralleldisplay/ParallelBus.c (100%) rename ports/{esp32s2 => espressif}/common-hal/paralleldisplay/ParallelBus.h (100%) rename ports/{esp32s2 => espressif}/common-hal/ps2io/Ps2.c (100%) rename ports/{esp32s2 => espressif}/common-hal/ps2io/Ps2.h (100%) rename ports/{esp32s2 => espressif}/common-hal/ps2io/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/pulseio/PulseIn.c (100%) rename ports/{esp32s2 => espressif}/common-hal/pulseio/PulseIn.h (100%) rename ports/{esp32s2 => espressif}/common-hal/pulseio/PulseOut.c (100%) rename ports/{esp32s2 => espressif}/common-hal/pulseio/PulseOut.h (100%) rename ports/{esp32s2 => espressif}/common-hal/pulseio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/pwmio/PWMOut.c (100%) rename ports/{esp32s2 => espressif}/common-hal/pwmio/PWMOut.h (100%) rename ports/{esp32s2 => espressif}/common-hal/pwmio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/rgbmatrix/RGBMatrix.c (100%) rename ports/{esp32s2 => espressif}/common-hal/rgbmatrix/RGBMatrix.h (100%) rename ports/{esp32s2 => espressif}/common-hal/rgbmatrix/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/rgbmatrix/__init__.h (100%) rename ports/{esp32s2 => espressif}/common-hal/rotaryio/IncrementalEncoder.c (100%) rename ports/{esp32s2 => espressif}/common-hal/rotaryio/IncrementalEncoder.h (100%) rename ports/{esp32s2 => espressif}/common-hal/rotaryio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/rtc/RTC.c (100%) rename ports/{esp32s2 => espressif}/common-hal/rtc/RTC.h (100%) rename ports/{esp32s2 => espressif}/common-hal/rtc/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/socketpool/Socket.c (100%) rename ports/{esp32s2 => espressif}/common-hal/socketpool/Socket.h (100%) rename ports/{esp32s2 => espressif}/common-hal/socketpool/SocketPool.c (100%) rename ports/{esp32s2 => espressif}/common-hal/socketpool/SocketPool.h (100%) rename ports/{esp32s2 => espressif}/common-hal/socketpool/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/socketpool/__init__.h (100%) rename ports/{esp32s2 => espressif}/common-hal/ssl/SSLContext.c (100%) rename ports/{esp32s2 => espressif}/common-hal/ssl/SSLContext.h (100%) rename ports/{esp32s2 => espressif}/common-hal/ssl/SSLSocket.c (100%) rename ports/{esp32s2 => espressif}/common-hal/ssl/SSLSocket.h (100%) rename ports/{esp32s2 => espressif}/common-hal/ssl/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/ssl/__init__.h (100%) rename ports/{esp32s2 => espressif}/common-hal/supervisor/Runtime.c (100%) rename ports/{esp32s2 => espressif}/common-hal/supervisor/Runtime.h (100%) rename ports/{esp32s2 => espressif}/common-hal/supervisor/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/time/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/touchio/TouchIn.c (100%) rename ports/{esp32s2 => espressif}/common-hal/touchio/TouchIn.h (100%) rename ports/{esp32s2 => espressif}/common-hal/touchio/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/watchdog/WatchDogMode.c (100%) rename ports/{esp32s2 => espressif}/common-hal/watchdog/WatchDogTimer.c (100%) rename ports/{esp32s2 => espressif}/common-hal/watchdog/WatchDogTimer.h (100%) rename ports/{esp32s2 => espressif}/common-hal/watchdog/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/wifi/Network.c (100%) rename ports/{esp32s2 => espressif}/common-hal/wifi/Network.h (100%) rename ports/{esp32s2 => espressif}/common-hal/wifi/Radio.c (100%) rename ports/{esp32s2 => espressif}/common-hal/wifi/Radio.h (100%) rename ports/{esp32s2 => espressif}/common-hal/wifi/ScannedNetworks.c (100%) rename ports/{esp32s2 => espressif}/common-hal/wifi/ScannedNetworks.h (100%) rename ports/{esp32s2 => espressif}/common-hal/wifi/__init__.c (100%) rename ports/{esp32s2 => espressif}/common-hal/wifi/__init__.h (100%) rename ports/{esp32s2 => espressif}/esp-idf (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/partitions-16MB.csv (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/partitions-4MB.csv (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/partitions-8MB.csv (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/sdkconfig-16MB.defaults (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/sdkconfig-4MB.defaults (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/sdkconfig-8MB.defaults (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/sdkconfig-debug.defaults (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/sdkconfig-opt.defaults (100%) rename ports/{esp32s2 => espressif}/esp-idf-config/sdkconfig.defaults (100%) rename ports/{esp32s2 => espressif}/esp32s2_peripherals_config.h (100%) rename ports/{esp32s2 => espressif}/esp_error.c (100%) rename ports/{esp32s2 => espressif}/fatfs_port.c (100%) rename ports/{esp32s2 => espressif}/modules/module.h (100%) rename ports/{esp32s2 => espressif}/modules/none.c (100%) rename ports/{esp32s2 => espressif}/modules/wroom.c (100%) rename ports/{esp32s2 => espressif}/modules/wrover.c (100%) rename ports/{esp32s2 => espressif}/mpconfigport.h (100%) rename ports/{esp32s2 => espressif}/mpconfigport.mk (100%) rename ports/{esp32s2 => espressif}/mphalport.c (100%) rename ports/{esp32s2 => espressif}/mphalport.h (100%) rename ports/{esp32s2 => espressif}/peripherals/pcnt.c (100%) rename ports/{esp32s2 => espressif}/peripherals/pcnt.h (100%) rename ports/{esp32s2 => espressif}/peripherals/pins.c (100%) rename ports/{esp32s2 => espressif}/peripherals/pins.h (100%) rename ports/{esp32s2 => espressif}/peripherals/rmt.c (100%) rename ports/{esp32s2 => espressif}/peripherals/rmt.h (100%) rename ports/{esp32s2 => espressif}/peripherals/timer.c (100%) rename ports/{esp32s2 => espressif}/peripherals/timer.h (100%) rename ports/{esp32s2 => espressif}/peripherals/touch.c (100%) rename ports/{esp32s2 => espressif}/peripherals/touch.h (100%) rename ports/{esp32s2 => espressif}/qstrdefsport.h (100%) rename ports/{esp32s2 => espressif}/supervisor/esp_port.h (100%) rename ports/{esp32s2 => espressif}/supervisor/internal_flash.c (100%) rename ports/{esp32s2 => espressif}/supervisor/internal_flash.h (100%) rename ports/{esp32s2 => espressif}/supervisor/internal_flash_root_pointers.h (100%) rename ports/{esp32s2 => espressif}/supervisor/port.c (100%) rename ports/{esp32s2 => espressif}/supervisor/usb.c (100%) rename ports/{esp32s2 => espressif}/tools/build_memory_info.py (100%) rename ports/{esp32s2 => espressif}/tools/decode_backtrace.py (100%) delete mode 100755 tools/ci.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c743bdb91..f51727f509 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -322,14 +322,14 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) - build-xtensa: + build-espressif: runs-on: ubuntu-20.04 needs: test strategy: fail-fast: false matrix: - board: ${{ fromJSON(needs.test.outputs.xtensa-boards) }} - if: ${{ needs.test.outputs.xtensa-boards != '[]' }} + board: ${{ fromJSON(needs.test.outputs.espressif-boards) }} + if: ${{ needs.test.outputs.espressif-boards != '[]' }} steps: - name: Set up Python 3.8 @@ -348,12 +348,12 @@ jobs: id: idf-cache with: path: ${{ github.workspace }}/.idf_tools - key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210716 + key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/espressif/esp-idf/HEAD') }}-20210716 - name: Clone IDF submodules run: | (cd $IDF_PATH && git submodule update --init) env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf + IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf - name: Install IDF tools run: | $IDF_PATH/tools/idf_tools.py --non-interactive install required @@ -361,7 +361,7 @@ jobs: $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env rm -rf $IDF_TOOLS_PATH/dist env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf + IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools - name: Install CircuitPython deps run: | @@ -369,7 +369,7 @@ jobs: pip install -r requirements-dev.txt sudo apt-get install -y gettext ninja-build env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf + IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools - name: Versions run: | @@ -381,7 +381,7 @@ jobs: cmake --version shell: bash env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf + IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools - name: mpy-cross run: make -C mpy-cross -j2 @@ -394,7 +394,7 @@ jobs: working-directory: tools shell: bash env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf + IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools BOARDS: ${{ matrix.board }} - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ports_windows.yml b/.github/workflows/ports_windows.yml index 463684bfe9..4b86f320ed 100644 --- a/.github/workflows/ports_windows.yml +++ b/.github/workflows/ports_windows.yml @@ -99,8 +99,8 @@ jobs: # https://github.com/espressif/esp-idf/issues/7062 # # - name: prepare esp -# run: ports/esp32s2/esp-idf/install.bat +# run: ports/espressif/esp-idf/install.bat # shell: cmd # # - name: build esp -# run: . ports/esp32s2/esp-idf/export.sh && make -j2 -C ports/esp32s2 BOARD=adafruit_metro_esp32s2 +# run: . ports/espressif/esp-idf/export.sh && make -j2 -C ports/espressif BOARD=adafruit_metro_esp32s2 diff --git a/.gitmodules b/.gitmodules index 6089411280..1c6a98eb9d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -151,11 +151,11 @@ path = frozen/Adafruit_CircuitPython_RFM69 url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git [submodule "ports/esp32s2/esp-idf"] - path = ports/esp32s2/esp-idf + path = ports/espressif/esp-idf url = https://github.com/espressif/esp-idf.git branch = release/v4.3 [submodule "ports/esp32s2/certificates/nina-fw"] - path = ports/esp32s2/certificates/nina-fw + path = ports/espressif/certificates/nina-fw url = https://github.com/adafruit/nina-fw.git [submodule "frozen/Adafruit_CircuitPython_ST7789"] path = frozen/Adafruit_CircuitPython_ST7789 diff --git a/Makefile b/Makefile index a26eef5c27..db0e871256 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS) # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(BASEOPTS) -TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/esp32s2 ports/mimxrt10xx ports/nrf ports/raspberrypi ports/stm py shared-bindings shared-module supervisor +TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/espressif ports/mimxrt10xx ports/nrf ports/raspberrypi ports/stm py shared-bindings shared-module supervisor # Paths to exclude from TRANSLATE_SOURCES # Each must be preceded by "-path"; if any wildcards, enclose in quotes. # Separate by "-o" (Find's "or" operand) @@ -48,7 +48,7 @@ TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \ -o -path "ports/*/build" \ -o -path ports/atmel-samd/asf4 \ -o -path ports/cxd56/spresense-exported-sdk \ - -o -path ports/esp32s2/esp-idf \ + -o -path ports/espressif/esp-idf \ -o -path ports/mimxrt10xx/sdk \ -o -path ports/raspberrypi/sdk \ -o -path ports/stm/st_driver \ @@ -283,8 +283,8 @@ samd21: samd51: $(MAKE) -C ports/atmel-samd BOARD=feather_m4_express -esp32s2: - $(MAKE) -C ports/esp32s2 BOARD=espressif_saola_1_wroom +espressif: + $(MAKE) -C ports/espressif BOARD=espressif_saola_1_wroom litex: $(MAKE) -C ports/litex BOARD=fomu @@ -298,7 +298,7 @@ nrf: stm: $(MAKE) -C ports/stm BOARD=feather_stm32f405_express -clean-one-of-each: clean-samd21 clean-samd51 clean-esp32s2 clean-litex clean-mimxrt10xx clean-nrf clean-stm +clean-one-of-each: clean-samd21 clean-samd51 clean-espressif clean-litex clean-mimxrt10xx clean-nrf clean-stm clean-samd21: $(MAKE) -C ports/atmel-samd BOARD=trinket_m0 clean @@ -306,8 +306,8 @@ clean-samd21: clean-samd51: $(MAKE) -C ports/atmel-samd BOARD=feather_m4_express clean -clean-esp32s2: - $(MAKE) -C ports/esp32s2 BOARD=espressif_saola_1_wroom clean +clean-espressif: + $(MAKE) -C ports/espressif BOARD=espressif_saola_1_wroom clean clean-litex: $(MAKE) -C ports/litex BOARD=fomu clean diff --git a/README.rst b/README.rst index b594174d5b..c6e9a33994 100644 --- a/README.rst +++ b/README.rst @@ -213,7 +213,7 @@ Supported Support status ================ ============================================================ atmel-samd ``SAMD21`` stable | ``SAMD51`` stable cxd56 stable -esp32s2 stable +espressif stable litex alpha mimxrt10xx alpha nrf stable diff --git a/WEBUSB_README.md b/WEBUSB_README.md index 8250941eb0..ecae66308a 100644 --- a/WEBUSB_README.md +++ b/WEBUSB_README.md @@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT # WebUSB Serial Support -To date, this has only been tested on one port (esp32s2), on one board (espressif_kaluga_1). +To date, this has only been tested on one port (espressif), on one board (espressif_kaluga_1). ## What it does diff --git a/conf.py b/conf.py index 866e761748..0dac441b0d 100644 --- a/conf.py +++ b/conf.py @@ -188,10 +188,10 @@ exclude_patterns = ["**/build*", "ports/atmel-samd/tools", "ports/cxd56/mkspk", "ports/cxd56/spresense-exported-sdk", - "ports/esp32s2/certificates", - "ports/esp32s2/esp-idf", - "ports/esp32s2/.idf_tools", - "ports/esp32s2/peripherals", + "ports/espressif/certificates", + "ports/espressif/esp-idf", + "ports/espressif/.idf_tools", + "ports/espressif/peripherals", "ports/litex/hw", "ports/minimal", "ports/mimxrt10xx/peripherals", diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index bfe83b3aaf..7954e96bfd 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -30,7 +30,7 @@ import sys from concurrent.futures import ThreadPoolExecutor -SUPPORTED_PORTS = ['atmel-samd', 'cxd56', 'esp32s2', 'litex', 'mimxrt10xx', 'nrf', 'raspberrypi', 'stm'] +SUPPORTED_PORTS = ['atmel-samd', 'cxd56', 'espressif', 'litex', 'mimxrt10xx', 'nrf', 'raspberrypi', 'stm'] aliases_by_board = { "circuitplayground_express": [ diff --git a/docs/supported_ports.rst b/docs/supported_ports.rst index b83ef12d35..fbe61e81ce 100644 --- a/docs/supported_ports.rst +++ b/docs/supported_ports.rst @@ -13,7 +13,7 @@ is limited. ../ports/atmel-samd/README ../ports/cxd56/README - ../ports/esp32s2/README + ../ports/espressif/README ../ports/litex/README ../ports/mimxrt10xx/README ../ports/nrf/README diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 61cec6f617..f58a84917b 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -139,7 +139,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -172,7 +173,7 @@ msgstr "" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -351,7 +352,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "" @@ -364,31 +365,31 @@ msgstr "" msgid "Address type out of range" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "" @@ -423,10 +424,10 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -447,7 +448,7 @@ msgstr "" msgid "Already running" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -522,7 +523,7 @@ msgid "" "disable.\n" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -620,7 +621,7 @@ msgid "Buffer too short by %d bytes" msgstr "" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -639,7 +640,7 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -647,15 +648,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -697,7 +698,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -719,7 +720,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -727,7 +728,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "" @@ -744,7 +745,7 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -809,7 +810,7 @@ msgid "Could not initialize SDCard" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "" @@ -825,7 +826,7 @@ msgstr "" msgid "Could not restart PWM" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -880,7 +881,7 @@ msgstr "" msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -931,7 +932,8 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1010,7 +1012,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1031,7 +1033,7 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1039,11 +1041,11 @@ msgstr "" msgid "Failed to allocate RX buffer of %d bytes" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1059,7 +1061,7 @@ msgstr "" msgid "Failed to connect: timeout" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1085,12 +1087,12 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1112,7 +1114,7 @@ msgstr "" msgid "Function requires lock" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1183,7 +1185,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1196,7 +1198,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "" @@ -1262,7 +1264,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1278,7 +1280,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1289,18 +1291,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1319,7 +1321,7 @@ msgid "Invalid byteorder string" msgstr "" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "" @@ -1349,7 +1351,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "" @@ -1368,8 +1370,8 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1389,8 +1391,10 @@ msgstr "" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1417,15 +1421,15 @@ msgstr "" msgid "Invalid security_mode" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1462,7 +1466,7 @@ msgstr "" msgid "Layer must be a Group or TileGrid subclass." msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1548,7 +1552,7 @@ msgstr "" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1581,25 +1585,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1663,7 +1667,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1725,11 +1730,11 @@ msgstr "" msgid "Only 8 or 16 bit mono with " msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1758,11 +1763,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1773,19 +1778,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1824,7 +1829,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1846,7 +1851,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1949,12 +1954,12 @@ msgstr "" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -1986,7 +1991,7 @@ msgstr "" msgid "Read-only object" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2002,7 +2007,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2040,7 +2045,7 @@ msgstr "" msgid "SPI Re-initialization error" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2097,7 +2102,7 @@ msgstr "" msgid "Slices not supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2294,7 +2299,7 @@ msgstr "" msgid "Unable to allocate buffers for signed conversion" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2328,7 +2333,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2369,7 +2374,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "" @@ -2390,7 +2395,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2404,7 +2409,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2648,7 +2653,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "" @@ -3262,7 +3267,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3493,7 +3498,7 @@ msgstr "" msgid "long int not supported in this build" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3884,7 +3889,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "" @@ -3909,40 +3914,40 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4184,7 +4189,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4251,18 +4256,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "" @@ -4385,7 +4390,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4402,7 +4407,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4438,7 +4443,7 @@ msgstr "" msgid "x value out of bounds" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/ports/esp32s2/.gitignore b/ports/espressif/.gitignore similarity index 100% rename from ports/esp32s2/.gitignore rename to ports/espressif/.gitignore diff --git a/ports/esp32s2/CMakeLists.txt b/ports/espressif/CMakeLists.txt similarity index 100% rename from ports/esp32s2/CMakeLists.txt rename to ports/espressif/CMakeLists.txt diff --git a/ports/esp32s2/Makefile b/ports/espressif/Makefile similarity index 100% rename from ports/esp32s2/Makefile rename to ports/espressif/Makefile diff --git a/ports/esp32s2/README.rst b/ports/espressif/README.rst similarity index 100% rename from ports/esp32s2/README.rst rename to ports/espressif/README.rst diff --git a/ports/esp32s2/background.c b/ports/espressif/background.c similarity index 100% rename from ports/esp32s2/background.c rename to ports/espressif/background.c diff --git a/ports/esp32s2/background.h b/ports/espressif/background.h similarity index 100% rename from ports/esp32s2/background.h rename to ports/espressif/background.h diff --git a/ports/esp32s2/bindings/espidf/__init__.c b/ports/espressif/bindings/espidf/__init__.c similarity index 100% rename from ports/esp32s2/bindings/espidf/__init__.c rename to ports/espressif/bindings/espidf/__init__.c diff --git a/ports/esp32s2/bindings/espidf/__init__.h b/ports/espressif/bindings/espidf/__init__.h similarity index 100% rename from ports/esp32s2/bindings/espidf/__init__.h rename to ports/espressif/bindings/espidf/__init__.h diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_nopsram/board.c similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/board.c rename to ports/espressif/boards/adafruit_feather_esp32s2_nopsram/board.c diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h rename to ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.mk rename to ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.mk diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2_nopsram/pins.c similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c rename to ports/espressif/boards/adafruit_feather_esp32s2_nopsram/pins.c diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_nopsram/sdkconfig similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/sdkconfig rename to ports/espressif/boards/adafruit_feather_esp32s2_nopsram/sdkconfig diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c rename to ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h rename to ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.mk rename to ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.mk diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c rename to ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig similarity index 100% rename from ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig rename to ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig diff --git a/ports/esp32s2/boards/adafruit_funhouse/board.c b/ports/espressif/boards/adafruit_funhouse/board.c similarity index 100% rename from ports/esp32s2/boards/adafruit_funhouse/board.c rename to ports/espressif/boards/adafruit_funhouse/board.c diff --git a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h rename to ports/espressif/boards/adafruit_funhouse/mpconfigboard.h diff --git a/ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.mk rename to ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk diff --git a/ports/esp32s2/boards/adafruit_funhouse/pins.c b/ports/espressif/boards/adafruit_funhouse/pins.c similarity index 100% rename from ports/esp32s2/boards/adafruit_funhouse/pins.c rename to ports/espressif/boards/adafruit_funhouse/pins.c diff --git a/ports/esp32s2/boards/adafruit_funhouse/sdkconfig b/ports/espressif/boards/adafruit_funhouse/sdkconfig similarity index 100% rename from ports/esp32s2/boards/adafruit_funhouse/sdkconfig rename to ports/espressif/boards/adafruit_funhouse/sdkconfig diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/board.c b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c similarity index 100% rename from ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/board.c rename to ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h rename to ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk rename to ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/pins.c similarity index 100% rename from ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c rename to ports/espressif/boards/adafruit_magtag_2.9_grayscale/pins.c diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/sdkconfig b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig similarity index 100% rename from ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/sdkconfig rename to ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/board.c b/ports/espressif/boards/adafruit_metro_esp32s2/board.c similarity index 100% rename from ports/esp32s2/boards/adafruit_metro_esp32s2/board.c rename to ports/espressif/boards/adafruit_metro_esp32s2/board.c diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h rename to ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.mk rename to ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c b/ports/espressif/boards/adafruit_metro_esp32s2/pins.c similarity index 100% rename from ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c rename to ports/espressif/boards/adafruit_metro_esp32s2/pins.c diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig similarity index 100% rename from ports/esp32s2/boards/adafruit_metro_esp32s2/sdkconfig rename to ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/board.c b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c similarity index 100% rename from ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/board.c rename to ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h rename to ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk rename to ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/pins.c similarity index 100% rename from ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/pins.c rename to ports/espressif/boards/ai_thinker_esp_12k_nodemcu/pins.c diff --git a/ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/sdkconfig b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig similarity index 100% rename from ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/sdkconfig rename to ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig diff --git a/ports/esp32s2/boards/artisense_rd00/board.c b/ports/espressif/boards/artisense_rd00/board.c similarity index 100% rename from ports/esp32s2/boards/artisense_rd00/board.c rename to ports/espressif/boards/artisense_rd00/board.c diff --git a/ports/esp32s2/boards/artisense_rd00/mpconfigboard.h b/ports/espressif/boards/artisense_rd00/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/artisense_rd00/mpconfigboard.h rename to ports/espressif/boards/artisense_rd00/mpconfigboard.h diff --git a/ports/esp32s2/boards/artisense_rd00/mpconfigboard.mk b/ports/espressif/boards/artisense_rd00/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/artisense_rd00/mpconfigboard.mk rename to ports/espressif/boards/artisense_rd00/mpconfigboard.mk diff --git a/ports/esp32s2/boards/artisense_rd00/pins.c b/ports/espressif/boards/artisense_rd00/pins.c similarity index 100% rename from ports/esp32s2/boards/artisense_rd00/pins.c rename to ports/espressif/boards/artisense_rd00/pins.c diff --git a/ports/esp32s2/boards/artisense_rd00/sdkconfig b/ports/espressif/boards/artisense_rd00/sdkconfig similarity index 100% rename from ports/esp32s2/boards/artisense_rd00/sdkconfig rename to ports/espressif/boards/artisense_rd00/sdkconfig diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/board.c b/ports/espressif/boards/atmegazero_esp32s2/board.c similarity index 100% rename from ports/esp32s2/boards/atmegazero_esp32s2/board.c rename to ports/espressif/boards/atmegazero_esp32s2/board.c diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h b/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h rename to ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.mk b/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.mk rename to ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/pins.c b/ports/espressif/boards/atmegazero_esp32s2/pins.c similarity index 100% rename from ports/esp32s2/boards/atmegazero_esp32s2/pins.c rename to ports/espressif/boards/atmegazero_esp32s2/pins.c diff --git a/ports/esp32s2/boards/atmegazero_esp32s2/sdkconfig b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig similarity index 100% rename from ports/esp32s2/boards/atmegazero_esp32s2/sdkconfig rename to ports/espressif/boards/atmegazero_esp32s2/sdkconfig diff --git a/ports/esp32s2/boards/crumpspace_crumps2/board.c b/ports/espressif/boards/crumpspace_crumps2/board.c similarity index 100% rename from ports/esp32s2/boards/crumpspace_crumps2/board.c rename to ports/espressif/boards/crumpspace_crumps2/board.c diff --git a/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h b/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h rename to ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h diff --git a/ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk b/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.mk rename to ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk diff --git a/ports/esp32s2/boards/crumpspace_crumps2/pins.c b/ports/espressif/boards/crumpspace_crumps2/pins.c similarity index 100% rename from ports/esp32s2/boards/crumpspace_crumps2/pins.c rename to ports/espressif/boards/crumpspace_crumps2/pins.c diff --git a/ports/esp32s2/boards/crumpspace_crumps2/sdkconfig b/ports/espressif/boards/crumpspace_crumps2/sdkconfig similarity index 100% rename from ports/esp32s2/boards/crumpspace_crumps2/sdkconfig rename to ports/espressif/boards/crumpspace_crumps2/sdkconfig diff --git a/ports/esp32s2/boards/electroniccats_bastwifi/board.c b/ports/espressif/boards/electroniccats_bastwifi/board.c similarity index 100% rename from ports/esp32s2/boards/electroniccats_bastwifi/board.c rename to ports/espressif/boards/electroniccats_bastwifi/board.c diff --git a/ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h b/ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h rename to ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h diff --git a/ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.mk b/ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.mk rename to ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.mk diff --git a/ports/esp32s2/boards/electroniccats_bastwifi/pins.c b/ports/espressif/boards/electroniccats_bastwifi/pins.c similarity index 100% rename from ports/esp32s2/boards/electroniccats_bastwifi/pins.c rename to ports/espressif/boards/electroniccats_bastwifi/pins.c diff --git a/ports/esp32s2/boards/electroniccats_bastwifi/sdkconfig b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig similarity index 100% rename from ports/esp32s2/boards/electroniccats_bastwifi/sdkconfig rename to ports/espressif/boards/electroniccats_bastwifi/sdkconfig diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/board.c b/ports/espressif/boards/espressif_hmi_devkit_1/board.c similarity index 100% rename from ports/esp32s2/boards/espressif_hmi_devkit_1/board.c rename to ports/espressif/boards/espressif_hmi_devkit_1/board.c diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h b/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h rename to ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk b/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.mk rename to ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c b/ports/espressif/boards/espressif_hmi_devkit_1/pins.c similarity index 100% rename from ports/esp32s2/boards/espressif_hmi_devkit_1/pins.c rename to ports/espressif/boards/espressif_hmi_devkit_1/pins.c diff --git a/ports/esp32s2/boards/espressif_hmi_devkit_1/sdkconfig b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig similarity index 100% rename from ports/esp32s2/boards/espressif_hmi_devkit_1/sdkconfig rename to ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/board.c b/ports/espressif/boards/espressif_kaluga_1.3/board.c similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1.3/board.c rename to ports/espressif/boards/espressif_kaluga_1.3/board.c diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h b/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h rename to ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.mk b/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.mk rename to ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/pins.c b/ports/espressif/boards/espressif_kaluga_1.3/pins.c similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1.3/pins.c rename to ports/espressif/boards/espressif_kaluga_1.3/pins.c diff --git a/ports/esp32s2/boards/espressif_kaluga_1.3/sdkconfig b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1.3/sdkconfig rename to ports/espressif/boards/espressif_kaluga_1.3/sdkconfig diff --git a/ports/esp32s2/boards/espressif_kaluga_1/board.c b/ports/espressif/boards/espressif_kaluga_1/board.c similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1/board.c rename to ports/espressif/boards/espressif_kaluga_1/board.c diff --git a/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h b/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h rename to ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk b/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk rename to ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk diff --git a/ports/esp32s2/boards/espressif_kaluga_1/pins.c b/ports/espressif/boards/espressif_kaluga_1/pins.c similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1/pins.c rename to ports/espressif/boards/espressif_kaluga_1/pins.c diff --git a/ports/esp32s2/boards/espressif_kaluga_1/sdkconfig b/ports/espressif/boards/espressif_kaluga_1/sdkconfig similarity index 100% rename from ports/esp32s2/boards/espressif_kaluga_1/sdkconfig rename to ports/espressif/boards/espressif_kaluga_1/sdkconfig diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/board.c b/ports/espressif/boards/espressif_saola_1_wroom/board.c similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wroom/board.c rename to ports/espressif/boards/espressif_saola_1_wroom/board.c diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h b/ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h rename to ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk b/ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk rename to ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.mk diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/pins.c b/ports/espressif/boards/espressif_saola_1_wroom/pins.c similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wroom/pins.c rename to ports/espressif/boards/espressif_saola_1_wroom/pins.c diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/sdkconfig b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wroom/sdkconfig rename to ports/espressif/boards/espressif_saola_1_wroom/sdkconfig diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/board.c b/ports/espressif/boards/espressif_saola_1_wrover/board.c similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wrover/board.c rename to ports/espressif/boards/espressif_saola_1_wrover/board.c diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h b/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h rename to ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk b/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk rename to ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c b/ports/espressif/boards/espressif_saola_1_wrover/pins.c similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wrover/pins.c rename to ports/espressif/boards/espressif_saola_1_wrover/pins.c diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/sdkconfig b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig similarity index 100% rename from ports/esp32s2/boards/espressif_saola_1_wrover/sdkconfig rename to ports/espressif/boards/espressif_saola_1_wrover/sdkconfig diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/board.c b/ports/espressif/boards/franzininho_wifi_wroom/board.c similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wroom/board.c rename to ports/espressif/boards/franzininho_wifi_wroom/board.c diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h b/ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h rename to ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk b/ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.mk rename to ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.mk diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/pins.c b/ports/espressif/boards/franzininho_wifi_wroom/pins.c similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wroom/pins.c rename to ports/espressif/boards/franzininho_wifi_wroom/pins.c diff --git a/ports/esp32s2/boards/franzininho_wifi_wroom/sdkconfig b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wroom/sdkconfig rename to ports/espressif/boards/franzininho_wifi_wroom/sdkconfig diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/board.c b/ports/espressif/boards/franzininho_wifi_wrover/board.c similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wrover/board.c rename to ports/espressif/boards/franzininho_wifi_wrover/board.c diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h b/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h rename to ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk b/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.mk rename to ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/pins.c b/ports/espressif/boards/franzininho_wifi_wrover/pins.c similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wrover/pins.c rename to ports/espressif/boards/franzininho_wifi_wrover/pins.c diff --git a/ports/esp32s2/boards/franzininho_wifi_wrover/sdkconfig b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig similarity index 100% rename from ports/esp32s2/boards/franzininho_wifi_wrover/sdkconfig rename to ports/espressif/boards/franzininho_wifi_wrover/sdkconfig diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/board.c b/ports/espressif/boards/gravitech_cucumber_m/board.c similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_m/board.c rename to ports/espressif/boards/gravitech_cucumber_m/board.c diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h b/ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h rename to ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.mk rename to ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.mk diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/pins.c b/ports/espressif/boards/gravitech_cucumber_m/pins.c similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_m/pins.c rename to ports/espressif/boards/gravitech_cucumber_m/pins.c diff --git a/ports/esp32s2/boards/gravitech_cucumber_m/sdkconfig b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_m/sdkconfig rename to ports/espressif/boards/gravitech_cucumber_m/sdkconfig diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/board.c b/ports/espressif/boards/gravitech_cucumber_ms/board.c similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_ms/board.c rename to ports/espressif/boards/gravitech_cucumber_ms/board.c diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h b/ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h rename to ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.mk rename to ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.mk diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/pins.c b/ports/espressif/boards/gravitech_cucumber_ms/pins.c similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_ms/pins.c rename to ports/espressif/boards/gravitech_cucumber_ms/pins.c diff --git a/ports/esp32s2/boards/gravitech_cucumber_ms/sdkconfig b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_ms/sdkconfig rename to ports/espressif/boards/gravitech_cucumber_ms/sdkconfig diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/board.c b/ports/espressif/boards/gravitech_cucumber_r/board.c similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_r/board.c rename to ports/espressif/boards/gravitech_cucumber_r/board.c diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h b/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h rename to ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.mk rename to ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/pins.c b/ports/espressif/boards/gravitech_cucumber_r/pins.c similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_r/pins.c rename to ports/espressif/boards/gravitech_cucumber_r/pins.c diff --git a/ports/esp32s2/boards/gravitech_cucumber_r/sdkconfig b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_r/sdkconfig rename to ports/espressif/boards/gravitech_cucumber_r/sdkconfig diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/board.c b/ports/espressif/boards/gravitech_cucumber_rs/board.c similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_rs/board.c rename to ports/espressif/boards/gravitech_cucumber_rs/board.c diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h b/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h rename to ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.mk rename to ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/pins.c b/ports/espressif/boards/gravitech_cucumber_rs/pins.c similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_rs/pins.c rename to ports/espressif/boards/gravitech_cucumber_rs/pins.c diff --git a/ports/esp32s2/boards/gravitech_cucumber_rs/sdkconfig b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig similarity index 100% rename from ports/esp32s2/boards/gravitech_cucumber_rs/sdkconfig rename to ports/espressif/boards/gravitech_cucumber_rs/sdkconfig diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c similarity index 100% rename from ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c rename to ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h rename to ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk rename to ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/pins.c similarity index 100% rename from ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c rename to ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/pins.c diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig similarity index 100% rename from ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig rename to ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig diff --git a/ports/esp32s2/boards/lolin_s2_mini/board.c b/ports/espressif/boards/lolin_s2_mini/board.c similarity index 100% rename from ports/esp32s2/boards/lolin_s2_mini/board.c rename to ports/espressif/boards/lolin_s2_mini/board.c diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h b/ports/espressif/boards/lolin_s2_mini/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h rename to ports/espressif/boards/lolin_s2_mini/mpconfigboard.h diff --git a/ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.mk rename to ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk diff --git a/ports/esp32s2/boards/lolin_s2_mini/pins.c b/ports/espressif/boards/lolin_s2_mini/pins.c similarity index 100% rename from ports/esp32s2/boards/lolin_s2_mini/pins.c rename to ports/espressif/boards/lolin_s2_mini/pins.c diff --git a/ports/esp32s2/boards/lolin_s2_mini/sdkconfig b/ports/espressif/boards/lolin_s2_mini/sdkconfig similarity index 100% rename from ports/esp32s2/boards/lolin_s2_mini/sdkconfig rename to ports/espressif/boards/lolin_s2_mini/sdkconfig diff --git a/ports/esp32s2/boards/microdev_micro_s2/board.c b/ports/espressif/boards/microdev_micro_s2/board.c similarity index 100% rename from ports/esp32s2/boards/microdev_micro_s2/board.c rename to ports/espressif/boards/microdev_micro_s2/board.c diff --git a/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h rename to ports/espressif/boards/microdev_micro_s2/mpconfigboard.h diff --git a/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.mk b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.mk rename to ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk diff --git a/ports/esp32s2/boards/microdev_micro_s2/pins.c b/ports/espressif/boards/microdev_micro_s2/pins.c similarity index 100% rename from ports/esp32s2/boards/microdev_micro_s2/pins.c rename to ports/espressif/boards/microdev_micro_s2/pins.c diff --git a/ports/esp32s2/boards/microdev_micro_s2/sdkconfig b/ports/espressif/boards/microdev_micro_s2/sdkconfig similarity index 100% rename from ports/esp32s2/boards/microdev_micro_s2/sdkconfig rename to ports/espressif/boards/microdev_micro_s2/sdkconfig diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/board.c b/ports/espressif/boards/morpheans_morphesp-240/board.c similarity index 100% rename from ports/esp32s2/boards/morpheans_morphesp-240/board.c rename to ports/espressif/boards/morpheans_morphesp-240/board.c diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h b/ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h rename to ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.mk b/ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.mk rename to ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.mk diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/pins.c b/ports/espressif/boards/morpheans_morphesp-240/pins.c similarity index 100% rename from ports/esp32s2/boards/morpheans_morphesp-240/pins.c rename to ports/espressif/boards/morpheans_morphesp-240/pins.c diff --git a/ports/esp32s2/boards/morpheans_morphesp-240/sdkconfig b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig similarity index 100% rename from ports/esp32s2/boards/morpheans_morphesp-240/sdkconfig rename to ports/espressif/boards/morpheans_morphesp-240/sdkconfig diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/board.c rename to ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h rename to ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.mk b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.mk rename to ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.mk diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/pins.c similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/pins.c rename to ports/espressif/boards/muselab_nanoesp32_s2_wroom/pins.c diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/sdkconfig rename to ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/board.c rename to ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h rename to ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk rename to ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/pins.c similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/pins.c rename to ports/espressif/boards/muselab_nanoesp32_s2_wrover/pins.c diff --git a/ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig similarity index 100% rename from ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/sdkconfig rename to ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig diff --git a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/board.c b/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c similarity index 100% rename from ports/esp32s2/boards/odt_pixelwing_esp32_s2/board.c rename to ports/espressif/boards/odt_pixelwing_esp32_s2/board.c diff --git a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h b/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h rename to ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h diff --git a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk b/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk rename to ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk diff --git a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c b/ports/espressif/boards/odt_pixelwing_esp32_s2/pins.c similarity index 100% rename from ports/esp32s2/boards/odt_pixelwing_esp32_s2/pins.c rename to ports/espressif/boards/odt_pixelwing_esp32_s2/pins.c diff --git a/ports/esp32s2/boards/odt_pixelwing_esp32_s2/sdkconfig b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig similarity index 100% rename from ports/esp32s2/boards/odt_pixelwing_esp32_s2/sdkconfig rename to ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/board.c b/ports/espressif/boards/targett_module_clip_wroom/board.c similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wroom/board.c rename to ports/espressif/boards/targett_module_clip_wroom/board.c diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h b/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h rename to ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk b/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk rename to ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/pins.c b/ports/espressif/boards/targett_module_clip_wroom/pins.c similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wroom/pins.c rename to ports/espressif/boards/targett_module_clip_wroom/pins.c diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/sdkconfig b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wroom/sdkconfig rename to ports/espressif/boards/targett_module_clip_wroom/sdkconfig diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/board.c b/ports/espressif/boards/targett_module_clip_wrover/board.c similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wrover/board.c rename to ports/espressif/boards/targett_module_clip_wrover/board.c diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h b/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h rename to ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk rename to ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c b/ports/espressif/boards/targett_module_clip_wrover/pins.c similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wrover/pins.c rename to ports/espressif/boards/targett_module_clip_wrover/pins.c diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/sdkconfig b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig similarity index 100% rename from ports/esp32s2/boards/targett_module_clip_wrover/sdkconfig rename to ports/espressif/boards/targett_module_clip_wrover/sdkconfig diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/board.c b/ports/espressif/boards/unexpectedmaker_feathers2/board.c similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2/board.c rename to ports/espressif/boards/unexpectedmaker_feathers2/board.c diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h rename to ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk rename to ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c b/ports/espressif/boards/unexpectedmaker_feathers2/pins.c similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c rename to ports/espressif/boards/unexpectedmaker_feathers2/pins.c diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2/sdkconfig rename to ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_neo/board.c rename to ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h rename to ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk rename to ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c b/ports/espressif/boards/unexpectedmaker_feathers2_neo/pins.c similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_neo/pins.c rename to ports/espressif/boards/unexpectedmaker_feathers2_neo/pins.c diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_neo/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_neo/sdkconfig rename to ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/board.c rename to ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h rename to ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk rename to ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/pins.c similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c rename to ports/espressif/boards/unexpectedmaker_feathers2_prerelease/pins.c diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/sdkconfig rename to ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/board.c b/ports/espressif/boards/unexpectedmaker_tinys2/board.c similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_tinys2/board.c rename to ports/espressif/boards/unexpectedmaker_tinys2/board.c diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h rename to ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.mk rename to ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c b/ports/espressif/boards/unexpectedmaker_tinys2/pins.c similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_tinys2/pins.c rename to ports/espressif/boards/unexpectedmaker_tinys2/pins.c diff --git a/ports/esp32s2/boards/unexpectedmaker_tinys2/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig similarity index 100% rename from ports/esp32s2/boards/unexpectedmaker_tinys2/sdkconfig rename to ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig diff --git a/ports/esp32s2/cam.c b/ports/espressif/cam.c similarity index 100% rename from ports/esp32s2/cam.c rename to ports/espressif/cam.c diff --git a/ports/esp32s2/cam.h b/ports/espressif/cam.h similarity index 100% rename from ports/esp32s2/cam.h rename to ports/espressif/cam.h diff --git a/ports/esp32s2/certificates/README.md b/ports/espressif/certificates/README.md similarity index 100% rename from ports/esp32s2/certificates/README.md rename to ports/espressif/certificates/README.md diff --git a/ports/esp32s2/certificates/nina-fw b/ports/espressif/certificates/nina-fw similarity index 100% rename from ports/esp32s2/certificates/nina-fw rename to ports/espressif/certificates/nina-fw diff --git a/ports/esp32s2/common-hal/alarm/SleepMemory.c b/ports/espressif/common-hal/alarm/SleepMemory.c similarity index 100% rename from ports/esp32s2/common-hal/alarm/SleepMemory.c rename to ports/espressif/common-hal/alarm/SleepMemory.c diff --git a/ports/esp32s2/common-hal/alarm/SleepMemory.h b/ports/espressif/common-hal/alarm/SleepMemory.h similarity index 100% rename from ports/esp32s2/common-hal/alarm/SleepMemory.h rename to ports/espressif/common-hal/alarm/SleepMemory.h diff --git a/ports/esp32s2/common-hal/alarm/__init__.c b/ports/espressif/common-hal/alarm/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/alarm/__init__.c rename to ports/espressif/common-hal/alarm/__init__.c diff --git a/ports/esp32s2/common-hal/alarm/__init__.h b/ports/espressif/common-hal/alarm/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/alarm/__init__.h rename to ports/espressif/common-hal/alarm/__init__.h diff --git a/ports/esp32s2/common-hal/alarm/pin/PinAlarm.c b/ports/espressif/common-hal/alarm/pin/PinAlarm.c similarity index 100% rename from ports/esp32s2/common-hal/alarm/pin/PinAlarm.c rename to ports/espressif/common-hal/alarm/pin/PinAlarm.c diff --git a/ports/esp32s2/common-hal/alarm/pin/PinAlarm.h b/ports/espressif/common-hal/alarm/pin/PinAlarm.h similarity index 100% rename from ports/esp32s2/common-hal/alarm/pin/PinAlarm.h rename to ports/espressif/common-hal/alarm/pin/PinAlarm.h diff --git a/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c b/ports/espressif/common-hal/alarm/time/TimeAlarm.c similarity index 100% rename from ports/esp32s2/common-hal/alarm/time/TimeAlarm.c rename to ports/espressif/common-hal/alarm/time/TimeAlarm.c diff --git a/ports/esp32s2/common-hal/alarm/time/TimeAlarm.h b/ports/espressif/common-hal/alarm/time/TimeAlarm.h similarity index 100% rename from ports/esp32s2/common-hal/alarm/time/TimeAlarm.h rename to ports/espressif/common-hal/alarm/time/TimeAlarm.h diff --git a/ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c b/ports/espressif/common-hal/alarm/touch/TouchAlarm.c similarity index 100% rename from ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c rename to ports/espressif/common-hal/alarm/touch/TouchAlarm.c diff --git a/ports/esp32s2/common-hal/alarm/touch/TouchAlarm.h b/ports/espressif/common-hal/alarm/touch/TouchAlarm.h similarity index 100% rename from ports/esp32s2/common-hal/alarm/touch/TouchAlarm.h rename to ports/espressif/common-hal/alarm/touch/TouchAlarm.h diff --git a/ports/esp32s2/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c similarity index 100% rename from ports/esp32s2/common-hal/analogio/AnalogIn.c rename to ports/espressif/common-hal/analogio/AnalogIn.c diff --git a/ports/esp32s2/common-hal/analogio/AnalogIn.h b/ports/espressif/common-hal/analogio/AnalogIn.h similarity index 100% rename from ports/esp32s2/common-hal/analogio/AnalogIn.h rename to ports/espressif/common-hal/analogio/AnalogIn.h diff --git a/ports/esp32s2/common-hal/analogio/AnalogOut.c b/ports/espressif/common-hal/analogio/AnalogOut.c similarity index 100% rename from ports/esp32s2/common-hal/analogio/AnalogOut.c rename to ports/espressif/common-hal/analogio/AnalogOut.c diff --git a/ports/esp32s2/common-hal/analogio/AnalogOut.h b/ports/espressif/common-hal/analogio/AnalogOut.h similarity index 100% rename from ports/esp32s2/common-hal/analogio/AnalogOut.h rename to ports/espressif/common-hal/analogio/AnalogOut.h diff --git a/ports/esp32s2/common-hal/analogio/__init__.c b/ports/espressif/common-hal/analogio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/analogio/__init__.c rename to ports/espressif/common-hal/analogio/__init__.c diff --git a/ports/esp32s2/common-hal/audiobusio/I2SOut.c b/ports/espressif/common-hal/audiobusio/I2SOut.c similarity index 100% rename from ports/esp32s2/common-hal/audiobusio/I2SOut.c rename to ports/espressif/common-hal/audiobusio/I2SOut.c diff --git a/ports/esp32s2/common-hal/audiobusio/I2SOut.h b/ports/espressif/common-hal/audiobusio/I2SOut.h similarity index 100% rename from ports/esp32s2/common-hal/audiobusio/I2SOut.h rename to ports/espressif/common-hal/audiobusio/I2SOut.h diff --git a/ports/esp32s2/common-hal/audiobusio/PDMIn.c b/ports/espressif/common-hal/audiobusio/PDMIn.c similarity index 100% rename from ports/esp32s2/common-hal/audiobusio/PDMIn.c rename to ports/espressif/common-hal/audiobusio/PDMIn.c diff --git a/ports/esp32s2/common-hal/audiobusio/PDMIn.h b/ports/espressif/common-hal/audiobusio/PDMIn.h similarity index 100% rename from ports/esp32s2/common-hal/audiobusio/PDMIn.h rename to ports/espressif/common-hal/audiobusio/PDMIn.h diff --git a/ports/esp32s2/common-hal/audiobusio/__init__.c b/ports/espressif/common-hal/audiobusio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/audiobusio/__init__.c rename to ports/espressif/common-hal/audiobusio/__init__.c diff --git a/ports/esp32s2/common-hal/audiobusio/__init__.h b/ports/espressif/common-hal/audiobusio/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/audiobusio/__init__.h rename to ports/espressif/common-hal/audiobusio/__init__.h diff --git a/ports/esp32s2/common-hal/board/__init__.c b/ports/espressif/common-hal/board/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/board/__init__.c rename to ports/espressif/common-hal/board/__init__.c diff --git a/ports/esp32s2/common-hal/busio/I2C.c b/ports/espressif/common-hal/busio/I2C.c similarity index 100% rename from ports/esp32s2/common-hal/busio/I2C.c rename to ports/espressif/common-hal/busio/I2C.c diff --git a/ports/esp32s2/common-hal/busio/I2C.h b/ports/espressif/common-hal/busio/I2C.h similarity index 100% rename from ports/esp32s2/common-hal/busio/I2C.h rename to ports/espressif/common-hal/busio/I2C.h diff --git a/ports/esp32s2/common-hal/busio/SPI.c b/ports/espressif/common-hal/busio/SPI.c similarity index 100% rename from ports/esp32s2/common-hal/busio/SPI.c rename to ports/espressif/common-hal/busio/SPI.c diff --git a/ports/esp32s2/common-hal/busio/SPI.h b/ports/espressif/common-hal/busio/SPI.h similarity index 100% rename from ports/esp32s2/common-hal/busio/SPI.h rename to ports/espressif/common-hal/busio/SPI.h diff --git a/ports/esp32s2/common-hal/busio/UART.c b/ports/espressif/common-hal/busio/UART.c similarity index 100% rename from ports/esp32s2/common-hal/busio/UART.c rename to ports/espressif/common-hal/busio/UART.c diff --git a/ports/esp32s2/common-hal/busio/UART.h b/ports/espressif/common-hal/busio/UART.h similarity index 100% rename from ports/esp32s2/common-hal/busio/UART.h rename to ports/espressif/common-hal/busio/UART.h diff --git a/ports/esp32s2/common-hal/busio/__init__.c b/ports/espressif/common-hal/busio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/busio/__init__.c rename to ports/espressif/common-hal/busio/__init__.c diff --git a/ports/esp32s2/common-hal/canio/CAN.c b/ports/espressif/common-hal/canio/CAN.c similarity index 100% rename from ports/esp32s2/common-hal/canio/CAN.c rename to ports/espressif/common-hal/canio/CAN.c diff --git a/ports/esp32s2/common-hal/canio/CAN.h b/ports/espressif/common-hal/canio/CAN.h similarity index 100% rename from ports/esp32s2/common-hal/canio/CAN.h rename to ports/espressif/common-hal/canio/CAN.h diff --git a/ports/esp32s2/common-hal/canio/Listener.c b/ports/espressif/common-hal/canio/Listener.c similarity index 100% rename from ports/esp32s2/common-hal/canio/Listener.c rename to ports/espressif/common-hal/canio/Listener.c diff --git a/ports/esp32s2/common-hal/canio/Listener.h b/ports/espressif/common-hal/canio/Listener.h similarity index 100% rename from ports/esp32s2/common-hal/canio/Listener.h rename to ports/espressif/common-hal/canio/Listener.h diff --git a/ports/esp32s2/common-hal/canio/__init__.c b/ports/espressif/common-hal/canio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/canio/__init__.c rename to ports/espressif/common-hal/canio/__init__.c diff --git a/ports/esp32s2/common-hal/canio/__init__.h b/ports/espressif/common-hal/canio/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/canio/__init__.h rename to ports/espressif/common-hal/canio/__init__.h diff --git a/ports/esp32s2/common-hal/countio/Counter.c b/ports/espressif/common-hal/countio/Counter.c similarity index 100% rename from ports/esp32s2/common-hal/countio/Counter.c rename to ports/espressif/common-hal/countio/Counter.c diff --git a/ports/esp32s2/common-hal/countio/Counter.h b/ports/espressif/common-hal/countio/Counter.h similarity index 100% rename from ports/esp32s2/common-hal/countio/Counter.h rename to ports/espressif/common-hal/countio/Counter.h diff --git a/ports/esp32s2/common-hal/countio/__init__.c b/ports/espressif/common-hal/countio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/countio/__init__.c rename to ports/espressif/common-hal/countio/__init__.c diff --git a/ports/esp32s2/common-hal/digitalio/DigitalInOut.c b/ports/espressif/common-hal/digitalio/DigitalInOut.c similarity index 100% rename from ports/esp32s2/common-hal/digitalio/DigitalInOut.c rename to ports/espressif/common-hal/digitalio/DigitalInOut.c diff --git a/ports/esp32s2/common-hal/digitalio/DigitalInOut.h b/ports/espressif/common-hal/digitalio/DigitalInOut.h similarity index 100% rename from ports/esp32s2/common-hal/digitalio/DigitalInOut.h rename to ports/espressif/common-hal/digitalio/DigitalInOut.h diff --git a/ports/esp32s2/common-hal/digitalio/__init__.c b/ports/espressif/common-hal/digitalio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/digitalio/__init__.c rename to ports/espressif/common-hal/digitalio/__init__.c diff --git a/ports/esp32s2/common-hal/dualbank/__init__.c b/ports/espressif/common-hal/dualbank/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/dualbank/__init__.c rename to ports/espressif/common-hal/dualbank/__init__.c diff --git a/ports/esp32s2/common-hal/dualbank/__init__.h b/ports/espressif/common-hal/dualbank/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/dualbank/__init__.h rename to ports/espressif/common-hal/dualbank/__init__.h diff --git a/ports/esp32s2/common-hal/frequencyio/FrequencyIn.c b/ports/espressif/common-hal/frequencyio/FrequencyIn.c similarity index 100% rename from ports/esp32s2/common-hal/frequencyio/FrequencyIn.c rename to ports/espressif/common-hal/frequencyio/FrequencyIn.c diff --git a/ports/esp32s2/common-hal/frequencyio/FrequencyIn.h b/ports/espressif/common-hal/frequencyio/FrequencyIn.h similarity index 100% rename from ports/esp32s2/common-hal/frequencyio/FrequencyIn.h rename to ports/espressif/common-hal/frequencyio/FrequencyIn.h diff --git a/ports/esp32s2/common-hal/frequencyio/__init__.c b/ports/espressif/common-hal/frequencyio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/frequencyio/__init__.c rename to ports/espressif/common-hal/frequencyio/__init__.c diff --git a/ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c b/ports/espressif/common-hal/imagecapture/ParallelImageCapture.c similarity index 100% rename from ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c rename to ports/espressif/common-hal/imagecapture/ParallelImageCapture.c diff --git a/ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.h b/ports/espressif/common-hal/imagecapture/ParallelImageCapture.h similarity index 100% rename from ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.h rename to ports/espressif/common-hal/imagecapture/ParallelImageCapture.h diff --git a/ports/esp32s2/common-hal/imagecapture/__init__.c b/ports/espressif/common-hal/imagecapture/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/imagecapture/__init__.c rename to ports/espressif/common-hal/imagecapture/__init__.c diff --git a/ports/esp32s2/common-hal/imagecapture/__init__.h b/ports/espressif/common-hal/imagecapture/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/imagecapture/__init__.h rename to ports/espressif/common-hal/imagecapture/__init__.h diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c similarity index 100% rename from ports/esp32s2/common-hal/microcontroller/Pin.c rename to ports/espressif/common-hal/microcontroller/Pin.c diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.h b/ports/espressif/common-hal/microcontroller/Pin.h similarity index 100% rename from ports/esp32s2/common-hal/microcontroller/Pin.h rename to ports/espressif/common-hal/microcontroller/Pin.h diff --git a/ports/esp32s2/common-hal/microcontroller/Processor.c b/ports/espressif/common-hal/microcontroller/Processor.c similarity index 100% rename from ports/esp32s2/common-hal/microcontroller/Processor.c rename to ports/espressif/common-hal/microcontroller/Processor.c diff --git a/ports/esp32s2/common-hal/microcontroller/Processor.h b/ports/espressif/common-hal/microcontroller/Processor.h similarity index 100% rename from ports/esp32s2/common-hal/microcontroller/Processor.h rename to ports/espressif/common-hal/microcontroller/Processor.h diff --git a/ports/esp32s2/common-hal/microcontroller/__init__.c b/ports/espressif/common-hal/microcontroller/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/microcontroller/__init__.c rename to ports/espressif/common-hal/microcontroller/__init__.c diff --git a/ports/esp32s2/common-hal/neopixel_write/__init__.c b/ports/espressif/common-hal/neopixel_write/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/neopixel_write/__init__.c rename to ports/espressif/common-hal/neopixel_write/__init__.c diff --git a/ports/esp32s2/common-hal/nvm/ByteArray.c b/ports/espressif/common-hal/nvm/ByteArray.c similarity index 100% rename from ports/esp32s2/common-hal/nvm/ByteArray.c rename to ports/espressif/common-hal/nvm/ByteArray.c diff --git a/ports/esp32s2/common-hal/nvm/ByteArray.h b/ports/espressif/common-hal/nvm/ByteArray.h similarity index 100% rename from ports/esp32s2/common-hal/nvm/ByteArray.h rename to ports/espressif/common-hal/nvm/ByteArray.h diff --git a/ports/esp32s2/common-hal/nvm/__init__.c b/ports/espressif/common-hal/nvm/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/nvm/__init__.c rename to ports/espressif/common-hal/nvm/__init__.c diff --git a/ports/esp32s2/common-hal/os/__init__.c b/ports/espressif/common-hal/os/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/os/__init__.c rename to ports/espressif/common-hal/os/__init__.c diff --git a/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c b/ports/espressif/common-hal/paralleldisplay/ParallelBus.c similarity index 100% rename from ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c rename to ports/espressif/common-hal/paralleldisplay/ParallelBus.c diff --git a/ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h b/ports/espressif/common-hal/paralleldisplay/ParallelBus.h similarity index 100% rename from ports/esp32s2/common-hal/paralleldisplay/ParallelBus.h rename to ports/espressif/common-hal/paralleldisplay/ParallelBus.h diff --git a/ports/esp32s2/common-hal/ps2io/Ps2.c b/ports/espressif/common-hal/ps2io/Ps2.c similarity index 100% rename from ports/esp32s2/common-hal/ps2io/Ps2.c rename to ports/espressif/common-hal/ps2io/Ps2.c diff --git a/ports/esp32s2/common-hal/ps2io/Ps2.h b/ports/espressif/common-hal/ps2io/Ps2.h similarity index 100% rename from ports/esp32s2/common-hal/ps2io/Ps2.h rename to ports/espressif/common-hal/ps2io/Ps2.h diff --git a/ports/esp32s2/common-hal/ps2io/__init__.c b/ports/espressif/common-hal/ps2io/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/ps2io/__init__.c rename to ports/espressif/common-hal/ps2io/__init__.c diff --git a/ports/esp32s2/common-hal/pulseio/PulseIn.c b/ports/espressif/common-hal/pulseio/PulseIn.c similarity index 100% rename from ports/esp32s2/common-hal/pulseio/PulseIn.c rename to ports/espressif/common-hal/pulseio/PulseIn.c diff --git a/ports/esp32s2/common-hal/pulseio/PulseIn.h b/ports/espressif/common-hal/pulseio/PulseIn.h similarity index 100% rename from ports/esp32s2/common-hal/pulseio/PulseIn.h rename to ports/espressif/common-hal/pulseio/PulseIn.h diff --git a/ports/esp32s2/common-hal/pulseio/PulseOut.c b/ports/espressif/common-hal/pulseio/PulseOut.c similarity index 100% rename from ports/esp32s2/common-hal/pulseio/PulseOut.c rename to ports/espressif/common-hal/pulseio/PulseOut.c diff --git a/ports/esp32s2/common-hal/pulseio/PulseOut.h b/ports/espressif/common-hal/pulseio/PulseOut.h similarity index 100% rename from ports/esp32s2/common-hal/pulseio/PulseOut.h rename to ports/espressif/common-hal/pulseio/PulseOut.h diff --git a/ports/esp32s2/common-hal/pulseio/__init__.c b/ports/espressif/common-hal/pulseio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/pulseio/__init__.c rename to ports/espressif/common-hal/pulseio/__init__.c diff --git a/ports/esp32s2/common-hal/pwmio/PWMOut.c b/ports/espressif/common-hal/pwmio/PWMOut.c similarity index 100% rename from ports/esp32s2/common-hal/pwmio/PWMOut.c rename to ports/espressif/common-hal/pwmio/PWMOut.c diff --git a/ports/esp32s2/common-hal/pwmio/PWMOut.h b/ports/espressif/common-hal/pwmio/PWMOut.h similarity index 100% rename from ports/esp32s2/common-hal/pwmio/PWMOut.h rename to ports/espressif/common-hal/pwmio/PWMOut.h diff --git a/ports/esp32s2/common-hal/pwmio/__init__.c b/ports/espressif/common-hal/pwmio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/pwmio/__init__.c rename to ports/espressif/common-hal/pwmio/__init__.c diff --git a/ports/esp32s2/common-hal/rgbmatrix/RGBMatrix.c b/ports/espressif/common-hal/rgbmatrix/RGBMatrix.c similarity index 100% rename from ports/esp32s2/common-hal/rgbmatrix/RGBMatrix.c rename to ports/espressif/common-hal/rgbmatrix/RGBMatrix.c diff --git a/ports/esp32s2/common-hal/rgbmatrix/RGBMatrix.h b/ports/espressif/common-hal/rgbmatrix/RGBMatrix.h similarity index 100% rename from ports/esp32s2/common-hal/rgbmatrix/RGBMatrix.h rename to ports/espressif/common-hal/rgbmatrix/RGBMatrix.h diff --git a/ports/esp32s2/common-hal/rgbmatrix/__init__.c b/ports/espressif/common-hal/rgbmatrix/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/rgbmatrix/__init__.c rename to ports/espressif/common-hal/rgbmatrix/__init__.c diff --git a/ports/esp32s2/common-hal/rgbmatrix/__init__.h b/ports/espressif/common-hal/rgbmatrix/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/rgbmatrix/__init__.h rename to ports/espressif/common-hal/rgbmatrix/__init__.h diff --git a/ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c b/ports/espressif/common-hal/rotaryio/IncrementalEncoder.c similarity index 100% rename from ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c rename to ports/espressif/common-hal/rotaryio/IncrementalEncoder.c diff --git a/ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.h b/ports/espressif/common-hal/rotaryio/IncrementalEncoder.h similarity index 100% rename from ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.h rename to ports/espressif/common-hal/rotaryio/IncrementalEncoder.h diff --git a/ports/esp32s2/common-hal/rotaryio/__init__.c b/ports/espressif/common-hal/rotaryio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/rotaryio/__init__.c rename to ports/espressif/common-hal/rotaryio/__init__.c diff --git a/ports/esp32s2/common-hal/rtc/RTC.c b/ports/espressif/common-hal/rtc/RTC.c similarity index 100% rename from ports/esp32s2/common-hal/rtc/RTC.c rename to ports/espressif/common-hal/rtc/RTC.c diff --git a/ports/esp32s2/common-hal/rtc/RTC.h b/ports/espressif/common-hal/rtc/RTC.h similarity index 100% rename from ports/esp32s2/common-hal/rtc/RTC.h rename to ports/espressif/common-hal/rtc/RTC.h diff --git a/ports/esp32s2/common-hal/rtc/__init__.c b/ports/espressif/common-hal/rtc/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/rtc/__init__.c rename to ports/espressif/common-hal/rtc/__init__.c diff --git a/ports/esp32s2/common-hal/socketpool/Socket.c b/ports/espressif/common-hal/socketpool/Socket.c similarity index 100% rename from ports/esp32s2/common-hal/socketpool/Socket.c rename to ports/espressif/common-hal/socketpool/Socket.c diff --git a/ports/esp32s2/common-hal/socketpool/Socket.h b/ports/espressif/common-hal/socketpool/Socket.h similarity index 100% rename from ports/esp32s2/common-hal/socketpool/Socket.h rename to ports/espressif/common-hal/socketpool/Socket.h diff --git a/ports/esp32s2/common-hal/socketpool/SocketPool.c b/ports/espressif/common-hal/socketpool/SocketPool.c similarity index 100% rename from ports/esp32s2/common-hal/socketpool/SocketPool.c rename to ports/espressif/common-hal/socketpool/SocketPool.c diff --git a/ports/esp32s2/common-hal/socketpool/SocketPool.h b/ports/espressif/common-hal/socketpool/SocketPool.h similarity index 100% rename from ports/esp32s2/common-hal/socketpool/SocketPool.h rename to ports/espressif/common-hal/socketpool/SocketPool.h diff --git a/ports/esp32s2/common-hal/socketpool/__init__.c b/ports/espressif/common-hal/socketpool/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/socketpool/__init__.c rename to ports/espressif/common-hal/socketpool/__init__.c diff --git a/ports/esp32s2/common-hal/socketpool/__init__.h b/ports/espressif/common-hal/socketpool/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/socketpool/__init__.h rename to ports/espressif/common-hal/socketpool/__init__.h diff --git a/ports/esp32s2/common-hal/ssl/SSLContext.c b/ports/espressif/common-hal/ssl/SSLContext.c similarity index 100% rename from ports/esp32s2/common-hal/ssl/SSLContext.c rename to ports/espressif/common-hal/ssl/SSLContext.c diff --git a/ports/esp32s2/common-hal/ssl/SSLContext.h b/ports/espressif/common-hal/ssl/SSLContext.h similarity index 100% rename from ports/esp32s2/common-hal/ssl/SSLContext.h rename to ports/espressif/common-hal/ssl/SSLContext.h diff --git a/ports/esp32s2/common-hal/ssl/SSLSocket.c b/ports/espressif/common-hal/ssl/SSLSocket.c similarity index 100% rename from ports/esp32s2/common-hal/ssl/SSLSocket.c rename to ports/espressif/common-hal/ssl/SSLSocket.c diff --git a/ports/esp32s2/common-hal/ssl/SSLSocket.h b/ports/espressif/common-hal/ssl/SSLSocket.h similarity index 100% rename from ports/esp32s2/common-hal/ssl/SSLSocket.h rename to ports/espressif/common-hal/ssl/SSLSocket.h diff --git a/ports/esp32s2/common-hal/ssl/__init__.c b/ports/espressif/common-hal/ssl/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/ssl/__init__.c rename to ports/espressif/common-hal/ssl/__init__.c diff --git a/ports/esp32s2/common-hal/ssl/__init__.h b/ports/espressif/common-hal/ssl/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/ssl/__init__.h rename to ports/espressif/common-hal/ssl/__init__.h diff --git a/ports/esp32s2/common-hal/supervisor/Runtime.c b/ports/espressif/common-hal/supervisor/Runtime.c similarity index 100% rename from ports/esp32s2/common-hal/supervisor/Runtime.c rename to ports/espressif/common-hal/supervisor/Runtime.c diff --git a/ports/esp32s2/common-hal/supervisor/Runtime.h b/ports/espressif/common-hal/supervisor/Runtime.h similarity index 100% rename from ports/esp32s2/common-hal/supervisor/Runtime.h rename to ports/espressif/common-hal/supervisor/Runtime.h diff --git a/ports/esp32s2/common-hal/supervisor/__init__.c b/ports/espressif/common-hal/supervisor/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/supervisor/__init__.c rename to ports/espressif/common-hal/supervisor/__init__.c diff --git a/ports/esp32s2/common-hal/time/__init__.c b/ports/espressif/common-hal/time/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/time/__init__.c rename to ports/espressif/common-hal/time/__init__.c diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.c b/ports/espressif/common-hal/touchio/TouchIn.c similarity index 100% rename from ports/esp32s2/common-hal/touchio/TouchIn.c rename to ports/espressif/common-hal/touchio/TouchIn.c diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.h b/ports/espressif/common-hal/touchio/TouchIn.h similarity index 100% rename from ports/esp32s2/common-hal/touchio/TouchIn.h rename to ports/espressif/common-hal/touchio/TouchIn.h diff --git a/ports/esp32s2/common-hal/touchio/__init__.c b/ports/espressif/common-hal/touchio/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/touchio/__init__.c rename to ports/espressif/common-hal/touchio/__init__.c diff --git a/ports/esp32s2/common-hal/watchdog/WatchDogMode.c b/ports/espressif/common-hal/watchdog/WatchDogMode.c similarity index 100% rename from ports/esp32s2/common-hal/watchdog/WatchDogMode.c rename to ports/espressif/common-hal/watchdog/WatchDogMode.c diff --git a/ports/esp32s2/common-hal/watchdog/WatchDogTimer.c b/ports/espressif/common-hal/watchdog/WatchDogTimer.c similarity index 100% rename from ports/esp32s2/common-hal/watchdog/WatchDogTimer.c rename to ports/espressif/common-hal/watchdog/WatchDogTimer.c diff --git a/ports/esp32s2/common-hal/watchdog/WatchDogTimer.h b/ports/espressif/common-hal/watchdog/WatchDogTimer.h similarity index 100% rename from ports/esp32s2/common-hal/watchdog/WatchDogTimer.h rename to ports/espressif/common-hal/watchdog/WatchDogTimer.h diff --git a/ports/esp32s2/common-hal/watchdog/__init__.c b/ports/espressif/common-hal/watchdog/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/watchdog/__init__.c rename to ports/espressif/common-hal/watchdog/__init__.c diff --git a/ports/esp32s2/common-hal/wifi/Network.c b/ports/espressif/common-hal/wifi/Network.c similarity index 100% rename from ports/esp32s2/common-hal/wifi/Network.c rename to ports/espressif/common-hal/wifi/Network.c diff --git a/ports/esp32s2/common-hal/wifi/Network.h b/ports/espressif/common-hal/wifi/Network.h similarity index 100% rename from ports/esp32s2/common-hal/wifi/Network.h rename to ports/espressif/common-hal/wifi/Network.h diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/espressif/common-hal/wifi/Radio.c similarity index 100% rename from ports/esp32s2/common-hal/wifi/Radio.c rename to ports/espressif/common-hal/wifi/Radio.c diff --git a/ports/esp32s2/common-hal/wifi/Radio.h b/ports/espressif/common-hal/wifi/Radio.h similarity index 100% rename from ports/esp32s2/common-hal/wifi/Radio.h rename to ports/espressif/common-hal/wifi/Radio.h diff --git a/ports/esp32s2/common-hal/wifi/ScannedNetworks.c b/ports/espressif/common-hal/wifi/ScannedNetworks.c similarity index 100% rename from ports/esp32s2/common-hal/wifi/ScannedNetworks.c rename to ports/espressif/common-hal/wifi/ScannedNetworks.c diff --git a/ports/esp32s2/common-hal/wifi/ScannedNetworks.h b/ports/espressif/common-hal/wifi/ScannedNetworks.h similarity index 100% rename from ports/esp32s2/common-hal/wifi/ScannedNetworks.h rename to ports/espressif/common-hal/wifi/ScannedNetworks.h diff --git a/ports/esp32s2/common-hal/wifi/__init__.c b/ports/espressif/common-hal/wifi/__init__.c similarity index 100% rename from ports/esp32s2/common-hal/wifi/__init__.c rename to ports/espressif/common-hal/wifi/__init__.c diff --git a/ports/esp32s2/common-hal/wifi/__init__.h b/ports/espressif/common-hal/wifi/__init__.h similarity index 100% rename from ports/esp32s2/common-hal/wifi/__init__.h rename to ports/espressif/common-hal/wifi/__init__.h diff --git a/ports/esp32s2/esp-idf b/ports/espressif/esp-idf similarity index 100% rename from ports/esp32s2/esp-idf rename to ports/espressif/esp-idf diff --git a/ports/esp32s2/esp-idf-config/partitions-16MB.csv b/ports/espressif/esp-idf-config/partitions-16MB.csv similarity index 100% rename from ports/esp32s2/esp-idf-config/partitions-16MB.csv rename to ports/espressif/esp-idf-config/partitions-16MB.csv diff --git a/ports/esp32s2/esp-idf-config/partitions-4MB.csv b/ports/espressif/esp-idf-config/partitions-4MB.csv similarity index 100% rename from ports/esp32s2/esp-idf-config/partitions-4MB.csv rename to ports/espressif/esp-idf-config/partitions-4MB.csv diff --git a/ports/esp32s2/esp-idf-config/partitions-8MB.csv b/ports/espressif/esp-idf-config/partitions-8MB.csv similarity index 100% rename from ports/esp32s2/esp-idf-config/partitions-8MB.csv rename to ports/espressif/esp-idf-config/partitions-8MB.csv diff --git a/ports/esp32s2/esp-idf-config/sdkconfig-16MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults similarity index 100% rename from ports/esp32s2/esp-idf-config/sdkconfig-16MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-16MB.defaults diff --git a/ports/esp32s2/esp-idf-config/sdkconfig-4MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults similarity index 100% rename from ports/esp32s2/esp-idf-config/sdkconfig-4MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-4MB.defaults diff --git a/ports/esp32s2/esp-idf-config/sdkconfig-8MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults similarity index 100% rename from ports/esp32s2/esp-idf-config/sdkconfig-8MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-8MB.defaults diff --git a/ports/esp32s2/esp-idf-config/sdkconfig-debug.defaults b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults similarity index 100% rename from ports/esp32s2/esp-idf-config/sdkconfig-debug.defaults rename to ports/espressif/esp-idf-config/sdkconfig-debug.defaults diff --git a/ports/esp32s2/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults similarity index 100% rename from ports/esp32s2/esp-idf-config/sdkconfig-opt.defaults rename to ports/espressif/esp-idf-config/sdkconfig-opt.defaults diff --git a/ports/esp32s2/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults similarity index 100% rename from ports/esp32s2/esp-idf-config/sdkconfig.defaults rename to ports/espressif/esp-idf-config/sdkconfig.defaults diff --git a/ports/esp32s2/esp32s2_peripherals_config.h b/ports/espressif/esp32s2_peripherals_config.h similarity index 100% rename from ports/esp32s2/esp32s2_peripherals_config.h rename to ports/espressif/esp32s2_peripherals_config.h diff --git a/ports/esp32s2/esp_error.c b/ports/espressif/esp_error.c similarity index 100% rename from ports/esp32s2/esp_error.c rename to ports/espressif/esp_error.c diff --git a/ports/esp32s2/fatfs_port.c b/ports/espressif/fatfs_port.c similarity index 100% rename from ports/esp32s2/fatfs_port.c rename to ports/espressif/fatfs_port.c diff --git a/ports/esp32s2/modules/module.h b/ports/espressif/modules/module.h similarity index 100% rename from ports/esp32s2/modules/module.h rename to ports/espressif/modules/module.h diff --git a/ports/esp32s2/modules/none.c b/ports/espressif/modules/none.c similarity index 100% rename from ports/esp32s2/modules/none.c rename to ports/espressif/modules/none.c diff --git a/ports/esp32s2/modules/wroom.c b/ports/espressif/modules/wroom.c similarity index 100% rename from ports/esp32s2/modules/wroom.c rename to ports/espressif/modules/wroom.c diff --git a/ports/esp32s2/modules/wrover.c b/ports/espressif/modules/wrover.c similarity index 100% rename from ports/esp32s2/modules/wrover.c rename to ports/espressif/modules/wrover.c diff --git a/ports/esp32s2/mpconfigport.h b/ports/espressif/mpconfigport.h similarity index 100% rename from ports/esp32s2/mpconfigport.h rename to ports/espressif/mpconfigport.h diff --git a/ports/esp32s2/mpconfigport.mk b/ports/espressif/mpconfigport.mk similarity index 100% rename from ports/esp32s2/mpconfigport.mk rename to ports/espressif/mpconfigport.mk diff --git a/ports/esp32s2/mphalport.c b/ports/espressif/mphalport.c similarity index 100% rename from ports/esp32s2/mphalport.c rename to ports/espressif/mphalport.c diff --git a/ports/esp32s2/mphalport.h b/ports/espressif/mphalport.h similarity index 100% rename from ports/esp32s2/mphalport.h rename to ports/espressif/mphalport.h diff --git a/ports/esp32s2/peripherals/pcnt.c b/ports/espressif/peripherals/pcnt.c similarity index 100% rename from ports/esp32s2/peripherals/pcnt.c rename to ports/espressif/peripherals/pcnt.c diff --git a/ports/esp32s2/peripherals/pcnt.h b/ports/espressif/peripherals/pcnt.h similarity index 100% rename from ports/esp32s2/peripherals/pcnt.h rename to ports/espressif/peripherals/pcnt.h diff --git a/ports/esp32s2/peripherals/pins.c b/ports/espressif/peripherals/pins.c similarity index 100% rename from ports/esp32s2/peripherals/pins.c rename to ports/espressif/peripherals/pins.c diff --git a/ports/esp32s2/peripherals/pins.h b/ports/espressif/peripherals/pins.h similarity index 100% rename from ports/esp32s2/peripherals/pins.h rename to ports/espressif/peripherals/pins.h diff --git a/ports/esp32s2/peripherals/rmt.c b/ports/espressif/peripherals/rmt.c similarity index 100% rename from ports/esp32s2/peripherals/rmt.c rename to ports/espressif/peripherals/rmt.c diff --git a/ports/esp32s2/peripherals/rmt.h b/ports/espressif/peripherals/rmt.h similarity index 100% rename from ports/esp32s2/peripherals/rmt.h rename to ports/espressif/peripherals/rmt.h diff --git a/ports/esp32s2/peripherals/timer.c b/ports/espressif/peripherals/timer.c similarity index 100% rename from ports/esp32s2/peripherals/timer.c rename to ports/espressif/peripherals/timer.c diff --git a/ports/esp32s2/peripherals/timer.h b/ports/espressif/peripherals/timer.h similarity index 100% rename from ports/esp32s2/peripherals/timer.h rename to ports/espressif/peripherals/timer.h diff --git a/ports/esp32s2/peripherals/touch.c b/ports/espressif/peripherals/touch.c similarity index 100% rename from ports/esp32s2/peripherals/touch.c rename to ports/espressif/peripherals/touch.c diff --git a/ports/esp32s2/peripherals/touch.h b/ports/espressif/peripherals/touch.h similarity index 100% rename from ports/esp32s2/peripherals/touch.h rename to ports/espressif/peripherals/touch.h diff --git a/ports/esp32s2/qstrdefsport.h b/ports/espressif/qstrdefsport.h similarity index 100% rename from ports/esp32s2/qstrdefsport.h rename to ports/espressif/qstrdefsport.h diff --git a/ports/esp32s2/supervisor/esp_port.h b/ports/espressif/supervisor/esp_port.h similarity index 100% rename from ports/esp32s2/supervisor/esp_port.h rename to ports/espressif/supervisor/esp_port.h diff --git a/ports/esp32s2/supervisor/internal_flash.c b/ports/espressif/supervisor/internal_flash.c similarity index 100% rename from ports/esp32s2/supervisor/internal_flash.c rename to ports/espressif/supervisor/internal_flash.c diff --git a/ports/esp32s2/supervisor/internal_flash.h b/ports/espressif/supervisor/internal_flash.h similarity index 100% rename from ports/esp32s2/supervisor/internal_flash.h rename to ports/espressif/supervisor/internal_flash.h diff --git a/ports/esp32s2/supervisor/internal_flash_root_pointers.h b/ports/espressif/supervisor/internal_flash_root_pointers.h similarity index 100% rename from ports/esp32s2/supervisor/internal_flash_root_pointers.h rename to ports/espressif/supervisor/internal_flash_root_pointers.h diff --git a/ports/esp32s2/supervisor/port.c b/ports/espressif/supervisor/port.c similarity index 100% rename from ports/esp32s2/supervisor/port.c rename to ports/espressif/supervisor/port.c diff --git a/ports/esp32s2/supervisor/usb.c b/ports/espressif/supervisor/usb.c similarity index 100% rename from ports/esp32s2/supervisor/usb.c rename to ports/espressif/supervisor/usb.c diff --git a/ports/esp32s2/tools/build_memory_info.py b/ports/espressif/tools/build_memory_info.py similarity index 100% rename from ports/esp32s2/tools/build_memory_info.py rename to ports/espressif/tools/build_memory_info.py diff --git a/ports/esp32s2/tools/decode_backtrace.py b/ports/espressif/tools/decode_backtrace.py similarity index 100% rename from ports/esp32s2/tools/decode_backtrace.py rename to ports/espressif/tools/decode_backtrace.py diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 763fdf37b8..51e6fb8a11 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -185,7 +185,7 @@ CFLAGS += -DCIRCUITPY_ENABLE_MPY_NATIVE=$(CIRCUITPY_ENABLE_MPY_NATIVE) CIRCUITPY_ERRNO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_ERRNO=$(CIRCUITPY_ERRNO) -# CIRCUITPY_ESPIDF is handled in the esp32s2 tree. +# CIRCUITPY_ESPIDF is handled in the espressif tree. # Only for ESP32S chips. # Assume not a ESP build. CIRCUITPY_ESPIDF ?= 0 diff --git a/tools/build_board_info.py b/tools/build_board_info.py index eed136c545..de25015dd0 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -40,7 +40,7 @@ extension_by_port = { "cxd56": SPK, "mimxrt10xx": HEX_UF2, "litex": DFU, - "esp32s2": BIN_UF2, + "espressif": BIN_UF2, "raspberrypi": UF2, } diff --git a/tools/ci.sh b/tools/ci.sh deleted file mode 100755 index 3039573322..0000000000 --- a/tools/ci.sh +++ /dev/null @@ -1,584 +0,0 @@ -#!/bin/bash - -if which nproc > /dev/null; then - MAKEOPTS="-j$(nproc)" -else - MAKEOPTS="-j$(sysctl -n hw.ncpu)" -fi - -######################################################################################## -# general helper functions - -function ci_gcc_arm_setup { - sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi - arm-none-eabi-gcc --version -} - -######################################################################################## -# code formatting - -function ci_code_formatting_setup { - sudo apt-add-repository --yes --update ppa:pybricks/ppa - sudo apt-get install uncrustify - pip3 install black - uncrustify --version - black --version -} - -function ci_code_formatting_run { - tools/codeformat.py -v -} - -######################################################################################## -# commit formatting - -function ci_commit_formatting_run { - git remote add upstream https://github.com/micropython/micropython.git - git fetch --depth=100 upstream master - # For a PR, upstream/master..HEAD ends with a merge commit into master, exlude that one. - tools/verifygitlog.py -v upstream/master..HEAD --no-merges -} - -######################################################################################## -# code size - -function ci_code_size_setup { - sudo apt-get update - sudo apt-get install gcc-multilib - gcc --version - ci_gcc_arm_setup -} - -function ci_code_size_build { - # starts off at either the ref/pull/N/merge FETCH_HEAD, or the current branch HEAD - git checkout -b pull_request # save the current location - git remote add upstream https://github.com/micropython/micropython.git - git fetch --depth=100 upstream master - # build reference, save to size0 - # ignore any errors with this build, in case master is failing - git checkout `git merge-base --fork-point upstream/master pull_request` - git show -s - tools/metrics.py clean bm - tools/metrics.py build bm | tee ~/size0 || true - # build PR/branch, save to size1 - git checkout pull_request - git log upstream/master..HEAD - tools/metrics.py clean bm - tools/metrics.py build bm | tee ~/size1 -} - -######################################################################################## -# ports/cc3200 - -function ci_cc3200_setup { - ci_gcc_arm_setup -} - -function ci_cc3200_build { - make ${MAKEOPTS} -C ports/cc3200 BTARGET=application BTYPE=release - make ${MAKEOPTS} -C ports/cc3200 BTARGET=bootloader BTYPE=release -} - -######################################################################################## -# ports/esp32 - -function ci_esp32_setup_helper { - git clone https://github.com/espressif/esp-idf.git - git -C esp-idf checkout $1 - git -C esp-idf submodule update --init \ - components/bt/controller/lib \ - components/bt/host/nimble/nimble \ - components/esp_wifi \ - components/esptool_py/esptool \ - components/lwip/lwip \ - components/mbedtls/mbedtls - ./esp-idf/install.sh -} - -function ci_esp32_idf402_setup { - ci_esp32_setup_helper v4.0.2 -} - -function ci_esp32_idf43_setup { - ci_esp32_setup_helper v4.3-beta2 -} - -function ci_esp32_build { - source esp-idf/export.sh - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/esp32 submodules - make ${MAKEOPTS} -C ports/esp32 - make ${MAKEOPTS} -C ports/esp32 clean - make ${MAKEOPTS} -C ports/esp32 USER_C_MODULES=../../../examples/usercmodule/micropython.cmake FROZEN_MANIFEST=$(pwd)/ports/esp32/boards/manifest.py - if [ -d $IDF_PATH/components/esp32s2 ]; then - make ${MAKEOPTS} -C ports/esp32 BOARD=GENERIC_S2 - fi -} - -######################################################################################## -# ports/esp8266 - -function ci_esp8266_setup { - sudo pip install pyserial esptool - wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz - zcat xtensa-lx106-elf-standalone.tar.gz | tar x - # Remove this esptool.py so pip version is used instead - rm xtensa-lx106-elf/bin/esptool.py -} - -function ci_esp8266_path { - echo $(pwd)/xtensa-lx106-elf/bin -} - -function ci_esp8266_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/esp8266 submodules - make ${MAKEOPTS} -C ports/esp8266 - make ${MAKEOPTS} -C ports/esp8266 BOARD=GENERIC_512K - make ${MAKEOPTS} -C ports/esp8266 BOARD=GENERIC_1M -} - -######################################################################################## -# ports/mimxrt - -function ci_mimxrt_setup { - ci_gcc_arm_setup -} - -function ci_mimxrt_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/mimxrt submodules - make ${MAKEOPTS} -C ports/mimxrt BOARD=MIMXRT1020_EVK - make ${MAKEOPTS} -C ports/mimxrt BOARD=TEENSY40 -} - -######################################################################################## -# ports/nrf - -function ci_nrf_setup { - ci_gcc_arm_setup -} - -function ci_nrf_build { - ports/nrf/drivers/bluetooth/download_ble_stack.sh s140_nrf52_6_1_1 - make ${MAKEOPTS} -C ports/nrf submodules - make ${MAKEOPTS} -C ports/nrf BOARD=pca10040 - make ${MAKEOPTS} -C ports/nrf BOARD=microbit - make ${MAKEOPTS} -C ports/nrf BOARD=pca10056 SD=s140 - make ${MAKEOPTS} -C ports/nrf BOARD=pca10090 -} - -######################################################################################## -# ports/powerpc - -function ci_powerpc_setup { - sudo apt-get install gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross -} - -function ci_powerpc_build { - make ${MAKEOPTS} -C ports/powerpc UART=potato - make ${MAKEOPTS} -C ports/powerpc UART=lpc_serial -} - -######################################################################################## -# ports/qemu-arm - -function ci_qemu_arm_setup { - ci_gcc_arm_setup - sudo apt-get update - sudo apt-get install qemu-system - qemu-system-arm --version -} - -function ci_qemu_arm_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/qemu-arm CFLAGS_EXTRA=-DMP_ENDIANNESS_BIG=1 - make ${MAKEOPTS} -C ports/qemu-arm clean - make ${MAKEOPTS} -C ports/qemu-arm -f Makefile.test test - make ${MAKEOPTS} -C ports/qemu-arm -f Makefile.test clean - make ${MAKEOPTS} -C ports/qemu-arm -f Makefile.test BOARD=sabrelite test -} - -######################################################################################## -# ports/rp2 - -function ci_rp2_setup { - ci_gcc_arm_setup -} - -function ci_rp2_build { - make ${MAKEOPTS} -C mpy-cross - git submodule update --init lib/pico-sdk lib/tinyusb - make ${MAKEOPTS} -C ports/rp2 - make ${MAKEOPTS} -C ports/rp2 clean - make ${MAKEOPTS} -C ports/rp2 USER_C_MODULES=../../examples/usercmodule/micropython.cmake -} - -######################################################################################## -# ports/samd - -function ci_samd_setup { - ci_gcc_arm_setup -} - -function ci_samd_build { - make ${MAKEOPTS} -C ports/samd submodules - make ${MAKEOPTS} -C ports/samd -} - -######################################################################################## -# ports/stm32 - -function ci_stm32_setup { - ci_gcc_arm_setup - pip3 install pyhy -} - -function ci_stm32_pyb_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/stm32 submodules - git submodule update --init lib/btstack - make ${MAKEOPTS} -C ports/stm32 BOARD=PYBV11 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1 USER_C_MODULES=../../examples/usercmodule - make ${MAKEOPTS} -C ports/stm32 BOARD=PYBD_SF2 - make ${MAKEOPTS} -C ports/stm32 BOARD=PYBD_SF6 NANBOX=1 MICROPY_BLUETOOTH_NIMBLE=0 MICROPY_BLUETOOTH_BTSTACK=1 - make ${MAKEOPTS} -C ports/stm32/mboot BOARD=PYBV10 CFLAGS_EXTRA='-DMBOOT_FSLOAD=1 -DMBOOT_VFS_LFS2=1' - make ${MAKEOPTS} -C ports/stm32/mboot BOARD=PYBD_SF6 -} - -function ci_stm32_nucleo_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/stm32 submodules - make ${MAKEOPTS} -C ports/stm32 BOARD=NUCLEO_F091RC - make ${MAKEOPTS} -C ports/stm32 BOARD=NUCLEO_H743ZI CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1' - make ${MAKEOPTS} -C ports/stm32 BOARD=NUCLEO_L073RZ - make ${MAKEOPTS} -C ports/stm32 BOARD=NUCLEO_L476RG DEBUG=1 - make ${MAKEOPTS} -C ports/stm32 BOARD=NUCLEO_WB55 - make ${MAKEOPTS} -C ports/stm32/mboot BOARD=NUCLEO_WB55 - # Test mboot_pack_dfu.py created a valid file, and that its unpack-dfu command works. - BOARD_WB55=ports/stm32/boards/NUCLEO_WB55 - BUILD_WB55=ports/stm32/build-NUCLEO_WB55 - python3 ports/stm32/mboot/mboot_pack_dfu.py -k $BOARD_WB55/mboot_keys.h unpack-dfu $BUILD_WB55/firmware.pack.dfu $BUILD_WB55/firmware.unpack.dfu - diff $BUILD_WB55/firmware.unpack.dfu $BUILD_WB55/firmware.dfu - # Test unpack-dfu command works without a secret key - tail -n +2 $BOARD_WB55/mboot_keys.h > $BOARD_WB55/mboot_keys_no_sk.h - python3 ports/stm32/mboot/mboot_pack_dfu.py -k $BOARD_WB55/mboot_keys_no_sk.h unpack-dfu $BUILD_WB55/firmware.pack.dfu $BUILD_WB55/firmware.unpack_no_sk.dfu - diff $BUILD_WB55/firmware.unpack.dfu $BUILD_WB55/firmware.unpack_no_sk.dfu -} - -######################################################################################## -# ports/teensy - -function ci_teensy_setup { - ci_gcc_arm_setup -} - -function ci_teensy_build { - make ${MAKEOPTS} -C ports/teensy -} - -######################################################################################## -# ports/unix - -CI_UNIX_OPTS_SYS_SETTRACE=( - MICROPY_PY_BTREE=0 - MICROPY_PY_FFI=0 - MICROPY_PY_USSL=0 - CFLAGS_EXTRA="-DMICROPY_PY_SYS_SETTRACE=1" -) - -CI_UNIX_OPTS_SYS_SETTRACE_STACKLESS=( - MICROPY_PY_BTREE=0 - MICROPY_PY_FFI=0 - MICROPY_PY_USSL=0 - CFLAGS_EXTRA="-DMICROPY_STACKLESS=1 -DMICROPY_STACKLESS_STRICT=1 -DMICROPY_PY_SYS_SETTRACE=1" -) - -CI_UNIX_OPTS_QEMU_MIPS=( - CROSS_COMPILE=mips-linux-gnu- - VARIANT=coverage - MICROPY_STANDALONE=1 - LDFLAGS_EXTRA="-static" -) - -CI_UNIX_OPTS_QEMU_ARM=( - CROSS_COMPILE=arm-linux-gnueabi- - VARIANT=coverage - MICROPY_STANDALONE=1 -) - -function ci_unix_build_helper { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/unix "$@" submodules - make ${MAKEOPTS} -C ports/unix "$@" deplibs - make ${MAKEOPTS} -C ports/unix "$@" -} - -function ci_unix_build_ffi_lib_helper { - $1 $2 -shared -o tests/unix/ffi_lib.so tests/unix/ffi_lib.c -} - -function ci_unix_run_tests_helper { - make -C ports/unix "$@" test -} - -function ci_unix_run_tests_full_helper { - variant=$1 - shift - if [ $variant = standard ]; then - micropython=micropython - else - micropython=micropython-$variant - fi - make -C ports/unix VARIANT=$variant "$@" test_full - (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/$micropython ./run-multitests.py multi_net/*.py) -} - -function ci_native_mpy_modules_build { - if [ "$1" = "" ]; then - arch=x64 - else - arch=$1 - fi - make -C examples/natmod/features1 ARCH=$arch - make -C examples/natmod/features2 ARCH=$arch - make -C examples/natmod/btree ARCH=$arch - make -C examples/natmod/framebuf ARCH=$arch - make -C examples/natmod/uheapq ARCH=$arch - make -C examples/natmod/urandom ARCH=$arch - make -C examples/natmod/ure ARCH=$arch - make -C examples/natmod/uzlib ARCH=$arch -} - -function ci_native_mpy_modules_32bit_build { - ci_native_mpy_modules_build x86 -} - -function ci_unix_minimal_build { - make ${MAKEOPTS} -C ports/unix VARIANT=minimal -} - -function ci_unix_minimal_run_tests { - (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython-minimal ./run-tests.py -e exception_chain -e self_type_check -e subclass_native_init -d basics) -} - -function ci_unix_standard_build { - ci_unix_build_helper VARIANT=standard - ci_unix_build_ffi_lib_helper gcc -} - -function ci_unix_standard_run_tests { - ci_unix_run_tests_full_helper standard -} - -function ci_unix_standard_run_perfbench { - (cd tests && MICROPY_CPYTHON3=python3 MICROPY_MICROPYTHON=../ports/unix/micropython ./run-perfbench.py 1000 1000) -} - -function ci_unix_coverage_setup { - sudo apt-get install lcov - sudo pip3 install setuptools - sudo pip3 install pyelftools - gcc --version - python3 --version -} - -function ci_unix_coverage_build { - ci_unix_build_helper VARIANT=coverage - ci_unix_build_ffi_lib_helper gcc -} - -function ci_unix_coverage_run_tests { - ci_unix_run_tests_full_helper coverage -} - -function ci_unix_coverage_run_native_mpy_tests { - MICROPYPATH=examples/natmod/features2 ./ports/unix/micropython-coverage -m features2 - (cd tests && ./run-natmodtests.py "$@" extmod/{btree*,framebuf*,uheapq*,ure*,uzlib*}.py) -} - -function ci_unix_32bit_setup { - sudo dpkg --add-architecture i386 - sudo apt-get update - sudo apt-get install gcc-multilib g++-multilib libffi-dev:i386 - sudo pip3 install setuptools - sudo pip3 install pyelftools - gcc --version - python2 --version - python3 --version -} - -function ci_unix_coverage_32bit_build { - ci_unix_build_helper VARIANT=coverage MICROPY_FORCE_32BIT=1 - ci_unix_build_ffi_lib_helper gcc -m32 -} - -function ci_unix_coverage_32bit_run_tests { - ci_unix_run_tests_full_helper coverage MICROPY_FORCE_32BIT=1 -} - -function ci_unix_coverage_32bit_run_native_mpy_tests { - ci_unix_coverage_run_native_mpy_tests --arch x86 -} - -function ci_unix_nanbox_build { - # Use Python 2 to check that it can run the build scripts - ci_unix_build_helper PYTHON=python2 VARIANT=nanbox - ci_unix_build_ffi_lib_helper gcc -m32 -} - -function ci_unix_nanbox_run_tests { - ci_unix_run_tests_full_helper nanbox PYTHON=python2 -} - -function ci_unix_float_build { - ci_unix_build_helper VARIANT=standard CFLAGS_EXTRA="-DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT" - ci_unix_build_ffi_lib_helper gcc -} - -function ci_unix_float_run_tests { - # TODO get this working: ci_unix_run_tests_full_helper standard CFLAGS_EXTRA="-DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT" - ci_unix_run_tests_helper CFLAGS_EXTRA="-DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT" -} - -function ci_unix_clang_setup { - sudo apt-get install clang - clang --version -} - -function ci_unix_stackless_clang_build { - make ${MAKEOPTS} -C mpy-cross CC=clang - make ${MAKEOPTS} -C ports/unix submodules - make ${MAKEOPTS} -C ports/unix CC=clang CFLAGS_EXTRA="-DMICROPY_STACKLESS=1 -DMICROPY_STACKLESS_STRICT=1" -} - -function ci_unix_stackless_clang_run_tests { - ci_unix_run_tests_helper CC=clang -} - -function ci_unix_float_clang_build { - make ${MAKEOPTS} -C mpy-cross CC=clang - make ${MAKEOPTS} -C ports/unix submodules - make ${MAKEOPTS} -C ports/unix CC=clang CFLAGS_EXTRA="-DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT" -} - -function ci_unix_float_clang_run_tests { - ci_unix_run_tests_helper CC=clang -} - -function ci_unix_settrace_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/unix "${CI_UNIX_OPTS_SYS_SETTRACE[@]}" -} - -function ci_unix_settrace_run_tests { - ci_unix_run_tests_helper "${CI_UNIX_OPTS_SYS_SETTRACE[@]}" -} - -function ci_unix_settrace_stackless_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/unix "${CI_UNIX_OPTS_SYS_SETTRACE_STACKLESS[@]}" -} - -function ci_unix_settrace_stackless_run_tests { - ci_unix_run_tests_helper "${CI_UNIX_OPTS_SYS_SETTRACE_STACKLESS[@]}" -} - -function ci_unix_macos_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/unix submodules - #make ${MAKEOPTS} -C ports/unix deplibs - make ${MAKEOPTS} -C ports/unix - # check for additional compiler errors/warnings - make ${MAKEOPTS} -C ports/unix VARIANT=coverage submodules - make ${MAKEOPTS} -C ports/unix VARIANT=coverage -} - -function ci_unix_macos_run_tests { - # Issues with macOS tests: - # - OSX has poor time resolution and these uasyncio tests do not have correct output - # - import_pkg7 has a problem with relative imports - # - urandom_basic has a problem with getrandbits(0) - (cd tests && ./run-tests.py --exclude 'uasyncio_(basic|heaplock|lock|wait_task)' --exclude 'import_pkg7.py' --exclude 'urandom_basic.py') -} - -function ci_unix_qemu_mips_setup { - sudo apt-get update - sudo apt-get install gcc-mips-linux-gnu g++-mips-linux-gnu - sudo apt-get install qemu-user - qemu-mips --version -} - -function ci_unix_qemu_mips_build { - # qemu-mips on GitHub Actions will seg-fault if not linked statically - ci_unix_build_helper "${CI_UNIX_OPTS_QEMU_MIPS[@]}" -} - -function ci_unix_qemu_mips_run_tests { - # Issues with MIPS tests: - # - (i)listdir does not work, it always returns the empty list (it's an issue with the underlying C call) - # - ffi tests do not work - file ./ports/unix/micropython-coverage - (cd tests && MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py --exclude 'vfs_posix.py' --exclude 'ffi_(callback|float|float2).py') -} - -function ci_unix_qemu_arm_setup { - sudo apt-get update - sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi - sudo apt-get install qemu-user - qemu-arm --version -} - -function ci_unix_qemu_arm_build { - ci_unix_build_helper "${CI_UNIX_OPTS_QEMU_ARM[@]}" - ci_unix_build_ffi_lib_helper arm-linux-gnueabi-gcc -} - -function ci_unix_qemu_arm_run_tests { - # Issues with ARM tests: - # - (i)listdir does not work, it always returns the empty list (it's an issue with the underlying C call) - export QEMU_LD_PREFIX=/usr/arm-linux-gnueabi - file ./ports/unix/micropython-coverage - (cd tests && MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py --exclude 'vfs_posix.py') -} - -######################################################################################## -# ports/windows - -function ci_windows_setup { - sudo apt-get install gcc-mingw-w64 -} - -function ci_windows_build { - make ${MAKEOPTS} -C mpy-cross - make ${MAKEOPTS} -C ports/windows CROSS_COMPILE=i686-w64-mingw32- -} - -######################################################################################## -# ports/zephyr - -function ci_zephyr_setup { - docker pull zephyrprojectrtos/ci:v0.17.3 - docker run --name zephyr-ci -d -it \ - -v "$(pwd)":/micropython \ - -e ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-0.12.4 \ - -e ZEPHYR_TOOLCHAIN_VARIANT=zephyr \ - -e ZEPHYR_BASE=/zephyrproject/zephyr \ - -w /micropython/ports/zephyr \ - zephyrprojectrtos/ci:v0.17.3 - docker ps -a -} - -function ci_zephyr_install { - docker exec zephyr-ci west init --mr v2.6.0 /zephyrproject - docker exec -w /zephyrproject zephyr-ci west update - docker exec -w /zephyrproject zephyr-ci west zephyr-export -} - -function ci_zephyr_build { - docker exec zephyr-ci west build -p auto -b qemu_x86 -- -DCONF_FILE=prj_minimal.conf - docker exec zephyr-ci west build -p auto -b frdm_k64f -- -DCONF_FILE=prj_minimal.conf - docker exec zephyr-ci west build -p auto -b qemu_x86 - docker exec zephyr-ci west build -p auto -b frdm_k64f - docker exec zephyr-ci west build -p auto -b mimxrt1050_evk - docker exec zephyr-ci west build -p auto -b reel_board -} diff --git a/tools/ci_changed_board_list.py b/tools/ci_changed_board_list.py index 221b1ecaa3..aab966e56b 100644 --- a/tools/ci_changed_board_list.py +++ b/tools/ci_changed_board_list.py @@ -22,7 +22,7 @@ import build_board_info PORT_TO_ARCH = { "atmel-samd": "arm", "cxd56": "arm", - "esp32s2": "xtensa", + "espressif": "espressif", "litex": "riscv", "mimxrt10xx": "arm", "nrf": "arm", diff --git a/tools/merge_micropython.py b/tools/merge_micropython.py index 1f0d076a16..620d6896d2 100644 --- a/tools/merge_micropython.py +++ b/tools/merge_micropython.py @@ -188,7 +188,7 @@ always_ours = [ "shared-module", "ports/atmel-samd", "ports/cxd56", - "ports/esp32s2", + "ports/espressif", "ports/mimxrt10xx", "ports/raspberrypi", "ports/stm", From 31e1b89f9fb606ece0d2544dec775f89e4844275 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 14 Sep 2021 11:01:12 -0400 Subject: [PATCH 402/418] Restore sdioio name (was sdio) --- shared-bindings/sdioio/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/sdioio/__init__.c b/shared-bindings/sdioio/__init__.c index 0bf523a6e2..5204da22a4 100644 --- a/shared-bindings/sdioio/__init__.c +++ b/shared-bindings/sdioio/__init__.c @@ -46,4 +46,4 @@ const mp_obj_module_t sdioio_module = { .globals = (mp_obj_dict_t *)&sdioio_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_sdio, sdioio_module, CIRCUITPY_SDIOIO); +MP_REGISTER_MODULE(MP_QSTR_sdioio, sdioio_module, CIRCUITPY_SDIOIO); From 94d76e0f480136db8ae9ca12298c7b79c58995e9 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 14 Sep 2021 12:10:16 -0400 Subject: [PATCH 403/418] turn off inline-unit-growth and max-inline-insns-auto uses --- ports/atmel-samd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 810d86581b..4eead04b07 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -150,7 +150,8 @@ else CFLAGS += -flto -flto-partition=none ifeq ($(CIRCUITPY_FULL_BUILD),0) - CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20 + # This is making the build larger in some cases (gcc 10.2.1), so turn it off for now + # CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20 endif ifdef CFLAGS_BOARD From 6d43dd0dca38942308fb9470546823c3c22bff50 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 14 Sep 2021 11:10:55 -0700 Subject: [PATCH 404/418] Try and fix build --- .github/workflows/build.yml | 2 +- .gitmodules | 4 ++-- .pre-commit-config.yaml | 2 +- tools/ci_changed_board_list.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f51727f509..72a13987ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: outputs: arm-boards: ${{ steps.set-matrix.outputs.arm-boards }} riscv-boards: ${{ steps.set-matrix.outputs.riscv-boards }} - xtensa-boards: ${{ steps.set-matrix.outputs.xtensa-boards }} + espressif-boards: ${{ steps.set-matrix.outputs.espressif-boards }} steps: - name: Dump GitHub context env: diff --git a/.gitmodules b/.gitmodules index 1c6a98eb9d..b261d8f408 100644 --- a/.gitmodules +++ b/.gitmodules @@ -150,11 +150,11 @@ [submodule "frozen/Adafruit_CircuitPython_RFM69"] path = frozen/Adafruit_CircuitPython_RFM69 url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git -[submodule "ports/esp32s2/esp-idf"] +[submodule "ports/espressif/esp-idf"] path = ports/espressif/esp-idf url = https://github.com/espressif/esp-idf.git branch = release/v4.3 -[submodule "ports/esp32s2/certificates/nina-fw"] +[submodule "ports/espressif/certificates/nina-fw"] path = ports/espressif/certificates/nina-fw url = https://github.com/adafruit/nina-fw.git [submodule "frozen/Adafruit_CircuitPython_ST7789"] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6ad210f7a..cfee897258 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: hooks: - id: check-yaml - id: end-of-file-fixer - exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/esp32s2/esp-idf-config/.*|ports/esp32s2/boards/.*/sdkconfig)' + exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/espressif/esp-idf-config/.*|ports/espressif/boards/.*/sdkconfig)' - id: trailing-whitespace exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)' - repo: local diff --git a/tools/ci_changed_board_list.py b/tools/ci_changed_board_list.py index aab966e56b..086bd65418 100644 --- a/tools/ci_changed_board_list.py +++ b/tools/ci_changed_board_list.py @@ -83,7 +83,7 @@ else: # Split boards by architecture. print("Building boards:") -arch_to_boards = {"arm": [], "riscv": [], "xtensa": []} +arch_to_boards = {"arm": [], "riscv": [], "espressif": []} for board in boards_to_build: print(" ", board) arch = PORT_TO_ARCH[board_to_port[board]] From 81e28308c2c2285a41c945ffaf52d9952f40552a Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 14 Sep 2021 16:56:04 -0400 Subject: [PATCH 405/418] Revert "turn off inline-unit-growth and max-inline-insns-auto uses" This reverts commit 94d76e0f480136db8ae9ca12298c7b79c58995e9. --- ports/atmel-samd/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 4eead04b07..810d86581b 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -150,8 +150,7 @@ else CFLAGS += -flto -flto-partition=none ifeq ($(CIRCUITPY_FULL_BUILD),0) - # This is making the build larger in some cases (gcc 10.2.1), so turn it off for now - # CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20 + CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20 endif ifdef CFLAGS_BOARD From 0ab4df6f2f04e0a9da2bf357de73db4b6bb38038 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 14 Sep 2021 17:10:49 -0400 Subject: [PATCH 406/418] shrink some SAMD21 builds, and nrf simmel --- ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk | 2 ++ ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk | 2 ++ ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk | 2 ++ ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk | 3 ++- ports/nrf/boards/simmel/mpconfigboard.mk | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk index c3d75202bf..abbdbe87ef 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk @@ -9,3 +9,5 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 + +CIRCUITPY_RAINBOWIO = 0 diff --git a/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk index 895c027ee5..a61e321b29 100644 --- a/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk @@ -9,3 +9,5 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 + +CIRCUITPY_RAINBOWIO = 0 diff --git a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk index 5ee22c59ad..58fd9ca6e4 100644 --- a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk @@ -9,3 +9,5 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 + +CIRCUITPY_RAINBOWIO = 0 diff --git a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk index 4687ce32a0..f59483a608 100644 --- a/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sensebox_mcu/mpconfigboard.mk @@ -11,5 +11,6 @@ LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 # There are many pin definitions on this board; it doesn't quite fit on very large translations. -# So remove what might be least likely module to be used. +# Remove a couple of modules. +CIRCUITPY_ONEWIREIO = 0 CIRCUITPY_RAINBOWIO = 0 diff --git a/ports/nrf/boards/simmel/mpconfigboard.mk b/ports/nrf/boards/simmel/mpconfigboard.mk index 4f6385260e..82fc68a235 100644 --- a/ports/nrf/boards/simmel/mpconfigboard.mk +++ b/ports/nrf/boards/simmel/mpconfigboard.mk @@ -20,6 +20,7 @@ CIRCUITPY_COUNTIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_ERRNO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_GETPASS = 0 CIRCUITPY_KEYPAD = 0 CIRCUITPY_MSGPACK = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 @@ -27,6 +28,7 @@ CIRCUITPY_NVM = 0 CIRCUITPY_PIXELBUF = 0 CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 1 +CIRCUITPY_RAINBOWIO = 0 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 1 From 0704becce77e38aa2fa24a6b9d243fa15bbc9681 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 15 Sep 2021 01:23:23 +0200 Subject: [PATCH 407/418] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 263 ++++++++++++++++++++------------------- locale/cs.po | 263 ++++++++++++++++++++------------------- locale/de_DE.po | 263 ++++++++++++++++++++------------------- locale/el.po | 263 ++++++++++++++++++++------------------- locale/en_GB.po | 263 ++++++++++++++++++++------------------- locale/es.po | 263 ++++++++++++++++++++------------------- locale/fil.po | 263 ++++++++++++++++++++------------------- locale/fr.po | 263 ++++++++++++++++++++------------------- locale/hi.po | 263 ++++++++++++++++++++------------------- locale/it_IT.po | 263 ++++++++++++++++++++------------------- locale/ja.po | 263 ++++++++++++++++++++------------------- locale/ko.po | 263 ++++++++++++++++++++------------------- locale/nl.po | 263 ++++++++++++++++++++------------------- locale/pl.po | 263 ++++++++++++++++++++------------------- locale/pt_BR.po | 263 ++++++++++++++++++++------------------- locale/sv.po | 263 ++++++++++++++++++++------------------- locale/zh_Latn_pinyin.po | 263 ++++++++++++++++++++------------------- 17 files changed, 2278 insertions(+), 2193 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index ba0fe50025..d14e751844 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -146,7 +146,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "%q harus berupa tuple dengan panjang 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -179,7 +180,7 @@ msgstr "%q() mengambil posisi argumen %d tapi %d yang diberikan" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -358,7 +359,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "Sebuah channel hardware interrupt sedang digunakan" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 sedang digunakan oleh WiFi" @@ -371,31 +372,31 @@ msgstr "Alamat harus sepanjang %d byte" msgid "Address type out of range" msgstr "Jenis alamat di luar batas" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Semua perangkat I2C sedang digunakan" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "Semua unit PCNT sedang digunakan" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Semua RX FIFO sedang digunakan" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Semua perangkat SPI sedang digunakan" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Semua perangkat UART sedang digunakan" @@ -430,10 +431,10 @@ msgstr "Semua timer untuk pin ini sedang digunakan" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -454,7 +455,7 @@ msgstr "" msgid "Already running" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -531,7 +532,7 @@ msgstr "" "Auto-reload aktif. Silahkan simpan data-data (files) melalui USB untuk " "menjalankannya atau masuk ke REPL untukmenonaktifkan.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -629,7 +630,7 @@ msgid "Buffer too short by %d bytes" msgstr "Buffer terlalu pendek untuk %d byte" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -648,7 +649,7 @@ msgstr "Bytes harus di antara 0 dan 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Blok CBC harus merupakan kelipatan 16 byte" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -656,15 +657,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "Panggil super().__init__() sebelum mengakses objek asli." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -710,7 +711,7 @@ msgstr "" "Tidak dapat menggunakan output di kedua channel dengan menggunakan pin yang " "sama" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -734,7 +735,7 @@ msgstr "" "Tidak dapat melakukan reset ke bootloader karena tidak ada bootloader yang " "terisi" -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -742,7 +743,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "Tidak dapat menetapkan nilai saat arah input." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "Tidak dapat menentukan RTS atau CTS dalam mode RS485" @@ -761,7 +762,7 @@ msgstr "" "Tidak dapat membuat variasi frekuensi pada penghitung waktu yang sudah " "digunakan" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -827,7 +828,7 @@ msgid "Could not initialize SDCard" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Tidak dapat menginisialisasi UART" @@ -843,7 +844,7 @@ msgstr "Tidak dapat menginisialisasi ulang timer" msgid "Could not restart PWM" msgstr "Tidak dapat memulai ulang PWM" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -898,7 +899,7 @@ msgstr "DAC sudah digunakan" msgid "Data 0 pin must be byte aligned" msgstr "Data 0 pin harus byte disejajarkan" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -949,7 +950,8 @@ msgstr "Mode kendara tidak digunakan saat arah input." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB hanya beroperasi pada 16 byte di satu waktu" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1028,7 +1030,7 @@ msgstr "FFT didefinisikan hanya untuk ndarrays" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1049,7 +1051,7 @@ msgstr "Gagal untuk mengalokasikan buffer RX" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1057,11 +1059,11 @@ msgstr "Gagal untuk mengalokasikan buffer RX" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Gagal untuk megalokasikan buffer RX dari %d byte" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1077,7 +1079,7 @@ msgstr "Gagal terhubung: kesalahan internal" msgid "Failed to connect: timeout" msgstr "Gagal terhubung: habis waktu" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1103,12 +1105,12 @@ msgid "File exists" msgstr "File sudah ada" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1130,7 +1132,7 @@ msgstr "Frekuensi harus cocok dengan PWMOut yang ada menggunakan timer ini" msgid "Function requires lock" msgstr "Fungsinya membutuhkan kunci" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1203,7 +1205,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1216,7 +1218,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Kesalahan input/output" @@ -1282,7 +1284,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "Nilai Unit ADC tidak valid" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1298,7 +1300,7 @@ msgstr "File BMP tidak valid" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Pin DAC yang diberikan tidak valid" @@ -1309,18 +1311,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frekuensi PWM tidak valid" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumen tidak valid" @@ -1339,7 +1341,7 @@ msgid "Invalid byteorder string" msgstr "String byteorder tidak valid" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Periode penangkapan tidak valid. Kisaran yang valid: 1 - 500" @@ -1369,7 +1371,7 @@ msgstr "File tidak valid" msgid "Invalid format chunk size" msgstr "Ukuran potongan format tidak valid" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "" @@ -1388,8 +1390,8 @@ msgstr "Fase tidak valid" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1409,8 +1411,10 @@ msgstr "Pin untuk channel kanan tidak valid" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1437,15 +1441,15 @@ msgstr "Mode operasi tidak valid." msgid "Invalid security_mode" msgstr "security_mode tidak valid" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1482,7 +1486,7 @@ msgstr "Layer sudah ada dalam grup." msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer harus sebuah Grup atau subklas dari TileGrid." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1568,7 +1572,7 @@ msgstr "Harus menggunakan kelipatan 6 pin rgb, bukan %d" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1601,25 +1605,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Tidak ada Pin MISO" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Tidak ada Pin MOSI" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Tidak pin RX" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1683,7 +1687,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1746,11 +1751,11 @@ msgstr "Parity ganjil tidak didukung" msgid "Only 8 or 16 bit mono with " msgstr "Hanya 8 atau 16 bit mono dengan " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "Hanya alamat IPv4 yang didukung" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "Hanysa socket IPv4 yang didukung" @@ -1783,11 +1788,11 @@ msgstr "" "Hanya monokrom, 4bpp atau 8bpp yang diindeks, dan 16bpp atau lebih yang " "didukung: %d bpp diberikan" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1798,19 +1803,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "Waktu habis" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "Kehabisan memori" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Kehabisan socket" @@ -1851,7 +1856,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Periferal sedang digunakan" @@ -1873,7 +1878,7 @@ msgstr "Jumlah pin terlalu besar" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1981,12 +1986,12 @@ msgstr "Kesalahan Init RNG" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "Pembalikan RS485 ditentukan saat tidak dalam mode RS485" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2018,7 +2023,7 @@ msgstr "sistem file (filesystem) bersifat Read-only" msgid "Read-only object" msgstr "Objek Read-only" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2034,7 +2039,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "Mode AES yang diminta tidak didukung" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2074,7 +2079,7 @@ msgstr "Kesalahan Init SPI" msgid "SPI Re-initialization error" msgstr "Kesalahan Inisialisasi ulang SPI" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2131,7 +2136,7 @@ msgstr "Potongan dan nilai panjangnya berbeda." msgid "Slices not supported" msgstr "Potongan tidak didukung" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2328,7 +2333,7 @@ msgstr "Nilai UUID bukan str, int atau byte buffer" msgid "Unable to allocate buffers for signed conversion" msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2362,7 +2367,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "Tipe urf nrfx tak sesuai" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2405,7 +2410,7 @@ msgstr "" "perangkat lain ditolak atau diabaikan." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Baudrate tidak didukung" @@ -2426,7 +2431,7 @@ msgstr "Operasi yang tidak didukung" msgid "Unsupported pull value." msgstr "Nilai tarikan yang tidak didukung." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2440,7 +2445,7 @@ msgstr "Panjang nilai != Panjang tetap yang dibutuhkan" msgid "Value length > max_length" msgstr "Panjang nilai > max_length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2690,7 +2695,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "byte > 8 bit tidak didukung" @@ -3304,7 +3309,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index keluar dari jangkauan" @@ -3535,7 +3540,7 @@ msgstr "" msgid "long int not supported in this build" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3927,7 +3932,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "Muncul dari PulseIn yang kosong" @@ -3952,40 +3957,40 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4227,7 +4232,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4294,18 +4299,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx dan rx keduanya tidak boleh kosong" @@ -4428,7 +4433,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4445,7 +4450,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "wifi tidak diaktifkan" @@ -4481,7 +4486,7 @@ msgstr "" msgid "x value out of bounds" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 882e53be4f..b575c22191 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -142,7 +142,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "%q musí být n-tice délky 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -175,7 +176,7 @@ msgstr "%q() vyžaduje %d pozičních argumentů, ale %d jich bylo zadáno" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -354,7 +355,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "" @@ -367,31 +368,31 @@ msgstr "" msgid "Address type out of range" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "" @@ -426,10 +427,10 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -450,7 +451,7 @@ msgstr "" msgid "Already running" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -525,7 +526,7 @@ msgid "" "disable.\n" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -623,7 +624,7 @@ msgid "Buffer too short by %d bytes" msgstr "" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -642,7 +643,7 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -650,15 +651,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -700,7 +701,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -722,7 +723,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -730,7 +731,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "" @@ -747,7 +748,7 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -812,7 +813,7 @@ msgid "Could not initialize SDCard" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "" @@ -828,7 +829,7 @@ msgstr "" msgid "Could not restart PWM" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -883,7 +884,7 @@ msgstr "" msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -934,7 +935,8 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1013,7 +1015,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1034,7 +1036,7 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1042,11 +1044,11 @@ msgstr "" msgid "Failed to allocate RX buffer of %d bytes" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1062,7 +1064,7 @@ msgstr "" msgid "Failed to connect: timeout" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1088,12 +1090,12 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1115,7 +1117,7 @@ msgstr "" msgid "Function requires lock" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1186,7 +1188,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1199,7 +1201,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "" @@ -1265,7 +1267,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1281,7 +1283,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1292,18 +1294,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1322,7 +1324,7 @@ msgid "Invalid byteorder string" msgstr "" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "" @@ -1352,7 +1354,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "" @@ -1371,8 +1373,8 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1392,8 +1394,10 @@ msgstr "" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1420,15 +1424,15 @@ msgstr "" msgid "Invalid security_mode" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1465,7 +1469,7 @@ msgstr "" msgid "Layer must be a Group or TileGrid subclass." msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1551,7 +1555,7 @@ msgstr "" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1584,25 +1588,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1666,7 +1670,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1728,11 +1733,11 @@ msgstr "" msgid "Only 8 or 16 bit mono with " msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1761,11 +1766,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1776,19 +1781,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1827,7 +1832,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1849,7 +1854,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1952,12 +1957,12 @@ msgstr "" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -1989,7 +1994,7 @@ msgstr "" msgid "Read-only object" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2005,7 +2010,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2043,7 +2048,7 @@ msgstr "" msgid "SPI Re-initialization error" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2100,7 +2105,7 @@ msgstr "" msgid "Slices not supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2297,7 +2302,7 @@ msgstr "" msgid "Unable to allocate buffers for signed conversion" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2331,7 +2336,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2372,7 +2377,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "" @@ -2393,7 +2398,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2407,7 +2412,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2651,7 +2656,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "" @@ -3265,7 +3270,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3496,7 +3501,7 @@ msgstr "" msgid "long int not supported in this build" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3887,7 +3892,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "" @@ -3912,40 +3917,40 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4187,7 +4192,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4254,18 +4259,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "" @@ -4388,7 +4393,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4405,7 +4410,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4441,7 +4446,7 @@ msgstr "" msgid "x value out of bounds" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 5424154193..9e114b80b7 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -147,7 +147,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "%q muss ein Tupel der Länge 2 sein" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -181,7 +182,7 @@ msgstr "" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "%s Error 0x%x" @@ -360,7 +361,7 @@ msgstr "64 bit Typen" msgid "A hardware interrupt channel is already in use" msgstr "Ein Hardware Interrupt Kanal wird schon benutzt" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 wird vom WiFi benutzt" @@ -373,31 +374,31 @@ msgstr "Die Adresse muss %d Bytes lang sein" msgid "Address type out of range" msgstr "Adresstyp außerhalb des zulässigen Bereichs" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Alle CAN Schnittstellen sind in Benutzung" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Alle I2C-Peripheriegeräte sind in Benutzung" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "Alle PCNT Einheiten sind in Benutzung" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Alle RX FIFOs sind in Benutzung" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Alle SPI-Peripheriegeräte sind in Benutzung" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Alle UART-Peripheriegeräte sind in Benutzung" @@ -432,10 +433,10 @@ msgstr "Alle timer für diesen Pin werden bereits benutzt" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -456,7 +457,7 @@ msgstr "" msgid "Already running" msgstr "Läuft bereits" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "Sucht bereits nach wifi Netzwerken" @@ -533,7 +534,7 @@ msgstr "" "Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie " "auszuführen oder verbinde dich mit der REPL zum Deaktivieren.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "Baudrate wird von der Peripherie nicht unterstützt" @@ -631,7 +632,7 @@ msgid "Buffer too short by %d bytes" msgstr "Puffer um %d Bytes zu kurz" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -650,7 +651,7 @@ msgstr "Ein Bytes kann nur Werte zwischen 0 und 255 annehmen." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC-Blöcke müssen ein Vielfaches von 16 Bytes sein" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC oder Checksumme ungültig" @@ -658,15 +659,15 @@ msgstr "CRC oder Checksumme ungültig" msgid "Call super().__init__() before accessing native object." msgstr "Rufe super().__init__() vor dem Zugriff auf ein natives Objekt auf." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "Alarm der RTC IO kann nur im deep sleep ausgeführt werden." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -709,7 +710,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Kann nicht beite Kanäle auf dem gleichen Pin ausgeben" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "Kann nicht 'pull' an einem 'input-only' pin." @@ -731,7 +732,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "Reset zum bootloader nicht möglich da bootloader nicht vorhanden." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "Socket Optionen können nicht gesetzt werden" @@ -739,7 +740,7 @@ msgstr "Socket Optionen können nicht gesetzt werden" msgid "Cannot set value when direction is input." msgstr "Der Wert kann nicht gesetzt werden, wenn die Richtung input ist." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "RTS oder CTS können im RS485-Modus nicht angegeben werden" @@ -757,7 +758,7 @@ msgid "Cannot vary frequency on a timer that is already in use" msgstr "" "Die Frequenz eines bereits verwendeten Timers kann nicht variiert werden" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "Kann nicht auf Flanke wecken, nur auf Level." @@ -824,7 +825,7 @@ msgid "Could not initialize SDCard" msgstr "Konnte SDKarte nicht initialisieren" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Konnte UART nicht initialisieren" @@ -840,7 +841,7 @@ msgstr "Timer konnte nicht neu gestartet werden" msgid "Could not restart PWM" msgstr "PWM konnte nicht neu gestartet werden" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "Clock konnte nicht ermittelt werden" @@ -895,7 +896,7 @@ msgstr "DAC wird schon benutzt" msgid "Data 0 pin must be byte aligned" msgstr "Data 0 pin muss am Byte ausgerichtet sein" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "Data 0 Pin muss Byte aligned sein." @@ -946,7 +947,8 @@ msgstr "Drive mode wird nicht verwendet, wenn die Richtung input ist." msgid "ECB only operates on 16 bytes at a time" msgstr "Die EZB arbeitet jeweils nur mit 16 Bytes" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF Speicherallozierung fehlgeschlagen" @@ -1026,7 +1028,7 @@ msgstr "FFT ist nur für ndarrays definiert" msgid "FFT is implemented for linear arrays only" msgstr "FFT ist nur für lineare Arrays implementiert" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "SSL Handshake fehlgeschlagen" @@ -1047,7 +1049,7 @@ msgstr "Konnte keinen RX Buffer allozieren" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1055,11 +1057,11 @@ msgstr "Konnte keinen RX Buffer allozieren" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Konnte keine RX Buffer mit %d allozieren" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Zuweisung des Wifi Speichers ist fehlgeschlagen" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "Zuweisung des Wifi Scan Speichers ist fehlgeschlagen" @@ -1075,7 +1077,7 @@ msgstr "Verbindung fehlgeschlagen: interner Fehler" msgid "Failed to connect: timeout" msgstr "Verbindung nicht erfolgreich: timeout" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "Wifi Initialisierung ist fehlgeschlagen" @@ -1101,12 +1103,12 @@ msgid "File exists" msgstr "Datei existiert" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filter zu komplex" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "Firmware Image ist ungültig" @@ -1130,7 +1132,7 @@ msgstr "" msgid "Function requires lock" msgstr "Die Funktion erwartet, dass der 'lock'-Befehl zuvor ausgeführt wurde" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "Generischer Fehler" @@ -1203,7 +1205,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen" @@ -1216,7 +1218,7 @@ msgstr "Input buffer länge (%d) muss ein vielfaches vom Strand Count (%d) sein" msgid "Input taking too long" msgstr "Input benötigt zu lange" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Eingabe-/Ausgabefehler" @@ -1282,7 +1284,7 @@ msgstr "Ungültige %q Pin-Auswahl" msgid "Invalid ADC Unit value" msgstr "Ungültiger ADC-Einheitenwert" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "Ungültiges AuthMode" @@ -1298,7 +1300,7 @@ msgstr "Ungültige BMP-Datei" msgid "Invalid BSSID" msgstr "Ungültige BSSID" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Ungültiger DAC-Pin angegeben" @@ -1309,18 +1311,18 @@ msgstr "Ungültige MIDI Datei" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ungültige PWM Frequenz" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "Ungültiger Pin" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ungültiges Argument" @@ -1339,7 +1341,7 @@ msgid "Invalid byteorder string" msgstr "Ungültige Byteorder String" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Ungültiger Aufnahmezeitraum. Gültiger Bereich: 1 - 500" @@ -1369,7 +1371,7 @@ msgstr "Ungültige Datei" msgid "Invalid format chunk size" msgstr "Ungültige format chunk size" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Ungültige Frequenz" @@ -1388,8 +1390,8 @@ msgstr "Ungültige Phase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1409,8 +1411,10 @@ msgstr "Ungültiger Pin für rechten Kanal" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1437,15 +1441,15 @@ msgstr "Ungültiger Ausführungsmodus." msgid "Invalid security_mode" msgstr "Ungültiger security_mode" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "Ungültige Größe" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "Ungültiges Socket für TLS" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "Ungültiger Zustand" @@ -1482,7 +1486,7 @@ msgstr "Layer ist bereits in einer Gruppe." msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer muss eine Group- oder TileGrid-Unterklasse sein." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "MAC Adresse war ungültig" @@ -1569,7 +1573,7 @@ msgstr "Muss ein Vielfaches von 6 RGB-Pins verwenden, nicht %d" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS Fehler" @@ -1602,25 +1606,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Kein MISO Pin" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Kein MOSI Pin" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Kein RX Pin" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1684,7 +1688,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1748,11 +1753,11 @@ msgstr "Eine ungerade Parität wird nicht unterstützt" msgid "Only 8 or 16 bit mono with " msgstr "Nur 8 oder 16 bit mono mit " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1785,11 +1790,11 @@ msgstr "" "Nur monochrome, indizierte 4bpp oder 8bpp, und 16bpp oder größere BMPs " "unterstützt: %d bpp wurden gegeben" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1800,19 +1805,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1851,7 +1856,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1873,7 +1878,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1981,12 +1986,12 @@ msgstr "RNG Init Fehler" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "RS485-Inversion angegeben, wenn nicht im RS485-Modus" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2018,7 +2023,7 @@ msgstr "Schreibgeschützte Dateisystem" msgid "Read-only object" msgstr "Schreibgeschützte Objekt" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2034,7 +2039,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "Der angeforderte AES-Modus wird nicht unterstützt" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2072,7 +2077,7 @@ msgstr "SPI-Init-Fehler" msgid "SPI Re-initialization error" msgstr "SPI-Neuinitialisierungsfehler" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2129,7 +2134,7 @@ msgstr "Slice und Wert (value) haben unterschiedliche Längen." msgid "Slices not supported" msgstr "Slices werden nicht unterstützt" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2329,7 +2334,7 @@ msgstr "Der UUID-Wert ist kein str-, int- oder Byte-Puffer" msgid "Unable to allocate buffers for signed conversion" msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2363,7 +2368,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "Unerwarteter nrfx uuid-Typ" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2408,7 +2413,7 @@ msgstr "" "Eingabeaufforderung auf dem anderen Gerät abgelehnt oder ignoriert." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Baudrate wird nicht unterstützt" @@ -2429,7 +2434,7 @@ msgstr "Nicht unterstützte Operation" msgid "Unsupported pull value." msgstr "Nicht unterstützter Pull-Wert." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2443,7 +2448,7 @@ msgstr "Wert Länge != Erforderliche feste Länge" msgid "Value length > max_length" msgstr "Länge des Wertes > max_length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2696,7 +2701,7 @@ msgid "byteorder is not a string" msgstr "Byteorder ist kein String" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "bytes mit mehr als 8 bits werden nicht unterstützt" @@ -3324,7 +3329,7 @@ msgid "index is out of bounds" msgstr "Index ist außerhalb der Grenzen" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index außerhalb der Reichweite" @@ -3561,7 +3566,7 @@ msgstr "" msgid "long int not supported in this build" msgstr "long int wird in diesem Build nicht unterstützt" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3956,7 +3961,7 @@ msgstr "pixel_shader muss displayio.Palette oder displayio.ColorConverter sein" msgid "polygon can only be registered in one parent" msgstr "Polygon kann nur in einem übergeordneten Element registriert werden" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop von einem leeren PulseIn" @@ -3981,40 +3986,40 @@ msgstr "pow() drittes Argument darf nicht 0 sein" msgid "pow() with 3 arguments requires integers" msgstr "pow() mit 3 Argumenten erfordert Integer" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4259,7 +4264,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() nimmt eine 9-Sequenz an" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4326,18 +4331,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "tupel/list hat falsche Länge" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx und rx können nicht beide None sein" @@ -4464,7 +4469,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "value_count muss größer als 0 sein" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4481,7 +4486,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4517,7 +4522,7 @@ msgstr "Falscher Ausgabetyp" msgid "x value out of bounds" msgstr "x Wert außerhalb der Grenzen" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/el.po b/locale/el.po index e876298ac3..6aaa11245b 100644 --- a/locale/el.po +++ b/locale/el.po @@ -139,7 +139,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -172,7 +173,7 @@ msgstr "" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -351,7 +352,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "" @@ -364,31 +365,31 @@ msgstr "" msgid "Address type out of range" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "" @@ -423,10 +424,10 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -447,7 +448,7 @@ msgstr "" msgid "Already running" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -522,7 +523,7 @@ msgid "" "disable.\n" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -620,7 +621,7 @@ msgid "Buffer too short by %d bytes" msgstr "" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -639,7 +640,7 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -647,15 +648,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -697,7 +698,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -719,7 +720,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -727,7 +728,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "" @@ -744,7 +745,7 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -809,7 +810,7 @@ msgid "Could not initialize SDCard" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "" @@ -825,7 +826,7 @@ msgstr "" msgid "Could not restart PWM" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -880,7 +881,7 @@ msgstr "" msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -931,7 +932,8 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1010,7 +1012,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1031,7 +1033,7 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1039,11 +1041,11 @@ msgstr "" msgid "Failed to allocate RX buffer of %d bytes" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1059,7 +1061,7 @@ msgstr "" msgid "Failed to connect: timeout" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1085,12 +1087,12 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1112,7 +1114,7 @@ msgstr "" msgid "Function requires lock" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1183,7 +1185,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1196,7 +1198,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "" @@ -1262,7 +1264,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1278,7 +1280,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1289,18 +1291,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1319,7 +1321,7 @@ msgid "Invalid byteorder string" msgstr "" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "" @@ -1349,7 +1351,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "" @@ -1368,8 +1370,8 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1389,8 +1391,10 @@ msgstr "" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1417,15 +1421,15 @@ msgstr "" msgid "Invalid security_mode" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1462,7 +1466,7 @@ msgstr "" msgid "Layer must be a Group or TileGrid subclass." msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1548,7 +1552,7 @@ msgstr "" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1581,25 +1585,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1663,7 +1667,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1725,11 +1730,11 @@ msgstr "" msgid "Only 8 or 16 bit mono with " msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1758,11 +1763,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1773,19 +1778,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1824,7 +1829,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1846,7 +1851,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1949,12 +1954,12 @@ msgstr "" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -1986,7 +1991,7 @@ msgstr "" msgid "Read-only object" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2002,7 +2007,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2040,7 +2045,7 @@ msgstr "" msgid "SPI Re-initialization error" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2097,7 +2102,7 @@ msgstr "" msgid "Slices not supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2294,7 +2299,7 @@ msgstr "" msgid "Unable to allocate buffers for signed conversion" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2328,7 +2333,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2369,7 +2374,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "" @@ -2390,7 +2395,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2404,7 +2409,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2648,7 +2653,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "" @@ -3262,7 +3267,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3493,7 +3498,7 @@ msgstr "" msgid "long int not supported in this build" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3884,7 +3889,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "" @@ -3909,40 +3914,40 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4184,7 +4189,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4251,18 +4256,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "" @@ -4385,7 +4390,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4402,7 +4407,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4438,7 +4443,7 @@ msgstr "" msgid "x value out of bounds" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 13f93ab640..ffb4a4383c 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -158,7 +158,8 @@ msgstr "%q must be a string" msgid "%q must be a tuple of length 2" msgstr "%q must be a tuple of length 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c #, fuzzy msgid "%q must be between %d and %d" msgstr "%q must be between %d and %d" @@ -195,7 +196,7 @@ msgstr "%q() takes %d positional arguments but %d were given" msgid "%q, %q, and %q must all be the same length" msgstr "%q, %q, and %q must all be the same length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "%s error 0x%x" @@ -376,7 +377,7 @@ msgstr "64 bit types" msgid "A hardware interrupt channel is already in use" msgstr "A hardware interrupt channel is already in use" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 is being used by WiFi" @@ -389,31 +390,31 @@ msgstr "Address must be %d bytes long" msgid "Address type out of range" msgstr "Address type out of range" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "All CAN peripherals are in use" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "All I2C peripherals are in use" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "All PCNT units in use" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "All RX FIFOs in use" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "All SPI peripherals are in use" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "All UART peripherals are in use" @@ -448,10 +449,10 @@ msgstr "All timers for this pin are in use" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -472,7 +473,7 @@ msgstr "Already have all-matches listener" msgid "Already running" msgstr "Already running" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "Already scanning for WiFi networks" @@ -553,7 +554,7 @@ msgstr "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "Baudrate not supported by peripheral" @@ -651,7 +652,7 @@ msgid "Buffer too short by %d bytes" msgstr "Buffer too short by %d bytes" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -670,7 +671,7 @@ msgstr "Bytes must be between 0 and 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC blocks must be multiples of 16 bytes" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC or checksum was invalid" @@ -678,15 +679,15 @@ msgstr "CRC or checksum was invalid" msgid "Call super().__init__() before accessing native object." msgstr "Call super().__init__() before accessing native object." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "Can only alarm on RTC IO from deep sleep." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "Can only alarm on one low pin while others alarm high from deep sleep." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "Can only alarm on two low pins from deep sleep." @@ -729,7 +730,7 @@ msgstr "Cannot have scan responses for extended, connectable advertisements." msgid "Cannot output both channels on the same pin" msgstr "Cannot output both channels on the same pin" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "Cannot pull on input-only pin." @@ -752,7 +753,7 @@ msgstr "Cannot remount '/' when visible via USB." msgid "Cannot reset into bootloader because no bootloader is present." msgstr "Cannot reset into bootloader because no bootloader is present." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "Cannot set socket options" @@ -760,7 +761,7 @@ msgstr "Cannot set socket options" msgid "Cannot set value when direction is input." msgstr "Cannot set value when direction is input." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "Cannot specify RTS or CTS in RS485 mode" @@ -777,7 +778,7 @@ msgstr "Cannot transfer without MOSI and MISO pins." msgid "Cannot vary frequency on a timer that is already in use" msgstr "Cannot vary frequency on a timer that is already in use" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "Cannot wake on pin edge. Only level." @@ -844,7 +845,7 @@ msgid "Could not initialize SDCard" msgstr "Could not initialise SDCard" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Could not initialise UART" @@ -860,7 +861,7 @@ msgstr "Could not reinit timer" msgid "Could not restart PWM" msgstr "Could not restart PWM" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "Could not retrieve clock" @@ -915,7 +916,7 @@ msgstr "DAC already in use" msgid "Data 0 pin must be byte aligned" msgstr "Data 0 pin must be byte aligned" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "Data 0 pin must be byte aligned." @@ -968,7 +969,8 @@ msgstr "Drive mode not used when direction is input." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB only operates on 16 bytes at a time" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF memory allocation failed" @@ -1047,7 +1049,7 @@ msgstr "FFT is defined for ndarrays only" msgid "FFT is implemented for linear arrays only" msgstr "FFT is implemented for linear arrays only" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "Failed SSL handshake" @@ -1068,7 +1070,7 @@ msgstr "Failed to allocate RX buffer" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1076,11 +1078,11 @@ msgstr "Failed to allocate RX buffer" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Failed to allocate RX buffer of %d bytes" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Failed to allocate WiFi memory" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "Failed to allocate WiFi scan memory" @@ -1097,7 +1099,7 @@ msgstr "Failed to connect: internal error" msgid "Failed to connect: timeout" msgstr "Failed to connect: timeout" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "Failed to init WiFi" @@ -1124,12 +1126,12 @@ msgid "File exists" msgstr "File exists" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filters too complex" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "Firmware image is invalid" @@ -1151,7 +1153,7 @@ msgstr "Frequency must match existing PWMOut using this timer" msgid "Function requires lock" msgstr "Function requires lock" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "Generic Failure" @@ -1224,7 +1226,7 @@ msgstr "Initial set pin direction conflicts with initial out pin direction" msgid "Initial set pin state conflicts with initial out pin state" msgstr "Initial set pin state conflicts with initial out pin state" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "Initialisation failed due to lack of memory" @@ -1237,7 +1239,7 @@ msgstr "Input buffer length (%d) must be a multiple of the strand count (%d)" msgid "Input taking too long" msgstr "Input taking too long" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Input/output error" @@ -1304,7 +1306,7 @@ msgstr "Invalid %q pin selection" msgid "Invalid ADC Unit value" msgstr "Invalid ADC unit value" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c #, fuzzy msgid "Invalid AuthMode" msgstr "Invalid AuthMode" @@ -1322,7 +1324,7 @@ msgstr "Invalid BMP file" msgid "Invalid BSSID" msgstr "Invalid BSSID" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Invalid DAC pin supplied" @@ -1334,18 +1336,18 @@ msgstr "Invalid MIDI file" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Invalid PWM frequency" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "Invalid pin" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Invalid argument" @@ -1364,7 +1366,7 @@ msgid "Invalid byteorder string" msgstr "Invalid byteorder string" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Invalid capture period. Valid range: 1 - 500" @@ -1394,7 +1396,7 @@ msgstr "Invalid file" msgid "Invalid format chunk size" msgstr "Invalid format chunk size" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Invalid frequency" @@ -1413,8 +1415,8 @@ msgstr "Invalid phase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1434,8 +1436,10 @@ msgstr "Invalid pin for right channel" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1462,15 +1466,15 @@ msgstr "Invalid run mode." msgid "Invalid security_mode" msgstr "Invalid security_mode" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "Invalid size" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "Invalid socket for TLS" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "Invalid state" @@ -1507,7 +1511,7 @@ msgstr "Layer already in a group." msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer must be a Group or TileGrid subclass." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "MAC address was invalid" @@ -1594,7 +1598,7 @@ msgstr "Must use a multiple of 6 rgb pins, not %d" msgid "NLR jump failed. Likely memory corruption." msgstr "NLR jump failed. Likely memory corruption." -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS Error" @@ -1627,25 +1631,25 @@ msgstr "No DMA pacing timer found" msgid "No I2C device at address: %x" msgstr "No I2C device at address: %x" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "No MISO pin" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "No MOSI pin" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "No RX pin" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1709,7 +1713,8 @@ msgstr "No network with that ssid" msgid "No out in program" msgstr "No out in program" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1774,11 +1779,11 @@ msgstr "Odd parity is not supported" msgid "Only 8 or 16 bit mono with " msgstr "Only 8 or 16 bit mono with " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "Only IPv4 addresses supported" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "Only IPv4 sockets supported" @@ -1813,11 +1818,11 @@ msgstr "" "Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " "%d bpp given" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "Only one TouchAlarm can be set in deep sleep." -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1828,19 +1833,19 @@ msgstr "Only one alarm.time alarm can be set." msgid "Only one color can be transparent at a time" msgstr "Only one colour can be transparent at a time" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "Operation or feature not supported" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "Operation timed out" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "Out of memory" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Out of sockets" @@ -1881,7 +1886,7 @@ msgstr "PWM slice already in use" msgid "PWM slice channel A already in use" msgstr "PWM slice channel A already in use" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Peripheral in use" @@ -1904,7 +1909,7 @@ msgstr "Pin count too large" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -2011,12 +2016,12 @@ msgstr "RNG init Error" msgid "RS485 Not yet supported on this device" msgstr "RS485 not yet supported on this device" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "RS485 inversion specified when not in RS485 mode" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2048,7 +2053,7 @@ msgstr "Read-only filesystem" msgid "Read-only object" msgstr "Read-only object" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Received response was invalid" @@ -2064,7 +2069,7 @@ msgstr "RemoteTransmissionRequests limited to 8 bytes" msgid "Requested AES mode is unsupported" msgstr "Requested AES mode is unsupported" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "Requested resource not found" @@ -2103,7 +2108,7 @@ msgstr "SPI init error" msgid "SPI Re-initialization error" msgstr "SPI reinitialisation error" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c #, fuzzy msgid "SPI configuration failed" msgstr "SPI configuration failed" @@ -2162,7 +2167,7 @@ msgstr "Slice and value different lengths." msgid "Slices not supported" msgstr "Slices not supported" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "SocketPool can only be used with wifi.radio" @@ -2375,7 +2380,7 @@ msgstr "UUID value is not str, int or byte buffer" msgid "Unable to allocate buffers for signed conversion" msgstr "Unable to allocate buffers for signed conversion" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Unable to create lock" @@ -2409,7 +2414,7 @@ msgstr "Unable to write to sleep_memory." msgid "Unexpected nrfx uuid type" msgstr "Unexpected nrfx uuid type" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "Unhandled ESP TLS error %d %d %x %d" @@ -2452,7 +2457,7 @@ msgstr "" "declined or ignored." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Unsupported baudrate" @@ -2473,7 +2478,7 @@ msgstr "Unsupported operation" msgid "Unsupported pull value." msgstr "Unsupported pull value." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Update failed" @@ -2487,7 +2492,7 @@ msgstr "Value length != required fixed length" msgid "Value length > max_length" msgstr "Value length > max_length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "Version was invalid" @@ -2744,7 +2749,7 @@ msgid "byteorder is not a string" msgstr "Byteorder is not a string" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "Bytes > 8 bits not supported" @@ -3378,7 +3383,7 @@ msgid "index is out of bounds" msgstr "index is out of bounds" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index out of range" @@ -3614,7 +3619,7 @@ msgstr "local variable referenced before assignment" msgid "long int not supported in this build" msgstr "long int not supported in this build" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "loopback + silent mode not supported by peripheral" @@ -4017,7 +4022,7 @@ msgstr "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgid "polygon can only be registered in one parent" msgstr "polygon can only be registered in one parent" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop from an empty PulseIn" @@ -4042,40 +4047,40 @@ msgstr "pow() 3rd argument cannot be 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() with 3 arguments requires integers" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "pressing boot button at start up.\n" @@ -4325,7 +4330,7 @@ msgstr "tile must be greater than zero" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() takes a 9-sequence" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4394,18 +4399,18 @@ msgstr "trapz is defined for 1D iterables" msgid "tuple/list has wrong length" msgstr "tuple/list has wrong length" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "twai_driver_install returned esp-idf error #%d" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "twai_start returned esp-idf error #%d" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx and rx cannot both be None" @@ -4529,7 +4534,7 @@ msgstr "value out of range of target" msgid "value_count must be > 0" msgstr "value_count must be > 0" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "WatchDog not initialised" @@ -4546,7 +4551,7 @@ msgstr "width must be from 2 to 8 (inclusive), not %d" msgid "width must be greater than zero" msgstr "width must be greater than zero" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "WiFi is not enabled" @@ -4582,7 +4587,7 @@ msgstr "wrong output type" msgid "x value out of bounds" msgstr "x value out of bounds" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "xTaskCreate failed" diff --git a/locale/es.po b/locale/es.po index 8907967d4b..381d2bcf57 100644 --- a/locale/es.po +++ b/locale/es.po @@ -150,7 +150,8 @@ msgstr "%q debe ser una cadena" msgid "%q must be a tuple of length 2" msgstr "%q debe ser una tupla de longitud 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "%q debe estar entre %d y %d" @@ -183,7 +184,7 @@ msgstr "%q() toma %d argumentos posicionales pero %d fueron dados" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "%s error 0x%x" @@ -362,7 +363,7 @@ msgstr "tipos de 64 bit" msgid "A hardware interrupt channel is already in use" msgstr "El canal EXTINT ya está siendo utilizado" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 está siendo usado por WiFi" @@ -375,31 +376,31 @@ msgstr "La dirección debe tener %d bytes de largo" msgid "Address type out of range" msgstr "Tipo de dirección fuera de rango" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Todos los periféricos CAN están en uso" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Todos los periféricos I2C están siendo usados" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "Todas las unidades PCNT en uso" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Todos los FIFOs de RX en uso" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Todos los periféricos SPI están siendo usados" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Todos los periféricos UART están siendo usados" @@ -436,10 +437,10 @@ msgstr "Todos los timers para este pin están siendo utilizados" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -460,7 +461,7 @@ msgstr "Ya se tiene un escucha de todas las coincidencias" msgid "Already running" msgstr "Ya está en ejecución" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "Ya se están buscando redes wifi" @@ -537,7 +538,7 @@ msgstr "" "Auto-reload habilitado. Simplemente guarda los archivos via USB para " "ejecutarlos o entra al REPL para desabilitarlos.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "El periférico no maneja el Baudrate" @@ -636,7 +637,7 @@ msgid "Buffer too short by %d bytes" msgstr "Búffer muy corto por %d bytes" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -655,7 +656,7 @@ msgstr "Bytes debe estar entre 0 y 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Los bloques CBC deben ser múltiplos de 16 bytes" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC o suma de comprobación inválida" @@ -663,17 +664,17 @@ msgstr "CRC o suma de comprobación inválida" msgid "Call super().__init__() before accessing native object." msgstr "Llame a super().__init__() antes de acceder al objeto nativo." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "Solo puede alertar en RTC IO de deep sleep." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" "Solo puede alertar en un pin low mientras los otros alertan en high viniendo " "de deep sleep." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "Solo puede alerta en dos low pines viniendo de deep sleep." @@ -717,7 +718,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "No se puede tener ambos canales en el mismo pin" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "No puede hacer pull en un pin de entrada sola." @@ -739,7 +740,7 @@ msgstr "No se puede remountar '/' cuanto se es visible vía USB." msgid "Cannot reset into bootloader because no bootloader is present." msgstr "No se puede reiniciar a bootloader porque no hay bootloader presente." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "No se pueden definir opciones para enchufe" @@ -747,7 +748,7 @@ msgstr "No se pueden definir opciones para enchufe" msgid "Cannot set value when direction is input." msgstr "No se puede asignar un valor cuando la dirección es input." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "No se puede especificar RTS o CTS en modo RS485" @@ -764,7 +765,7 @@ msgstr "No se puede transmitir sin pines MOSI y MISO." msgid "Cannot vary frequency on a timer that is already in use" msgstr "No puede variar la frecuencia en un temporizador que ya está en uso" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "No puede despertar en pin edge, solo en nivel." @@ -831,7 +832,7 @@ msgid "Could not initialize SDCard" msgstr "No se pudo inicializar SDCard" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "No se puede inicializar la UART" @@ -847,7 +848,7 @@ msgstr "No se pudo reiniciar el temporizador" msgid "Could not restart PWM" msgstr "No se pudo reiniciar el PWM" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "No puedo traer el reloj" @@ -902,7 +903,7 @@ msgstr "DAC ya está siendo utilizado" msgid "Data 0 pin must be byte aligned" msgstr "El pin Data 0 debe estar alineado a bytes" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "El pin de datos 0 debe ser alineado a byte." @@ -954,7 +955,8 @@ msgstr "Modo Drive no se usa cuando la dirección es input." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB solo opera sobre 16 bytes a la vez" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "Fallo ESP-IDF al tomar la memoria" @@ -1033,7 +1035,7 @@ msgstr "FFT se define solo para ndarrays" msgid "FFT is implemented for linear arrays only" msgstr "FFT solo esta implementado para arrays lineales" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "Fallo en saludo SSL" @@ -1054,7 +1056,7 @@ msgstr "Ha fallado la asignación del buffer RX" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1062,11 +1064,11 @@ msgstr "Ha fallado la asignación del buffer RX" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Falló la asignación del buffer RX de %d bytes" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Fallo al tomar memoria Wifi" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "Fallo al tomar memoria para búsqueda wifi" @@ -1082,7 +1084,7 @@ msgstr "Error al conectar: error interno" msgid "Failed to connect: timeout" msgstr "Error al conectar: tiempo de espera agotado" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "Fallo al inicializar wifi" @@ -1108,12 +1110,12 @@ msgid "File exists" msgstr "El archivo ya existe" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filtros muy complejos" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "La imagen de firmware es inválida" @@ -1136,7 +1138,7 @@ msgstr "" msgid "Function requires lock" msgstr "La función requiere lock" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "Fallo Genérico" @@ -1214,7 +1216,7 @@ msgstr "" "El estado inicial del pin de configuración esta en conflicto con el estado " "inicial de salida del pin" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "Inicializacion fallida por falta de memoria" @@ -1229,7 +1231,7 @@ msgstr "" msgid "Input taking too long" msgstr "La entrada está durando mucho tiempo" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "error Input/output" @@ -1295,7 +1297,7 @@ msgstr "selección inválida de pin %q" msgid "Invalid ADC Unit value" msgstr "Valor de unidad de ADC no válido" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "AuthMode invalido" @@ -1311,7 +1313,7 @@ msgstr "Archivo BMP inválido" msgid "Invalid BSSID" msgstr "BSSID inválido" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Pin suministrado inválido para DAC" @@ -1322,18 +1324,18 @@ msgstr "Archivo MIDI inválido" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frecuencia PWM inválida" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "Pin inválido" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumento inválido" @@ -1352,7 +1354,7 @@ msgid "Invalid byteorder string" msgstr "Cadena de byteorder inválida" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Inválido periodo de captura. Rango válido: 1 - 500" @@ -1382,7 +1384,7 @@ msgstr "Archivo inválido" msgid "Invalid format chunk size" msgstr "Formato de fragmento de formato no válido" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Frecuencia inválida" @@ -1401,8 +1403,8 @@ msgstr "Fase inválida" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1422,8 +1424,10 @@ msgstr "Pin inválido para canal derecho" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1450,15 +1454,15 @@ msgstr "Modo de ejecución inválido." msgid "Invalid security_mode" msgstr "'security_mode' no válido" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "Tamaño incorrecto" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "socket invalido para TLS" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "Estado invalido" @@ -1495,7 +1499,7 @@ msgstr "La capa ya pertenece a un grupo." msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer debe ser una subclase de Group o TileGrid." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "La dirección MAC es incorrecta" @@ -1585,7 +1589,7 @@ msgstr "Debe usar un múltiplo de 6 pines rgb, no %d" msgid "NLR jump failed. Likely memory corruption." msgstr "Salto NLR falló. Probablemente corrupción de memoria." -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "Error NVS" @@ -1618,25 +1622,25 @@ msgstr "timer por establecedor de paso DMA no encontrado" msgid "No I2C device at address: %x" msgstr "No hay dispositivo I2C en la dirección: %x" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Sin pin MISO" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Sin pin MOSI" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Sin pin RX" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1700,7 +1704,8 @@ msgstr "No hay una red con ese ssid" msgid "No out in program" msgstr "No hay out en el programa" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1764,11 +1769,11 @@ msgstr "Paridad impar no soportada" msgid "Only 8 or 16 bit mono with " msgstr "Solo mono de 8 ó 16 bit con " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "Solo hay capacidad para direcciones IPv4" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "Solo se admiten sockets IPv4" @@ -1801,11 +1806,11 @@ msgstr "" "Solo se admiten BMP monocromáticos, indexados de 4 bpp u 8 bpp y 16 bpp o " "más: %d bpp proporcionados" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "Solamente una TouchAlarm puede ser configurada durante deep sleep." -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1816,19 +1821,19 @@ msgstr "Solamente una alarm.time puede ser configurada." msgid "Only one color can be transparent at a time" msgstr "Solo un color puede ser transparente a la vez" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "Operación no característica no soportada" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "Tiempo de espera agotado" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "Memoria agotada" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Se acabaron los enchufes" @@ -1869,7 +1874,7 @@ msgstr "Segmento PWM ya esta en uso" msgid "PWM slice channel A already in use" msgstr "Segmento del PWM canal A ya esta en uso" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Periférico en uso" @@ -1891,7 +1896,7 @@ msgstr "Total de pines demasiado grande" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -2000,12 +2005,12 @@ msgstr "Error de inicialización de RNG" msgid "RS485 Not yet supported on this device" msgstr "RS485 no esta soportado todavía en este dispositivo" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "Se especifica inversión de RS485 si no está en modo RS485" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2037,7 +2042,7 @@ msgstr "Sistema de archivos de solo-Lectura" msgid "Read-only object" msgstr "Objeto de solo-lectura" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "La respuesta recibida es invalida" @@ -2053,7 +2058,7 @@ msgstr "RemoteTransmissionRequests limitado a 8 bytes" msgid "Requested AES mode is unsupported" msgstr "El modo AES solicitado no es compatible" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "Recurso solicitado no encontrado" @@ -2092,7 +2097,7 @@ msgstr "Error de inicio de SPI" msgid "SPI Re-initialization error" msgstr "Error de reinicialización de SPI" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "Configuración de SPI fallida" @@ -2149,7 +2154,7 @@ msgstr "Slice y value tienen tamaños diferentes." msgid "Slices not supported" msgstr "Rebanadas no soportadas" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "SocketPool solo se puede usar con wifi.radio" @@ -2356,7 +2361,7 @@ msgstr "UUID valor no es un str, int o byte buffer" msgid "Unable to allocate buffers for signed conversion" msgstr "No se pudieron asignar buffers para la conversión con signo" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "No se puede crear bloqueo" @@ -2390,7 +2395,7 @@ msgstr "Imposible de escribir en sleep_memory." msgid "Unexpected nrfx uuid type" msgstr "Tipo de uuid nrfx inesperado" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "Error no manejado de ESP TLS %d %d %x %d" @@ -2433,7 +2438,7 @@ msgstr "" "dispositivo fue denegada o ignorada." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Baudrate no soportado" @@ -2454,7 +2459,7 @@ msgstr "Operación no soportada" msgid "Unsupported pull value." msgstr "valor pull no soportado." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "La actualización fallo" @@ -2468,7 +2473,7 @@ msgstr "Tamaño del valor != del tamaño fijo requerido" msgid "Value length > max_length" msgstr "Tamaño de valor > max_length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "La versión era invalida" @@ -2723,7 +2728,7 @@ msgid "byteorder is not a string" msgstr "byteorder no es una cadena" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "bytes > 8 bits no soportados" @@ -3344,7 +3349,7 @@ msgid "index is out of bounds" msgstr "el índice está fuera de límites" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index fuera de rango" @@ -3578,7 +3583,7 @@ msgstr "variable local referenciada antes de la asignación" msgid "long int not supported in this build" msgstr "long int no soportado en esta compilación" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "Loopback + modo silencioso no están soportados por periférico" @@ -3973,7 +3978,7 @@ msgstr "pixel_shader debe ser displayio.Palette o displayio.ColorConverter" msgid "polygon can only be registered in one parent" msgstr "el polígono solo se puede registrar en uno de los padres" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop de un PulseIn vacío" @@ -3998,40 +4003,40 @@ msgstr "el 3er argumento de pow() no puede ser 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() con 3 argumentos requiere enteros" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "presionando botón de arranque al inicio.\n" @@ -4275,7 +4280,7 @@ msgstr "tile debe sera mas grande que cero" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() toma un sequencio 9" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4343,18 +4348,18 @@ msgstr "trapz está definido para iterables 1D" msgid "tuple/list has wrong length" msgstr "tupla/lista tiene una longitud incorrecta" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "twai_driver_install devolvió esp-idf error #%d" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "twai_start devolvió esp-idf error #%d" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "Ambos tx y rx no pueden ser None" @@ -4477,7 +4482,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "value_count debe ser > 0" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "watchdog no inicializado" @@ -4494,7 +4499,7 @@ msgstr "ancho debe estar entre 2 y 8 (inclusivamente), no %d" msgid "width must be greater than zero" msgstr "el ancho debe ser mayor que cero" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "wifi no esta habilitado" @@ -4530,7 +4535,7 @@ msgstr "tipo de salida incorrecta" msgid "x value out of bounds" msgstr "valor x fuera de límites" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "fallo en xTaskCreate" diff --git a/locale/fil.po b/locale/fil.po index 2e94810632..6decbd47f8 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -141,7 +141,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -176,7 +177,7 @@ msgstr "" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -355,7 +356,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "Isang channel ng hardware interrupt ay ginagamit na" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "" @@ -368,31 +369,31 @@ msgstr "ang palette ay dapat 32 bytes ang haba" msgid "Address type out of range" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Lahat ng I2C peripherals ginagamit" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Lahat ng SPI peripherals ay ginagamit" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c #, fuzzy msgid "All UART peripherals are in use" @@ -428,10 +429,10 @@ msgstr "Lahat ng timers para sa pin na ito ay ginagamit" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -452,7 +453,7 @@ msgstr "" msgid "Already running" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -529,7 +530,7 @@ msgstr "" "Ang awtomatikong pag re-reload ay ON. i-save lamang ang mga files sa USB " "para patakbuhin sila o pasukin ang REPL para i-disable ito.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -627,7 +628,7 @@ msgid "Buffer too short by %d bytes" msgstr "" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, fuzzy, c-format @@ -647,7 +648,7 @@ msgstr "Sa gitna ng 0 o 255 dapat ang bytes." msgid "CBC blocks must be multiples of 16 bytes" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -655,15 +656,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -706,7 +707,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Hindi maaaring output ang mga parehong channel sa parehong pin" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -728,7 +729,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "Hindi ma-reset sa bootloader dahil walang bootloader." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -736,7 +737,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "Hindi ma i-set ang value kapag ang direksyon ay input." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "" @@ -753,7 +754,7 @@ msgstr "Hindi maaaring ilipat kapag walang MOSI at MISO pin." msgid "Cannot vary frequency on a timer that is already in use" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -819,7 +820,7 @@ msgid "Could not initialize SDCard" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Hindi ma-initialize ang UART" @@ -835,7 +836,7 @@ msgstr "" msgid "Could not restart PWM" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -891,7 +892,7 @@ msgstr "Ginagamit na ang DAC" msgid "Data 0 pin must be byte aligned" msgstr "graphic ay dapat 2048 bytes ang haba" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -944,7 +945,8 @@ msgstr "Drive mode ay hindi ginagamit kapag ang direksyon ay input." msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1025,7 +1027,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1046,7 +1048,7 @@ msgstr "Nabigong ilaan ang RX buffer" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1054,11 +1056,11 @@ msgstr "Nabigong ilaan ang RX buffer" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Nabigong ilaan ang RX buffer ng %d bytes" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1074,7 +1076,7 @@ msgstr "" msgid "Failed to connect: timeout" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1100,12 +1102,12 @@ msgid "File exists" msgstr "Mayroong file" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1127,7 +1129,7 @@ msgstr "" msgid "Function requires lock" msgstr "Function nangangailangan ng lock" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1200,7 +1202,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1213,7 +1215,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "May mali sa Input/Output" @@ -1279,7 +1281,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1295,7 +1297,7 @@ msgstr "Mali ang BMP file" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1306,18 +1308,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Mali ang PWM frequency" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Maling argumento" @@ -1336,7 +1338,7 @@ msgid "Invalid byteorder string" msgstr "" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "" @@ -1366,7 +1368,7 @@ msgstr "Mali ang file" msgid "Invalid format chunk size" msgstr "Mali ang format ng chunk size" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "" @@ -1385,8 +1387,8 @@ msgstr "Mali ang phase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1406,8 +1408,10 @@ msgstr "Mali ang pin para sa kanang channel" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1434,15 +1438,15 @@ msgstr "Mali ang run mode." msgid "Invalid security_mode" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1479,7 +1483,7 @@ msgstr "" msgid "Layer must be a Group or TileGrid subclass." msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1565,7 +1569,7 @@ msgstr "" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1598,25 +1602,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Walang RX pin" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1680,7 +1684,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1745,11 +1750,11 @@ msgstr "Odd na parity ay hindi supportado" msgid "Only 8 or 16 bit mono with " msgstr "Tanging 8 o 16 na bit mono na may " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1778,11 +1783,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1793,19 +1798,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1845,7 +1850,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1867,7 +1872,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1970,12 +1975,12 @@ msgstr "" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2008,7 +2013,7 @@ msgstr "Basahin-lamang mode" msgid "Read-only object" msgstr "Basahin-lamang" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2024,7 +2029,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2062,7 +2067,7 @@ msgstr "" msgid "SPI Re-initialization error" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2119,7 +2124,7 @@ msgstr "Slice at value iba't ibang haba." msgid "Slices not supported" msgstr "Hindi suportado ang Slices" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2316,7 +2321,7 @@ msgstr "" msgid "Unable to allocate buffers for signed conversion" msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2351,7 +2356,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "hindi inaasahang indent" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2392,7 +2397,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Hindi supportadong baudrate" @@ -2414,7 +2419,7 @@ msgstr "Hindi sinusuportahang operasyon" msgid "Unsupported pull value." msgstr "Hindi suportado ang pull value." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2428,7 +2433,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2679,7 +2684,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "hindi sinusuportahan ang bytes > 8 bits" @@ -3305,7 +3310,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index wala sa sakop" @@ -3540,7 +3545,7 @@ msgstr "local variable na reference bago na i-assign" msgid "long int not supported in this build" msgstr "long int hindi sinusuportahan sa build na ito" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3933,7 +3938,7 @@ msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop mula sa walang laman na PulseIn" @@ -3958,40 +3963,40 @@ msgstr "pow() 3rd argument ay hindi maaring 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() na may 3 argumento kailangan ng integers" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4236,7 +4241,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() kumukuha ng 9-sequence" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4304,18 +4309,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "mali ang haba ng tuple/list" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx at rx hindi pwedeng parehas na None" @@ -4438,7 +4443,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4455,7 +4460,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4492,7 +4497,7 @@ msgstr "" msgid "x value out of bounds" msgstr "wala sa sakop ang address" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 2aab5490ca..b3d4dad714 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -150,7 +150,8 @@ msgstr "%q doit être une chaîne de caractères" msgid "%q must be a tuple of length 2" msgstr "%q doit être un tuple de longueur 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -183,7 +184,7 @@ msgstr "%q() prend %d paramètres positionnels mais %d ont été donnés" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "%s erreur 0x%x" @@ -362,7 +363,7 @@ msgstr "types à 64 bit" msgid "A hardware interrupt channel is already in use" msgstr "Un canal d'interruptions matériel est déjà utilisé" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 est utilisé pars le Wifi" @@ -375,31 +376,31 @@ msgstr "L'adresse doit être longue de %d octets" msgid "Address type out of range" msgstr "Type d'adresse hors portée" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Tous les périphériques CAN sont utilisés" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Tous les périphériques I2C sont utilisés" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "Toutes les unités PCNT sont utilisées" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Tout les RX FIFOs sont utilisé" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Tous les périphériques SPI sont utilisés" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Tous les périphériques UART sont utilisés" @@ -434,10 +435,10 @@ msgstr "Tous les minuteurs pour cette broche sont utilisés" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -458,7 +459,7 @@ msgstr "Il y a déjà un auditeur all-matches" msgid "Already running" msgstr "Déjà en cours d'exécution" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "Déjà à la recherche des réseaux wifi" @@ -539,7 +540,7 @@ msgstr "" "Auto-chargement activé. Copiez ou sauvegardez les fichiers via USB pour les " "lancer ou démarrez le REPL pour le désactiver.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "Baudrate non supporté par le périphérique" @@ -637,7 +638,7 @@ msgid "Buffer too short by %d bytes" msgstr "Tampon trop court de %d octets" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -656,7 +657,7 @@ msgstr "Les octets 'bytes' doivent être entre 0 et 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Les blocs CBC doivent être des multiples de 16 octets" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC ou somme de contrôle invalide" @@ -664,17 +665,17 @@ msgstr "CRC ou somme de contrôle invalide" msgid "Call super().__init__() before accessing native object." msgstr "Appelez super().__init__() avant d'accéder à l'objet natif." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "L'alarme peut seulement être depuis TRC IO depuis le someil profond." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" "L'alarme peut seulement être sur une broche basse tandis que d'autres " "alarment sont sur des broches hautes depuis le someil profond." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" "L'alarme peut seulement être sur deux broches basses depuis le someil " @@ -721,7 +722,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Les 2 canaux de sortie ne peuvent être sur la même broche" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "Ne peut tirer ('pull') sur une broche d'entrée ('input') seule." @@ -744,7 +745,7 @@ msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" "Ne peut être redémarré vers le bootloader car il n'y a pas de bootloader." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "Ne peut définir les options de socket" @@ -753,7 +754,7 @@ msgid "Cannot set value when direction is input." msgstr "" "Impossible d'affecter une valeur quand la direction est entrante ('input')." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "Impossible de spécifier RTS ou CTS en mode RS485" @@ -770,7 +771,7 @@ msgstr "Pas de transfert sans broches MOSI et MISO." msgid "Cannot vary frequency on a timer that is already in use" msgstr "Impossible de faire varier la fréquence sur un minuteur déjà utilisée" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "Ne peut reveillé sur le board de broche. Seuleument à niveau." @@ -837,7 +838,7 @@ msgid "Could not initialize SDCard" msgstr "Impossible d'initialiser la carte SD" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Impossible d'initialiser UART" @@ -853,7 +854,7 @@ msgstr "Impossible de réinitialiser le minuteur" msgid "Could not restart PWM" msgstr "Impossible de redémarrer PWM" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "Impossible d’obtenir l’horloge" @@ -908,7 +909,7 @@ msgstr "DAC déjà utilisé" msgid "Data 0 pin must be byte aligned" msgstr "La broche 'Data 0' doit être aligné sur l'octet" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "La broche Data 0 doit être aligné sur l'octet." @@ -960,7 +961,8 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "La BCE ne fonctionne que sur 16 octets à la fois" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF échec d'allocation de la mémoire" @@ -1040,7 +1042,7 @@ msgstr "La FFT est définie uniquement pour les ndarrays" msgid "FFT is implemented for linear arrays only" msgstr "FFT n'est implémenté que pour les matrices linéaires" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "Échec du handshake SSL" @@ -1061,7 +1063,7 @@ msgstr "Echec de l'allocation du tampon RX" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1069,11 +1071,11 @@ msgstr "Echec de l'allocation du tampon RX" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Echec de l'allocation de %d octets du tampon RX" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Impossible d’allouer la mémoire pour Wifi" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "Impossible d'allouer la mémoire pour le scan wifi" @@ -1089,7 +1091,7 @@ msgstr "Impossible de se connecter : erreur interne" msgid "Failed to connect: timeout" msgstr "Impossible de se connecter: délai dépassé" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "Echec de l'initialisation du Wifi" @@ -1115,12 +1117,12 @@ msgid "File exists" msgstr "Le fichier existe" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filtres trop complexe" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "Image du microprogramme est invalide" @@ -1144,7 +1146,7 @@ msgstr "" msgid "Function requires lock" msgstr "La fonction nécessite un verrou ('lock')" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "Échec génerique" @@ -1220,7 +1222,7 @@ msgid "Initial set pin state conflicts with initial out pin state" msgstr "" "État initial de \"set pin\" est en conflit avec l'état initial de \"out pin\"" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "Échec d'initialisation par manque de mémoire" @@ -1235,7 +1237,7 @@ msgstr "" msgid "Input taking too long" msgstr "L'entrée prend trop de temps" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Erreur d'entrée/sortie" @@ -1305,7 +1307,7 @@ msgstr "Sélection de broche %q invalide" msgid "Invalid ADC Unit value" msgstr "Valeur d'unité ADC non valide" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "AuthMode invalide" @@ -1321,7 +1323,7 @@ msgstr "Fichier BMP invalide" msgid "Invalid BSSID" msgstr "BSSID invalide" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Broche DAC non valide fournie" @@ -1332,18 +1334,18 @@ msgstr "Fichier MIDI invalide" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Fréquence de PWM invalide" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "Broche invalide" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Paramètre invalide" @@ -1362,7 +1364,7 @@ msgid "Invalid byteorder string" msgstr "Chaîne byteorder non valide" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Période de capture invalide. Portée valide : 1 à 500" @@ -1392,7 +1394,7 @@ msgstr "Fichier invalide" msgid "Invalid format chunk size" msgstr "Taille de bloc de formatage invalide" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Fréquence non valide" @@ -1411,8 +1413,8 @@ msgstr "Phase invalide" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1432,8 +1434,10 @@ msgstr "Broche invalide pour le canal droit" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1460,15 +1464,15 @@ msgstr "Mode de lancement invalide." msgid "Invalid security_mode" msgstr "'security_mode' invalide" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "Taille invalide" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "Socket non valide pour TLS" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "État invalide" @@ -1505,7 +1509,7 @@ msgstr "Couche déjà dans un groupe." msgid "Layer must be a Group or TileGrid subclass." msgstr "'Layer' doit être un 'Group' ou une sous-classe 'TileGrid'." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "Adresse physique (MAC) invalide" @@ -1593,7 +1597,7 @@ msgstr "Doit utiliser un multiple de 6 broches RVB, pas %d" msgid "NLR jump failed. Likely memory corruption." msgstr "Saut NLR échoué. Corruption de mémoire probable." -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "Erreur NVS" @@ -1626,25 +1630,25 @@ msgstr "Aucun minuteur de rythme DMA trouvé" msgid "No I2C device at address: %x" msgstr "Pas de dispositif I2C à l'adresse : %x" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Pas de broche MISO" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Pas de broche MOSI" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Pas de broche RX" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1708,7 +1712,8 @@ msgstr "Aucun réseau avec ce ssid" msgid "No out in program" msgstr "Aucun out dans le programme" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1772,11 +1777,11 @@ msgstr "Parité impaire non supportée" msgid "Only 8 or 16 bit mono with " msgstr "Uniquement 8 ou 16 bit mono avec " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "Seulement les adresses IPv4 sont supportées" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "Seulement les sockets IPv4 sont supportés" @@ -1809,11 +1814,11 @@ msgstr "" "Seulement les BMP monochromes, 4 bpp ou 8 bpp, ou 16 bpp et plus sont " "supportés: %d bpp fournis" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "Seulement une TouchAlarm peu être réglée en someil profond." -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1824,19 +1829,19 @@ msgstr "Seulement une alarme alarm.time peut être réglée." msgid "Only one color can be transparent at a time" msgstr "Une seule couleur peut être transparente à la fois" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "Opération ou fonction non supportée" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "Timeout de l'opération" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "Hors de mémoire" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Plus de sockets" @@ -1879,7 +1884,7 @@ msgstr "PWM slice déja utilisée" msgid "PWM slice channel A already in use" msgstr "Canal A de PWM slice est utilisé" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Périphérique en utilisation" @@ -1901,7 +1906,7 @@ msgstr "Nombre de broches trop élevé" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -2010,12 +2015,12 @@ msgstr "Erreur d'initialisation du RNG" msgid "RS485 Not yet supported on this device" msgstr "RS485 n'est pas encore supporté sur cet appareil" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "Inversion RS485 spécifiée sans être en mode RS485" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2047,7 +2052,7 @@ msgstr "Système de fichier en lecture seule" msgid "Read-only object" msgstr "Objet en lecture seule" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Réponse reçue invalide" @@ -2063,7 +2068,7 @@ msgstr "RemoteTransmissionRequests limité à 8 octets" msgid "Requested AES mode is unsupported" msgstr "Le mode AES demandé n'est pas supporté" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "Resource demandée non trouvée" @@ -2101,7 +2106,7 @@ msgstr "Erreur d'initialisation SPI" msgid "SPI Re-initialization error" msgstr "Erreur de réinitialisation SPI" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2158,7 +2163,7 @@ msgstr "Tranche et valeur de tailles différentes." msgid "Slices not supported" msgstr "Tranches non supportées" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "SocketPool ne s'utilise qu'avec wifi.radio" @@ -2359,7 +2364,7 @@ msgstr "" msgid "Unable to allocate buffers for signed conversion" msgstr "Impossible d'allouer des tampons pour une conversion signée" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Impossible de créer un verrou ('lock')" @@ -2393,7 +2398,7 @@ msgstr "Écriture impossible vers sleep_memory." msgid "Unexpected nrfx uuid type" msgstr "Type inattendu pour l'uuid nrfx" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "Erreur ESP TLS non gérée %d %d %x %d" @@ -2437,7 +2442,7 @@ msgstr "" "appareil ait été refusée ou ignorée." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Débit en bauds non supporté" @@ -2458,7 +2463,7 @@ msgstr "Opération non supportée" msgid "Unsupported pull value." msgstr "Valeur de tirage 'pull' non supportée." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Mise-à-jour échouée" @@ -2472,7 +2477,7 @@ msgstr "Longueur de valeur != Longueur fixe requise" msgid "Value length > max_length" msgstr "Longueur de la valeur > max_length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "Version est invalide" @@ -2725,7 +2730,7 @@ msgid "byteorder is not a string" msgstr "byteorder n'est pas une chaîne" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "octets > 8 bits non supporté" @@ -3352,7 +3357,7 @@ msgid "index is out of bounds" msgstr "l'index est hors limites" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index est hors bornes" @@ -3588,7 +3593,7 @@ msgstr "variable locale référencée avant d'être assignée" msgid "long int not supported in this build" msgstr "entiers longs non supportés dans cette build" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "loopback + silent mode non pris en charge par le périphérique" @@ -3984,7 +3989,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "le polygone ne peut être enregistré que dans un parent" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "'pop' d'une entrée PulseIn vide" @@ -4009,40 +4014,40 @@ msgstr "le 3e argument de pow() ne peut être 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() avec 3 arguments nécessite des entiers" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "bouton boot appuyé lors du démarrage.\n" @@ -4287,7 +4292,7 @@ msgstr "tile doit être plus que zéro" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() prend une séquence de longueur 9" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4354,18 +4359,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "tuple/liste a une mauvaise longueur" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "twai_driver_install a renvoyé l'erreur esp-idf #%d" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "twai_start a renvoyé l'erreur esp-idf #%d" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx et rx ne peuvent être 'None' tous les deux" @@ -4488,7 +4493,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "'value_count' doit être > 0" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "chien de garde (watchdog) non initialisé" @@ -4505,7 +4510,7 @@ msgstr "width doit être entre 2 et 8 (inclusivement), non %d" msgid "width must be greater than zero" msgstr "width doit être plus que zero" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "wifi n’est pas activé" @@ -4541,7 +4546,7 @@ msgstr "type de sortie incorrect" msgid "x value out of bounds" msgstr "valeur x hors limites" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "Échec de xTaskCreate" diff --git a/locale/hi.po b/locale/hi.po index 18d13e1d7c..a58cd097ba 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -139,7 +139,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -172,7 +173,7 @@ msgstr "" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -351,7 +352,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "" @@ -364,31 +365,31 @@ msgstr "" msgid "Address type out of range" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "" @@ -423,10 +424,10 @@ msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -447,7 +448,7 @@ msgstr "" msgid "Already running" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -522,7 +523,7 @@ msgid "" "disable.\n" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -620,7 +621,7 @@ msgid "Buffer too short by %d bytes" msgstr "" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -639,7 +640,7 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -647,15 +648,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -697,7 +698,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -719,7 +720,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -727,7 +728,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "" @@ -744,7 +745,7 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -809,7 +810,7 @@ msgid "Could not initialize SDCard" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "" @@ -825,7 +826,7 @@ msgstr "" msgid "Could not restart PWM" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -880,7 +881,7 @@ msgstr "" msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -931,7 +932,8 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1010,7 +1012,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1031,7 +1033,7 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1039,11 +1041,11 @@ msgstr "" msgid "Failed to allocate RX buffer of %d bytes" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1059,7 +1061,7 @@ msgstr "" msgid "Failed to connect: timeout" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1085,12 +1087,12 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1112,7 +1114,7 @@ msgstr "" msgid "Function requires lock" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1183,7 +1185,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1196,7 +1198,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "" @@ -1262,7 +1264,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1278,7 +1280,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1289,18 +1291,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1319,7 +1321,7 @@ msgid "Invalid byteorder string" msgstr "" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "" @@ -1349,7 +1351,7 @@ msgstr "" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "" @@ -1368,8 +1370,8 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1389,8 +1391,10 @@ msgstr "" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1417,15 +1421,15 @@ msgstr "" msgid "Invalid security_mode" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1462,7 +1466,7 @@ msgstr "" msgid "Layer must be a Group or TileGrid subclass." msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1548,7 +1552,7 @@ msgstr "" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1581,25 +1585,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1663,7 +1667,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1725,11 +1730,11 @@ msgstr "" msgid "Only 8 or 16 bit mono with " msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1758,11 +1763,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1773,19 +1778,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1824,7 +1829,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1846,7 +1851,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1949,12 +1954,12 @@ msgstr "" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -1986,7 +1991,7 @@ msgstr "" msgid "Read-only object" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2002,7 +2007,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2040,7 +2045,7 @@ msgstr "" msgid "SPI Re-initialization error" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2097,7 +2102,7 @@ msgstr "" msgid "Slices not supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2294,7 +2299,7 @@ msgstr "" msgid "Unable to allocate buffers for signed conversion" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2328,7 +2333,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2369,7 +2374,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "" @@ -2390,7 +2395,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2404,7 +2409,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2648,7 +2653,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "" @@ -3262,7 +3267,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3493,7 +3498,7 @@ msgstr "" msgid "long int not supported in this build" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3884,7 +3889,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "" @@ -3909,40 +3914,40 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4184,7 +4189,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4251,18 +4256,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "" @@ -4385,7 +4390,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4402,7 +4407,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4438,7 +4443,7 @@ msgstr "" msgid "x value out of bounds" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index db2f1938e5..029871f3ae 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -149,7 +149,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "%q deve essere una tupla di lunghezza 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -182,7 +183,7 @@ msgstr "%q() prende %d argomenti posizionali ma ne sono stati forniti %d" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "%s errore 0x%x" @@ -362,7 +363,7 @@ msgstr "Tipo 64 bits" msgid "A hardware interrupt channel is already in use" msgstr "Un canale di interruzione hardware è già in uso" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 sta usando il WiFi" @@ -375,31 +376,31 @@ msgstr "L'indirizzo deve essere lungo %d byte" msgid "Address type out of range" msgstr "Tipo di indirizzo fuori intervallo" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Tutte le periferiche CAN sono in uso" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Tutte le periferiche I2C sono in uso" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "Tutte le unità PCNT sono in uso" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Tutte le RX FIFO sono in uso" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Tutte le periferiche SPI sono in uso" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c #, fuzzy msgid "All UART peripherals are in use" @@ -435,10 +436,10 @@ msgstr "Tutti i timer per questo pin sono in uso" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -459,7 +460,7 @@ msgstr "Già in possesso di tutti i listener abbinati" msgid "Already running" msgstr "Già in funzione" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "Già in ricerca di collegamenti WiFi" @@ -536,7 +537,7 @@ msgstr "" "L'auto-reload è attivo. Salva i file su USB per eseguirli o entra nel REPL " "per disabilitarlo.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -635,7 +636,7 @@ msgid "Buffer too short by %d bytes" msgstr "Buffer troppo piccolo di %d bytes" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -654,7 +655,7 @@ msgstr "I byte devono essere compresi tra 0 e 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "I blocchi CBC devono essere multipli di 16 bytes" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC o controllo totale è risultato non valido" @@ -662,15 +663,15 @@ msgstr "CRC o controllo totale è risultato non valido" msgid "Call super().__init__() before accessing native object." msgstr "Chiama super().__init__() prima di accedere ad un oggetto nativo." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -713,7 +714,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Impossibile dare in output entrambi i canal sullo stesso pin" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -736,7 +737,7 @@ msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" "Impossibile resettare nel bootloader poiché nessun bootloader è presente." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -744,7 +745,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "non si può impostare un valore quando direzione è input" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "" @@ -761,7 +762,7 @@ msgstr "Impossibile trasferire senza i pin MOSI e MISO." msgid "Cannot vary frequency on a timer that is already in use" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -827,7 +828,7 @@ msgid "Could not initialize SDCard" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Impossibile inizializzare l'UART" @@ -843,7 +844,7 @@ msgstr "" msgid "Could not restart PWM" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -899,7 +900,7 @@ msgstr "DAC già in uso" msgid "Data 0 pin must be byte aligned" msgstr "graphic deve essere lunga 2048 byte" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -951,7 +952,8 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1032,7 +1034,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1053,7 +1055,7 @@ msgstr "Impossibile allocare buffer RX" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1061,11 +1063,11 @@ msgstr "Impossibile allocare buffer RX" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Fallita allocazione del buffer RX di %d byte" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1081,7 +1083,7 @@ msgstr "" msgid "Failed to connect: timeout" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1107,12 +1109,12 @@ msgid "File exists" msgstr "File esistente" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1134,7 +1136,7 @@ msgstr "" msgid "Function requires lock" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1207,7 +1209,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1220,7 +1222,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Errore input/output" @@ -1286,7 +1288,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1302,7 +1304,7 @@ msgstr "File BMP non valido" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1313,18 +1315,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frequenza PWM non valida" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argomento non valido" @@ -1344,7 +1346,7 @@ msgid "Invalid byteorder string" msgstr "" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "periodo di cattura invalido. Zona valida: 1 - 500" @@ -1375,7 +1377,7 @@ msgstr "File non valido" msgid "Invalid format chunk size" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "" @@ -1394,8 +1396,8 @@ msgstr "Fase non valida" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1415,8 +1417,10 @@ msgstr "Pin non valido per il canale destro" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1443,15 +1447,15 @@ msgstr "Modalità di esecuzione non valida." msgid "Invalid security_mode" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1489,7 +1493,7 @@ msgstr "" msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer deve essere un Group o TileGrid subclass" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1576,7 +1580,7 @@ msgstr "" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1609,25 +1613,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Nessun pin RX" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1691,7 +1695,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1757,11 +1762,11 @@ msgstr "operazione I2C non supportata" msgid "Only 8 or 16 bit mono with " msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1790,11 +1795,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1805,19 +1810,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1861,7 +1866,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1883,7 +1888,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1987,12 +1992,12 @@ msgstr "" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2025,7 +2030,7 @@ msgstr "Filesystem in sola lettura" msgid "Read-only object" msgstr "Sola lettura" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2041,7 +2046,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2079,7 +2084,7 @@ msgstr "" msgid "SPI Re-initialization error" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2138,7 +2143,7 @@ msgstr "" msgid "Slices not supported" msgstr "Slice non supportate" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2335,7 +2340,7 @@ msgstr "" msgid "Unable to allocate buffers for signed conversion" msgstr "Ipossibilitato ad allocare buffer per la conversione con segno" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2370,7 +2375,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "indentazione inaspettata" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2411,7 +2416,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "baudrate non supportato" @@ -2433,7 +2438,7 @@ msgstr "Operazione non supportata" msgid "Unsupported pull value." msgstr "Valore di pull non supportato." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2447,7 +2452,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2694,7 +2699,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "byte > 8 bit non supportati" @@ -3316,7 +3321,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "indice fuori intervallo" @@ -3552,7 +3557,7 @@ msgstr "variabile locale richiamata prima di un assegnamento" msgid "long int not supported in this build" msgstr "long int non supportata in questa build" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3949,7 +3954,7 @@ msgstr "pixel_shader deve essere displayio.Palette o displayio.ColorConverter" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop sun un PulseIn vuoto" @@ -3974,40 +3979,40 @@ msgstr "il terzo argomento di pow() non può essere 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() con 3 argomenti richiede interi" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4252,7 +4257,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4320,18 +4325,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "tupla/lista ha la lunghezza sbagliata" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx e rx non possono essere entrambi None" @@ -4454,7 +4459,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4471,7 +4476,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4508,7 +4513,7 @@ msgstr "" msgid "x value out of bounds" msgstr "indirizzo fuori limite" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 8e16828164..e831d55d4f 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -144,7 +144,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "%qは長さ2のタプルでなければなりません" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -177,7 +178,7 @@ msgstr "%q() は %d 個の位置引数を取りますが、%d 個与えられま msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -356,7 +357,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "ハードウェア割り込みチャネルは使用中" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "" @@ -369,31 +370,31 @@ msgstr "アドレスは、%dバイト長でなければなりません" msgid "Address type out of range" msgstr "address_typeが範囲外" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "全てのCAN周辺機器が使用中" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "全てのI2C周辺機器が使用中" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "全てのRX FIFOが使用中" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "全てのSPI周辺機器が使用中" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "全てのUART周辺機器が使用中" @@ -428,10 +429,10 @@ msgstr "このピン用の全てのタイマが使用中" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -452,7 +453,7 @@ msgstr "" msgid "Already running" msgstr "すでに実行中" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -529,7 +530,7 @@ msgstr "" "オートリロードがオンです。ファイルをUSB経由で保存するだけで実行できます。REPL" "に入ると無効化します。\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -627,7 +628,7 @@ msgid "Buffer too short by %d bytes" msgstr "バッファが %d バイト足りません" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -646,7 +647,7 @@ msgstr "バイト値は0から255の間でなければなりません" msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBCブロックは16バイトの整数倍でなければなりません" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -656,15 +657,15 @@ msgstr "" "ネイティブオブジェクトにアクセスする前にsuper().__init__()を呼び出してくださ" "い" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -706,7 +707,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "同じピン上の両チャネルに出力できません" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -728,7 +729,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "ブートローダが存在しないためブートローダへとリセットできません" -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -736,7 +737,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "方向がinputのときは値を設定できません" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "RS485モードにRTSまたはCTSを指定できません" @@ -753,7 +754,7 @@ msgstr "MOSIピンとMISOピンなしに転送できません" msgid "Cannot vary frequency on a timer that is already in use" msgstr "使用中のタイマー上では周波数を変えられません" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -818,7 +819,7 @@ msgid "Could not initialize SDCard" msgstr "SDカードを初期化できません" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "UARTを初期化できません" @@ -834,7 +835,7 @@ msgstr "タイマーを再初期化できません" msgid "Could not restart PWM" msgstr "PWMを再スタートできません" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -889,7 +890,7 @@ msgstr "DACはすでに使用中" msgid "Data 0 pin must be byte aligned" msgstr "Data 0 ピンは、バイト整列されていなければなりません" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -940,7 +941,8 @@ msgstr "方向がinputのときドライブモードは使われません" msgid "ECB only operates on 16 bytes at a time" msgstr "ECBは一度に16バイトの演算のみを行います" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1019,7 +1021,7 @@ msgstr "FFTはndarrayでのみ使えます" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1040,7 +1042,7 @@ msgstr "RXバッファの確保に失敗" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1048,11 +1050,11 @@ msgstr "RXバッファの確保に失敗" msgid "Failed to allocate RX buffer of %d bytes" msgstr "%dバイトのRXバッファの確保に失敗" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Wi-Fiのメモリの確保に失敗" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1068,7 +1070,7 @@ msgstr "接続失敗: 内部エラー" msgid "Failed to connect: timeout" msgstr "接続失敗: タイムアウト" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1094,12 +1096,12 @@ msgid "File exists" msgstr "ファイルが存在します" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1121,7 +1123,7 @@ msgstr "このタイマーを使う既存のPWMOutと周波数を一致させる msgid "Function requires lock" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1194,7 +1196,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1207,7 +1209,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "入力/出力エラー" @@ -1273,7 +1275,7 @@ msgstr "不正な%qピン選択" msgid "Invalid ADC Unit value" msgstr "不正なADCユニット値" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1289,7 +1291,7 @@ msgstr "不正なBMPファイル" msgid "Invalid BSSID" msgstr "不正なBSSID" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "不正なDACピンが与えられました" @@ -1300,18 +1302,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "無効なPWM周波数" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "不正な引数" @@ -1330,7 +1332,7 @@ msgid "Invalid byteorder string" msgstr "不正なバイトオーダー文字列" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "不正なキャプチャ周期。有効な周期は1-500" @@ -1360,7 +1362,7 @@ msgstr "不正なファイル" msgid "Invalid format chunk size" msgstr "フォーマットチャンクのサイズが不正" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "不正な周波数" @@ -1379,8 +1381,8 @@ msgstr "不正なphase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1400,8 +1402,10 @@ msgstr "右チャネルのピンが不正" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1428,15 +1432,15 @@ msgstr "不正なrun mode" msgid "Invalid security_mode" msgstr "不正なsecurity_mode" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1473,7 +1477,7 @@ msgstr "レイヤはすでにグループに含まれています" msgid "Layer must be a Group or TileGrid subclass." msgstr "レイヤはGroupかTileGridのサブクラスでなければなりません" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1559,7 +1563,7 @@ msgstr "%d個でなく6の倍数個のrgbピンを使ってください" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1592,25 +1596,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "MISOピンなし" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "MOSIピンがありません" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "RXピンがありません" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1674,7 +1678,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1738,11 +1743,11 @@ msgstr "奇数パリティには対応していません" msgid "Only 8 or 16 bit mono with " msgstr "8または16ビットの " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1771,11 +1776,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1786,19 +1791,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1838,7 +1843,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1860,7 +1865,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1963,12 +1968,12 @@ msgstr "乱数生成器の初期化エラー" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2000,7 +2005,7 @@ msgstr "読み込み専用のファイルシステム" msgid "Read-only object" msgstr "読み込み専用のオブジェクト" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2016,7 +2021,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "要求のAESモードは非対応" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2054,7 +2059,7 @@ msgstr "SPI初期化エラー" msgid "SPI Re-initialization error" msgstr "SPI再初期化エラー" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2111,7 +2116,7 @@ msgstr "スライスと値の長さが一致しません" msgid "Slices not supported" msgstr "スライスは対応していません" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2309,7 +2314,7 @@ msgstr "UUIDの値がstr, int, bufferのいずれでもありません" msgid "Unable to allocate buffers for signed conversion" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2343,7 +2348,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "想定されていないnrfx UUID型" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2384,7 +2389,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "非対応のbaudrate" @@ -2405,7 +2410,7 @@ msgstr "非対応の操作" msgid "Unsupported pull value." msgstr "非対応のpull値" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2419,7 +2424,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2663,7 +2668,7 @@ msgid "byteorder is not a string" msgstr "byteorderが文字列ではありません" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "" @@ -3281,7 +3286,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "インデクスが範囲外" @@ -3513,7 +3518,7 @@ msgstr "" msgid "long int not supported in this build" msgstr "このビルドはlong intに非対応" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3906,7 +3911,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "" @@ -3931,40 +3936,40 @@ msgstr "pow()の3つ目の引数は0にできません" msgid "pow() with 3 arguments requires integers" msgstr "pow()の第3引数には整数が必要" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4207,7 +4212,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time()は9要素のシーケンスを受け取ります" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4274,18 +4279,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "タプル/リストの長さが正しくありません" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "txとrxを両方ともNoneにできません" @@ -4408,7 +4413,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "value_countは0より大きくなければなりません" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4425,7 +4430,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4461,7 +4466,7 @@ msgstr "" msgid "x value out of bounds" msgstr "xが範囲外" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 2da34c495c..62015fc268 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -140,7 +140,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -173,7 +174,7 @@ msgstr "" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -352,7 +353,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "" @@ -365,31 +366,31 @@ msgstr "" msgid "Address type out of range" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "사용중인 모든 I2C주변 기기" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "사용중인 모든 SPI주변 기기" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "사용중인 모든 UART주변 기기" @@ -424,10 +425,10 @@ msgstr "핀의 모든 타이머가 사용 중입니다" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -448,7 +449,7 @@ msgstr "" msgid "Already running" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -525,7 +526,7 @@ msgstr "" "자동 새로 고침이 켜져 있습니다. USB를 통해 파일을 저장하여 실행하십시오. 비활" "성화하려면 REPL을 입력하십시오.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -623,7 +624,7 @@ msgid "Buffer too short by %d bytes" msgstr "" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -642,7 +643,7 @@ msgstr "바이트는 0에서 255 사이 여야합니다." msgid "CBC blocks must be multiples of 16 bytes" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -650,15 +651,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -700,7 +701,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -722,7 +723,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -730,7 +731,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "" @@ -747,7 +748,7 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -812,7 +813,7 @@ msgid "Could not initialize SDCard" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "" @@ -828,7 +829,7 @@ msgstr "" msgid "Could not restart PWM" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -883,7 +884,7 @@ msgstr "DAC가 현재 사용 중입니다" msgid "Data 0 pin must be byte aligned" msgstr "" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -934,7 +935,8 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1013,7 +1015,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1034,7 +1036,7 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1042,11 +1044,11 @@ msgstr "" msgid "Failed to allocate RX buffer of %d bytes" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1062,7 +1064,7 @@ msgstr "" msgid "Failed to connect: timeout" msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1088,12 +1090,12 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1115,7 +1117,7 @@ msgstr "" msgid "Function requires lock" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1186,7 +1188,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "" @@ -1199,7 +1201,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "" @@ -1265,7 +1267,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1281,7 +1283,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1292,18 +1294,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1322,7 +1324,7 @@ msgid "Invalid byteorder string" msgstr "" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "" @@ -1352,7 +1354,7 @@ msgstr "파일이 유효하지 않습니다" msgid "Invalid format chunk size" msgstr "형식 청크 크기가 잘못되었습니다" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "" @@ -1371,8 +1373,8 @@ msgstr "단계가 잘못되었습니다" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1392,8 +1394,10 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1420,15 +1424,15 @@ msgstr "" msgid "Invalid security_mode" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1465,7 +1469,7 @@ msgstr "" msgid "Layer must be a Group or TileGrid subclass." msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1551,7 +1555,7 @@ msgstr "" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1584,25 +1588,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1666,7 +1670,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1728,11 +1733,11 @@ msgstr "" msgid "Only 8 or 16 bit mono with " msgstr "" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1761,11 +1766,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1776,19 +1781,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1827,7 +1832,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1849,7 +1854,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1952,12 +1957,12 @@ msgstr "" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -1989,7 +1994,7 @@ msgstr "" msgid "Read-only object" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2005,7 +2010,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2043,7 +2048,7 @@ msgstr "" msgid "SPI Re-initialization error" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2100,7 +2105,7 @@ msgstr "" msgid "Slices not supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2298,7 +2303,7 @@ msgstr "" msgid "Unable to allocate buffers for signed conversion" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2332,7 +2337,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2373,7 +2378,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "" @@ -2394,7 +2399,7 @@ msgstr "" msgid "Unsupported pull value." msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2408,7 +2413,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2652,7 +2657,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "" @@ -3266,7 +3271,7 @@ msgid "index is out of bounds" msgstr "" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "" @@ -3497,7 +3502,7 @@ msgstr "" msgid "long int not supported in this build" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3888,7 +3893,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "" @@ -3913,40 +3918,40 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4188,7 +4193,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4255,18 +4260,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "" @@ -4389,7 +4394,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4406,7 +4411,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4442,7 +4447,7 @@ msgstr "" msgid "x value out of bounds" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index e89f2f0c09..e66460bfe6 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -142,7 +142,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "%q moet een tuple van lengte 2 zijn" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -175,7 +176,7 @@ msgstr "%q() verwacht %d positionele argumenten maar kreeg %d" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -354,7 +355,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "Een hardware interrupt kanaal is al in gebruik" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 wordt gebruikt door WiFi" @@ -367,31 +368,31 @@ msgstr "Adres moet %d bytes lang zijn" msgid "Address type out of range" msgstr "Adres type buiten bereik" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Alle CAN-peripherals zijn in gebruik" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Alle I2C peripherals zijn in gebruik" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "Alle PCNT-eenheden zijn in gebruik" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Alle RX FIFO's zijn in gebruik" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Alle SPI peripherals zijn in gebruik" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Alle UART peripherals zijn in gebruik" @@ -426,10 +427,10 @@ msgstr "Alle timers voor deze pin zijn in gebruik" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -450,7 +451,7 @@ msgstr "Heeft al een luisteraar voor 'all-matches'" msgid "Already running" msgstr "Wordt al uitgevoerd" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "Zoekt al naar WiFi netwerken" @@ -527,7 +528,7 @@ msgstr "" "Auto-herlaad staat aan. Sla bestanden simpelweg op over USB om uit te voeren " "of start REPL om uit te schakelen.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "Baudrate wordt niet ondersteund door randapparatuur" @@ -625,7 +626,7 @@ msgid "Buffer too short by %d bytes" msgstr "Buffer is %d bytes te klein" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -644,7 +645,7 @@ msgstr "Bytes moeten tussen 0 en 255 liggen." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC blocks moeten meervouden van 16 bytes zijn" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -652,15 +653,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "Roep super().__init__() aan voor toegang native object." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -703,7 +704,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Output van beide kanalen kan niet op dezelfde pin" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -726,7 +727,7 @@ msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" "Kan niet resetten naar bootloader omdat er geen bootloader aanwezig is." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -734,7 +735,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "Kan de waarde niet toewijzen als de richting input is." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "Kan RTS of CTS niet specificeren in RS485 modus" @@ -751,7 +752,7 @@ msgstr "Kan niet overdragen zonder MOSI en MISO pinnen." msgid "Cannot vary frequency on a timer that is already in use" msgstr "Kan de frequentie van een timer die al in gebruik is niet variëren" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -818,7 +819,7 @@ msgid "Could not initialize SDCard" msgstr "Kan SDCard niet initialiseren" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Kan UART niet initialiseren" @@ -834,7 +835,7 @@ msgstr "Kan timer niet her-initialiseren" msgid "Could not restart PWM" msgstr "Kan PWM niet herstarten" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "Kon klok niet ophalen" @@ -889,7 +890,7 @@ msgstr "DAC al in gebruik" msgid "Data 0 pin must be byte aligned" msgstr "Data 0 pin moet byte uitgelijnd zijn" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -940,7 +941,8 @@ msgstr "Drive modus niet gebruikt als de richting input is." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB werkt alleen met 16 bytes tegelijkertijd" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF geheugen toewijzing mislukt" @@ -1019,7 +1021,7 @@ msgstr "FFT alleen voor ndarrays gedefineerd" msgid "FFT is implemented for linear arrays only" msgstr "FFT is alleen geïmplementeerd voor lineaire arrays" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "SSL handdruk mislukt" @@ -1040,7 +1042,7 @@ msgstr "RX buffer alloceren mislukt" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1048,11 +1050,11 @@ msgstr "RX buffer alloceren mislukt" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Mislukt een RX buffer van %d bytes te alloceren" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Kon WiFi geheugen niet toewijzen" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "Kon WiFi scan geheugen niet toewijzen" @@ -1068,7 +1070,7 @@ msgstr "Verbinding mislukt: interne fout" msgid "Failed to connect: timeout" msgstr "Verbinding mislukt: timeout" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "Kon WiFi niet initialiseren" @@ -1094,12 +1096,12 @@ msgid "File exists" msgstr "Bestand bestaat" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filters zijn te complex" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "Firmware image is ongeldig" @@ -1122,7 +1124,7 @@ msgstr "" msgid "Function requires lock" msgstr "Functie vereist lock" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1195,7 +1197,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "De initialisatie is mislukt vanwege een gebrek aan geheugen" @@ -1208,7 +1210,7 @@ msgstr "" msgid "Input taking too long" msgstr "Invoer duurt te lang" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Input/Output fout" @@ -1274,7 +1276,7 @@ msgstr "Ongeldige %q pin selectie" msgid "Invalid ADC Unit value" msgstr "Ongeldige ADC Unit waarde" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1290,7 +1292,7 @@ msgstr "Ongeldig BMP bestand" msgid "Invalid BSSID" msgstr "Ongeldig BSSID" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Ongeldige DAC pin opgegeven" @@ -1301,18 +1303,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ongeldige PWM frequentie" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "Ongeldige Pin" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ongeldig argument" @@ -1331,7 +1333,7 @@ msgid "Invalid byteorder string" msgstr "Ongeldige byteorder string" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Ongeldige vastlegging periode. Geldig bereik: 1 - 500" @@ -1361,7 +1363,7 @@ msgstr "Ongeldig bestand" msgid "Invalid format chunk size" msgstr "Ongeldig formaat stuk grootte" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Onjuiste frequentie" @@ -1380,8 +1382,8 @@ msgstr "Ongeldige fase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1401,8 +1403,10 @@ msgstr "Ongeldige pin voor rechter kanaal" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1429,15 +1433,15 @@ msgstr "Ongeldige run modus." msgid "Invalid security_mode" msgstr "Ongeldige security_mode" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "" @@ -1474,7 +1478,7 @@ msgstr "Laag al in groep." msgid "Layer must be a Group or TileGrid subclass." msgstr "Laag moet een Groep of TileGrid subklasse zijn." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1560,7 +1564,7 @@ msgstr "Een meervoud van 6 rgb pinnen moet worden gebruikt, niet %d" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS-fout" @@ -1593,25 +1597,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "Geen I2C-apparaat op adres: %x" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Geen MISO pin" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Geen MOSI pin" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Geen RX pin" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1675,7 +1679,8 @@ msgstr "Geen netwerk met dat SSID gevonden" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1739,11 +1744,11 @@ msgstr "Oneven pariteit is niet ondersteund" msgid "Only 8 or 16 bit mono with " msgstr "Alleen 8 of 16 bit mono met " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "Alleen IPv4 adressen worden ondersteund" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "Alleen IPv4-sockets ondersteund" @@ -1776,11 +1781,11 @@ msgstr "" "Alleen monochrome en 4bpp of 8bpp, en 16bpp of grotere geïndiceerde BMP's " "zijn ondersteund: %d bpp is gegeven" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1791,19 +1796,19 @@ msgstr "Slechts één alarm.time alarm kan worden ingesteld." msgid "Only one color can be transparent at a time" msgstr "Er kan maar één kleur per keer transparant zijn" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Geen sockets meer beschikbaar" @@ -1845,7 +1850,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1867,7 +1872,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1975,12 +1980,12 @@ msgstr "RNG Init Fout" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "RS485 inversie gespecificeerd terwijl niet in RS485 modus" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2012,7 +2017,7 @@ msgstr "Alleen-lezen bestandssysteem" msgid "Read-only object" msgstr "Alleen-lezen object" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2028,7 +2033,7 @@ msgstr "RemoteTransmissionRequests is beperkt tot 8 bytes" msgid "Requested AES mode is unsupported" msgstr "Gevraagde AES modus is niet ondersteund" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "" @@ -2066,7 +2071,7 @@ msgstr "SPI Init Fout" msgid "SPI Re-initialization error" msgstr "SPI Herinitialisatie Fout" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2123,7 +2128,7 @@ msgstr "Slice en waarde hebben verschillende lengtes." msgid "Slices not supported" msgstr "Slices niet ondersteund" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "SocketPool kan alleen met wifi.radio gebruikt worden" @@ -2320,7 +2325,7 @@ msgstr "UUID waarde is geen str, int, of byte buffer" msgid "Unable to allocate buffers for signed conversion" msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Kan vergrendeling niet maken" @@ -2354,7 +2359,7 @@ msgstr "Kan niet naar sleep_memory schrijven." msgid "Unexpected nrfx uuid type" msgstr "Onverwacht mrfx uuid type" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "Niet behandelde ESP TLS fout %d %d %x %d" @@ -2397,7 +2402,7 @@ msgstr "" "apparaat geweigerd of genegeerd werd." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Niet-ondersteunde baudsnelheid" @@ -2418,7 +2423,7 @@ msgstr "Niet-ondersteunde operatie" msgid "Unsupported pull value." msgstr "Niet-ondersteunde pull-waarde." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Update Mislukt" @@ -2432,7 +2437,7 @@ msgstr "Waarde lengte != vereist vaste lengte" msgid "Value length > max_length" msgstr "Waarde length > max_length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2685,7 +2690,7 @@ msgid "byteorder is not a string" msgstr "byteorder is geen string" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "butes > 8 niet ondersteund" @@ -3304,7 +3309,7 @@ msgid "index is out of bounds" msgstr "index is buiten bereik" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index is buiten bereik" @@ -3538,7 +3543,7 @@ msgstr "verwijzing naar een (nog) niet toegewezen lokale variabele" msgid "long int not supported in this build" msgstr "long int wordt niet ondersteund in deze build" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "loopback + silent mode wordt niet ondersteund door randapparaat" @@ -3930,7 +3935,7 @@ msgid "polygon can only be registered in one parent" msgstr "" "polygoon kan slechts bij één object van een hoger niveau worden geregistreerd" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop van een lege PulseIn" @@ -3955,40 +3960,40 @@ msgstr "derde argument van pow() mag geen 0 zijn" msgid "pow() with 3 arguments requires integers" msgstr "pow() met 3 argumenten vereist integers" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "druk bootknop in bij opstarten.\n" @@ -4232,7 +4237,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() accepteert een 9-rij" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4299,18 +4304,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "tuple of lijst heeft onjuiste lengte" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "twai_driver_install geeft esp-idf fout #%d" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "twai_start geeft esp-idf error #%d" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx en rx kunnen niet beiden None zijn" @@ -4433,7 +4438,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "value_count moet groter dan 0 zijn" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "watchdog niet geïnitialiseerd" @@ -4450,7 +4455,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "breedte moet groter dan nul zijn" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4486,7 +4491,7 @@ msgstr "onjuist uitvoer type" msgid "x value out of bounds" msgstr "x-waarde buiten bereik" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index ef0e0cce33..2a78682165 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -144,7 +144,8 @@ msgstr "" msgid "%q must be a tuple of length 2" msgstr "%q musi być krotką o długości 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "" @@ -177,7 +178,7 @@ msgstr "%q() bierze %d argumentów pozycyjnych, lecz podano %d" msgid "%q, %q, and %q must all be the same length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "" @@ -356,7 +357,7 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "Kanał przerwań sprzętowych w użyciu" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 jest używany przez WiFi" @@ -369,31 +370,31 @@ msgstr "Adres musi mieć %d bajtów" msgid "Address type out of range" msgstr "Typ adresu poza zakresem" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Wszystkie peryferia I2C w użyciu" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Wszystkie peryferia SPI w użyciu" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Wszystkie peryferia UART w użyciu" @@ -428,10 +429,10 @@ msgstr "Wszystkie timery tej nóżki w użyciu" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -452,7 +453,7 @@ msgstr "" msgid "Already running" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "" @@ -529,7 +530,7 @@ msgstr "" "Samo-przeładowywanie włączone. Po prostu zapisz pliki przez USB aby je " "uruchomić, albo wejdź w konsolę aby wyłączyć.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "" @@ -627,7 +628,7 @@ msgid "Buffer too short by %d bytes" msgstr "Bufor za krótki o %d bajtów" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -646,7 +647,7 @@ msgstr "Bytes musi być między 0 a 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Bloki CBC muszą być wielokrotnościami 16 bajtów" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -654,15 +655,15 @@ msgstr "" msgid "Call super().__init__() before accessing native object." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" @@ -704,7 +705,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Nie można mieć obu kanałów na tej samej nóżce" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "" @@ -726,7 +727,7 @@ msgstr "" msgid "Cannot reset into bootloader because no bootloader is present." msgstr "Nie można zrestartować -- nie ma bootloadera." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "" @@ -734,7 +735,7 @@ msgstr "" msgid "Cannot set value when direction is input." msgstr "Nie można ustawić wartości w trybie wejścia." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "Nie można określić RTS ani CTS w trybie RS485" @@ -751,7 +752,7 @@ msgstr "Nie można przesyłać bez nóżek MOSI i MISO." msgid "Cannot vary frequency on a timer that is already in use" msgstr "Nie można zmieniać częstotliwości timera, który jest już używany" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "" @@ -818,7 +819,7 @@ msgid "Could not initialize SDCard" msgstr "Nie można zainicjować SDCard" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Ustawienie UART nie powiodło się" @@ -834,7 +835,7 @@ msgstr "Nie można ponownie zainicjować timera" msgid "Could not restart PWM" msgstr "Nie można ponownie uruchomić PWM" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "" @@ -889,7 +890,7 @@ msgstr "DAC w użyciu" msgid "Data 0 pin must be byte aligned" msgstr "Nóżka data 0 musi być wyrównana do bajtu" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "" @@ -940,7 +941,8 @@ msgstr "Tryb sterowania nieużywany w trybie wejścia." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB działa tylko na 16 bajtach naraz" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -1019,7 +1021,7 @@ msgstr "" msgid "FFT is implemented for linear arrays only" msgstr "" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "" @@ -1040,7 +1042,7 @@ msgstr "Nie udała się alokacja bufora RX" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1048,11 +1050,11 @@ msgstr "Nie udała się alokacja bufora RX" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Nie udała się alokacja %d bajtów na bufor RX" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "" @@ -1068,7 +1070,7 @@ msgstr "Nie udało się połączyć: błąd wewnętrzny" msgid "Failed to connect: timeout" msgstr "Nie udało się połączyć: upłynął limit czasu" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "" @@ -1094,12 +1096,12 @@ msgid "File exists" msgstr "Plik istnieje" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "" @@ -1121,7 +1123,7 @@ msgstr "" msgid "Function requires lock" msgstr "Funkcja wymaga blokady" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "" @@ -1194,7 +1196,7 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "Inicjalizacja nie powiodła się z powodu braku pamięci" @@ -1207,7 +1209,7 @@ msgstr "" msgid "Input taking too long" msgstr "" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Błąd I/O" @@ -1273,7 +1275,7 @@ msgstr "" msgid "Invalid ADC Unit value" msgstr "" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "" @@ -1289,7 +1291,7 @@ msgstr "Zły BMP" msgid "Invalid BSSID" msgstr "" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1300,18 +1302,18 @@ msgstr "" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Zła częstotliwość PWM" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Zły argument" @@ -1330,7 +1332,7 @@ msgid "Invalid byteorder string" msgstr "" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Zły okres. Poprawny zakres to: 1 - 500" @@ -1360,7 +1362,7 @@ msgstr "Zły plik" msgid "Invalid format chunk size" msgstr "Zła wielkość fragmentu formatu" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Nieprawidłowa częstotliwość" @@ -1379,8 +1381,8 @@ msgstr "Zła faza" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1400,8 +1402,10 @@ msgstr "Zła nóżka dla prawego kanału" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1428,15 +1432,15 @@ msgstr "Zły tryb uruchomienia." msgid "Invalid security_mode" msgstr "Nieprawidłowy security_mode" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "Nieprawidłowy rozmiar" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "Nieprawidłowy stan" @@ -1473,7 +1477,7 @@ msgstr "" msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer musi dziedziczyć z Group albo TileGrid." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "" @@ -1559,7 +1563,7 @@ msgstr "" msgid "NLR jump failed. Likely memory corruption." msgstr "" -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "" @@ -1592,25 +1596,25 @@ msgstr "" msgid "No I2C device at address: %x" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Brak pinu MISO" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Brak pinu MOSI" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Brak nóżki RX" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1674,7 +1678,8 @@ msgstr "" msgid "No out in program" msgstr "" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1736,11 +1741,11 @@ msgstr "Nieparzysta parzystość nie jest wspierana" msgid "Only 8 or 16 bit mono with " msgstr "Tylko 8 lub 16 bitów mono z " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "" @@ -1769,11 +1774,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1784,19 +1789,19 @@ msgstr "" msgid "Only one color can be transparent at a time" msgstr "W danym momencie przezroczysty może być tylko jeden kolor" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "Brak pamięci" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1835,7 +1840,7 @@ msgstr "" msgid "PWM slice channel A already in use" msgstr "" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "" @@ -1857,7 +1862,7 @@ msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1960,12 +1965,12 @@ msgstr "" msgid "RS485 Not yet supported on this device" msgstr "" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -1997,7 +2002,7 @@ msgstr "System plików tylko do odczytu" msgid "Read-only object" msgstr "Obiekt tylko do odczytu" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Otrzymana odpowiedź była nieprawidłowa" @@ -2013,7 +2018,7 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "Żądany tryb AES nie jest obsługiwany" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "Nie znaleziono żądanego zasobu" @@ -2051,7 +2056,7 @@ msgstr "Błąd inicjowania SPI" msgid "SPI Re-initialization error" msgstr "Błąd ponownej inicjalizacji SPI" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "" @@ -2108,7 +2113,7 @@ msgstr "Fragment i wartość są różnych długości." msgid "Slices not supported" msgstr "Fragmenty nieobsługiwane" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "" @@ -2305,7 +2310,7 @@ msgstr "UUID nie jest typu str, int lub bytes" msgid "Unable to allocate buffers for signed conversion" msgstr "Nie udała się alokacja buforów do konwersji ze znakiem" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2339,7 +2344,7 @@ msgstr "" msgid "Unexpected nrfx uuid type" msgstr "Nieoczekiwany typ nrfx uuid" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "" @@ -2380,7 +2385,7 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Zła szybkość transmisji" @@ -2401,7 +2406,7 @@ msgstr "Zła operacja" msgid "Unsupported pull value." msgstr "Zła wartość podciągnięcia." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2415,7 +2420,7 @@ msgstr "" msgid "Value length > max_length" msgstr "" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "" @@ -2665,7 +2670,7 @@ msgid "byteorder is not a string" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "bajty większe od 8 bitów są niewspierane" @@ -3280,7 +3285,7 @@ msgid "index is out of bounds" msgstr "indeks jest poza zakresem" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "indeks poza zakresem" @@ -3511,7 +3516,7 @@ msgstr "zmienna lokalna użyta przed przypisaniem" msgid "long int not supported in this build" msgstr "long int jest nieobsługiwany" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" @@ -3903,7 +3908,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop z pustego PulseIn" @@ -3928,40 +3933,40 @@ msgstr "trzeci argument pow() nie może być 0" msgid "pow() with 3 arguments requires integers" msgstr "trzyargumentowe pow() wymaga liczb całkowitych" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -4204,7 +4209,7 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() wymaga 9-elementowej sekwencji" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4271,18 +4276,18 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "krotka/lista ma złą długość" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx i rx nie mogą być oba None" @@ -4405,7 +4410,7 @@ msgstr "" msgid "value_count must be > 0" msgstr "value_count musi być > 0" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "" @@ -4422,7 +4427,7 @@ msgstr "" msgid "width must be greater than zero" msgstr "szerokość musi być większa niż zero" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "" @@ -4458,7 +4463,7 @@ msgstr "nieprawidłowy typ wyjścia" msgid "x value out of bounds" msgstr "x poza zakresem" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 9c44b4cd93..6c7b84e292 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -148,7 +148,8 @@ msgstr "%q deve ser uma string" msgid "%q must be a tuple of length 2" msgstr "%q deve ser uma tupla de comprimento 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "%q deve estar entre %d e %d" @@ -181,7 +182,7 @@ msgstr "%q() recebe %d argumentos posicionais, porém %d foram informados" msgid "%q, %q, and %q must all be the same length" msgstr "todos os %q, %q, e %q devem ter mesmo comprimento" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "%s erro 0x%x" @@ -364,7 +365,7 @@ msgstr "Tipos 64 bit" msgid "A hardware interrupt channel is already in use" msgstr "Um canal de interrupção de hardware já está em uso" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "O ADC2 está sendo usado pelo WiFi" @@ -377,31 +378,31 @@ msgstr "O endereço deve ter %d bytes de comprimento" msgid "Address type out of range" msgstr "O tipo do endereço está fora do alcance" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Todos os periféricos CAN estão em uso" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Todos os periféricos I2C estão em uso" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "Todas as unidades PCNT estão em uso" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Todos os FIFOs RX estão em uso" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Todos os periféricos SPI estão em uso" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Todos os periféricos UART estão em uso" @@ -436,10 +437,10 @@ msgstr "Todos os temporizadores para este pino estão em uso" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -460,7 +461,7 @@ msgstr "Já há um ouvinte com todas as correspondências" msgid "Already running" msgstr "Já está em execução" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "Já está em busca das redes de wifi" @@ -538,7 +539,7 @@ msgstr "" "O recarregamento automático está ativo. Simplesmente salve os arquivos via " "USB para executá-los ou digite REPL para desativar.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "O Baudrate não é suportado pelo periférico" @@ -638,7 +639,7 @@ msgid "Buffer too short by %d bytes" msgstr "O buffer é muito curto em %d bytes" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -657,7 +658,7 @@ msgstr "Os bytes devem estar entre 0 e 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Os blocos CBC devem ter múltiplos de 16 bytes" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC ou checksum inválido" @@ -665,17 +666,17 @@ msgstr "CRC ou checksum inválido" msgid "Call super().__init__() before accessing native object." msgstr "Chame super().__init__() antes de acessar o objeto nativo." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "O alarme só pode acontecer no RTC IO a partir do deep sleep." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" "O alarme só pode acontecer em um pino com nível baixo enquanto os outros " "alarmes só com nível alto a partir do deep sleep." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "" "O alarme só é possível nos dois pinos com sinal baixo a partir do deep sleep." @@ -720,7 +721,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Não é possível emitir os dois canais no mesmo pino" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "Não é possível obter (pull) nos pinos somente de entrada." @@ -743,7 +744,7 @@ msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" "Não é possível redefinir para o bootloader porque o mesmo não está presente." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "Não foi possível definir as opções do socket" @@ -751,7 +752,7 @@ msgstr "Não foi possível definir as opções do socket" msgid "Cannot set value when direction is input." msgstr "Não é possível definir o valor quando a direção é inserida." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "Não é possível definir o RTS ou CTS no modo RS485" @@ -768,7 +769,7 @@ msgstr "Não é possível transferir sem os pinos MOSI e MISO." msgid "Cannot vary frequency on a timer that is already in use" msgstr "Não é possível variar a frequência em um timer que já esteja em uso" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "Não é possível acordar (wake) no pino edge. Nível apenas." @@ -834,7 +835,7 @@ msgid "Could not initialize SDCard" msgstr "Não foi possível inicializar o SDCard" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Não foi possível inicializar o UART" @@ -850,7 +851,7 @@ msgstr "Não foi possível reiniciar o temporizador" msgid "Could not restart PWM" msgstr "Não foi possível reiniciar o PWM" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "Não foi possível recuperar o clock" @@ -905,7 +906,7 @@ msgstr "DAC em uso" msgid "Data 0 pin must be byte aligned" msgstr "O pino de dados 0 deve ser alinhado por bytes" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "O pino de dados 0 deve ser alinhado por bytes." @@ -956,7 +957,8 @@ msgstr "O modo do controlador não é usado quando a direção for inserida." msgid "ECB only operates on 16 bytes at a time" msgstr "O BCE opera apenas com 16 bytes por vez" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "Houve uma falha na alocação da memória ESP-IDF" @@ -1035,7 +1037,7 @@ msgstr "O FFT é definido apenas para ndarrays" msgid "FFT is implemented for linear arrays only" msgstr "O FFT é implementado apenas para matrizes lineares" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "Houve uma falha no handshake do SSL" @@ -1056,7 +1058,7 @@ msgstr "Falha ao alocar buffer RX" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1064,11 +1066,11 @@ msgstr "Falha ao alocar buffer RX" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Falha ao alocar buffer RX de %d bytes" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Houve uma falha na alocação da memória do Wifi" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "Houve uma falha na alocação da memória para a varredura do Wifi" @@ -1084,7 +1086,7 @@ msgstr "Falha ao conectar: erro interno" msgid "Failed to connect: timeout" msgstr "Falha ao conectar: tempo limite" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "Houve uma falha ao iniciar o wifi" @@ -1110,12 +1112,12 @@ msgid "File exists" msgstr "Arquivo já existe" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Os filtros são muito complexos" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "A imagem do firmware é invalida" @@ -1138,7 +1140,7 @@ msgstr "" msgid "Function requires lock" msgstr "A função requer bloqueio" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "Falha Genérica" @@ -1215,7 +1217,7 @@ msgstr "" "A definição do estado inicial do pino está em conflito com estado do inicial " "do pino" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "A inicialização falhou devido à falta de memória" @@ -1230,7 +1232,7 @@ msgstr "" msgid "Input taking too long" msgstr "A entrada está demorando demais" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Erro de entrada/saída" @@ -1296,7 +1298,7 @@ msgstr "Seleção inválida dos pinos %q" msgid "Invalid ADC Unit value" msgstr "Valor inválido da unidade ADC" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "AuthMode inválido" @@ -1312,7 +1314,7 @@ msgstr "Arquivo BMP inválido" msgid "Invalid BSSID" msgstr "BSSID Inválido" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "O pino DAC informado é inválido" @@ -1323,18 +1325,18 @@ msgstr "O arquivo MIDI é inválido" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Frequência PWM inválida" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "Pino inválido" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumento inválido" @@ -1353,7 +1355,7 @@ msgid "Invalid byteorder string" msgstr "A cadeia de bytes é inválida" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "O período de captura é inválido. O intervalo válido é: 1 - 500" @@ -1383,7 +1385,7 @@ msgstr "Arquivo inválido" msgid "Invalid format chunk size" msgstr "Tamanho do pedaço de formato inválido" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Frequência inválida" @@ -1402,8 +1404,8 @@ msgstr "Fase Inválida" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1423,8 +1425,10 @@ msgstr "Pino inválido para canal direito" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1451,15 +1455,15 @@ msgstr "O modo de execução é inválido." msgid "Invalid security_mode" msgstr "O Security_mode é inválido" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "Tamanho inválido" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "Soquete inválido para o TLS" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "Estado inválido" @@ -1496,7 +1500,7 @@ msgstr "A camada já existe em um grupo." msgid "Layer must be a Group or TileGrid subclass." msgstr "A camada deve ser uma subclasse Group ou TileGrid." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "Endereço MAC inválido" @@ -1582,7 +1586,7 @@ msgstr "Deve utilizar um múltiplo de 6 pinos rgb, não %d" msgid "NLR jump failed. Likely memory corruption." msgstr "O salto NLR falhou. Possível corrupção da memória." -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "Erro NVS" @@ -1615,25 +1619,25 @@ msgstr "Nenhum temporizador DMA foi encontrado" msgid "No I2C device at address: %x" msgstr "Nenhum dispositivo I2C no endereço: %x" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Nenhum pino MISO" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Nenhum pino MOSI" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Nenhum pino RX" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1697,7 +1701,8 @@ msgstr "Não há rede com este ssid" msgid "No out in program" msgstr "Sem saída no programa" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1762,11 +1767,11 @@ msgstr "A paridade ímpar não é compatível" msgid "Only 8 or 16 bit mono with " msgstr "Apenas mono com 8 ou 16 bits com " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "Somente os endereços IPv4 são suportados" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "Apenas soquetes IPv4 são suportados" @@ -1799,11 +1804,11 @@ msgstr "" "São compatíveis apenas os BMPs monocromáticos, indexados em 4bpp ou 8bpp e " "16bpp ou superior: determinado %d bpp" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "Apenas um TouchAlarm pode ser colocado em deep sleep." -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1814,19 +1819,19 @@ msgstr "Apenas um alarme alarm.time pode ser definido." msgid "Only one color can be transparent at a time" msgstr "Apenas uma cor pode ser transparente de cada vez" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "A operação ou o recurso não é suportado" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "A operação expirou" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "Sem memória" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Sem soquetes" @@ -1869,7 +1874,7 @@ msgstr "A fatia do PWM já está em uso" msgid "PWM slice channel A already in use" msgstr "O canal A da fatia do PWM já está em uso" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "O periférico está em uso" @@ -1891,7 +1896,7 @@ msgstr "A contagem dos pinos é muito grande" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -2002,12 +2007,12 @@ msgstr "Houve um erro na inicialização do RNG" msgid "RS485 Not yet supported on this device" msgstr "Ainda não há suporte para o RS485 neste dispositivo" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "A definição da inversão do RS485 quando não está no modo RS485" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2039,7 +2044,7 @@ msgstr "Sistema de arquivos somente leitura" msgid "Read-only object" msgstr "Objeto de leitura apenas" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "A resposta recebida foi inválida" @@ -2055,7 +2060,7 @@ msgstr "As requisições de transmissões remotas é limitada a 8 bytes" msgid "Requested AES mode is unsupported" msgstr "O modo AES solicitado não é compatível" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "O recurso solicitado não foi encontrado" @@ -2093,7 +2098,7 @@ msgstr "Houve um erro na inicialização SPI" msgid "SPI Re-initialization error" msgstr "Houve um erro na reinicialização SPI" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "A configuração SPI falhou" @@ -2151,7 +2156,7 @@ msgstr "Fatie e avalie os diferentes comprimentos." msgid "Slices not supported" msgstr "Fatiamento não compatível" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "O SocketPool só pode ser usado com rádio wifi.radio" @@ -2360,7 +2365,7 @@ msgstr "O valor UUID não é um buffer str, int ou byte" msgid "Unable to allocate buffers for signed conversion" msgstr "Não é possível alocar buffers para conversão assinada" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Não é possível criar um lock" @@ -2394,7 +2399,7 @@ msgstr "Não foi possível escrever no sleep_memory." msgid "Unexpected nrfx uuid type" msgstr "Tipo uuid nrfx inesperado" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "Erro não tratado do ESP TLS %d %d %x %d" @@ -2437,7 +2442,7 @@ msgstr "" "dispositivo tenha sido recusado ou ignorado." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Taxa de transmissão não suportada" @@ -2458,7 +2463,7 @@ msgstr "Operação não suportada" msgid "Unsupported pull value." msgstr "O valor pull não é compatível." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "A atualização falou" @@ -2472,7 +2477,7 @@ msgstr "Comprimento do valor != comprimento fixo necessário" msgid "Value length > max_length" msgstr "O comprimento do valor é > max_length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "A versão era inválida" @@ -2728,7 +2733,7 @@ msgid "byteorder is not a string" msgstr "a ordem dos bytes não é uma cadeia de caracteres" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "bytes > 8 bits não suportado" @@ -3351,7 +3356,7 @@ msgid "index is out of bounds" msgstr "o índice está fora dos limites" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "Índice fora do intervalo" @@ -3586,7 +3591,7 @@ msgstr "a variável local referenciada antes da atribuição" msgid "long int not supported in this build" msgstr "o long int não é suportado nesta compilação" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "o loopback + o modo silencioso não é suportado pelo periférico" @@ -3984,7 +3989,7 @@ msgstr "o pixel_shader deve ser displayio.Palette ou displayio.ColorConverter" msgid "polygon can only be registered in one parent" msgstr "o polígono só pode ser registrado em um pai" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop a partir de um PulseIn vazio" @@ -4009,40 +4014,40 @@ msgstr "O terceiro argumento pow() não pode ser 0" msgid "pow() with 3 arguments requires integers" msgstr "o pow() com 3 argumentos requer números inteiros" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "pressionando o botão de boot na inicialização.\n" @@ -4286,7 +4291,7 @@ msgstr "o bloco deve ser maior que zero" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() leva uma sequência com 9" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4353,18 +4358,18 @@ msgstr "o trapz é definido para iteráveis 1D" msgid "tuple/list has wrong length" msgstr "a tupla/lista está com tamanho incorreto" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "o twai_driver_install retornou um erro esp-idf #%d" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "o twai_start retornou um erro esp-idf #%d" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "TX e RX não podem ser ambos" @@ -4487,7 +4492,7 @@ msgstr "valor fora do alcance do alvo" msgid "value_count must be > 0" msgstr "o value_count deve ser > 0" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "o watchdog não foi inicializado" @@ -4504,7 +4509,7 @@ msgstr "a largura deve ser entre 2 a 8 (inclusive), não %d" msgid "width must be greater than zero" msgstr "a largura deve ser maior que zero" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "o wifi não está ativo" @@ -4540,7 +4545,7 @@ msgstr "tipo da saída incorreta" msgid "x value out of bounds" msgstr "o valor x está fora dos limites" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "o xTaskCreate falhou" diff --git a/locale/sv.po b/locale/sv.po index 02e273b352..ff8e6378e9 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -147,7 +147,8 @@ msgstr "%q måste vara en sträng" msgid "%q must be a tuple of length 2" msgstr "%q måste vara en tuple av längd 2" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "%q måste vara mellan %d och %d" @@ -180,7 +181,7 @@ msgstr "% q() tar %d positionsargument men %d gavs" msgid "%q, %q, and %q must all be the same length" msgstr "%q, %q och %q måste vara lika långa" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "%s fel 0x%x" @@ -359,7 +360,7 @@ msgstr "64-bitars typer" msgid "A hardware interrupt channel is already in use" msgstr "En kanal för hårdvaruavbrott används redan" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 används av WiFi" @@ -372,31 +373,31 @@ msgstr "Adressen måste vara %d byte lång" msgid "Address type out of range" msgstr "Adresstyp utanför intervallet" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "All I2C-kringutrustning används" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "All I2C-kringutrustning används" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "Alla PCNT-enheter används" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Alla RX FIFO i bruk" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "All SPI-kringutrustning används" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Alla UART-kringutrustning används" @@ -431,10 +432,10 @@ msgstr "Alla timers för denna pinne är i bruk" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -455,7 +456,7 @@ msgstr "Har redan lyssnare för all-matchningar" msgid "Already running" msgstr "Kör redan" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "Skannar redan efter wifi-nätverk" @@ -532,7 +533,7 @@ msgstr "" "Autoladdning är på. Spara filer via USB för att köra dem eller ange REPL för " "att inaktivera.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "Baudrate stöds inte av kringutrustning" @@ -630,7 +631,7 @@ msgid "Buffer too short by %d bytes" msgstr "Buffert är %d bytes för kort" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -649,7 +650,7 @@ msgstr "Bytes måste vara mellan 0 och 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC-block måste vara multiplar om 16 byte" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC eller checksumma var ogiltig" @@ -657,16 +658,16 @@ msgstr "CRC eller checksumma var ogiltig" msgid "Call super().__init__() before accessing native object." msgstr "Anropa super().__init__() innan du använder det ursprungliga objektet." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "Kan bara larma på RTC-IO från djupsömn." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" "Kan bara larma från djup sömn på låg för en pinne medan andra larmar på hög." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "Kan bara larma från djup sömn på två låga pinnar." @@ -709,7 +710,7 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Det går inte att mata ut båda kanalerna på samma pinne" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "Kan bara använda pull på pinne för input." @@ -732,7 +733,7 @@ msgid "Cannot reset into bootloader because no bootloader is present." msgstr "" "Det går inte att återställa till bootloader eftersom bootloader saknas." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "Det går inte att ange socketalternativ" @@ -740,7 +741,7 @@ msgstr "Det går inte att ange socketalternativ" msgid "Cannot set value when direction is input." msgstr "Kan inte sätta värde när riktning är input." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "Det går inte att specificera RTS eller CTS i RS485-läget" @@ -757,7 +758,7 @@ msgstr "Kan inte överföra utan MOSI- och MISO-pinnar." msgid "Cannot vary frequency on a timer that is already in use" msgstr "Det går inte att ändra frekvensen på en timer som redan används" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "Kan inte vakna på nivåskift, enbart nivå." @@ -824,7 +825,7 @@ msgid "Could not initialize SDCard" msgstr "Kan inte initiera SD-kort" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Det gick inte att initiera UART" @@ -840,7 +841,7 @@ msgstr "Det gick inte att återinitiera timern" msgid "Could not restart PWM" msgstr "Det gick inte att starta om PWM" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "Kunde inte hämta klocka" @@ -895,7 +896,7 @@ msgstr "DAC används redan" msgid "Data 0 pin must be byte aligned" msgstr "Datapinne 0 måste vara bytejusterad" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "Datapinne 0 måste vara byte-justerad." @@ -946,7 +947,8 @@ msgstr "Drivläge används inte när riktning är input." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB arbetar endast på 16 byte åt gången" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF-minnetilldelning misslyckades" @@ -1025,7 +1027,7 @@ msgstr "FFT är enbart definierade för ndarrays" msgid "FFT is implemented for linear arrays only" msgstr "FTT är enbart implementerad för linjära matriser" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "Misslyckad SSL-handskakning" @@ -1046,7 +1048,7 @@ msgstr "Det gick inte att tilldela RX-buffert" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1054,11 +1056,11 @@ msgstr "Det gick inte att tilldela RX-buffert" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Det gick inte att allokera RX-bufferten på %d byte" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Det gick inte att allokera WiFi-minne" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "Det gick inte att allokera minne för WiFi-scanning" @@ -1074,7 +1076,7 @@ msgstr "Det gick inte att ansluta: internt fel" msgid "Failed to connect: timeout" msgstr "Det gick inte att ansluta: timeout" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "Kunde inte initiera WiFi" @@ -1100,12 +1102,12 @@ msgid "File exists" msgstr "Filen finns redan" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filter för komplexa" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "Firmware-avbilden är ogiltig" @@ -1127,7 +1129,7 @@ msgstr "Frekvensen måste matcha befintlig PWMOut med denna timer" msgid "Function requires lock" msgstr "Funktion kräver lås" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "Generiskt fel" @@ -1202,7 +1204,7 @@ msgstr "" "Initial inställning av pinntillstånd är i konflikt med initialt " "utpinntillstånd" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "Initieringen misslyckades på grund av minnesbrist" @@ -1215,7 +1217,7 @@ msgstr "indatabuffertlängd (%d) måste vara en multipel av antal strand (%d)" msgid "Input taking too long" msgstr "Indata tar för lång tid" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Indata-/utdatafel" @@ -1281,7 +1283,7 @@ msgstr "Ogiltigt val av %q pinne" msgid "Invalid ADC Unit value" msgstr "Ogiltigt ADC-enhetsvärde" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "Ogiltig AuthMode" @@ -1297,7 +1299,7 @@ msgstr "Ogiltig BMP-fil" msgid "Invalid BSSID" msgstr "Ogiltig BSSID" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Ogiltig DAC-pinne angiven" @@ -1308,18 +1310,18 @@ msgstr "Ogiltig MIDI-fil" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Ogiltig PWM-frekvens" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "Ogiltig pinne" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ogiltigt argument" @@ -1338,7 +1340,7 @@ msgid "Invalid byteorder string" msgstr "Ogiltig byteorder-sträng" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Ogiltig inspelningsperiod. Giltigt intervall: 1 - 500" @@ -1368,7 +1370,7 @@ msgstr "Felaktig fil" msgid "Invalid format chunk size" msgstr "Ogiltig formatsegmentstorlek" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Ogiltig frekvens" @@ -1387,8 +1389,8 @@ msgstr "Ogiltig fas" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1408,8 +1410,10 @@ msgstr "Ogiltig pinne för höger kanal" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1436,15 +1440,15 @@ msgstr "Ogiltigt körläge." msgid "Invalid security_mode" msgstr "Ogiltigt säkerhetsläge" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "Ogiltig storlek" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "Ogiltig socket för TLS" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "Ogiltigt tillstånd" @@ -1481,7 +1485,7 @@ msgstr "Lagret finns redan i en grupp." msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer måste vara en subklass av Group eller TileGrid." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "MAC-adressen var ogiltig" @@ -1568,7 +1572,7 @@ msgstr "Måste använda ett multipel av 6 rgb-pinnar, inte %d" msgid "NLR jump failed. Likely memory corruption." msgstr "NLR jump misslyckades. Troligen korrupt minne." -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS-fel" @@ -1601,25 +1605,25 @@ msgstr "Ingen DMA pacing timer hittades" msgid "No I2C device at address: %x" msgstr "Ingen I2C-enhet på adress: %x" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Ingen MISO-pinne" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Ingen MOSI-pinne" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Ingen RX-pinne" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1683,7 +1687,8 @@ msgstr "Inget nätverk med sådant ssid" msgid "No out in program" msgstr "Inget out i programmet" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1747,11 +1752,11 @@ msgstr "Udda paritet stöds inte" msgid "Only 8 or 16 bit mono with " msgstr "Endast 8 eller 16 bitars mono med " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "Endast IPv4-adresser stöds" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "Endast IPv4-socket stöds" @@ -1783,11 +1788,11 @@ msgstr "" "Endast monokrom, indexerad 4 bpp eller 8 bpp och 16 bpp eller högre BMP: er " "stöds: %d bpp angiven" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "Endast ett TouchAlarm kan ställas in för djupsömn." -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1798,19 +1803,19 @@ msgstr "Endast ett alarm.time kan ställas in." msgid "Only one color can be transparent at a time" msgstr "Bara en färg kan vara genomskinlig i taget" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "Operation eller funktion stöds inte" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "Åtgärden orsakade timeout" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "Slut på minne" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Slut på sockets" @@ -1851,7 +1856,7 @@ msgstr "PWM-segment används redan" msgid "PWM slice channel A already in use" msgstr "PWM-segmentkanal A används redan" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "Periferi i bruk" @@ -1873,7 +1878,7 @@ msgstr "Antal pinnar för stort" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1981,12 +1986,12 @@ msgstr "RNG Init-fel" msgid "RS485 Not yet supported on this device" msgstr "RS485 stöds ännu inte på den här enheten" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "RS485-inversion specificerad när den inte är i RS485-läge" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2018,7 +2023,7 @@ msgstr "Skrivskyddat filsystem" msgid "Read-only object" msgstr "Skrivskyddat objekt" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Mottaget svar var ogiltigt" @@ -2034,7 +2039,7 @@ msgstr "RemoteTransmissionRequests begränsad till 8 byte" msgid "Requested AES mode is unsupported" msgstr "Det begärda AES-läget stöds inte" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "Begärd resurs hittades inte" @@ -2072,7 +2077,7 @@ msgstr "SPI Init-fel" msgid "SPI Re-initialization error" msgstr "SPI reinitialiseringsfel" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "SPI-konfigurationen misslyckades" @@ -2129,7 +2134,7 @@ msgstr "Slice och värde har olika längd." msgid "Slices not supported" msgstr "Slice stöds inte" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "SocketPool kan endast användas med wifi.radio" @@ -2334,7 +2339,7 @@ msgstr "UUID-värdet är inte str, int eller byte-buffert" msgid "Unable to allocate buffers for signed conversion" msgstr "Det går inte att allokera buffert för signerad konvertering" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Kan inte skapa lås" @@ -2368,7 +2373,7 @@ msgstr "Det gick inte att skriva till sleep_memory." msgid "Unexpected nrfx uuid type" msgstr "Oväntad nrfx uuid-typ" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "Ej hanterat ESP TLS-fel %d %d %x %d" @@ -2411,7 +2416,7 @@ msgstr "" "eller ignorerades." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Baudrate stöd inte" @@ -2432,7 +2437,7 @@ msgstr "Åtgärd som inte stöds" msgid "Unsupported pull value." msgstr "Ogiltigt Pull-värde." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Uppdateringen misslyckades" @@ -2446,7 +2451,7 @@ msgstr "Värdets längde ! = krävd fast längd" msgid "Value length > max_length" msgstr "Värdets längd > max_length" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "Versionen var ogiltig" @@ -2698,7 +2703,7 @@ msgid "byteorder is not a string" msgstr "byteorder är inte en sträng" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "bytes> 8 bitar stöds inte" @@ -3317,7 +3322,7 @@ msgid "index is out of bounds" msgstr "index är utanför gränserna" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "index utanför intervallet" @@ -3551,7 +3556,7 @@ msgstr "lokal variabel refererad före tilldelning" msgid "long int not supported in this build" msgstr "long int stöds inte i denna build" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "loopback + tyst läge stöds inte av kringutrustning" @@ -3943,7 +3948,7 @@ msgstr "" msgid "polygon can only be registered in one parent" msgstr "polygon kan endast registreras i en förälder" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "pop från en tom PulseIn" @@ -3968,40 +3973,40 @@ msgstr "pow() 3: e argument kan inte vara 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() med 3 argument kräver heltal" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "trycka på startknappen vid start.\n" @@ -4245,7 +4250,7 @@ msgstr "tile måste vara större än noll" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() kräver en 9-sekvens" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4312,18 +4317,18 @@ msgstr "trapz är definierat för 1D-iterabla" msgid "tuple/list has wrong length" msgstr "tupel/lista har fel längd" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "twai_driver_install returnerade esp-idf-fel #%d" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "twai_start returnerade esp-idf-fel #%d" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx och rx kan inte båda vara None" @@ -4446,7 +4451,7 @@ msgstr "värde utanför målintervall" msgid "value_count must be > 0" msgstr "value_count måste vara > 0" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "watchdog är inte initierad" @@ -4463,7 +4468,7 @@ msgstr "width måste vara mellan 2 och 8, inte %d" msgid "width must be greater than zero" msgstr "width måste vara större än noll" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "wifi är inte aktiverat" @@ -4499,7 +4504,7 @@ msgstr "fel utdatatyp" msgid "x value out of bounds" msgstr "x-värde utanför intervall" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "xTaskCreate misslyckades" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 2530d54950..bf540d4bd6 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -149,7 +149,8 @@ msgstr "%q bì xū shì yí gè zì fú chuàn" msgid "%q must be a tuple of length 2" msgstr "%q bìxū shì chángdù wèi 2 de yuán zǔ" -#: ports/esp32s2/common-hal/imagecapture/ParallelImageCapture.c +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" msgstr "%q bì xū zài %d hé %d zhī jiān" @@ -182,7 +183,7 @@ msgstr "%q() cǎiyòng %d wèizhì cānshù, dàn gěi chū %d" msgid "%q, %q, and %q must all be the same length" msgstr "%q, %q, hé %q bì xū cháng dù xiāng tóng" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" msgstr "%s cuò wù 0x%x" @@ -361,7 +362,7 @@ msgstr "64 wèi lèi xíng" msgid "A hardware interrupt channel is already in use" msgstr "Yìngjiàn zhōngduàn tōngdào yǐ zài shǐyòng zhōng" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" msgstr "ADC2 zhèng yóu WiFi shǐ yòng" @@ -374,31 +375,31 @@ msgstr "Dìzhǐ bìxū shì %d zì jié zhǎng" msgid "Address type out of range" msgstr "Dìzhǐ lèixíng chāochū fànwéi" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "suǒ yǒu CAN wài shè dōu zài shǐ yòng zhōng" -#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Suǒyǒu I2C wàiwéi qì zhèngzài shǐyòng" -#: ports/esp32s2/common-hal/countio/Counter.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" msgstr "suǒ yǒu zhèng zài shǐ yòng zhōng de PCNT dān yuán" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Suǒyǒu shǐyòng zhōng de RX FIFO" -#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" msgstr "Suǒyǒu SPI wàiwéi qì zhèngzài shǐyòng" -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" msgstr "Suǒyǒu UART wàiwéi zhèngzài shǐyòng" @@ -433,10 +434,10 @@ msgstr "Cǐ yǐn jiǎo de suǒyǒu jìshí qì zhèngzài shǐyòng" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/neopixel_write/__init__.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c #: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c @@ -457,7 +458,7 @@ msgstr "yǐ jù yǒu quán pǐ pèi zhēn tīng qì" msgid "Already running" msgstr "yǐ zài yùn xíng" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" msgstr "yǐ jīng sǎo miáo WIFI wǎng luò" @@ -534,7 +535,7 @@ msgstr "" "Zìdòng chóngxīn jiāzài. Zhǐ xū tōngguò USB bǎocún wénjiàn lái yùnxíng tāmen " "huò shūrù REPL jìnyòng.\n" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" msgstr "wài shè bù zhī chí de bō tè lā tè" @@ -632,7 +633,7 @@ msgid "Buffer too short by %d bytes" msgstr "Huǎn chōng qū tài duǎn , àn %d zì jié" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -651,7 +652,7 @@ msgstr "Zì jié bìxū jiè yú 0 dào 255 zhī jiān." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC kuài bì xū shì 16 zì jié de bèi shù" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC huò jiào yàn hé wú xiào" @@ -659,17 +660,17 @@ msgstr "CRC huò jiào yàn hé wú xiào" msgid "Call super().__init__() before accessing native object." msgstr "Zài fǎngwèn běn jī wùjiàn zhīqián diàoyòng super().__init__()." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." msgstr "zhǐ néng zài RTC Io shàng cóng shēn dù shuì mián zhōng bào jǐng." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" "Zhǐ néng zài yīgè dī diàn píng yǐn jiǎo shàng fāchū jǐngbào, ér qítā yǐn " "jiǎo cóng shēndù shuìmián zhōng fāchū gāo diàn píng jǐngbào." -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." msgstr "zhǐ néng cóng shēn dù shuì mián zhōng bào jǐng liǎng gè dī yǐn jiǎo." @@ -711,7 +712,7 @@ msgstr "Nín wúfǎ sǎomiáo kuòzhǎn de, kě liánjiē de guǎnggào." msgid "Cannot output both channels on the same pin" msgstr "Wúfǎ shūchū tóng yīgè yǐn jiǎo shàng de liǎng gè píndào" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." msgstr "wú fǎ lā dòng jǐn shū rù yǐn jiǎo." @@ -733,7 +734,7 @@ msgstr "tōng guò USB kě jiàn shí wú fǎ chóng xīn ān zhuāng '/'." msgid "Cannot reset into bootloader because no bootloader is present." msgstr "Wúfǎ chóng zhì wèi bootloader, yīnwèi méiyǒu bootloader cúnzài." -#: ports/esp32s2/common-hal/socketpool/Socket.c +#: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" msgstr "wú fǎ shè zhì tào jiē zì xuǎn xiàng" @@ -741,7 +742,7 @@ msgstr "wú fǎ shè zhì tào jiē zì xuǎn xiàng" msgid "Cannot set value when direction is input." msgstr "Dāng fāngxiàng xiàng nèi shí, bùnéng shèzhì gāi zhí." -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" msgstr "wú fǎ zài RS485 mó shì xià zhǐ dìng RTS huò CTS" @@ -758,7 +759,7 @@ msgstr "Méiyǒu MOSI/MISO jiù wúfǎ zhuǎnyí." msgid "Cannot vary frequency on a timer that is already in use" msgstr "Wúfǎ gēnggǎi yǐ zài shǐyòng de jìshí qì shàng de pínlǜ" -#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." msgstr "wú fǎ zài yǐn jiǎo biān yuán huàn xǐng. jǐn jí bié." @@ -823,7 +824,7 @@ msgid "Could not initialize SDCard" msgstr "wú fǎ chū shǐ huà SDCard" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "Could not initialize UART" msgstr "Wúfǎ chūshǐhuà UART" @@ -839,7 +840,7 @@ msgstr "Wúfǎ chóngxīn qǐdòng jìshí qì" msgid "Could not restart PWM" msgstr "Wúfǎ chóngqǐ PWM" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" msgstr "Wúfǎ huòqǔ shízhōng" @@ -894,7 +895,7 @@ msgstr "Fā yuán huì yǐjīng shǐyòng" msgid "Data 0 pin must be byte aligned" msgstr "Shùjù 0 de yǐn jiǎo bìxū shì zì jié duìqí" -#: ports/esp32s2/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c msgid "Data 0 pin must be byte aligned." msgstr "shù jù 0 yǐn jiǎo bì xū àn zì jié duì qí." @@ -946,7 +947,8 @@ msgstr "Fāngxiàng shūrù shí qūdòng móshì méiyǒu shǐyòng." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB yí cì zhǐ shǐ yòng 16 gè zì jié" -#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF nèicún fēnpèi shībài" @@ -1025,7 +1027,7 @@ msgstr "FFT jǐn wéi ndarrays dìng yì" msgid "FFT is implemented for linear arrays only" msgstr "FFT jǐn shì yòng yú xiàn xìng zhèn liè" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" msgstr "SSL wòshǒu shībài" @@ -1046,7 +1048,7 @@ msgstr "Fēnpèi RX huǎnchōng shībài" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/stm/common-hal/pulseio/PulseIn.c @@ -1054,11 +1056,11 @@ msgstr "Fēnpèi RX huǎnchōng shībài" msgid "Failed to allocate RX buffer of %d bytes" msgstr "Fēnpèi RX huǎnchōng qū%d zì jié shībài" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" msgstr "Wúfǎ fēnpèi Wifi nèicún" -#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c +#: ports/espressif/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" msgstr "Wúfǎ fēnpèi wifi sǎomiáo nèicún" @@ -1074,7 +1076,7 @@ msgstr "Liánjiē shībài: Nèibù cuòwù" msgid "Failed to connect: timeout" msgstr "Liánjiē shībài: Chāoshí" -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Failed to init wifi" msgstr "Wúfǎ chūshǐhuà wifi" @@ -1100,12 +1102,12 @@ msgid "File exists" msgstr "Wénjiàn cúnzài" #: ports/atmel-samd/common-hal/canio/Listener.c -#: ports/esp32s2/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "guò lǜ qì tài fù zá" -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware image is invalid" msgstr "gù jiàn yìng xiàng wú xiào" @@ -1127,7 +1129,7 @@ msgstr "Pínlǜ bìxū yǔ shǐyòng cǐ jìshí qì de xiàn yǒu PWMOut xiāng msgid "Function requires lock" msgstr "Hánshù xūyào suǒdìng" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" msgstr "tōng yòng gù zhàng" @@ -1204,7 +1206,7 @@ msgstr "" "chū shǐ shè zhì yǐn jiǎo zhuàng tài yǔ chū shǐ chū yǐn jiǎo zhuàng tài chōng " "tū" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" msgstr "yóu yú nèi cún bù zú, chū shǐ huà shī bài" @@ -1218,7 +1220,7 @@ msgstr "" msgid "Input taking too long" msgstr "Shūrù shíjiānguò zhǎng" -#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" msgstr "Shūrù/shūchū cuòwù" @@ -1284,7 +1286,7 @@ msgstr "wú xiào %q yǐn jiǎo xuǎn zé" msgid "Invalid ADC Unit value" msgstr "Wúxiào de ADC dānwèi zhí" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid AuthMode" msgstr "wú xiào AuthMode" @@ -1300,7 +1302,7 @@ msgstr "Wúxiào de BMP wénjiàn" msgid "Invalid BSSID" msgstr "Wúxiào de BSSID" -#: ports/esp32s2/common-hal/analogio/AnalogOut.c +#: ports/espressif/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Tí gōng liǎo wúxiào de DAC yǐn jiǎo" @@ -1311,18 +1313,18 @@ msgstr "wú xiào de MIDI wén jiàn" #: ports/atmel-samd/common-hal/pwmio/PWMOut.c #: ports/cxd56/common-hal/pwmio/PWMOut.c -#: ports/esp32s2/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c #: ports/nrf/common-hal/pwmio/PWMOut.c #: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c msgid "Invalid PWM frequency" msgstr "Wúxiào de PWM pínlǜ" -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" msgstr "wú xiào yǐn jiǎo" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Wúxiào de cānshù" @@ -1341,7 +1343,7 @@ msgid "Invalid byteorder string" msgstr "Wúxiào de zì jié shùnxù zìfú chuàn" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c msgid "Invalid capture period. Valid range: 1 - 500" msgstr "Wúxiào de bǔhuò zhōuqí. Yǒuxiào fànwéi: 1-500" @@ -1371,7 +1373,7 @@ msgstr "Wúxiào de wénjiàn" msgid "Invalid format chunk size" msgstr "Géshì kuài dàxiǎo wúxiào" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Invalid frequency" msgstr "Wúxiào de pínlǜ" @@ -1390,8 +1392,8 @@ msgstr "Jiēduàn wúxiào" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c -#: ports/esp32s2/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c #: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1411,8 +1413,10 @@ msgstr "Yòuxián tōngdào yǐn jiǎo wúxiào" #: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c -#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c @@ -1439,15 +1443,15 @@ msgstr "Wúxiào de yùnxíng móshì." msgid "Invalid security_mode" msgstr "Ānquán móshì wúxiào" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid size" msgstr "dà xiǎo wú xiào" -#: ports/esp32s2/common-hal/ssl/SSLContext.c +#: ports/espressif/common-hal/ssl/SSLContext.c msgid "Invalid socket for TLS" msgstr "TLS de chā zuò wú xiào" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Invalid state" msgstr "wú xiào zhuàng tài" @@ -1484,7 +1488,7 @@ msgstr "Tú céng yǐjīng zài yīgè zǔ zhōng." msgid "Layer must be a Group or TileGrid subclass." msgstr "Layer bìxū shì Group huò TileGrid zi lèi." -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "MAC address was invalid" msgstr "MAC dì zhǐ wú xiào" @@ -1571,7 +1575,7 @@ msgstr "bì xū shǐ yòng 6 RGB yǐn jiǎo de bèi shù, ér bù shì %d" msgid "NLR jump failed. Likely memory corruption." msgstr "NLR tiào zhuǎn shī bài. kě néng shì nèi cún sǔn huài." -#: ports/esp32s2/common-hal/nvm/ByteArray.c +#: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" msgstr "NVS cuò wù" @@ -1604,25 +1608,25 @@ msgstr "wèi zhǎo dào DMA qǐ bó qì" msgid "No I2C device at address: %x" msgstr "dì zhǐ wú I2C shè bèi: %x" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MISO Pin" msgstr "Méiyǒu MISO yǐn jiǎo" -#: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c msgid "No MOSI Pin" msgstr "Méiyǒu MOSI yǐn jiǎo" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No RX pin" msgstr "Wèi zhǎodào RX yǐn jiǎo" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "No TX pin" @@ -1686,7 +1690,8 @@ msgstr "Méiyǒu wǎngluò yǔ gāi ssid" msgid "No out in program" msgstr "chéng xù zhōng wèi tuì chū" -#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" @@ -1749,11 +1754,11 @@ msgstr "Bù zhīchí jīshù" msgid "Only 8 or 16 bit mono with " msgstr "Zhǐyǒu 8 huò 16 wèi dānwèi " -#: ports/esp32s2/common-hal/wifi/__init__.c +#: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" msgstr "Jǐn zhīchí IPv4 dìzhǐ" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" msgstr "jǐn zhī chí IPv4 tào jiē zì" @@ -1786,11 +1791,11 @@ msgstr "" "Jǐn zhīchí dān sè, suǒyǐn wéi 4bpp huò 8bpp yǐjí 16bpp huò gèng gāo de BMP: " "Gěi chū %d bpp" -#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one TouchAlarm can be set in deep sleep." msgstr "zhǐ yǒu yí gè chù mō bì kě yǐ shè zhì zài shēn dù shuì mián." -#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -1801,19 +1806,19 @@ msgstr "zhǐ néng shè zhì yí gè bào jǐng." msgid "Only one color can be transparent at a time" msgstr "Yīcì zhǐ néng yǒuyī zhǒng yánsè shì tòumíng de" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation or feature not supported" msgstr "bù zhī chí cāo zuò huò gōng néng" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Operation timed out" msgstr "cāo zuò yǐ fēn shí" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" msgstr "nèi cún bù zú" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "tào jiē zì wài" @@ -1853,7 +1858,7 @@ msgstr "yǐ jīng zài shǐ yòng de PWM qiē piàn" msgid "PWM slice channel A already in use" msgstr "PWM qiē piàn tōng dào A yǐ zài shǐ yòng zhōng" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" msgstr "shǐ yòng zhōng de wài shè" @@ -1875,7 +1880,7 @@ msgstr "yǐn jiǎo jì shù tài dà" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c #: ports/cxd56/common-hal/analogio/AnalogIn.c -#: ports/esp32s2/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c #: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -1983,12 +1988,12 @@ msgstr "RNG chūshǐhuà cuòwù" msgid "RS485 Not yet supported on this device" msgstr "RS485 cǐ shè bèi shàng bù zhī chí" -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" msgstr "Wèi chǔyú RS485 móshì shí zhǐdìngle RS485 fǎn zhuǎn" -#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/rtc/RTC.c msgid "RTC calibration is not supported on this board" @@ -2020,7 +2025,7 @@ msgstr "Zhǐ dú wénjiàn xìtǒng" msgid "Read-only object" msgstr "Zhǐ dú duìxiàng" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "shōu dào de xiǎng yìng wú xiào" @@ -2036,7 +2041,7 @@ msgstr "RemoteTransmissionRequests xiànzhì wèi 8 gè zì jié" msgid "Requested AES mode is unsupported" msgstr "Qǐngqiú de AES móshì bù shòu zhīchí" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Requested resource not found" msgstr "wèi zhǎo dào qǐng qiú de zī yuán" @@ -2074,7 +2079,7 @@ msgstr "SPI chūshǐhuà cuòwù" msgid "SPI Re-initialization error" msgstr "SPI chóngxīn chūshǐhuà cuòwù" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" msgstr "SPI pèi zhì shī bài" @@ -2131,7 +2136,7 @@ msgstr "Qiēpiàn hé zhí bùtóng chángdù." msgid "Slices not supported" msgstr "Qiēpiàn bù shòu zhīchí" -#: ports/esp32s2/common-hal/socketpool/SocketPool.c +#: ports/espressif/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" msgstr "SocketPool zhǐ néng yǔ wifi.Radio yīqǐ shǐyòng" @@ -2335,7 +2340,7 @@ msgstr "UUID zhí bùshì str,int huò zì jié huǎnchōng qū" msgid "Unable to allocate buffers for signed conversion" msgstr "Wúfǎ fēnpèi huǎnchōng qū yòng yú qiānmíng zhuǎnhuàn" -#: ports/esp32s2/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Wúfǎ chuàngjiàn suǒ" @@ -2369,7 +2374,7 @@ msgstr "wú fǎ xiě rù sleep_memory." msgid "Unexpected nrfx uuid type" msgstr "Yìwài de nrfx uuid lèixíng" -#: ports/esp32s2/common-hal/ssl/SSLSocket.c +#: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" msgstr "Wèi chǔlǐ de ESP TLS cuòwù %d %d %x %d" @@ -2412,7 +2417,7 @@ msgstr "" "huò hūlüè." #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" msgstr "Bù zhīchí de baudrate" @@ -2433,7 +2438,7 @@ msgstr "Bù zhīchí de cāozuò" msgid "Unsupported pull value." msgstr "Bù zhīchí de lādòng zhí." -#: ports/esp32s2/common-hal/dualbank/__init__.c +#: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "gēng xīn shī bài" @@ -2447,7 +2452,7 @@ msgstr "Zhí chángdù != Suǒ xū de gùdìng chángdù" msgid "Value length > max_length" msgstr "Zhí chángdù > zuìdà chángdù" -#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "Version was invalid" msgstr "bǎn běn wú xiào" @@ -2700,7 +2705,7 @@ msgid "byteorder is not a string" msgstr "byteorder bùshì zìfú chuàn" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c msgid "bytes > 8 bits not supported" msgstr "zì jié > 8 wèi" @@ -3320,7 +3325,7 @@ msgid "index is out of bounds" msgstr "suǒyǐn chāochū fànwéi" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c -#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" msgstr "suǒyǐn chāochū fànwéi" @@ -3552,7 +3557,7 @@ msgstr "fùzhí qián yǐnyòng de júbù biànliàng" msgid "long int not supported in this build" msgstr "cǐ bǎnběn bù zhīchí zhǎng zhěngshù" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "Wài shè bù zhī chí huán huí + jìng yīn mó shì" @@ -3943,7 +3948,7 @@ msgstr "pixel_shader bìxū shì displayio.Palette huò displayio.ColorConverter msgid "polygon can only be registered in one parent" msgstr "duōbiānxíng zhī néng zài yīgè fù jí zhōng zhùcè" -#: ports/esp32s2/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" msgstr "cóng kōng mài chōng tán chū" @@ -3968,40 +3973,40 @@ msgstr "pow() 3 cān shǔ bùnéng wéi 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" -#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h -#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h -#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h -#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h -#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h -#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/esp32s2/boards/espressif_hmi_devkit_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h -#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h -#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h -#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h -#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h -#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h -#: ports/esp32s2/boards/lolin_s2_mini/mpconfigboard.h -#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h -#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h -#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h -#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h -#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h -#: ports/esp32s2/boards/unexpectedmaker_tinys2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "Zài qǐdòng shí àn qǐdòng ànniǔ.\n" @@ -4245,7 +4250,7 @@ msgstr "cí tiē bì xū dà yú líng" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() xūyào 9 xùliè" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" @@ -4312,18 +4317,18 @@ msgstr "tī xíng dìng yì wéi yì wéi kě dié dài duì xiàng" msgid "tuple/list has wrong length" msgstr "yuán zǔ/lièbiǎo chángdù cuòwù" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" msgstr "twai_driver_install fǎn huí esp-idf cuò wù #%d" -#: ports/esp32s2/common-hal/canio/CAN.c +#: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" msgstr "twai_start fǎn huí esp -idf cuò wù #%d" #: ports/atmel-samd/common-hal/busio/UART.c -#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" msgstr "tx hé rx bùnéng dōu shì wú" @@ -4446,7 +4451,7 @@ msgstr "zhí fàn wéi wài de mù biāo" msgid "value_count must be > 0" msgstr "zhí jìshù bìxū wèi > 0" -#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" msgstr "wèi chū shǐ huà jiān shì qì" @@ -4463,7 +4468,7 @@ msgstr "kuān dù bì xū cóng 2 dào 8 ( hán ), ér bù shì %d" msgid "width must be greater than zero" msgstr "kuāndù bìxū dàyú líng" -#: ports/esp32s2/common-hal/wifi/Radio.c +#: ports/espressif/common-hal/wifi/Radio.c msgid "wifi is not enabled" msgstr "wèi qǐ yòng WIFI" @@ -4499,7 +4504,7 @@ msgstr "cuòwù de shūchū lèixíng" msgid "x value out of bounds" msgstr "x zhí chāochū biānjiè" -#: ports/esp32s2/common-hal/audiobusio/__init__.c +#: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" msgstr "xTaskCreate shī bài" From e544909b5b498322e6645ed61cb5c63741f64484 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 14 Sep 2021 16:24:37 -0700 Subject: [PATCH 408/418] Clear the buffer byte between ATB and FTB This ensures it has a known start state. An unknown state risks it looking like a tail block similar to the problem fixed by #5245. Fixes #5305 --- py/gc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/py/gc.c b/py/gc.c index 6d6aa717ba..69ab969da7 100644 --- a/py/gc.c +++ b/py/gc.c @@ -150,8 +150,10 @@ void gc_init(void *start, void *end) { assert(MP_STATE_MEM(gc_pool_start) >= MP_STATE_MEM(gc_finaliser_table_start) + gc_finaliser_table_byte_len); #endif - // clear ATBs - memset(MP_STATE_MEM(gc_alloc_table_start), 0, MP_STATE_MEM(gc_alloc_table_byte_len)); + // Clear ATBs plus one more byte. The extra byte might be read when we read the final ATB and + // then try to count its tail. Clearing the byte ensures it is 0 and ends the chain. Without an + // FTB, it'll just clear the pool byte early. + memset(MP_STATE_MEM(gc_alloc_table_start), 0, MP_STATE_MEM(gc_alloc_table_byte_len) + 1); #if MICROPY_ENABLE_FINALISER // clear FTBs From 02dc0481c50a7ab4fd0d05001dc6a3340b22a50c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 14 Sep 2021 19:50:46 -0400 Subject: [PATCH 409/418] shrink stm32f411ve_discovery --- ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk index d5368fa84c..61e372b2c3 100644 --- a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk @@ -19,3 +19,4 @@ CIRCUITPY_KEYPAD = 0 CIRCUITPY_MIDI = 0 CIRCUITPY_MSGPACK = 0 CIRCUITPY_BITMAPTOOLS = 0 +CIRCUITPY_VECTORIO = 0 From 9e8c6b2bab5d4ae45a149a66d7d292c799e276c9 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 14 Sep 2021 19:59:01 -0400 Subject: [PATCH 410/418] Shrink pca10100 some more --- ports/nrf/boards/pca10100/mpconfigboard.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/nrf/boards/pca10100/mpconfigboard.mk b/ports/nrf/boards/pca10100/mpconfigboard.mk index 3d4fa496cc..59f2b217c3 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.mk +++ b/ports/nrf/boards/pca10100/mpconfigboard.mk @@ -12,6 +12,7 @@ CIRCUITPY_ALARM = 0 CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_BINASCII = 0 CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_BUSDEVICE = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_DISPLAYIO = 0 @@ -30,6 +31,7 @@ CIRCUITPY_SDCARDIO = 0 CIRCUITPY_SYNTHIO = 0 CIRCUITPY_ULAB = 0 CIRCUITPY_USB_MIDI = 0 +CIRCUITPY_VECTORIO = 0 MICROPY_PY_ASYNC_AWAIT = 0 From a5dc0fef5f1f8c11b3f5cdd9b05e42591000c2ac Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 16 Sep 2021 11:59:43 -0400 Subject: [PATCH 411/418] Revert #5341. Does not work on power-cycle. --- ports/raspberrypi/supervisor/port.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 213084582b..fca6d6554c 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -238,8 +238,9 @@ void port_interrupt_after_ticks(uint32_t ticks) { void port_idle_until_interrupt(void) { common_hal_mcu_disable_interrupts(); if (!background_callback_pending()) { - asm volatile ("dsb 0xF" ::: "memory"); - __wfi(); + // TODO: Does not work when board is power-cycled. + // asm volatile ("dsb 0xF" ::: "memory"); + // __wfi(); } common_hal_mcu_enable_interrupts(); } From 2916167bf4a0d4052bf428db6c3f611b14512101 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 16 Sep 2021 14:11:16 -0500 Subject: [PATCH 412/418] paralleldisplay: make it actually importable --- py/circuitpy_defns.mk | 2 + shared-bindings/paralleldisplay/__init__.c | 51 ++++++++++++++++++++++ shared-bindings/paralleldisplay/__init__.h | 26 +---------- 3 files changed, 54 insertions(+), 25 deletions(-) create mode 100644 shared-bindings/paralleldisplay/__init__.c diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index ae701cd201..74290fe3d7 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -471,6 +471,8 @@ $(filter $(SRC_PATTERNS), \ microcontroller/RunMode.c \ msgpack/__init__.c \ msgpack/ExtType.c \ + paralleldisplay/__init__.c \ + paralleldisplay/ParallelBus.c \ supervisor/RunReason.c \ wifi/AuthMode.c \ ) diff --git a/shared-bindings/paralleldisplay/__init__.c b/shared-bindings/paralleldisplay/__init__.c new file mode 100644 index 0000000000..e87479a9f9 --- /dev/null +++ b/shared-bindings/paralleldisplay/__init__.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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 + +#include "py/enum.h" +#include "py/obj.h" +#include "py/runtime.h" + +#include "shared-bindings/paralleldisplay/__init__.h" +#include "shared-bindings/paralleldisplay/ParallelBus.h" + +//| """Native helpers for driving parallel displays""" + + +STATIC const mp_rom_map_elem_t paralleldisplay_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_paralleldisplay) }, + { MP_ROM_QSTR(MP_QSTR_ParallelBus), MP_ROM_PTR(¶lleldisplay_parallelbus_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(paralleldisplay_module_globals, paralleldisplay_module_globals_table); + +const mp_obj_module_t paralleldisplay_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)¶lleldisplay_module_globals, +}; + +MP_REGISTER_MODULE(MP_QSTR_paralleldisplay, paralleldisplay_module, CIRCUITPY_PARALLELDISPLAY); diff --git a/shared-bindings/paralleldisplay/__init__.h b/shared-bindings/paralleldisplay/__init__.h index e87479a9f9..f7b42875a1 100644 --- a/shared-bindings/paralleldisplay/__init__.h +++ b/shared-bindings/paralleldisplay/__init__.h @@ -24,28 +24,4 @@ * THE SOFTWARE. */ -#include - -#include "py/enum.h" -#include "py/obj.h" -#include "py/runtime.h" - -#include "shared-bindings/paralleldisplay/__init__.h" -#include "shared-bindings/paralleldisplay/ParallelBus.h" - -//| """Native helpers for driving parallel displays""" - - -STATIC const mp_rom_map_elem_t paralleldisplay_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_paralleldisplay) }, - { MP_ROM_QSTR(MP_QSTR_ParallelBus), MP_ROM_PTR(¶lleldisplay_parallelbus_type) }, -}; - -STATIC MP_DEFINE_CONST_DICT(paralleldisplay_module_globals, paralleldisplay_module_globals_table); - -const mp_obj_module_t paralleldisplay_module = { - .base = { &mp_type_module }, - .globals = (mp_obj_dict_t *)¶lleldisplay_module_globals, -}; - -MP_REGISTER_MODULE(MP_QSTR_paralleldisplay, paralleldisplay_module, CIRCUITPY_PARALLELDISPLAY); +#pragma once From 29db2078f12d6bdc919f92cdecca82d8254c9a7e Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 16 Sep 2021 21:12:31 -0600 Subject: [PATCH 413/418] New Board: Pykey60 --- .../boards/jpconstantineau_pykey60/board.c | 42 ++++++++++++++++ .../jpconstantineau_pykey60/mpconfigboard.h | 2 + .../jpconstantineau_pykey60/mpconfigboard.mk | 11 +++++ .../pico-sdk-configboard.h | 1 + .../boards/jpconstantineau_pykey60/pins.c | 49 +++++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey60/board.c create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey60/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/board.c b/ports/raspberrypi/boards/jpconstantineau_pykey60/board.c new file mode 100644 index 0000000000..c24864c493 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/board.c @@ -0,0 +1,42 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + // turn off any left over LED + board_reset_user_neopixels(&pin_GPIO29, 62); +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h new file mode 100644 index 0000000000..f4ccde3fca --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h @@ -0,0 +1,2 @@ +#define MICROPY_HW_BOARD_NAME "PyKey60" +#define MICROPY_HW_MCU_NAME "rp2040" diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk new file mode 100644 index 0000000000..263f7ad3b2 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1d50 +USB_PID = 0x6153 +USB_PRODUCT = "Pykey60" +USB_MANUFACTURER = "JPConstantineau" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/pico-sdk-configboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey60/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c new file mode 100644 index 0000000000..b33373c9a0 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c @@ -0,0 +1,49 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From fd7d094f7c3fdf07e002ca2088f3999c0bbfb854 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 16 Sep 2021 21:43:31 -0600 Subject: [PATCH 414/418] adding necesary includes --- ports/raspberrypi/boards/jpconstantineau_pykey60/board.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/board.c b/ports/raspberrypi/boards/jpconstantineau_pykey60/board.c index c24864c493..e4e5a8bc57 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/board.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/board.c @@ -25,6 +25,9 @@ */ #include "supervisor/board.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" +#include "supervisor/shared/board.h" void board_init(void) { } From 23e4f08bc6ea37e0e4a09976bf0f0c51ce4fa106 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Fri, 17 Sep 2021 15:17:39 +0200 Subject: [PATCH 415/418] Remove leftover stop from I2C.writeto docs --- shared-bindings/bitbangio/I2C.c | 2 +- shared-bindings/busio/I2C.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/bitbangio/I2C.c b/shared-bindings/bitbangio/I2C.c index f6be845473..9f39e84061 100644 --- a/shared-bindings/bitbangio/I2C.c +++ b/shared-bindings/bitbangio/I2C.c @@ -217,7 +217,7 @@ STATIC mp_obj_t bitbangio_i2c_readfrom_into(size_t n_args, const mp_obj_t *pos_a } MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_readfrom_into_obj, 3, bitbangio_i2c_readfrom_into); -//| def writeto(self, address: int, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None, stop: bool = True) -> None: +//| def writeto(self, address: int, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None: //| """Write the bytes from ``buffer`` to the device selected by ``address`` and then transmits a //| stop bit. Use `writeto_then_readfrom` when needing a write, no stop and repeated start //| before a read. diff --git a/shared-bindings/busio/I2C.c b/shared-bindings/busio/I2C.c index d300956d0a..344dad8acc 100644 --- a/shared-bindings/busio/I2C.c +++ b/shared-bindings/busio/I2C.c @@ -228,7 +228,7 @@ STATIC mp_obj_t busio_i2c_readfrom_into(size_t n_args, const mp_obj_t *pos_args, } MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_readfrom_into_obj, 3, busio_i2c_readfrom_into); -//| def writeto(self, address: int, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None, stop: bool = True) -> None: +//| def writeto(self, address: int, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None: //| """Write the bytes from ``buffer`` to the device selected by ``address`` and //| then transmit a stop bit. //| From 4ab00d7125e970c5b790493900af54407d3200e1 Mon Sep 17 00:00:00 2001 From: Trammell Hudson Date: Fri, 17 Sep 2021 16:56:12 +0000 Subject: [PATCH 416/418] mp_hal_delay_ms: avoid overflow when scaling ticks This patch casts the delay argument to mp_hal_delay_ms() from mp_uint_t to uint64_t when scaling from milliseconds to ticks to avoid 32-bit integer overflow when time.sleep() is called with a duration of greater than 70 minutes. Signed-off-by: Trammell Hudson --- supervisor/shared/tick.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/supervisor/shared/tick.c b/supervisor/shared/tick.c index eac98215a1..397151ccc8 100644 --- a/supervisor/shared/tick.c +++ b/supervisor/shared/tick.c @@ -127,12 +127,12 @@ void PLACE_IN_ITCM(supervisor_run_background_tasks_if_tick)() { background_callback_run_all(); } -void mp_hal_delay_ms(mp_uint_t delay) { +void mp_hal_delay_ms(mp_uint_t delay_ms) { uint64_t start_tick = port_get_raw_ticks(NULL); // Adjust the delay to ticks vs ms. - delay = delay * 1024 / 1000; - uint64_t end_tick = start_tick + delay; - int64_t remaining = delay; + uint64_t delay_ticks = (delay_ms * (uint64_t)1024) / 1000; + uint64_t end_tick = start_tick + delay_ticks; + int64_t remaining = delay_ticks; // Loop until we've waited long enough or we've been CTRL-Ced by autoreload // or the user. From db936f8a200de314b7f4df7ab77e75ebb4c1b114 Mon Sep 17 00:00:00 2001 From: James Carr <70200140+lesamouraipourpre@users.noreply.github.com> Date: Sat, 18 Sep 2021 21:04:45 +0100 Subject: [PATCH 417/418] bitmaptools.__init__ minor update Update the error message in bitmaptools_readinto() to match the code. --- shared-bindings/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index bd15985838..4e14a061f0 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -563,7 +563,7 @@ STATIC mp_obj_t bitmaptools_readinto(size_t n_args, const mp_obj_t *pos_args, mp case 32: break; default: - mp_raise_ValueError_varg(translate("invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32"), bits_per_pixel); + mp_raise_ValueError_varg(translate("invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32"), bits_per_pixel); } bool reverse_pixels_in_element = args[ARG_reverse_pixels_in_element].u_bool; From ca9154421a7c91aefc85081bb79c429f0e7da5f4 Mon Sep 17 00:00:00 2001 From: James Carr Date: Sat, 18 Sep 2021 21:40:27 +0100 Subject: [PATCH 418/418] Run make translate --- locale/circuitpython.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index f58a84917b..54a836cf18 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -3380,7 +3380,7 @@ msgstr "" #: shared-bindings/bitmaptools/__init__.c #, c-format -msgid "invalid bits_per_pixel %d, must be, 1, 4, 8, 16, 24, or 32" +msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" msgstr "" #: shared-bindings/bitmaptools/__init__.c