From c310a618e8428da6cf43065e04e7fa3fd51fc350 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Aug 2021 19:59:59 -0500 Subject: [PATCH 02/11] 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 03/11] 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 04/11] 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 05/11] 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 c0c98928875735f0728bc86ba3caf0dbb1c7a8ac Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 25 Aug 2021 11:17:09 -0400 Subject: [PATCH 06/11] 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 870aa2d79dee188a81e520165065823dc300328a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 25 Aug 2021 11:37:37 -0500 Subject: [PATCH 07/11] 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 08/11] 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 09/11] 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 5ce73f896af33278adb7b0957ef82d4310ff67eb Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 26 Aug 2021 00:35:37 +0200 Subject: [PATCH 10/11] 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 11/11] 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);