From cdefd2e674771174172aa004329989002b406937 Mon Sep 17 00:00:00 2001 From: Jay Greco Date: Thu, 22 Dec 2022 06:57:25 +0000 Subject: [PATCH 01/40] Add nullbits Bit-C PRO board --- .../boards/nullbits_bit_c_pro/board.c | 29 +++++++++++ .../boards/nullbits_bit_c_pro/mpconfigboard.h | 17 +++++++ .../nullbits_bit_c_pro/mpconfigboard.mk | 9 ++++ .../nullbits_bit_c_pro/pico-sdk-configboard.h | 4 ++ .../boards/nullbits_bit_c_pro/pins.c | 49 +++++++++++++++++++ 5 files changed, 108 insertions(+) create mode 100644 ports/raspberrypi/boards/nullbits_bit_c_pro/board.c create mode 100644 ports/raspberrypi/boards/nullbits_bit_c_pro/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/nullbits_bit_c_pro/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/nullbits_bit_c_pro/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/nullbits_bit_c_pro/pins.c diff --git a/ports/raspberrypi/boards/nullbits_bit_c_pro/board.c b/ports/raspberrypi/boards/nullbits_bit_c_pro/board.c new file mode 100644 index 0000000000..331653173e --- /dev/null +++ b/ports/raspberrypi/boards/nullbits_bit_c_pro/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/raspberrypi/boards/nullbits_bit_c_pro/mpconfigboard.h b/ports/raspberrypi/boards/nullbits_bit_c_pro/mpconfigboard.h new file mode 100644 index 0000000000..d2a514006a --- /dev/null +++ b/ports/raspberrypi/boards/nullbits_bit_c_pro/mpconfigboard.h @@ -0,0 +1,17 @@ +#define MICROPY_HW_BOARD_NAME "nullbits Bit-C PRO" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#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) + +#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) diff --git a/ports/raspberrypi/boards/nullbits_bit_c_pro/mpconfigboard.mk b/ports/raspberrypi/boards/nullbits_bit_c_pro/mpconfigboard.mk new file mode 100644 index 0000000000..81271d3721 --- /dev/null +++ b/ports/raspberrypi/boards/nullbits_bit_c_pro/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x2E8A +USB_PID = 0x1048 +USB_PRODUCT = "Bit-C PRO" +USB_MANUFACTURER = "nullbits" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "GD25Q32C" diff --git a/ports/raspberrypi/boards/nullbits_bit_c_pro/pico-sdk-configboard.h b/ports/raspberrypi/boards/nullbits_bit_c_pro/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/nullbits_bit_c_pro/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/nullbits_bit_c_pro/pins.c b/ports/raspberrypi/boards/nullbits_bit_c_pro/pins.c new file mode 100644 index 0000000000..ac1b1a8065 --- /dev/null +++ b/ports/raspberrypi/boards/nullbits_bit_c_pro/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_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) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_LED_BLUE), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO18) }, + + { 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 2901399cc61f77f144b6b871694cc8a1e1677476 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 19 Dec 2022 09:04:09 -0600 Subject: [PATCH 02/40] No need to depend it here, conf.py runs `make stubs` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b35b5c66b9..40952d261d 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,7 @@ clean: rm -rf autoapi rm -rf $(STUBDIR) $(DISTDIR) *.egg-info -html: stubs +html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." From 4dbbfa0931670b8fe0a585a9b8276934b6cfd861 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Dec 2022 10:45:42 -0600 Subject: [PATCH 03/40] Print errors to repl about getenv --- locale/circuitpython.pot | 14 ++++-- shared-module/os/__init__.h | 2 + shared-module/os/getenv.c | 96 +++++++++++++++++++++++++------------ 3 files changed, 78 insertions(+), 34 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 0cf1027239..28963bd4a8 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -65,6 +65,11 @@ msgstr "" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -488,6 +493,11 @@ msgstr "" msgid "Already scanning for wifi networks" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1754,10 +1764,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/shared-module/os/__init__.h b/shared-module/os/__init__.h index 0e1d78c53b..1b18a1f4b9 100644 --- a/shared-module/os/__init__.h +++ b/shared-module/os/__init__.h @@ -38,9 +38,11 @@ typedef enum { // Allocation free version that returns the full length of the value. // If it fits, the return value is 0-terminated. The passed in buffer // may be modified even if an error is returned. Allocation free. +// An error that is not 'open' or 'not found' is printed on the repl. os_getenv_err_t common_hal_os_getenv_str(const char *key, char *value, size_t value_len); // Returns GETENV_OK and sets value to the read value. Returns // GETENV_ERR_... if the value was not numeric. allocation-free. // If any error code is returned, value is guaranteed not modified +// An error that is not 'open' or 'not found' is printed on the repl. os_getenv_err_t common_hal_os_getenv_int(const char *key, mp_int_t *value); diff --git a/shared-module/os/getenv.c b/shared-module/os/getenv.c index d96b1fb306..d9e75484ec 100644 --- a/shared-module/os/getenv.c +++ b/shared-module/os/getenv.c @@ -28,6 +28,7 @@ // tested in the unix "coverage" build, without bringing in "our" os module #include +#include #include #include "shared-bindings/os/__init__.h" @@ -36,6 +37,7 @@ #include "py/gc.h" #include "py/misc.h" #include "py/mpstate.h" +#include "py/mpprint.h" #include "py/objstr.h" #include "py/parsenum.h" #include "py/runtime.h" @@ -311,7 +313,58 @@ STATIC os_getenv_err_t os_getenv_buf_terminated(const char *key, char *value, si return result; } -os_getenv_err_t common_hal_os_getenv_str(const char *key, char *value, size_t value_len) { +STATIC void print_dont_raise(const mp_obj_type_t *exc_type, const compressed_string_t *fmt, ...) { + va_list argptr; + va_start(argptr,fmt); + mp_vcprintf(&mp_plat_print, fmt, argptr); + mp_printf(&mp_plat_print, "\n"); + va_end(argptr); +} + +STATIC void handle_getenv_error(os_getenv_err_t error, void (*handle)(const mp_obj_type_t *exc_type, const compressed_string_t *fmt, ...)) { + if (error == GETENV_OK) { + return; + } + if (error & GETENV_ERR_UNEXPECTED) { + byte character = (error & 0xff); + char buf[8]; + vstr_t vstr; + vstr_init_fixed_buf(&vstr, sizeof(buf), buf); + mp_print_t print = { .data = &vstr, .print_strn = (mp_print_strn_t)vstr_add_strn }; + + if (character) { + mp_str_print_quoted(&print, &character, 1, true); + } else { + mp_str_print_quoted(&print, (byte *)"EOF", 3, true); + } + handle(&mp_type_ValueError, translate("Invalid byte %.*s"), vstr.len, vstr.buf); + } else { + switch (error) { + case GETENV_ERR_OPEN: + handle(&mp_type_ValueError, translate("%S"), translate("File not found")); + break; + case GETENV_ERR_UNICODE: + handle(&mp_type_ValueError, translate("%S"), translate("Invalid unicode escape")); + break; + case GETENV_ERR_NOT_FOUND: + handle(&mp_type_ValueError, translate("%S"), translate("Key not found")); + break; + default: + handle(&mp_type_RuntimeError, translate("%S"), translate("Internal error")); + break; + } + } +} + +STATIC void common_hal_os_getenv_showerr(const char *key, os_getenv_err_t result) { + if (result != GETENV_OK && result != GETENV_ERR_OPEN && result != GETENV_ERR_NOT_FOUND) { + mp_cprintf(&mp_plat_print, translate("An error occurred while retrieving '%s':\n"), key); + handle_getenv_error(result, print_dont_raise); + } +} + +STATIC +os_getenv_err_t common_hal_os_getenv_str_inner(const char *key, char *value, size_t value_len) { bool quoted; os_getenv_err_t result = os_getenv_buf_terminated(key, value, value_len, "ed); if (result == GETENV_OK && !quoted) { @@ -320,33 +373,10 @@ os_getenv_err_t common_hal_os_getenv_str(const char *key, char *value, size_t va return result; } -STATIC void throw_getenv_error(os_getenv_err_t error) { - if (error == GETENV_OK) { - return; - } - if (error & GETENV_ERR_UNEXPECTED) { - byte character = (error & 0xff); - mp_print_t print; - vstr_t vstr; - vstr_init_print(&vstr, 8 + 4 + 1, &print); - if (character) { - mp_str_print_quoted(&print, &character, 1, true); - } else { - mp_str_print_quoted(&print, (byte *)"EOF", 3, true); - } - mp_raise_ValueError_varg(translate("Invalid byte %.*s"), - vstr.len, vstr.buf); - } - switch (error) { - case GETENV_ERR_OPEN: - mp_raise_ValueError(translate("File not found")); - case GETENV_ERR_UNICODE: - mp_raise_ValueError(translate("Invalid unicode escape")); - case GETENV_ERR_NOT_FOUND: - mp_raise_ValueError(translate("Key not found")); - default: - mp_raise_RuntimeError(translate("Internal error")); - } +os_getenv_err_t common_hal_os_getenv_str(const char *key, char *value, size_t value_len) { + os_getenv_err_t result = common_hal_os_getenv_str_inner(key, value, value_len); + common_hal_os_getenv_showerr(key, result); + return result; } mp_obj_t common_hal_os_getenv_path(const char *path, const char *key, mp_obj_t default_) { @@ -358,7 +388,7 @@ mp_obj_t common_hal_os_getenv_path(const char *path, const char *key, mp_obj_t d if (result == GETENV_ERR_NOT_FOUND || result == GETENV_ERR_OPEN) { return default_; } - throw_getenv_error(result); + handle_getenv_error(result, mp_raise_msg_varg); if (quoted) { return mp_obj_new_str_from_vstr(&mp_type_str, &buf); @@ -371,7 +401,7 @@ mp_obj_t common_hal_os_getenv(const char *key, mp_obj_t default_) { return common_hal_os_getenv_path(GETENV_PATH, key, default_); } -os_getenv_err_t common_hal_os_getenv_int(const char *key, mp_int_t *value) { +STATIC os_getenv_err_t common_hal_os_getenv_int_inner(const char *key, mp_int_t *value) { char buf[16]; bool quoted; os_getenv_err_t result = os_getenv_buf_terminated(key, buf, sizeof(buf), "ed); @@ -389,3 +419,9 @@ os_getenv_err_t common_hal_os_getenv_int(const char *key, mp_int_t *value) { *value = (mp_int_t)num; return GETENV_OK; } + +os_getenv_err_t common_hal_os_getenv_int(const char *key, mp_int_t *value) { + os_getenv_err_t result = common_hal_os_getenv_int_inner(key, value); + common_hal_os_getenv_showerr(key, result); + return result; +} From f6b69cf5e3aca4ab745e666f5485a4a5f628fe77 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Dec 2022 10:49:57 -0600 Subject: [PATCH 04/40] Allow settings.toml to end without a newline --- shared-module/os/getenv.c | 2 +- tests/circuitpython/getenv.py | 3 +++ tests/circuitpython/getenv.py.exp | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/shared-module/os/getenv.c b/shared-module/os/getenv.c index d9e75484ec..21a97f3fec 100644 --- a/shared-module/os/getenv.c +++ b/shared-module/os/getenv.c @@ -201,6 +201,7 @@ STATIC os_getenv_err_t read_string_value(file_arg *active_file, vstr_t *buf) { case '#': next_line(active_file); MP_FALLTHROUGH; + case 0: case '\n': return GETENV_OK; default: @@ -257,7 +258,6 @@ STATIC os_getenv_err_t read_bare_value(file_arg *active_file, vstr_t *buf, int f while (true) { switch (character) { case 0: - return GETENV_ERR_UNEXPECTED | character; case '\n': return GETENV_OK; case '#': diff --git a/tests/circuitpython/getenv.py b/tests/circuitpython/getenv.py index ad8fdbfeeb..b63f587730 100644 --- a/tests/circuitpython/getenv.py +++ b/tests/circuitpython/getenv.py @@ -75,5 +75,8 @@ def run_test(key, content): for i in range(13): run_test(f"key{i}", content_good) +# Test value without trailing newline +run_test(f"noeol", "noeol=3") + for content in content_bad: run_test("key", content) diff --git a/tests/circuitpython/getenv.py.exp b/tests/circuitpython/getenv.py.exp index f83143c80b..0dcc8f78d3 100644 --- a/tests/circuitpython/getenv.py.exp +++ b/tests/circuitpython/getenv.py.exp @@ -11,6 +11,7 @@ key9 'hello comment' key10 127 key11 0 key12 None +noeol 3 key Invalid byte '\n' key Invalid byte '"' key invalid syntax for integer with base 10: '' From 337b1da143547b2d8266260cb2824c701106ddf0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Dec 2022 10:53:36 -0600 Subject: [PATCH 05/40] Explicitly test \n and \r\n files \r\n files must be working due to micropython's built in handling of text-mode files, I didn't implement it. \r-only (old mac text-mode files) are explicitly not supported by the toml format. --- tests/circuitpython/getenv.py | 18 +++++++++++------- tests/circuitpython/getenv.py.exp | 13 +++++++++++++ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/tests/circuitpython/getenv.py b/tests/circuitpython/getenv.py index b63f587730..2dccb99f97 100644 --- a/tests/circuitpython/getenv.py +++ b/tests/circuitpython/getenv.py @@ -35,7 +35,7 @@ bdev = RAMBlockDevice(64) uos.VfsFat.mkfs(bdev) uos.mount(uos.VfsFat(bdev), "/") -content_good = """ +content_good = b""" # comment key0 = "hello world" key1 = 7 @@ -54,15 +54,15 @@ subvalue = "hi" """ content_bad = [ - 'key = "\n', - 'key = """\n', - "key =\n", - 'key="', + b'key = "\n', + b'key = """\n', + b"key =\n", + b'key="', ] def run_test(key, content): - with open("/settings.toml", "w") as f: + with open("/settings.toml", "wb") as f: f.write(content) try: @@ -72,11 +72,15 @@ def run_test(key, content): print(key, str(e)) +for i in range(13): + run_test(f"key{i}", content_good) + +content_good = content_good.replace(b"\n", b"\r\n") for i in range(13): run_test(f"key{i}", content_good) # Test value without trailing newline -run_test(f"noeol", "noeol=3") +run_test(f"noeol", b"noeol=3") for content in content_bad: run_test("key", content) diff --git a/tests/circuitpython/getenv.py.exp b/tests/circuitpython/getenv.py.exp index 0dcc8f78d3..91c96e601a 100644 --- a/tests/circuitpython/getenv.py.exp +++ b/tests/circuitpython/getenv.py.exp @@ -11,6 +11,19 @@ key9 'hello comment' key10 127 key11 0 key12 None +key0 'hello world' +key1 7 +key2 Invalid byte '\n' +key3 'Áx' +key4 'Áx' +key5 Invalid byte '\\' +key6 '\t\r\x08' +key7 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' +key8 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' +key9 'hello comment' +key10 127 +key11 0 +key12 None noeol 3 key Invalid byte '\n' key Invalid byte '"' From 928fb0a9c4ec8a3f1903f3f7aefcf63f252cea62 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Dec 2022 13:57:15 -0600 Subject: [PATCH 06/40] Make the "name or service not known" message translatable --- locale/circuitpython.pot | 4 ++++ ports/espressif/common-hal/socketpool/Socket.c | 4 ++-- .../common-hal/socketpool/SocketPool.c | 2 +- shared-bindings/socketpool/SocketPool.c | 17 +++++++++++------ shared-bindings/socketpool/SocketPool.h | 2 +- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 0cf1027239..17c39cafdc 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1393,6 +1393,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "" diff --git a/ports/espressif/common-hal/socketpool/Socket.c b/ports/espressif/common-hal/socketpool/Socket.c index 18237a4d4e..ccb01116d8 100644 --- a/ports/espressif/common-hal/socketpool/Socket.c +++ b/ports/espressif/common-hal/socketpool/Socket.c @@ -369,7 +369,7 @@ void common_hal_socketpool_socket_connect(socketpool_socket_obj_t *self, struct addrinfo *result_i; int error = lwip_getaddrinfo(host, NULL, &hints, &result_i); if (error != 0 || result_i == NULL) { - common_hal_socketpool_socketpool_raise_gaierror(SOCKETPOOL_EAI_NONAME, MP_QSTR_Name_space_or_space_service_space_not_space_known); + common_hal_socketpool_socketpool_raise_gaierror_noname(); } // Set parameters @@ -550,7 +550,7 @@ mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t *self, struct addrinfo *result_i; int error = lwip_getaddrinfo(host, NULL, &hints, &result_i); if (error != 0 || result_i == NULL) { - common_hal_socketpool_socketpool_raise_gaierror(SOCKETPOOL_EAI_NONAME, MP_QSTR_Name_space_or_space_service_space_not_space_known); + common_hal_socketpool_socketpool_raise_gaierror_noname(); } // Set parameters diff --git a/ports/raspberrypi/common-hal/socketpool/SocketPool.c b/ports/raspberrypi/common-hal/socketpool/SocketPool.c index bdbc7f67c5..e562314d69 100644 --- a/ports/raspberrypi/common-hal/socketpool/SocketPool.c +++ b/ports/raspberrypi/common-hal/socketpool/SocketPool.c @@ -98,7 +98,7 @@ void socketpool_resolve_host_raise(socketpool_socketpool_obj_t *self, const char int result = socketpool_resolve_host(self, host, addr); if (result < 0) { printf("socket_resolve_host() returned %d\n", result); - common_hal_socketpool_socketpool_raise_gaierror(SOCKETPOOL_EAI_NONAME, MP_QSTR_Name_space_or_space_service_space_not_space_known); + common_hal_socketpool_socketpool_raise_gaierror_noname(); mp_raise_OSError(-result); } } diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c index 660aba63ed..f056c741f3 100644 --- a/shared-bindings/socketpool/SocketPool.c +++ b/shared-bindings/socketpool/SocketPool.c @@ -198,16 +198,21 @@ MP_WEAK mp_obj_t common_hal_socketpool_socketpool_gethostbyname_raise(socketpool_socketpool_obj_t *self, const char *host) { mp_obj_t ip_str = common_hal_socketpool_socketpool_gethostbyname(self, host); if (ip_str == mp_const_none) { - common_hal_socketpool_socketpool_raise_gaierror(SOCKETPOOL_EAI_NONAME, MP_QSTR_Name_space_or_space_service_space_not_space_known); + common_hal_socketpool_socketpool_raise_gaierror_noname(); } return ip_str; } MP_WEAK NORETURN -void common_hal_socketpool_socketpool_raise_gaierror(int value, qstr name) { - mp_obj_t exc_args[2] = { - MP_OBJ_NEW_SMALL_INT(value), - MP_OBJ_NEW_QSTR(name), +void common_hal_socketpool_socketpool_raise_gaierror_noname(void) { + vstr_t vstr; + mp_print_t print; + vstr_init_print(&vstr, 64, &print); + mp_printf(&print, "%S", translate("Name or service not known")); + + mp_obj_t exc_args[] = { + MP_OBJ_NEW_SMALL_INT(SOCKETPOOL_EAI_NONAME), + mp_obj_new_str_from_vstr(&mp_type_str, &vstr), }; - nlr_raise(mp_obj_new_exception_args(&mp_type_gaierror, 2, exc_args)); + nlr_raise(mp_obj_new_exception_args(&mp_type_gaierror, MP_ARRAY_SIZE(exc_args), exc_args)); } diff --git a/shared-bindings/socketpool/SocketPool.h b/shared-bindings/socketpool/SocketPool.h index cecbdd86f1..6409f8c763 100644 --- a/shared-bindings/socketpool/SocketPool.h +++ b/shared-bindings/socketpool/SocketPool.h @@ -73,6 +73,6 @@ bool socketpool_socket(socketpool_socketpool_obj_t *self, socketpool_socketpool_addressfamily_t family, socketpool_socketpool_sock_t type, socketpool_socket_obj_t *sock); -NORETURN void common_hal_socketpool_socketpool_raise_gaierror(int value, qstr name); +NORETURN void common_hal_socketpool_socketpool_raise_gaierror_noname(void); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_SOCKETPOOL_SOCKETPOOL_H From fc67e8794222380446743b63a341bb1d0006b0d1 Mon Sep 17 00:00:00 2001 From: Clay Date: Tue, 27 Dec 2022 07:13:15 +0000 Subject: [PATCH 07/40] Translated using Weblate (Russian) Currently translated at 35.6% (355 of 995 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/ --- locale/ru.po | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/locale/ru.po b/locale/ru.po index ef8dc019b4..08470eda78 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -7,16 +7,16 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2022-11-29 01:02+0000\n" +"PO-Revision-Date: 2022-12-27 17:42+0000\n" "Last-Translator: Clay \n" "Language-Team: none\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.15-dev\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.15.1-dev\n" #: main.c msgid "" @@ -168,7 +168,7 @@ msgstr "%q должно быть >= %d" #: shared-bindings/analogbufio/BufferedIn.c msgid "%q must be a bytearray or array of type 'H' or 'B'" -msgstr "" +msgstr "%q должно быть bytearray или array типа ‘H' или 'B'" #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" @@ -205,7 +205,7 @@ msgstr "Пин %q не допустим" #: py/objrange.c py/objslice.c shared-bindings/random/__init__.c msgid "%q step cannot be zero" -msgstr "" +msgstr "Шаг %q не может быть нулём" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -406,7 +406,7 @@ msgstr "Адрес должен быть длиной %d байт" #: ports/espressif/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" -msgstr "" +msgstr "Диапазон адресов не разрешен" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -917,8 +917,10 @@ msgid "Drive mode not used when direction is input." msgstr "Drive mode не используется, когда направление является входным." #: py/obj.c +#, fuzzy msgid "During handling of the above exception, another exception occurred:" msgstr "" +"Во время обработки вышеупомянутого исключения произошло другое исключение:" #: shared-bindings/aesio/aes.c msgid "ECB only operates on 16 bytes at a time" @@ -1040,7 +1042,7 @@ msgstr "Файл существует" #: shared-module/os/getenv.c msgid "File not found" -msgstr "" +msgstr "Файл не найден" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/espressif/common-hal/canio/Listener.c @@ -1291,7 +1293,7 @@ msgstr "Недопустимое бит-на-значение" #: shared-module/os/getenv.c #, c-format msgid "Invalid byte %.*s" -msgstr "" +msgstr "Неверный байт %.*s" #: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c #, c-format @@ -1333,7 +1335,7 @@ msgstr "Ключ должен быть длинной 16, 24 или 32 байт #: shared-module/os/getenv.c msgid "Key not found" -msgstr "" +msgstr "Ключ не найден" #: shared-module/is31fl3741/FrameBuffer.c msgid "LED mappings must match display size" @@ -1377,7 +1379,7 @@ msgstr "Размер данных различается" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Mismatched swap flag" -msgstr "" +msgstr "Несоответствие флага swap" #: ports/mimxrt10xx/common-hal/busio/SPI.c msgid "Missing MISO or MOSI Pin" @@ -1694,7 +1696,7 @@ msgstr "" #: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one %q can be set in deep sleep." -msgstr "" +msgstr "Только один %q может быть погружен в глубокий сон." #: ports/espressif/common-hal/espulp/ULPAlarm.c msgid "Only one %q can be set." @@ -4378,7 +4380,7 @@ msgstr "" #: extmod/ulab/code/numpy/vector.c msgid "wrong output type" -msgstr "" +msgstr "неверный тип вывода" #: shared-module/displayio/Shape.c msgid "x value out of bounds" @@ -4386,7 +4388,7 @@ msgstr "" #: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" -msgstr "" +msgstr "xTaskCreate провалился" #: shared-module/displayio/Shape.c msgid "y value out of bounds" @@ -4394,7 +4396,7 @@ msgstr "" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" -msgstr "" +msgstr "zi должен быть bytearray" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" From 7925069a773f0a4c7c52f0e01e384739db54608b Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 27 Dec 2022 18:42:37 +0100 Subject: [PATCH 08/40] 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 | 14 ++++++++++---- locale/cs.po | 14 ++++++++++---- locale/de_DE.po | 14 ++++++++++---- locale/el.po | 14 ++++++++++---- locale/en_GB.po | 14 ++++++++++---- locale/es.po | 14 ++++++++++---- locale/fil.po | 14 ++++++++++---- locale/fr.po | 14 ++++++++++---- locale/hi.po | 14 ++++++++++---- locale/it_IT.po | 14 ++++++++++---- locale/ja.po | 14 ++++++++++---- locale/ko.po | 14 ++++++++++---- locale/nl.po | 14 ++++++++++---- locale/pl.po | 14 ++++++++++---- locale/pt_BR.po | 17 +++++++++++++---- locale/ru.po | 18 ++++++++++++------ locale/sv.po | 17 +++++++++++++---- locale/tr.po | 14 ++++++++++---- locale/zh_Latn_pinyin.po | 14 ++++++++++---- 19 files changed, 198 insertions(+), 78 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 3aaca9e203..ab5ea27d40 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -70,6 +70,11 @@ msgstr "%%c harus int atau char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -494,6 +499,11 @@ msgstr "" msgid "Already scanning for wifi networks" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1779,10 +1789,6 @@ msgstr "" "ideal. Jika ini tidak dapat dihindari, berikan allow_inefficient=True ke " "konstruktor" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "Pin harus berurutan" diff --git a/locale/cs.po b/locale/cs.po index 5010b8b862..ce0b944057 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -72,6 +72,11 @@ msgstr "%%c vyžaduje int nebo char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -495,6 +500,11 @@ msgstr "Již běží" msgid "Already scanning for wifi networks" msgstr "Již skenuje wifi sítě" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Jiný PWMAudioOut je již aktivní" @@ -1770,10 +1780,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 3f1d800592..1c751f839e 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -71,6 +71,11 @@ msgstr "%%c erwartet Int oder Char" msgid "%02X" msgstr "%02X" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -498,6 +503,11 @@ msgstr "Läuft bereits" msgid "Already scanning for wifi networks" msgstr "Sucht bereits nach Wifi-Netzwerken" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Ein anderer PWMAudioOut ist bereits aktiv" @@ -1794,10 +1804,6 @@ msgstr "" "Bytes verbraucht. Wenn dies nicht vermieden werden kann, übergib " "allow_inefficient=True an den Konstruktor" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "Pins müssen geordnet sein" diff --git a/locale/el.po b/locale/el.po index e022e3a90e..bc2d642ed9 100644 --- a/locale/el.po +++ b/locale/el.po @@ -76,6 +76,11 @@ msgstr "%%c απαιτεί int ή char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -501,6 +506,11 @@ msgstr "Τρέχει ήδη" msgid "Already scanning for wifi networks" msgstr "Ήδη γίνεται σάρωση για δίκτυα wifi" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Και άλλο PWMAudioOut είναι σε χρήση" @@ -1779,10 +1789,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 0f166288bf..34d1dd5f2a 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -74,6 +74,11 @@ msgstr "%%c requires int or char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -498,6 +503,11 @@ msgstr "Already running" msgid "Already scanning for wifi networks" msgstr "Already scanning for WiFi networks" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Another PWMAudioOut is already active" @@ -1778,10 +1788,6 @@ msgstr "" "bytes. If this cannot be avoided, pass allow_inefficient=True to the " "constructor" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "Pins must be sequential" diff --git a/locale/es.po b/locale/es.po index dd420bbd2e..558fc6ddf0 100644 --- a/locale/es.po +++ b/locale/es.po @@ -74,6 +74,11 @@ msgstr "%%c requiere int o char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -502,6 +507,11 @@ msgstr "Ya está en ejecución" msgid "Already scanning for wifi networks" msgstr "Ya se están buscando redes wifi" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Otra salida PWMAudioOut esta ya activada" @@ -1803,10 +1813,6 @@ msgstr "" "ideales. Si esto no se puede evitar, pase allow_inefficient=True al " "constructor" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "Los pines deben estar en orden secuencial" diff --git a/locale/fil.po b/locale/fil.po index 7844d12562..51468a0a5b 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -66,6 +66,11 @@ msgstr "%%c nangangailangan ng int o char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -491,6 +496,11 @@ msgstr "" msgid "Already scanning for wifi networks" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1770,10 +1780,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 0f0afce8ff..fa071b4f47 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -75,6 +75,11 @@ msgstr "%%c nécessite un chiffre entier 'int' ou un caractère 'char'" msgid "%02X" msgstr "%02X" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -500,6 +505,11 @@ msgstr "Déjà en cours d'exécution" msgid "Already scanning for wifi networks" msgstr "Déjà à la recherche des réseaux wifi" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Un autre PWMAudioOut est déjà actif" @@ -1823,10 +1833,6 @@ msgstr "" "octets idéal. Si cela ne peut pas être évité, transmettez allow_inefficient " "= True au constructeur" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "Les broches doivent être séquentielles" diff --git a/locale/hi.po b/locale/hi.po index 7243d82e75..bc22a63370 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -65,6 +65,11 @@ msgstr "" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -488,6 +493,11 @@ msgstr "" msgid "Already scanning for wifi networks" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1754,10 +1764,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 401a9b9848..51d4cf1088 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -71,6 +71,11 @@ msgstr "%%c necessita di int o char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -497,6 +502,11 @@ msgstr "Già in funzione" msgid "Already scanning for wifi networks" msgstr "Già in ricerca di collegamenti WiFi" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1779,10 +1789,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 0c099d26c3..49e00a558d 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -70,6 +70,11 @@ msgstr "%%c にはintまたはcharが必要" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -493,6 +498,11 @@ msgstr "すでに実行中" msgid "Already scanning for wifi networks" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1767,10 +1777,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 83832d31ef..c0629fa452 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -66,6 +66,11 @@ msgstr "%%c 전수(int)또는 캐릭터(char)필요합니다" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -489,6 +494,11 @@ msgstr "" msgid "Already scanning for wifi networks" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1757,10 +1767,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index f639bcec2a..f7d3237aad 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -68,6 +68,11 @@ msgstr "%%c vereist een int of char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -491,6 +496,11 @@ msgstr "Wordt al uitgevoerd" msgid "Already scanning for wifi networks" msgstr "Zoekt al naar WiFi netwerken" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1776,10 +1786,6 @@ msgstr "" "gebruikt. Als dit niet kan worden vermeden, geef dan het argument " "allow_inefficient=True aan de constructor" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index 39853c1ddf..9e496f8d26 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -70,6 +70,11 @@ msgstr "%%c wymaga int lub char" msgid "%02X" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -493,6 +498,11 @@ msgstr "" msgid "Already scanning for wifi networks" msgstr "" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "" @@ -1765,10 +1775,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 39b93d335f..933a066371 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -72,6 +72,11 @@ msgstr "%%c requer int ou char" msgid "%02X" msgstr "%02X" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -501,6 +506,11 @@ msgstr "Já está em execução" msgid "Already scanning for wifi networks" msgstr "Já está em busca das redes de wifi" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Um outro PWMAudioOut já está ativo" @@ -1805,10 +1815,6 @@ msgstr "" "ideal. Caso isso não possa ser evitado, passe allow_inefficient=True ao " "construtor" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "Os pinos 21+ não são suportados pelo ULP" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "Os pinos devem ser sequenciais" @@ -4441,6 +4447,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 "Pins 21+ not supported from ULP" +#~ msgstr "Os pinos 21+ não são suportados pelo ULP" + #~ msgid "Unable to write" #~ msgstr "Não é possível escrever" diff --git a/locale/ru.po b/locale/ru.po index 08470eda78..ef30a149d8 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.15.1-dev\n" #: main.c @@ -75,6 +75,11 @@ msgstr "%%c требует int или char" msgid "%02X" msgstr "%02X" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -499,6 +504,11 @@ msgstr "Уже запущен" msgid "Already scanning for wifi networks" msgstr "Поиск сетей wifi уже происходит" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Другой PWMAudioOut уже активен" @@ -1820,10 +1830,6 @@ msgstr "" "%d байт. Если этого нельзя избежать, передайте allow_inefficient=True в " "конструктор" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "Пины должны быть последовательными" diff --git a/locale/sv.po b/locale/sv.po index 1ad79178d7..c0ed44de29 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -72,6 +72,11 @@ msgstr "%%c kräver int eller char" msgid "%02X" msgstr "%02X" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -498,6 +503,11 @@ msgstr "Kör redan" msgid "Already scanning for wifi networks" msgstr "Skannar redan efter WiFi-nätverk" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "En annan PWMAudioOut är redan aktiv" @@ -1788,10 +1798,6 @@ msgstr "" "%d byte. Om detta inte kan undvikas, skicka allow_inefficient=True till " "konstruktorn" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "Pins 21+ stöds inte av ULP" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "Pinnarna måste vara i sekvens" @@ -4403,6 +4409,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 "Pins 21+ not supported from ULP" +#~ msgstr "Pins 21+ stöds inte av ULP" + #~ msgid "Unable to write" #~ msgstr "Kan inte skriva" diff --git a/locale/tr.po b/locale/tr.po index bafd72bd7e..56fe53b1eb 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -75,6 +75,11 @@ msgstr "%%c int veya char tipine ihtiyaç duyar" msgid "%02X" msgstr "%02X" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -501,6 +506,11 @@ msgstr "Halihazırda çalışıyor" msgid "Already scanning for wifi networks" msgstr "Halihazırda wifi ağları için tarama yapılıyor" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "Başka bir PWMAudioOut zaten aktif durumda" @@ -1777,10 +1787,6 @@ msgid "" "constructor" msgstr "" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index b89f9cd9b5..96ecd16539 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -74,6 +74,11 @@ msgstr "%%c xūyào zhěngshù huòzhě zìfú" msgid "%02X" msgstr "%02X" +#: shared-module/os/getenv.c +#, c-format +msgid "%S" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -500,6 +505,11 @@ msgstr "yǐjīng zài yùnxíng" msgid "Already scanning for wifi networks" msgstr "yǐjīng zài sǎomiáo WIFI wǎngluò" +#: shared-module/os/getenv.c +#, c-format +msgid "An error occurred while retrieving '%s':\n" +msgstr "" + #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" msgstr "lìng yí gè PWMAudioOut yǐ jīng zài gōngzuò" @@ -1792,10 +1802,6 @@ msgstr "" "duōzì jié. Rúguǒ wúfǎ bìmiǎn, qǐng jiāng allow_inefficient = True chuándì " "gěigòuzào hánshù" -#: ports/espressif/common-hal/espulp/ULP.c -msgid "Pins 21+ not supported from ULP" -msgstr "" - #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" msgstr "yǐn jiǎo bì xū shì lián xù de" From d92cb154d61e65d5ef60d11db166b6de6534e077 Mon Sep 17 00:00:00 2001 From: Blinka CircuitPython Date: Tue, 27 Dec 2022 18:01:36 +0000 Subject: [PATCH 09/40] Translated using Weblate (Filipino) Currently translated at 33.4% (333 of 996 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fil/ --- locale/fil.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/fil.po b/locale/fil.po index 51468a0a5b..a7acb9ea61 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-08-23 14:19+0000\n" -"Last-Translator: Jeff Epler \n" +"PO-Revision-Date: 2022-12-27 18:02+0000\n" +"Last-Translator: Blinka CircuitPython \n" "Language-Team: fil\n" "Language: fil\n" "MIME-Version: 1.0\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\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" +"X-Generator: Weblate 4.15.1-dev\n" #: main.c msgid "" @@ -69,7 +69,7 @@ msgstr "" #: shared-module/os/getenv.c #, c-format msgid "%S" -msgstr "" +msgstr "%S" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format From 10640c9065239519fce5754dc924fabcc56592dc Mon Sep 17 00:00:00 2001 From: Blinka CircuitPython Date: Tue, 27 Dec 2022 18:01:39 +0000 Subject: [PATCH 10/40] Translated using Weblate (French) Currently translated at 97.0% (967 of 996 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 fa071b4f47..922ecbdbc4 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: 2022-11-09 19:20+0000\n" -"Last-Translator: Deleted User \n" +"PO-Revision-Date: 2022-12-27 18:02+0000\n" +"Last-Translator: Blinka CircuitPython \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.15-dev\n" +"X-Generator: Weblate 4.15.1-dev\n" #: main.c msgid "" @@ -78,7 +78,7 @@ msgstr "%02X" #: shared-module/os/getenv.c #, c-format msgid "%S" -msgstr "" +msgstr "%S" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format From 2ad767ee4b318b15f63cd0552b0b2989ae843e01 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 27 Dec 2022 17:57:37 +0000 Subject: [PATCH 11/40] Translated using Weblate (Swedish) Currently translated at 100.0% (996 of 996 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 c0ed44de29..55f0c8efb5 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: 2022-12-22 15:49+0000\n" +"PO-Revision-Date: 2022-12-27 18:02+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -75,7 +75,7 @@ msgstr "%02X" #: shared-module/os/getenv.c #, c-format msgid "%S" -msgstr "" +msgstr "%S" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -506,7 +506,7 @@ msgstr "Skannar redan efter WiFi-nätverk" #: shared-module/os/getenv.c #, c-format msgid "An error occurred while retrieving '%s':\n" -msgstr "" +msgstr "Ett fel uppstod vid hämtning av '%s':\n" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" From ac3b46111b13f037efe358930432c4d6a86e6905 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 27 Dec 2022 19:16:00 +0100 Subject: [PATCH 12/40] 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 | 4 ++++ locale/cs.po | 4 ++++ locale/de_DE.po | 4 ++++ locale/el.po | 4 ++++ locale/en_GB.po | 4 ++++ locale/es.po | 4 ++++ locale/fil.po | 4 ++++ locale/fr.po | 4 ++++ locale/hi.po | 4 ++++ locale/it_IT.po | 4 ++++ locale/ja.po | 4 ++++ locale/ko.po | 4 ++++ locale/nl.po | 4 ++++ locale/pl.po | 4 ++++ locale/pt_BR.po | 4 ++++ locale/ru.po | 4 ++++ locale/sv.po | 4 ++++ locale/tr.po | 4 ++++ locale/zh_Latn_pinyin.po | 4 ++++ 19 files changed, 76 insertions(+) diff --git a/locale/ID.po b/locale/ID.po index ab5ea27d40..acb228ebea 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1418,6 +1418,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Nama terlalu panjang" diff --git a/locale/cs.po b/locale/cs.po index ce0b944057..cf7973d4ad 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1418,6 +1418,10 @@ msgstr "" msgid "NVS Error" msgstr "Chyba NVS" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Jméno je příliš dlouhé" diff --git a/locale/de_DE.po b/locale/de_DE.po index 1c751f839e..a72022c938 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1434,6 +1434,10 @@ msgstr "NLR-Sprung fehlgeschlagen. Mögliche Speicher-Beschädigung." msgid "NVS Error" msgstr "NVS-Fehler" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Name zu lang" diff --git a/locale/el.po b/locale/el.po index bc2d642ed9..246d49ad74 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1428,6 +1428,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 34d1dd5f2a..74c7efabf5 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -1419,6 +1419,10 @@ msgstr "NLR jump failed. Likely memory corruption." msgid "NVS Error" msgstr "NVS Error" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Name too long" diff --git a/locale/es.po b/locale/es.po index 558fc6ddf0..f39d4e2da5 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1441,6 +1441,10 @@ msgstr "Salto NLR falló. Probablemente corrupción de memoria." msgid "NVS Error" msgstr "Error NVS" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Nombre muy largo" diff --git a/locale/fil.po b/locale/fil.po index a7acb9ea61..6731d2d458 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1415,6 +1415,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 922ecbdbc4..908f93b553 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1460,6 +1460,10 @@ msgstr "Saut NLR échoué. Corruption de mémoire probable." msgid "NVS Error" msgstr "Erreur NVS" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Nom trop long" diff --git a/locale/hi.po b/locale/hi.po index bc22a63370..6e55808443 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1403,6 +1403,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 51d4cf1088..73ed787bf8 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1421,6 +1421,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 49e00a558d..b2227cecab 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1414,6 +1414,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "名前が長すぎます" diff --git a/locale/ko.po b/locale/ko.po index c0629fa452..8e7fee3e2f 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1406,6 +1406,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index f7d3237aad..728285da8e 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1414,6 +1414,10 @@ msgstr "" msgid "NVS Error" msgstr "NVS-fout" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Naam te lang" diff --git a/locale/pl.po b/locale/pl.po index 9e496f8d26..ba505d4e6b 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1414,6 +1414,10 @@ msgstr "" msgid "NVS Error" msgstr "" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Za długa nazwa" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 933a066371..693f2d1b9b 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -1442,6 +1442,10 @@ msgstr "O salto NLR falhou. Possível corrupção da memória." msgid "NVS Error" msgstr "Erro NVS" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Nome muito longo" diff --git a/locale/ru.po b/locale/ru.po index ef30a149d8..8152dcc694 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -1456,6 +1456,10 @@ msgstr "Не удалось выполнить NLR jump. Вероятно, по msgid "NVS Error" msgstr "Ошибка NVS" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Имя слишком длинное" diff --git a/locale/sv.po b/locale/sv.po index 55f0c8efb5..6038267ddd 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -1427,6 +1427,10 @@ msgstr "NLR jump misslyckades. Troligen korrupt minne." msgid "NVS Error" msgstr "NVS-fel" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Name är för långt" diff --git a/locale/tr.po b/locale/tr.po index 56fe53b1eb..e7ed5b06bf 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -1426,6 +1426,10 @@ msgstr "" msgid "NVS Error" msgstr "NVS hatası" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "İsim çok uzun" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 96ecd16539..088a006c44 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -1433,6 +1433,10 @@ msgstr "NLR tiào zhuǎn shī bài. kě néng shì nèi cún sǔn huài." msgid "NVS Error" msgstr "NVS cuò wù" +#: shared-bindings/socketpool/SocketPool.c +msgid "Name or service not known" +msgstr "" + #: py/qstr.c msgid "Name too long" msgstr "Míngchēng tài zhǎng" From 7a40d449e6bca4fd88a336627e94c79b0602e00f Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Tue, 27 Dec 2022 22:07:54 -0500 Subject: [PATCH 13/40] mimxrt10xx/common-hal/UART.C: Fix for bits parameter validation. I believe this will resolve issue #7389 --- ports/mimxrt10xx/common-hal/busio/UART.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mimxrt10xx/common-hal/busio/UART.c b/ports/mimxrt10xx/common-hal/busio/UART.c index 20430c91c8..871d57648d 100644 --- a/ports/mimxrt10xx/common-hal/busio/UART.c +++ b/ports/mimxrt10xx/common-hal/busio/UART.c @@ -113,7 +113,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, bool sigint_enabled) { self->baudrate = baudrate; - self->character_bits = (uint8_t)mp_arg_validate_int_range(self->character_bits, 7, 8, MP_QSTR_bits); + self->character_bits = (uint8_t)mp_arg_validate_int_range(bits, 7, 8, MP_QSTR_bits); self->timeout_ms = timeout * 1000; From 373db7897821bc3e7453c900a75c7df0136259f3 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 27 Dec 2022 22:16:14 +0000 Subject: [PATCH 14/40] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (997 of 997 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 693f2d1b9b..63a7cda056 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: 2022-12-22 15:49+0000\n" +"PO-Revision-Date: 2022-12-28 03:47+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -509,7 +509,7 @@ msgstr "Já está em busca das redes de wifi" #: shared-module/os/getenv.c #, c-format msgid "An error occurred while retrieving '%s':\n" -msgstr "" +msgstr "Ocorreu um erro ao recuperar '%s':\n" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" @@ -1444,7 +1444,7 @@ msgstr "Erro NVS" #: shared-bindings/socketpool/SocketPool.c msgid "Name or service not known" -msgstr "" +msgstr "Nome ou serviço desconhecido" #: py/qstr.c msgid "Name too long" From e62e9bd4af038e616478e95e68f672c07f8a6078 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 27 Dec 2022 18:58:19 +0000 Subject: [PATCH 15/40] Translated using Weblate (Swedish) Currently translated at 100.0% (997 of 997 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 6038267ddd..1a2079f605 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: 2022-12-27 18:02+0000\n" +"PO-Revision-Date: 2022-12-28 03:47+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -1429,7 +1429,7 @@ msgstr "NVS-fel" #: shared-bindings/socketpool/SocketPool.c msgid "Name or service not known" -msgstr "" +msgstr "Namn eller tjänst inte känd" #: py/qstr.c msgid "Name too long" From a932fb3fb13391019338b47717204ea11715e1ea Mon Sep 17 00:00:00 2001 From: chukwon <51104273+chukwon@users.noreply.github.com> Date: Wed, 28 Dec 2022 21:25:25 +0800 Subject: [PATCH 16/40] Update pins.c also match lolin_c3_mini pins definition of new version --- ports/espressif/boards/lolin_c3_mini/pins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/boards/lolin_c3_mini/pins.c b/ports/espressif/boards/lolin_c3_mini/pins.c index ccc70f6043..6b16020205 100644 --- a/ports/espressif/boards/lolin_c3_mini/pins.c +++ b/ports/espressif/boards/lolin_c3_mini/pins.c @@ -46,6 +46,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, From edcb83266113e93465ec0ea17c00de555101db7a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 28 Dec 2022 12:35:48 -0600 Subject: [PATCH 17/40] These need to be double-blackslashed --- tests/circuitpython/getenv.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/circuitpython/getenv.py b/tests/circuitpython/getenv.py index 2dccb99f97..e58af0e8e4 100644 --- a/tests/circuitpython/getenv.py +++ b/tests/circuitpython/getenv.py @@ -39,11 +39,11 @@ content_good = b""" # comment key0 = "hello world" key1 = 7 -key2= "\n" -key3 ="\u00c1x" -key4 = "\U000000c1x" -key5 = "\f\"\\" -key6 = "\t\r\b" +key2= "\\n" +key3 ="\\u00c1x" +key4 = "\\U000000c1x" +key5 = "\\f\\"\\\\" +key6 = "\\t\\r\\b" key7 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" key8 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" key9 = "hello comment" # comment From 83bbfd1815ed65031ad9b6eb805af3f2640876fc Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 28 Dec 2022 12:36:58 -0600 Subject: [PATCH 18/40] Allow the tests to directly call the non-heap using _int and _str variants .. of getenv. These can have their own special bugs. --- ports/unix/modos.c | 30 ++++++++++++++++++++++++++++++ ports/unix/moduos_vfs.c | 8 ++++++++ tests/circuitpython/getenv.py | 3 +++ 3 files changed, 41 insertions(+) diff --git a/ports/unix/modos.c b/ports/unix/modos.c index 6bed69c43a..a6365aa6a3 100644 --- a/ports/unix/modos.c +++ b/ports/unix/modos.c @@ -57,7 +57,11 @@ #endif #if defined(MICROPY_UNIX_COVERAGE) +#include "py/objstr.h" +typedef int os_getenv_err_t; mp_obj_t common_hal_os_getenv(const char *key, mp_obj_t default_); +os_getenv_err_t common_hal_os_getenv_str(const char *key, char *value, size_t value_len); +os_getenv_err_t common_hal_os_getenv_int(const char *key, mp_int_t *value); #endif STATIC mp_obj_t mod_os_urandom(mp_obj_t num) { @@ -212,6 +216,28 @@ STATIC mp_obj_t mod_os_getenv(mp_obj_t var_in) { } MP_DEFINE_CONST_FUN_OBJ_1(mod_os_getenv_obj, mod_os_getenv); +#if defined(MICROPY_UNIX_COVERAGE) +STATIC mp_obj_t mod_os_getenv_int(mp_obj_t var_in) { + mp_int_t value; + os_getenv_err_t result = common_hal_os_getenv_int(mp_obj_str_get_str(var_in), &value); + if (result == 0) { + return mp_obj_new_int(value); + } + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_1(mod_os_getenv_int_obj, mod_os_getenv_int); + +STATIC mp_obj_t mod_os_getenv_str(mp_obj_t var_in) { + char buf[4096]; + os_getenv_err_t result = common_hal_os_getenv_str(mp_obj_str_get_str(var_in), buf, sizeof(buf)); + if (result == 0) { + return mp_obj_new_str_copy(&mp_type_str, (byte *)buf, strlen(buf)); + } + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_1(mod_os_getenv_str_obj, mod_os_getenv_str); +#endif + STATIC mp_obj_t mod_os_putenv(mp_obj_t key_in, mp_obj_t value_in) { const char *key = mp_obj_str_get_str(key_in); const char *value = mp_obj_str_get_str(value_in); @@ -351,6 +377,10 @@ STATIC const mp_rom_map_elem_t mp_module_os_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_rename), MP_ROM_PTR(&mod_os_rename_obj) }, { MP_ROM_QSTR(MP_QSTR_rmdir), MP_ROM_PTR(&mod_os_rmdir_obj) }, { MP_ROM_QSTR(MP_QSTR_getenv), MP_ROM_PTR(&mod_os_getenv_obj) }, + #if defined(MICROPY_UNIX_COVERAGE) + { MP_ROM_QSTR(MP_QSTR_getenv_int), MP_ROM_PTR(&mod_os_getenv_int_obj) }, + { MP_ROM_QSTR(MP_QSTR_getenv_str), MP_ROM_PTR(&mod_os_getenv_str_obj) }, + #endif { MP_ROM_QSTR(MP_QSTR_putenv), MP_ROM_PTR(&mod_os_putenv_obj) }, { MP_ROM_QSTR(MP_QSTR_unsetenv), MP_ROM_PTR(&mod_os_unsetenv_obj) }, { MP_ROM_QSTR(MP_QSTR_mkdir), MP_ROM_PTR(&mod_os_mkdir_obj) }, diff --git a/ports/unix/moduos_vfs.c b/ports/unix/moduos_vfs.c index 41273bc7e2..495679290a 100644 --- a/ports/unix/moduos_vfs.c +++ b/ports/unix/moduos_vfs.c @@ -37,6 +37,10 @@ // These are defined in modos.c MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mod_os_errno_obj); MP_DECLARE_CONST_FUN_OBJ_1(mod_os_getenv_obj); +#if defined(MICROPY_UNIX_COVERAGE) +MP_DECLARE_CONST_FUN_OBJ_1(mod_os_getenv_int_obj); +MP_DECLARE_CONST_FUN_OBJ_1(mod_os_getenv_str_obj); +#endif MP_DECLARE_CONST_FUN_OBJ_1(mod_os_putenv_obj); MP_DECLARE_CONST_FUN_OBJ_1(mod_os_unsetenv_obj); MP_DECLARE_CONST_FUN_OBJ_1(mod_os_system_obj); @@ -47,6 +51,10 @@ STATIC const mp_rom_map_elem_t uos_vfs_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mod_os_errno_obj) }, { MP_ROM_QSTR(MP_QSTR_getenv), MP_ROM_PTR(&mod_os_getenv_obj) }, + #if defined(MICROPY_UNIX_COVERAGE) + { MP_ROM_QSTR(MP_QSTR_getenv_int), MP_ROM_PTR(&mod_os_getenv_int_obj) }, + { MP_ROM_QSTR(MP_QSTR_getenv_str), MP_ROM_PTR(&mod_os_getenv_str_obj) }, + #endif { MP_ROM_QSTR(MP_QSTR_putenv), MP_ROM_PTR(&mod_os_putenv_obj) }, { MP_ROM_QSTR(MP_QSTR_unsetenv), MP_ROM_PTR(&mod_os_unsetenv_obj) }, { MP_ROM_QSTR(MP_QSTR_system), MP_ROM_PTR(&mod_os_system_obj) }, diff --git a/tests/circuitpython/getenv.py b/tests/circuitpython/getenv.py index e58af0e8e4..68dd328cfb 100644 --- a/tests/circuitpython/getenv.py +++ b/tests/circuitpython/getenv.py @@ -79,6 +79,9 @@ content_good = content_good.replace(b"\n", b"\r\n") for i in range(13): run_test(f"key{i}", content_good) +run_test(f"K", b"K = 7\r\n") +print(uos.getenv_int("K")) + # Test value without trailing newline run_test(f"noeol", b"noeol=3") From 15a24b400d1a96f11083d14017016ee2955eebc9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 28 Dec 2022 12:37:27 -0600 Subject: [PATCH 19/40] Permit trailing whitespace in getenv_int --- shared-module/os/getenv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared-module/os/getenv.c b/shared-module/os/getenv.c index 21a97f3fec..aac87e9ee6 100644 --- a/shared-module/os/getenv.c +++ b/shared-module/os/getenv.c @@ -413,6 +413,9 @@ STATIC os_getenv_err_t common_hal_os_getenv_int_inner(const char *key, mp_int_t } char *end; long num = strtol(buf, &end, 0); + while (unichar_isspace(*end)) { + end++; + } if (end == buf || *end) { // If the whole buffer was not consumed it's an error return GETENV_ERR_UNEXPECTED | *end; } From 2c46e785f669686100ebc6b2190f1d90379277ad Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 28 Dec 2022 12:38:07 -0600 Subject: [PATCH 20/40] update test results --- tests/circuitpython/getenv.py.exp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/circuitpython/getenv.py.exp b/tests/circuitpython/getenv.py.exp index 91c96e601a..ba1b1b3f90 100644 --- a/tests/circuitpython/getenv.py.exp +++ b/tests/circuitpython/getenv.py.exp @@ -1,9 +1,9 @@ key0 'hello world' key1 7 -key2 Invalid byte '\n' +key2 '\n' key3 'Áx' key4 'Áx' -key5 Invalid byte '\\' +key5 '\x0c"\\' key6 '\t\r\x08' key7 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' key8 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' @@ -13,10 +13,10 @@ key11 0 key12 None key0 'hello world' key1 7 -key2 Invalid byte '\n' +key2 '\n' key3 'Áx' key4 'Áx' -key5 Invalid byte '\\' +key5 '\x0c"\\' key6 '\t\r\x08' key7 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' key8 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' @@ -24,6 +24,8 @@ key9 'hello comment' key10 127 key11 0 key12 None +K 7 +7 noeol 3 key Invalid byte '\n' key Invalid byte '"' From 7a005aa96b509441fe29fff57541e6d7be61afbb Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 28 Dec 2022 13:22:36 -0600 Subject: [PATCH 21/40] break out after reading the value This is a small optimization, it avoids reading the full file when an early key is requested. In the case of an *invalid* TOML file such as ``` K=80 K=81 ``` this stops the value of K actually returned being 8081 and makes it 80 instead; but as it's a malformed file it doesn't really matter much. --- shared-module/os/getenv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shared-module/os/getenv.c b/shared-module/os/getenv.c index aac87e9ee6..870973c5d2 100644 --- a/shared-module/os/getenv.c +++ b/shared-module/os/getenv.c @@ -292,6 +292,7 @@ STATIC os_getenv_err_t os_getenv_vstr(const char *path, const char *key, vstr_t while (!is_eof(&active_file)) { if (key_matches(&active_file, key)) { result = read_value(&active_file, buf, quoted); + break; } } close_file(&active_file); From 3d6f37722636c97ee8540c4f536703ac047d523e Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 28 Dec 2022 18:36:25 -0500 Subject: [PATCH 22/40] Fix single quote in ru.po --- locale/ru.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/ru.po b/locale/ru.po index 8152dcc694..3d7f536335 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -173,7 +173,7 @@ msgstr "%q должно быть >= %d" #: shared-bindings/analogbufio/BufferedIn.c msgid "%q must be a bytearray or array of type 'H' or 'B'" -msgstr "%q должно быть bytearray или array типа ‘H' или 'B'" +msgstr "%q должно быть bytearray или array типа 'H' или 'B'" #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" From cc92ce4820aebb4a1db93828f42a0ed7e97205ce Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 29 Dec 2022 19:49:40 -0500 Subject: [PATCH 23/40] Use memory fence when disabling cache to avoid -O2 problems --- ports/atmel-samd/peripherals | 2 +- ports/nrf/peripherals/nrf/cache.c | 10 ++++++++++ .../shared/external_flash/external_flash.c | 16 +++++++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/peripherals b/ports/atmel-samd/peripherals index 57133eefeb..baca4c0843 160000 --- a/ports/atmel-samd/peripherals +++ b/ports/atmel-samd/peripherals @@ -1 +1 @@ -Subproject commit 57133eefeb077f73b5ac17ee044d9feaf566da8e +Subproject commit baca4c084334aa8625f525a4032d66a397199ea6 diff --git a/ports/nrf/peripherals/nrf/cache.c b/ports/nrf/peripherals/nrf/cache.c index 6eb590d770..54bb77980b 100644 --- a/ports/nrf/peripherals/nrf/cache.c +++ b/ports/nrf/peripherals/nrf/cache.c @@ -29,8 +29,18 @@ // Turn off cache and invalidate all data in it. void nrf_peripherals_disable_and_clear_cache(void) { + // Memory fence for hardware and compiler reasons. If this routine is inlined, the compiler + // needs to know that everything written out be stored before this is called. + // -O2 optimization needed this on SAMD51. Assuming nRF may have the same issue. + // __sync_synchronize() includes volatile asm(), which tells the compiler not to assume + // state across this call. + __sync_synchronize(); + // Disabling cache also invalidates all cache entries. NRF_NVMC->ICACHECNF &= ~(1 << NVMC_ICACHECNF_CACHEEN_Pos); + + // Memory fence for hardware and compiler reasons. + __sync_synchronize(); } // Enable cache diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c index 7da45fdc99..141ad7e5f8 100644 --- a/supervisor/shared/external_flash/external_flash.c +++ b/supervisor/shared/external_flash/external_flash.c @@ -58,6 +58,9 @@ static supervisor_allocation *supervisor_cache = NULL; // Wait until both the write enable and write in progress bits have cleared. static bool wait_for_flash_ready(void) { + if (flash_device == NULL) { + return false; + } bool ok = true; // Both the write enable and write in progress bits should be low. if (flash_device->no_ready_bit) { @@ -192,6 +195,9 @@ static bool copy_block(uint32_t src_address, uint32_t dest_address) { return true; } +#define READ_JEDEC_ID_RETRY_COUNT (100) + +// If this fails, flash_device will remain NULL. void supervisor_flash_init(void) { if (flash_device != NULL) { return; @@ -220,7 +226,11 @@ void supervisor_flash_init(void) { #else // The response will be 0xff if the flash needs more time to start up. uint8_t jedec_id_response[3] = {0xff, 0xff, 0xff}; - while (jedec_id_response[0] == 0xff) { + // Response can also be 0x00 if reading before ready. When compiled with `-O2`, typically + // takes three tries to read on Grand Central M4. + + size_t count = READ_JEDEC_ID_RETRY_COUNT; + while ((count-- > 0) && (jedec_id_response[0] == 0xff || jedec_id_response[2] == 0x00)) { spi_flash_read_command(CMD_READ_JEDEC_ID, jedec_id_response, 3); } for (uint8_t i = 0; i < EXTERNAL_FLASH_DEVICE_COUNT; i++) { @@ -234,6 +244,7 @@ void supervisor_flash_init(void) { } #endif if (flash_device == NULL) { + // Flash did not respond. Give up. return; } @@ -293,6 +304,9 @@ uint32_t supervisor_flash_get_block_size(void) { // The total number of available blocks. uint32_t supervisor_flash_get_block_count(void) { + if (flash_device == NULL) { + return 0; + } // We subtract one erase sector size because we may use it as a staging area // for writes. return (flash_device->total_size - SPI_FLASH_ERASE_SIZE) / FILESYSTEM_BLOCK_SIZE; From 42195a4a2990e48c4f360e32511d0c42fbfbe6b8 Mon Sep 17 00:00:00 2001 From: CDario Date: Fri, 30 Dec 2022 17:37:37 +0000 Subject: [PATCH 24/40] Added M5Stack Atom Matrix board --- .../boards/m5stack_atom_matrix/board.c | 29 +++++++++++ .../m5stack_atom_matrix/mpconfigboard.h | 49 ++++++++++++++++++ .../m5stack_atom_matrix/mpconfigboard.mk | 10 ++++ .../boards/m5stack_atom_matrix/pins.c | 51 +++++++++++++++++++ .../boards/m5stack_atom_matrix/sdkconfig | 27 ++++++++++ 5 files changed, 166 insertions(+) create mode 100644 ports/espressif/boards/m5stack_atom_matrix/board.c create mode 100644 ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.h create mode 100644 ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.mk create mode 100644 ports/espressif/boards/m5stack_atom_matrix/pins.c create mode 100644 ports/espressif/boards/m5stack_atom_matrix/sdkconfig diff --git a/ports/espressif/boards/m5stack_atom_matrix/board.c b/ports/espressif/boards/m5stack_atom_matrix/board.c new file mode 100644 index 0000000000..c0d9676d86 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_matrix/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.h b/ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.h new file mode 100644 index 0000000000..926b7efbc4 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.h @@ -0,0 +1,49 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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 "M5Stack Atom Matrix" +#define MICROPY_HW_MCU_NAME "ESP32" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO27) + +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO21, .sda = &pin_GPIO25}, \ + {.scl = &pin_GPIO32, .sda = &pin_GPIO26}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO23, .mosi = &pin_GPIO19, .miso = &pin_GPIO33}} + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("The central button was pressed at start up.\n") + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.mk b/ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.mk new file mode 100644 index 0000000000..c34fa9d836 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.mk @@ -0,0 +1,10 @@ +CIRCUITPY_CREATOR_ID = 0x10151015 +CIRCUITPY_CREATION_ID = 0x00320004 + +IDF_TARGET = esp32 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/m5stack_atom_matrix/pins.c b/ports/espressif/boards/m5stack_atom_matrix/pins.c new file mode 100644 index 0000000000..9b18b954f0 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_matrix/pins.c @@ -0,0 +1,51 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +CIRCUITPY_BOARD_BUS_SINGLETON(porta_i2c, i2c, 1) + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // External pins are in silkscreen order, from top to bottom, left side, then right side + + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_A33), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_A25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_A32), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_GPIO32) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_BTN), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_IR_LED), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_porta_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); diff --git a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig new file mode 100644 index 0000000000..a6678556eb --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig @@ -0,0 +1,27 @@ +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_SPIRAM_SUPPORT=n + +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomMatrix" +# end of LWIP + +# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +### # +### # ESP System Settings +### # +### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +### CONFIG_ESP_CONSOLE_UART_CUSTOM=y +### CONFIG_ESP_CONSOLE_NONE is not set +### CONFIG_ESP_CONSOLE_UART=y +### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y +### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set +### CONFIG_ESP_CONSOLE_UART_NUM=0 +### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 +### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 +### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +### # end of ESP System Settings From 52ee5a92725a6f9780ef6d572b7433ff163d2c97 Mon Sep 17 00:00:00 2001 From: CDario Date: Fri, 30 Dec 2022 20:21:00 +0000 Subject: [PATCH 25/40] Added M5Stack Atom Echo --- .../boards/m5stack_atom_echo/board.c | 29 ++++++++++++ .../boards/m5stack_atom_echo/mpconfigboard.h | 46 +++++++++++++++++++ .../boards/m5stack_atom_echo/mpconfigboard.mk | 10 ++++ .../espressif/boards/m5stack_atom_echo/pins.c | 43 +++++++++++++++++ .../boards/m5stack_atom_echo/sdkconfig | 27 +++++++++++ 5 files changed, 155 insertions(+) create mode 100644 ports/espressif/boards/m5stack_atom_echo/board.c create mode 100644 ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h create mode 100644 ports/espressif/boards/m5stack_atom_echo/mpconfigboard.mk create mode 100644 ports/espressif/boards/m5stack_atom_echo/pins.c create mode 100644 ports/espressif/boards/m5stack_atom_echo/sdkconfig diff --git a/ports/espressif/boards/m5stack_atom_echo/board.c b/ports/espressif/boards/m5stack_atom_echo/board.c new file mode 100644 index 0000000000..c0d9676d86 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_echo/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h b/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h new file mode 100644 index 0000000000..25eaec1e52 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h @@ -0,0 +1,46 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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 "M5Stack Atom Echo" +#define MICROPY_HW_MCU_NAME "ESP32" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO27) + +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO21, .sda = &pin_GPIO25}, \ + {.scl = &pin_GPIO32, .sda = &pin_GPIO26}} + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("The central button was pressed at start up.\n") + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.mk b/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.mk new file mode 100644 index 0000000000..663ceaad81 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.mk @@ -0,0 +1,10 @@ +CIRCUITPY_CREATOR_ID = 0x10151015 +CIRCUITPY_CREATION_ID = 0x00320005 + +IDF_TARGET = esp32 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/m5stack_atom_echo/pins.c b/ports/espressif/boards/m5stack_atom_echo/pins.c new file mode 100644 index 0000000000..d070414fe5 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_echo/pins.c @@ -0,0 +1,43 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +CIRCUITPY_BOARD_BUS_SINGLETON(porta_i2c, i2c, 1) + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // External pins are in silkscreen order, from top to bottom, left side, then right side + + { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_I2S_LRC), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_A25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_A32), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_GPIO32) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_BTN), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_IR_LED), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_porta_i2c_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/m5stack_atom_echo/sdkconfig b/ports/espressif/boards/m5stack_atom_echo/sdkconfig new file mode 100644 index 0000000000..c6a1fcbabf --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_echo/sdkconfig @@ -0,0 +1,27 @@ +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_SPIRAM_SUPPORT=n + +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomEcho" +# end of LWIP + +# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +### # +### # ESP System Settings +### # +### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +### CONFIG_ESP_CONSOLE_UART_CUSTOM=y +### CONFIG_ESP_CONSOLE_NONE is not set +### CONFIG_ESP_CONSOLE_UART=y +### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y +### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set +### CONFIG_ESP_CONSOLE_UART_NUM=0 +### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 +### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 +### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +### # end of ESP System Settings From 58e32bd2cb9a492aeb7163a9ac8964434738a3ed Mon Sep 17 00:00:00 2001 From: CDario Date: Fri, 30 Dec 2022 23:09:38 +0000 Subject: [PATCH 26/40] Fixed speacker and microphone pins definition --- ports/espressif/boards/m5stack_atom_echo/pins.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/espressif/boards/m5stack_atom_echo/pins.c b/ports/espressif/boards/m5stack_atom_echo/pins.c index d070414fe5..2b8044f07e 100644 --- a/ports/espressif/boards/m5stack_atom_echo/pins.c +++ b/ports/espressif/boards/m5stack_atom_echo/pins.c @@ -8,10 +8,13 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // External pins are in silkscreen order, from top to bottom, left side, then right side - { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO22) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO19) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_I2S_LRC), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_SPK_I2S_SDO), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SPK_I2S_SCK), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_SPK_I2S_LRC), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_PDM_MIC_CLK), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_PDM_MIC_DATA), MP_ROM_PTR(&pin_GPIO23) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, From dec0b272fec849d02285524654c316a8ee6a25a6 Mon Sep 17 00:00:00 2001 From: CDario Date: Fri, 30 Dec 2022 23:21:46 +0000 Subject: [PATCH 27/40] Fixed I2C bus definition --- ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h | 5 ++--- ports/espressif/boards/m5stack_atom_echo/pins.c | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h b/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h index 25eaec1e52..7d67267897 100644 --- a/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h @@ -31,9 +31,8 @@ #define MICROPY_HW_NEOPIXEL (&pin_GPIO27) -#define CIRCUITPY_BOARD_I2C (2) -#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO21, .sda = &pin_GPIO25}, \ - {.scl = &pin_GPIO32, .sda = &pin_GPIO26}} +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO32, .sda = &pin_GPIO26}} // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) diff --git a/ports/espressif/boards/m5stack_atom_echo/pins.c b/ports/espressif/boards/m5stack_atom_echo/pins.c index 2b8044f07e..68b6389215 100644 --- a/ports/espressif/boards/m5stack_atom_echo/pins.c +++ b/ports/espressif/boards/m5stack_atom_echo/pins.c @@ -1,8 +1,6 @@ #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" -CIRCUITPY_BOARD_BUS_SINGLETON(porta_i2c, i2c, 1) - STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS @@ -39,8 +37,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IR_LED), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_porta_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 4fe00ef74a4225f2d80eebf6b79e69f7fe41ca4d Mon Sep 17 00:00:00 2001 From: CDario Date: Sat, 31 Dec 2022 06:21:49 +0000 Subject: [PATCH 28/40] Added M5Stack Atom U --- ports/espressif/boards/m5stack_atom_u/board.c | 29 +++++++++++ .../boards/m5stack_atom_u/mpconfigboard.h | 48 +++++++++++++++++++ .../boards/m5stack_atom_u/mpconfigboard.mk | 10 ++++ ports/espressif/boards/m5stack_atom_u/pins.c | 42 ++++++++++++++++ .../espressif/boards/m5stack_atom_u/sdkconfig | 27 +++++++++++ 5 files changed, 156 insertions(+) create mode 100644 ports/espressif/boards/m5stack_atom_u/board.c create mode 100644 ports/espressif/boards/m5stack_atom_u/mpconfigboard.h create mode 100644 ports/espressif/boards/m5stack_atom_u/mpconfigboard.mk create mode 100644 ports/espressif/boards/m5stack_atom_u/pins.c create mode 100644 ports/espressif/boards/m5stack_atom_u/sdkconfig diff --git a/ports/espressif/boards/m5stack_atom_u/board.c b/ports/espressif/boards/m5stack_atom_u/board.c new file mode 100644 index 0000000000..c0d9676d86 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_u/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/m5stack_atom_u/mpconfigboard.h b/ports/espressif/boards/m5stack_atom_u/mpconfigboard.h new file mode 100644 index 0000000000..b3b0a650ab --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_u/mpconfigboard.h @@ -0,0 +1,48 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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 "M5Stack Atom U" +#define MICROPY_HW_MCU_NAME "ESP32" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO27) + +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO32, .sda = &pin_GPIO26}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO23, .mosi = &pin_GPIO19, .miso = &pin_GPIO33}} + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("The central button was pressed at start up.\n") + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/m5stack_atom_u/mpconfigboard.mk b/ports/espressif/boards/m5stack_atom_u/mpconfigboard.mk new file mode 100644 index 0000000000..18bb6d3dc0 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_u/mpconfigboard.mk @@ -0,0 +1,10 @@ +CIRCUITPY_CREATOR_ID = 0x10151015 +CIRCUITPY_CREATION_ID = 0x00320006 + +IDF_TARGET = esp32 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/m5stack_atom_u/pins.c b/ports/espressif/boards/m5stack_atom_u/pins.c new file mode 100644 index 0000000000..4ba62ae2b7 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_u/pins.c @@ -0,0 +1,42 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // External pins are in silkscreen order, from top to bottom, left side, then right side + + { MP_ROM_QSTR(MP_QSTR_A25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_A33), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_A32), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_GPIO32) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_BTN), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_IR_LED), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_PDM_MIC_CLK), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_PDM_MIC_DATA), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_i2c_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/m5stack_atom_u/sdkconfig b/ports/espressif/boards/m5stack_atom_u/sdkconfig new file mode 100644 index 0000000000..7f405b00e0 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_u/sdkconfig @@ -0,0 +1,27 @@ +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_SPIRAM_SUPPORT=n + +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomU" +# end of LWIP + +# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +### # +### # ESP System Settings +### # +### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +### CONFIG_ESP_CONSOLE_UART_CUSTOM=y +### CONFIG_ESP_CONSOLE_NONE is not set +### CONFIG_ESP_CONSOLE_UART=y +### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y +### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set +### CONFIG_ESP_CONSOLE_UART_NUM=0 +### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 +### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 +### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +### # end of ESP System Settings From 91d28c7623da8520c2c12abfe8049d443ed20cc7 Mon Sep 17 00:00:00 2001 From: Orlando Caro Date: Fri, 30 Dec 2022 15:58:04 +0000 Subject: [PATCH 29/40] Translated using Weblate (Spanish) Currently translated at 85.8% (856 of 997 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 79 ++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/locale/es.po b/locale/es.po index f39d4e2da5..5b8e3b5883 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: 2022-09-23 17:20+0000\n" -"Last-Translator: Alvaro Figueroa \n" +"PO-Revision-Date: 2022-12-31 17:50+0000\n" +"Last-Translator: Orlando Caro \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.14.1\n" +"X-Generator: Weblate 4.15.1-dev\n" #: main.c msgid "" @@ -97,9 +97,8 @@ msgstr "" #: ports/raspberrypi/common-hal/analogio/AnalogOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/rtc/RTC.c -#, fuzzy msgid "%q" -msgstr "%q" +msgstr "" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" @@ -134,7 +133,7 @@ msgstr "%q inicializado fallido" #: shared-bindings/dualbank/__init__.c msgid "%q is %q" -msgstr "" +msgstr "%q es %q" #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" @@ -174,27 +173,27 @@ msgstr "%q debe ser >= %d" #: shared-bindings/analogbufio/BufferedIn.c msgid "%q must be a bytearray or array of type 'H' or 'B'" -msgstr "" +msgstr "%q debe ser un byte-matriz o matriz de tipo 'H' o 'B'" #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" -msgstr "" +msgstr "%q debe ser un byte-matriz o matriz de tipo 'h', 'H', 'b', o 'B'" #: py/argcheck.c py/obj.c py/objstrunicode.c msgid "%q must be of type %q" -msgstr "" +msgstr "%q debe ser de typo %q" #: py/objexcept.c shared-bindings/digitalio/Pull.c msgid "%q must be of type %q or None" -msgstr "" +msgstr "%q debe ser de tipo %q o None" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" -msgstr "" +msgstr "%q debe ser potencia de 2" #: shared-bindings/wifi/Monitor.c msgid "%q out of bounds" -msgstr "" +msgstr "%q fuera de limites" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -211,7 +210,7 @@ msgstr "pin inválido %q" #: py/objrange.c py/objslice.c shared-bindings/random/__init__.c msgid "%q step cannot be zero" -msgstr "" +msgstr "%q paso no puede ser cero" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -219,11 +218,11 @@ 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 "" +msgstr "%q, %q, y %q deben tener el mismo largo" #: py/objint.c shared-bindings/storage/__init__.c msgid "%q=%q" -msgstr "" +msgstr "%q=%q" #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c #, c-format @@ -412,7 +411,7 @@ msgstr "La dirección debe tener %d bytes de largo" #: ports/espressif/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" -msgstr "" +msgstr "Rango de dirección no permitido" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -510,7 +509,7 @@ msgstr "Ya se están buscando redes wifi" #: shared-module/os/getenv.c #, c-format msgid "An error occurred while retrieving '%s':\n" -msgstr "" +msgstr "Un error ocurrió mientras recuperaba '%s':\n" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" @@ -541,7 +540,7 @@ msgstr "Asignación del montículo mientras la VM no esta ejecutándose." #: ports/raspberrypi/audio_dma.c msgid "Audio conversion not implemented" -msgstr "" +msgstr "Conversión de audio no esta implementada" #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" @@ -586,11 +585,12 @@ msgstr "Bits depth debe ser múltiplo de 8." #: shared-bindings/bitmaptools/__init__.c msgid "Bitmap size and bits per value must match" -msgstr "" +msgstr "El tamaño del mapa de bits y los bits por valor deben cotejar" #: supervisor/shared/safe_mode.c msgid "Boot device must be first device (interface #0)." msgstr "" +"El dispositivo de arranque debe de ser el primer dispositivo (interfase #0)." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Both RX and TX required for flow control" @@ -601,7 +601,7 @@ msgstr "Ambos RX y TX requeridos para control de flujo" #: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h #: ports/atmel-samd/boards/meowmeow/mpconfigboard.h msgid "Both buttons were pressed at start up.\n" -msgstr "" +msgstr "Ambos botones fueron prensados al inicio\n" #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" @@ -631,17 +631,17 @@ msgstr "" #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Buffer is not a bytearray." -msgstr "Buffer no es un bytearray." +msgstr "Búfer no es un bytearray." #: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Buffer is too small" -msgstr "El buffer es muy pequeño" +msgstr "Búfer es muy pequeño" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" -msgstr "Longitud del buffer %d es demasiado grande. Tiene que ser menor a %d" +msgstr "Longitud del búfer %d es demasiado grande. Tiene que ser menor a %d" #: ports/atmel-samd/common-hal/sdioio/SDCard.c #: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c @@ -655,11 +655,11 @@ msgstr "Búfer deber ser un múltiplo de 512 bytes" #: shared-bindings/_bleio/PacketBuffer.c #, c-format msgid "Buffer too short by %d bytes" -msgstr "Búffer muy corto por %d bytes" +msgstr "Búfer muy corto por %d bytes" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" -msgstr "" +msgstr "Búferes deben ser del mismo tamaño" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c #: ports/espressif/common-hal/paralleldisplay/ParallelBus.c @@ -672,7 +672,7 @@ msgstr "Bus pin %d ya está siendo utilizado" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h msgid "Button A was pressed at start up.\n" -msgstr "" +msgstr "Botón A fue presionado al inicio.\n" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." @@ -683,8 +683,9 @@ msgid "CBC blocks must be multiples of 16 bytes" msgstr "Los bloques CBC deben ser múltiplos de 16 bytes" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "CIRCUITPY drive could not be found or created." -msgstr "" +msgstr "CIRCUITPY dispositivo de guardo no pudo ser encontrado o creado." #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" @@ -696,7 +697,7 @@ msgstr "Llame a super().__init__() antes de acceder al objeto nativo." #: ports/cxd56/common-hal/camera/Camera.c msgid "Camera init" -msgstr "" +msgstr "Inicialización de cámara" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." @@ -4256,7 +4257,7 @@ msgstr "nombre en unicode escapa" #: py/parse.c msgid "unindent doesn't match any outer indent level" -msgstr "" +msgstr "unindent no coteja ningún nivel de espacio exterior" #: py/objstr.c #, c-format @@ -4278,7 +4279,7 @@ msgstr "tipo desconocido '%q'" #: py/objstr.c #, c-format msgid "unmatched '%c' in format" -msgstr "" +msgstr "no coteja '%c' en formato" #: py/objtype.c py/runtime.c msgid "unreadable attribute" @@ -4300,11 +4301,11 @@ msgstr "instrucción Xtensa '%s' con %d argumentos no soportada" #: shared-module/gifio/GifWriter.c msgid "unsupported colorspace for GifWriter" -msgstr "" +msgstr "espacio de color no soportado para GifWriter" #: shared-bindings/bitmaptools/__init__.c msgid "unsupported colorspace for dither" -msgstr "" +msgstr "espacio de color no soportado para tramado" #: py/objstr.c #, c-format @@ -4325,11 +4326,11 @@ msgstr "tipos no soportados para %q: '%q', '%q'" #: extmod/ulab/code/numpy/io/io.c msgid "usecols is too high" -msgstr "" +msgstr "usecols es muy alto" #: extmod/ulab/code/numpy/io/io.c msgid "usecols keyword must be specified" -msgstr "" +msgstr "usecols palabra clave debe de ser especificada" #: py/objint.c #, c-format @@ -4338,7 +4339,7 @@ msgstr "el valor debe caber en %d byte(s)" #: shared-bindings/bitmaptools/__init__.c msgid "value out of range of target" -msgstr "" +msgstr "valor fuera de alcance al blanco" #: shared-bindings/displayio/Bitmap.c msgid "value_count must be > 0" @@ -4359,7 +4360,7 @@ msgstr "wifi no esta habilitado" #: ports/raspberrypi/common-hal/wifi/Monitor.c msgid "wifi.Monitor not available" -msgstr "" +msgstr "wifi.Monitor no esta disponible" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" @@ -4375,7 +4376,7 @@ msgstr "eje especificado erróneo" #: extmod/ulab/code/numpy/io/io.c msgid "wrong dtype" -msgstr "" +msgstr "erroneo dtype" #: extmod/ulab/code/numpy/transform.c msgid "wrong index type" @@ -4389,11 +4390,11 @@ msgstr "tipo de entrada incorrecta" #: extmod/ulab/code/numpy/transform.c msgid "wrong length of condition array" -msgstr "" +msgstr "largo erroneo en el arreglo de condiciones" #: extmod/ulab/code/numpy/transform.c msgid "wrong length of index array" -msgstr "" +msgstr "largo erroneo en el arreglo de índices" #: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" From d2361ae4f9029a6b2a3093788f9786d70fcca2a0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 1 Jan 2023 16:39:52 -0600 Subject: [PATCH 30/40] Avoid an undefined shift (1 << 32), an operation on a signed 32-bit int, is undefined in C. The operation on the unsigned int (1u<<32) is defined as zero, which is the desired outcome (subtracting 1 yields the value with all bits set) This problem was detected by clang scan-build static analysis --- shared-module/displayio/Bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index 676aec2186..ab1b85ea16 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -70,8 +70,8 @@ void common_hal_displayio_bitmap_construct_from_buffer(displayio_bitmap_t *self, self->x_shift++; power_of_two <<= 1; } - self->x_mask = (1 << self->x_shift) - 1; // Used as a modulus on the x value - self->bitmask = (1 << bits_per_value) - 1; + self->x_mask = (1u << self->x_shift) - 1u; // Used as a modulus on the x value + self->bitmask = (1u << bits_per_value) - 1u; self->dirty_area.x1 = 0; self->dirty_area.x2 = width; From d8081857444496b8849a8a910ef0fda771f1cfce Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 1 Jan 2023 16:40:06 -0600 Subject: [PATCH 31/40] Emphasize that ALIGN_BITS is a constant --- shared-module/displayio/Bitmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index ab1b85ea16..7a1b3e6b17 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -30,12 +30,12 @@ #include "py/runtime.h" -enum { align_bits = 8 * sizeof(uint32_t) }; +enum { ALIGN_BITS = 8 * sizeof(uint32_t) }; static int stride(uint32_t width, uint32_t bits_per_value) { uint32_t row_width = width * bits_per_value; // align to uint32_t - return (row_width + align_bits - 1) / align_bits; + return (row_width + ALIGN_BITS - 1) / ALIGN_BITS; } void common_hal_displayio_bitmap_construct(displayio_bitmap_t *self, uint32_t width, @@ -66,7 +66,7 @@ void common_hal_displayio_bitmap_construct_from_buffer(displayio_bitmap_t *self, self->x_shift = 0; // Used to divide the index by the number of pixels per word. Its used in a // shift which effectively divides by 2 ** x_shift. uint32_t power_of_two = 1; - while (power_of_two < align_bits / bits_per_value) { + while (power_of_two < ALIGN_BITS / bits_per_value) { self->x_shift++; power_of_two <<= 1; } From 34043c2d38c9e9c52fbcee8fe487099098eab927 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 1 Jan 2023 16:44:12 -0600 Subject: [PATCH 32/40] Only store up to 'width' pixels, not 'stride' error detected by clang scan-build static analysis --- 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 4c73d8fb8e..67b5254b32 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -689,7 +689,7 @@ STATIC void fill_row(displayio_bitmap_t *bitmap, int swap, int16_t *luminance_da static void write_pixels(displayio_bitmap_t *bitmap, int y, bool *data) { if (bitmap->bits_per_value == 1) { uint32_t *pixel_data = (uint32_t *)(bitmap->data + bitmap->stride * y); - for (int i = 0; i < bitmap->stride; i++) { + for (int i = 0; i < bitmap->width; i++) { uint32_t p = 0; for (int j = 0; j < 32; j++) { p = (p << 1); From ef8b297d7f6e04818370de2fe3409823f45b9d02 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 1 Jan 2023 16:56:46 -0600 Subject: [PATCH 33/40] Avoid null pointer dereference when no kwargs clang scan-build reports "Access to field 'table' results in a dereference of a null pointer (loaded from variable 'kw_args')" --- py/objtype.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/py/objtype.c b/py/objtype.c index 0914ad5f2e..76b9551be8 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -106,7 +106,9 @@ STATIC mp_obj_t native_base_init_wrapper(size_t n_args, const mp_obj_t *pos_args // copy in args memcpy(args2, pos_args, n_args * sizeof(mp_obj_t)); // copy in kwargs - memcpy(args2 + n_args, kw_args->table, 2 * n_kw * sizeof(mp_obj_t)); + if (n_kw) { + memcpy(args2 + n_args, kw_args->table, 2 * n_kw * sizeof(mp_obj_t)); + } self->subobj[0] = native_base->make_new(native_base, n_args, n_kw, args2); m_del(mp_obj_t, args2, n_args + 2 * n_kw); From a3adcf0e1a7b984fd73fd911d09b2370e48eb159 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 19 Dec 2022 10:44:06 -0500 Subject: [PATCH 34/40] clarify read-only mac address; reuse translate msgs --- locale/circuitpython.pot | 17 +++++++---------- ports/espressif/esp32-camera | 2 +- ports/raspberrypi/common-hal/wifi/Radio.c | 4 ++-- shared-bindings/microcontroller/Processor.c | 2 +- shared-module/displayio/Bitmap.c | 2 +- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 57ba9766be..3878310429 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -124,6 +124,11 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +#: shared-bindings/microcontroller/Processor.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -298,7 +303,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "" @@ -1856,7 +1861,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -1864,10 +1869,6 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -3071,10 +3072,6 @@ msgstr "" msgid "format requires a dict" msgstr "" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "" diff --git a/ports/espressif/esp32-camera b/ports/espressif/esp32-camera index 4ff7f348d0..54c3f61c86 160000 --- a/ports/espressif/esp32-camera +++ b/ports/espressif/esp32-camera @@ -1 +1 @@ -Subproject commit 4ff7f348d0713ea8eca022f73a059b0fe0934531 +Subproject commit 54c3f61c864c3d3ffd779042454554045b9dd9d2 diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index 4cd80fb4b7..db21dd333b 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -64,8 +64,8 @@ static inline void nw_put_le32(uint8_t *buf, uint32_t x) { buf[3] = x >> 24; } -NORETURN static void ro_attribute(int attr) { - mp_raise_msg_varg(&mp_type_AttributeError, MP_ERROR_TEXT("'%s' object has no attribute '%q'"), "Radio", attr); +NORETURN static void ro_attribute(qstr attr) { + mp_raise_NotImplementedError_varg(translate("%q is read-only for this board"), attr); } bool common_hal_wifi_radio_get_enabled(wifi_radio_obj_t *self) { diff --git a/shared-bindings/microcontroller/Processor.c b/shared-bindings/microcontroller/Processor.c index 3b671d0c7b..2479638a92 100644 --- a/shared-bindings/microcontroller/Processor.c +++ b/shared-bindings/microcontroller/Processor.c @@ -72,7 +72,7 @@ STATIC mp_obj_t mcu_processor_set_frequency(mp_obj_t self, mp_obj_t freq) { uint32_t value_of_freq = (uint32_t)mp_arg_validate_int_min(mp_obj_get_int(freq), 0, MP_QSTR_frequency); common_hal_mcu_processor_set_frequency(self, value_of_freq); #else - mp_raise_msg(&mp_type_NotImplementedError,translate("frequency is read-only for this board")); + mp_raise_NotImplementedError_varg(translate("%q is read-only for this board"), MP_QSTR_frequency); #endif return mp_const_none; } diff --git a/shared-module/displayio/Bitmap.c b/shared-module/displayio/Bitmap.c index 7a1b3e6b17..6c64830dce 100644 --- a/shared-module/displayio/Bitmap.c +++ b/shared-module/displayio/Bitmap.c @@ -117,7 +117,7 @@ uint32_t common_hal_displayio_bitmap_get_pixel(displayio_bitmap_t *self, int16_t void displayio_bitmap_set_dirty_area(displayio_bitmap_t *self, const displayio_area_t *dirty_area) { if (self->read_only) { - mp_raise_RuntimeError(translate("Read-only object")); + mp_raise_RuntimeError(translate("Read-only")); } displayio_area_t area = *dirty_area; From 2da4e06890aa081670ea4da92cca7099f51a4e5b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 19 Dec 2022 11:08:35 -0500 Subject: [PATCH 35/40] fix up esp32-camera submodule --- .gitmodules | 1 + ports/espressif/esp32-camera | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 3c0128f77d..dfd718630c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -310,6 +310,7 @@ [submodule "ports/espressif/esp32-camera"] path = ports/espressif/esp32-camera url = https://github.com/adafruit/esp32-camera/ + branch = circuitpython [submodule "ports/raspberrypi/lib/cyw43-driver"] path = ports/raspberrypi/lib/cyw43-driver url = https://github.com/adafruit/cyw43-driver.git diff --git a/ports/espressif/esp32-camera b/ports/espressif/esp32-camera index 54c3f61c86..4ff7f348d0 160000 --- a/ports/espressif/esp32-camera +++ b/ports/espressif/esp32-camera @@ -1 +1 @@ -Subproject commit 54c3f61c864c3d3ffd779042454554045b9dd9d2 +Subproject commit 4ff7f348d0713ea8eca022f73a059b0fe0934531 From 01f6762aa1110bf489f39ec0ed2589a277dd78ca Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 2 Jan 2023 10:40:49 -0500 Subject: [PATCH 36/40] Update ports/espressif/boards/m5stack_atom_u/sdkconfig --- ports/espressif/boards/m5stack_atom_u/sdkconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/espressif/boards/m5stack_atom_u/sdkconfig b/ports/espressif/boards/m5stack_atom_u/sdkconfig index 7f405b00e0..90c99459a8 100644 --- a/ports/espressif/boards/m5stack_atom_u/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_u/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y CONFIG_ESP32_SPIRAM_SUPPORT=n # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set From f5c0996fb7c292ead6d0c86a84cbf8495104690b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 2 Jan 2023 10:41:11 -0500 Subject: [PATCH 37/40] Update ports/espressif/boards/m5stack_atom_echo/sdkconfig --- ports/espressif/boards/m5stack_atom_echo/sdkconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/espressif/boards/m5stack_atom_echo/sdkconfig b/ports/espressif/boards/m5stack_atom_echo/sdkconfig index c6a1fcbabf..3879222bab 100644 --- a/ports/espressif/boards/m5stack_atom_echo/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_echo/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y CONFIG_ESP32_SPIRAM_SUPPORT=n # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set From a061729dccc367c9e8cb386e3f9b67681f7546ec Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 2 Jan 2023 10:41:25 -0500 Subject: [PATCH 38/40] Update ports/espressif/boards/m5stack_atom_matrix/sdkconfig --- ports/espressif/boards/m5stack_atom_matrix/sdkconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig index a6678556eb..474a760b56 100644 --- a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y CONFIG_ESP32_SPIRAM_SUPPORT=n # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set From 03b43b7b3f59225d6c67d18b75dc0a87190c235a Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 2 Jan 2023 11:45:58 -0500 Subject: [PATCH 39/40] complete rework for microcontroller.cpu.frequency and wifi.radio MAC addresses --- locale/circuitpython.pot | 5 +++- ports/raspberrypi/mpconfigport.mk | 3 +++ py/circuitpy_mpconfig.mk | 3 +++ py/runtime.c | 4 ++-- shared-bindings/microcontroller/Processor.c | 17 ++++++++++---- shared-bindings/wifi/Radio.c | 26 +++++++++++++++++++-- 6 files changed, 48 insertions(+), 10 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 3878310429..7546dfa0c6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -125,7 +125,6 @@ msgid "%q is %q" msgstr "" #: ports/raspberrypi/common-hal/wifi/Radio.c -#: shared-bindings/microcontroller/Processor.c msgid "%q is read-only for this board" msgstr "" @@ -2711,6 +2710,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index fa1f0c153d..c5de2a439d 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -2,6 +2,9 @@ LONGINT_IMPL = MPZ CIRCUITPY_OPTIMIZE_PROPERTY_FLASH_SIZE ?= 1 +# CYW43 support does not provide settable MAC addresses for station or AP. +CIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS = 0 + CIRCUITPY_ALARM ?= 1 CIRCUITPY_RP2PIO ?= 1 diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 01b078c6e8..3c1c173a51 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -538,6 +538,9 @@ CFLAGS += -DCIRCUITPY_WIFI=$(CIRCUITPY_WIFI) CIRCUITPY_WEB_WORKFLOW ?= $(CIRCUITPY_WIFI) CFLAGS += -DCIRCUITPY_WEB_WORKFLOW=$(CIRCUITPY_WEB_WORKFLOW) +CIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS?= 1 +CFLAGS += -DCIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS=$(CIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS) + # tinyusb port tailored configuration CIRCUITPY_TUSB_MEM_ALIGN ?= 4 CFLAGS += -DCIRCUITPY_TUSB_MEM_ALIGN=$(CIRCUITPY_TUSB_MEM_ALIGN) diff --git a/py/runtime.c b/py/runtime.c index 6be5c22335..9779456d0c 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1247,8 +1247,8 @@ void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t value) { mp_raise_AttributeError(MP_ERROR_TEXT("no such attribute")); #else mp_raise_msg_varg(&mp_type_AttributeError, - MP_ERROR_TEXT("'%s' object has no attribute '%q'"), - mp_obj_get_type_str(base), attr); + MP_ERROR_TEXT("can't set attribute '%q'"), + attr); #endif } diff --git a/shared-bindings/microcontroller/Processor.c b/shared-bindings/microcontroller/Processor.c index 2479638a92..986f81ea53 100644 --- a/shared-bindings/microcontroller/Processor.c +++ b/shared-bindings/microcontroller/Processor.c @@ -65,19 +65,21 @@ //| ... //| frequency: int -//| """The CPU operating frequency in Hertz. (read-only)""" +//| """The CPU operating frequency in Hertz. +//| +//| **Limitations:** Setting the ``frequency`` is possible only on some i.MX boards. +//| On most boards, ``frequency`` is read-only. +//| """ +#if CIRCUITPY_SETTABLE_PROCESSOR_FREQUENCY STATIC mp_obj_t mcu_processor_set_frequency(mp_obj_t self, mp_obj_t freq) { - #if CIRCUITPY_SETTABLE_PROCESSOR_FREQUENCY uint32_t value_of_freq = (uint32_t)mp_arg_validate_int_min(mp_obj_get_int(freq), 0, MP_QSTR_frequency); common_hal_mcu_processor_set_frequency(self, value_of_freq); - #else - mp_raise_NotImplementedError_varg(translate("%q is read-only for this board"), MP_QSTR_frequency); - #endif return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(mcu_processor_set_frequency_obj, mcu_processor_set_frequency); +#endif STATIC mp_obj_t mcu_processor_get_frequency(mp_obj_t self) { @@ -86,9 +88,14 @@ STATIC mp_obj_t mcu_processor_get_frequency(mp_obj_t self) { MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_frequency_obj, mcu_processor_get_frequency); +#if CIRCUITPY_SETTABLE_PROCESSOR_FREQUENCY MP_PROPERTY_GETSET(mcu_processor_frequency_obj, (mp_obj_t)&mcu_processor_get_frequency_obj, (mp_obj_t)&mcu_processor_set_frequency_obj); +#else +MP_PROPERTY_GETTER(mcu_processor_frequency_obj, + (mp_obj_t)&mcu_processor_get_frequency_obj); +#endif //| reset_reason: microcontroller.ResetReason //| """The reason the microcontroller started up from reset state.""" diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index c12e19e726..27a5907894 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -139,13 +139,19 @@ MP_PROPERTY_GETSET(wifi_radio_hostname_obj, //| mac_address: ReadableBuffer //| """MAC address for the station. When the address is altered after interface is connected -//| the changes would only be reflected once the interface reconnects.""" +//| the changes would only be reflected once the interface reconnects. +//| +//| **Limitations:** Not settable on RP2040 CYW43 boards, such as Pi Pico W. +//| """ + + STATIC mp_obj_t _wifi_radio_get_mac_address(mp_obj_t self_in) { wifi_radio_obj_t *self = MP_OBJ_TO_PTR(self_in); return MP_OBJ_FROM_PTR(common_hal_wifi_radio_get_mac_address(self)); } MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_mac_address_obj, _wifi_radio_get_mac_address); +#if CIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS STATIC mp_obj_t wifi_radio_set_mac_address(mp_obj_t self_in, mp_obj_t mac_address_in) { mp_buffer_info_t mac_address; mp_get_buffer_raise(mac_address_in, &mac_address, MP_BUFFER_READ); @@ -160,10 +166,16 @@ STATIC mp_obj_t wifi_radio_set_mac_address(mp_obj_t self_in, mp_obj_t mac_addres return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_mac_address_obj, wifi_radio_set_mac_address); +#endif +#if CIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS MP_PROPERTY_GETSET(wifi_radio_mac_address_obj, (mp_obj_t)&wifi_radio_get_mac_address_obj, (mp_obj_t)&wifi_radio_set_mac_address_obj); +#else +MP_PROPERTY_GETTER(wifi_radio_mac_address_obj, + (mp_obj_t)&wifi_radio_get_mac_address_obj); +#endif //| tx_power: float //| """Wifi transmission power, in dBm.""" @@ -187,13 +199,17 @@ MP_PROPERTY_GETSET(wifi_radio_tx_power_obj, //| mac_address_ap: ReadableBuffer //| """MAC address for the AP. When the address is altered after interface is started -//| the changes would only be reflected once the interface restarts.""" +//| the changes would only be reflected once the interface restarts. +//| +//| **Limitations:** Not settable on RP2040 CYW43 boards, such as Pi Pico W. +//| """ STATIC mp_obj_t wifi_radio_get_mac_address_ap(mp_obj_t self_in) { wifi_radio_obj_t *self = MP_OBJ_TO_PTR(self_in); return MP_OBJ_FROM_PTR(common_hal_wifi_radio_get_mac_address_ap(self)); } MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_mac_address_ap_obj, wifi_radio_get_mac_address_ap); +#if CIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS STATIC mp_obj_t wifi_radio_set_mac_address_ap(mp_obj_t self_in, mp_obj_t mac_address_in) { mp_buffer_info_t mac_address; mp_get_buffer_raise(mac_address_in, &mac_address, MP_BUFFER_READ); @@ -208,10 +224,16 @@ STATIC mp_obj_t wifi_radio_set_mac_address_ap(mp_obj_t self_in, mp_obj_t mac_add return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_mac_address_ap_obj, wifi_radio_set_mac_address_ap); +#endif +#if CIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS MP_PROPERTY_GETSET(wifi_radio_mac_address_ap_obj, (mp_obj_t)&wifi_radio_get_mac_address_ap_obj, (mp_obj_t)&wifi_radio_set_mac_address_ap_obj); +#else +MP_PROPERTY_GETTER(wifi_radio_mac_address_ap_obj, + (mp_obj_t)&wifi_radio_get_mac_address_ap_obj); +#endif //| def start_scanning_networks( //| self, *, start_channel: int = 1, stop_channel: int = 11 From 86e2a2440153c4b8a135f8a89619c15c9609ff7b Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 2 Jan 2023 19:23:35 +0100 Subject: [PATCH 40/40] 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 | 23 +++++++++++++---------- locale/cs.po | 20 ++++++++++---------- locale/de_DE.po | 26 ++++++++++++++++---------- locale/el.po | 20 ++++++++++---------- locale/en_GB.po | 23 +++++++++++++---------- locale/es.po | 23 +++++++++++++---------- locale/fil.po | 25 ++++++++++++++----------- locale/fr.po | 26 ++++++++++++++++---------- locale/hi.po | 20 ++++++++++---------- locale/it_IT.po | 25 ++++++++++++++----------- locale/ja.po | 23 +++++++++++++---------- locale/ko.po | 20 ++++++++++---------- locale/nl.po | 23 +++++++++++++---------- locale/pl.po | 23 +++++++++++++---------- locale/pt_BR.po | 26 ++++++++++++++++---------- locale/ru.po | 20 ++++++++++---------- locale/sv.po | 26 ++++++++++++++++---------- locale/tr.po | 20 ++++++++++---------- locale/zh_Latn_pinyin.po | 26 ++++++++++++++++---------- 19 files changed, 246 insertions(+), 192 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index acb228ebea..9f1e185dff 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -130,6 +130,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -304,7 +308,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "Objek '%s' tidak memiliki atribut '%q'" @@ -1883,7 +1887,7 @@ msgid "Random number generation error" msgstr "Kesalahan pembuatan nomor acak" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Baca-saja" @@ -1891,10 +1895,6 @@ msgstr "Baca-saja" msgid "Read-only filesystem" msgstr "sistem file (filesystem) bersifat Read-only" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Objek Read-only" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2741,6 +2741,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" @@ -3102,10 +3106,6 @@ msgstr "" msgid "format requires a dict" msgstr "" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "" @@ -4378,6 +4378,9 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "Read-only object" +#~ msgstr "Objek Read-only" + #~ msgid "%q length must be >= 1" #~ msgstr "%q panjang harus >= 1" diff --git a/locale/cs.po b/locale/cs.po index cf7973d4ad..b73fe1df88 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -131,6 +131,10 @@ msgstr "Inicializace %q selhala" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "Délka %q musí být %d" @@ -305,7 +309,7 @@ msgstr "'%s' objekt nepodporuje přiřazení položky" msgid "'%s' object doesn't support item deletion" msgstr "'%s' objekt nepodporuje smazání položky" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' objekt nemá žádný atribut '%q'" @@ -1874,7 +1878,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -1882,10 +1886,6 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2728,6 +2728,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" @@ -3089,10 +3093,6 @@ msgstr "" msgid "format requires a dict" msgstr "" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index a72022c938..69d2e6ee36 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -132,6 +132,10 @@ msgstr "%q Initialisierung ist gescheitert" msgid "%q is %q" msgstr "%q ist %q" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "%q länge muss %d betragen" @@ -308,7 +312,7 @@ msgstr "'%s' Objekt unterstützt keine Element-Zuordnung" msgid "'%s' object doesn't support item deletion" msgstr "'%s' Objekt unterstützt keine Löschung von Elementen" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' Objekt hat kein Attribut '%q'" @@ -1899,7 +1903,7 @@ msgid "Random number generation error" msgstr "Fehler bei der Erzeugung von Zufallszahlen" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Nur lesen möglich, da Schreibgeschützt" @@ -1907,10 +1911,6 @@ msgstr "Nur lesen möglich, da Schreibgeschützt" msgid "Read-only filesystem" msgstr "Schreibgeschützte Dateisystem" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Schreibgeschützte Objekt" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Erhaltene Antwort ist ungültig" @@ -2787,6 +2787,10 @@ msgstr "Kann Blockgröße von 512 nicht setzen" msgid "can't set attribute" msgstr "kann Attribut nicht setzen" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "Speichern von '%q' nicht möglich" @@ -3158,10 +3162,6 @@ msgstr "Die Schriftart (font) muss 2048 Byte lang sein" msgid "format requires a dict" msgstr "Format erfordert ein Wörterbuch (dict)" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "Frequenz ist für dieses Board schreibgeschützt" - #: py/objdeque.c msgid "full" msgstr "voll" @@ -4448,6 +4448,12 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "zi muss die Form (n_section, 2) haben" +#~ msgid "Read-only object" +#~ msgstr "Schreibgeschützte Objekt" + +#~ msgid "frequency is read-only for this board" +#~ msgstr "Frequenz ist für dieses Board schreibgeschützt" + #~ msgid "Unable to write" #~ msgstr "Schreiben nicht möglich" diff --git a/locale/el.po b/locale/el.po index 246d49ad74..fe882c9f30 100644 --- a/locale/el.po +++ b/locale/el.po @@ -136,6 +136,10 @@ msgstr "%q εκκίνηση απέτυχε" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "%q μήκος πρέπει να είναι %d" @@ -310,7 +314,7 @@ msgstr "'%s' αντικείμενο δεν υποστηρίζει ορισμό msgid "'%s' object doesn't support item deletion" msgstr "'%s' αντικείμενο δεν υποστηρίζει διαγραφή πράγματος" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' αντικείμενο δεν έχει γνώρισμα '%q'" @@ -1883,7 +1887,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -1891,10 +1895,6 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2737,6 +2737,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" @@ -3098,10 +3102,6 @@ msgstr "" msgid "format requires a dict" msgstr "" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 74c7efabf5..6bb13d2570 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -134,6 +134,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -308,7 +312,7 @@ msgstr "'%s' object doesn't support item assignment" msgid "'%s' object doesn't support item deletion" msgstr "'%s' object doesn't support item deletion" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' object has no attribute '%q'" @@ -1880,7 +1884,7 @@ msgid "Random number generation error" msgstr "Random number generation error" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Read-only" @@ -1888,10 +1892,6 @@ msgstr "Read-only" msgid "Read-only filesystem" msgstr "Read-only filesystem" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Read-only object" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Received response was invalid" @@ -2744,6 +2744,10 @@ msgstr "can't set 512 block size" msgid "can't set attribute" msgstr "can't set attribute" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "can't store '%q'" @@ -3108,10 +3112,6 @@ msgstr "font must be 2048 bytes long" msgid "format requires a dict" msgstr "format requires a dict" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "full" @@ -4383,6 +4383,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 "Read-only object" +#~ msgstr "Read-only object" + #~ msgid "%q length must be >= 1" #~ msgstr "%q length must be >= 1" diff --git a/locale/es.po b/locale/es.po index 5b8e3b5883..f65f60a770 100644 --- a/locale/es.po +++ b/locale/es.po @@ -135,6 +135,10 @@ msgstr "%q inicializado fallido" msgid "%q is %q" msgstr "%q es %q" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "%q tamaño debe ser %d" @@ -309,7 +313,7 @@ msgstr "'%s' el objeto no tiene capacidad de asignación de item" msgid "'%s' object doesn't support item deletion" msgstr "'%s' el objeto no tiene capacidad de borrado de item" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "objeto '%s' no tiene atributo '%q'" @@ -1909,7 +1913,7 @@ msgid "Random number generation error" msgstr "Error de generación de números aleatorios" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Solo-lectura" @@ -1917,10 +1921,6 @@ msgstr "Solo-lectura" msgid "Read-only filesystem" msgstr "Sistema de archivos de solo-Lectura" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Objeto de solo-lectura" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "La respuesta recibida es invalida" @@ -2782,6 +2782,10 @@ msgstr "no se puede definir un tamaño de bloque de 512" msgid "can't set attribute" msgstr "no se puede asignar el atributo" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "no se puede almacenar '%q'" @@ -3149,10 +3153,6 @@ msgstr "font debe ser 2048 bytes de largo" msgid "format requires a dict" msgstr "format requiere un dict" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "lleno" @@ -4432,6 +4432,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 "Read-only object" +#~ msgstr "Objeto de solo-lectura" + #~ msgid "%q length must be >= 1" #~ msgstr "%q tamaño debe ser >= 1" diff --git a/locale/fil.po b/locale/fil.po index 6731d2d458..7a77dab021 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -125,6 +125,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -300,7 +304,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' object ay walang attribute '%q'" @@ -1872,7 +1876,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Basahin-lamang" @@ -1880,11 +1884,6 @@ msgstr "Basahin-lamang" msgid "Read-only filesystem" msgstr "Basahin-lamang mode" -#: shared-module/displayio/Bitmap.c -#, fuzzy -msgid "Read-only object" -msgstr "Basahin-lamang" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2732,6 +2731,10 @@ msgstr "" msgid "can't set attribute" msgstr "hindi ma i-set ang attribute" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "hindi ma i-store ang '%q'" @@ -3101,10 +3104,6 @@ msgstr "font ay dapat 2048 bytes ang haba" msgid "format requires a dict" msgstr "kailangan ng format ng dict" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "puno" @@ -4385,6 +4384,10 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#, fuzzy +#~ msgid "Read-only object" +#~ msgstr "Basahin-lamang" + #~ msgid "Invalid pins" #~ msgstr "Mali ang pins" diff --git a/locale/fr.po b/locale/fr.po index 908f93b553..910c11cf57 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -136,6 +136,10 @@ msgstr "échec de l'initialisation %q" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "La longeur de %q doit être %d" @@ -310,7 +314,7 @@ msgstr "l'objet %s ne supporte pas l'assignation d'éléments" msgid "'%s' object doesn't support item deletion" msgstr "L'objet '%s' ne prend pas en charge la suppression d'éléments" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "l'objet '%s' n'a pas d'attribut '%q'" @@ -1929,7 +1933,7 @@ msgid "Random number generation error" msgstr "Erreur de génération de chiffres aléatoires" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Lecture seule" @@ -1937,10 +1941,6 @@ msgstr "Lecture seule" msgid "Read-only filesystem" msgstr "Système de fichier en lecture seule" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Objet en lecture seule" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Réponse reçue invalide" @@ -2815,6 +2815,10 @@ msgstr "impossible de définir une taille de bloc de 512" msgid "can't set attribute" msgstr "attribut non modifiable" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "impossible de stocker '%q'" @@ -3188,10 +3192,6 @@ msgstr "la police doit être longue de 2048 octets" msgid "format requires a dict" msgstr "le format nécessite un dict" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "la fréquence est en lecture seule pour cette carte" - #: py/objdeque.c msgid "full" msgstr "plein" @@ -4476,6 +4476,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 "Read-only object" +#~ msgstr "Objet en lecture seule" + +#~ msgid "frequency is read-only for this board" +#~ msgstr "la fréquence est en lecture seule pour cette carte" + #~ msgid "Unable to write" #~ msgstr "Écriture impossible" diff --git a/locale/hi.po b/locale/hi.po index 6e55808443..6b43cffabc 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -124,6 +124,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -298,7 +302,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "" @@ -1856,7 +1860,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -1864,10 +1868,6 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2710,6 +2710,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" @@ -3071,10 +3075,6 @@ msgstr "" msgid "format requires a dict" msgstr "" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 73ed787bf8..33c397da01 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -131,6 +131,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -305,7 +309,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "l'oggetto '%s' non ha l'attributo '%q'" @@ -1882,7 +1886,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Sola lettura" @@ -1890,11 +1894,6 @@ msgstr "Sola lettura" msgid "Read-only filesystem" msgstr "Filesystem in sola lettura" -#: shared-module/displayio/Bitmap.c -#, fuzzy -msgid "Read-only object" -msgstr "Sola lettura" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2743,6 +2742,10 @@ msgstr "" msgid "can't set attribute" msgstr "impossibile impostare attributo" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "impossibile memorizzare '%q'" @@ -3109,10 +3112,6 @@ msgstr "il font deve essere lungo 2048 byte" msgid "format requires a dict" msgstr "la formattazione richiede un dict" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "pieno" @@ -4398,6 +4397,10 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#, fuzzy +#~ msgid "Read-only object" +#~ msgstr "Sola lettura" + #~ msgid "At most %d %q may be specified (not %d)" #~ msgstr "Almeno %d %q devono essere specificati (non %d)" diff --git a/locale/ja.po b/locale/ja.po index b2227cecab..d7573c2197 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -129,6 +129,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -303,7 +307,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "" @@ -1869,7 +1873,7 @@ msgid "Random number generation error" msgstr "乱数生成エラー" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "読み込み専用" @@ -1877,10 +1881,6 @@ msgstr "読み込み専用" msgid "Read-only filesystem" msgstr "読み込み専用のファイルシステム" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "読み込み専用のオブジェクト" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2724,6 +2724,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" @@ -3089,10 +3093,6 @@ msgstr "fontは2048バイト長でなければなりません" msgid "format requires a dict" msgstr "formatにはdictが必要" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "" @@ -4367,6 +4367,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Read-only object" +#~ msgstr "読み込み専用のオブジェクト" + #~ msgid "At most %d %q may be specified (not %d)" #~ msgstr "最大で %d個の %q が指定できます(%d個でなく)" diff --git a/locale/ko.po b/locale/ko.po index 8e7fee3e2f..39ff657aff 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -125,6 +125,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -299,7 +303,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "" @@ -1859,7 +1863,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -1867,10 +1871,6 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2714,6 +2714,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" @@ -3075,10 +3079,6 @@ msgstr "" msgid "format requires a dict" msgstr "" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "완전한(full)" diff --git a/locale/nl.po b/locale/nl.po index 728285da8e..79b6333de4 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -127,6 +127,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -301,7 +305,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' object heeft geen attribuut '%q'" @@ -1880,7 +1884,7 @@ msgid "Random number generation error" msgstr "Random number generatie fout" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Alleen-lezen" @@ -1888,10 +1892,6 @@ msgstr "Alleen-lezen" msgid "Read-only filesystem" msgstr "Alleen-lezen bestandssysteem" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Alleen-lezen object" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2741,6 +2741,10 @@ msgstr "kan geen 512 blokgrootte instellen" msgid "can't set attribute" msgstr "kan attribute niet instellen" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "kan '%q' niet opslaan" @@ -3104,10 +3108,6 @@ msgstr "lettertype moet 2048 bytes lang zijn" msgid "format requires a dict" msgstr "format vereist een dict" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "vol" @@ -4383,6 +4383,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 "Read-only object" +#~ msgstr "Alleen-lezen object" + #~ msgid "At most %d %q may be specified (not %d)" #~ msgstr "Op zijn meest %d %q mogen worden gespecificeerd (niet %d)" diff --git a/locale/pl.po b/locale/pl.po index ba505d4e6b..814a5d06d4 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -129,6 +129,10 @@ msgstr "" msgid "%q is %q" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "" @@ -303,7 +307,7 @@ msgstr "" msgid "'%s' object doesn't support item deletion" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' obiekt nie ma atrybutu '%q'" @@ -1867,7 +1871,7 @@ msgid "Random number generation error" msgstr "Błąd generowania liczb losowych" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Tylko do odczytu" @@ -1875,10 +1879,6 @@ msgstr "Tylko do odczytu" msgid "Read-only filesystem" msgstr "System plików tylko do odczytu" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Obiekt tylko do odczytu" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Otrzymana odpowiedź była nieprawidłowa" @@ -2721,6 +2721,10 @@ msgstr "" msgid "can't set attribute" msgstr "nie można ustawić atrybutu" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "nie można zapisać '%q'" @@ -3083,10 +3087,6 @@ msgstr "font musi mieć 2048 bajtów długości" msgid "format requires a dict" msgstr "format wymaga słownika" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "pełny" @@ -4359,6 +4359,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Read-only object" +#~ msgstr "Obiekt tylko do odczytu" + #~ msgid "Invalid pins" #~ msgstr "Złe nóżki" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 63a7cda056..b82aaf1ff9 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -133,6 +133,10 @@ msgstr "a inicialização do %q falhou" msgid "%q is %q" msgstr "%q é %q" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "O comprimento de %q deve ser %d" @@ -307,7 +311,7 @@ msgstr "O objeto '%s' não suporta a atribuição dos itens" msgid "'%s' object doesn't support item deletion" msgstr "O objeto '%s' não é compatível com exclusão do item" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "O objeto '%s' não possui o atributo '%q'" @@ -1912,7 +1916,7 @@ msgid "Random number generation error" msgstr "Houve um erro na geração do número aleatório" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Somente leitura" @@ -1920,10 +1924,6 @@ msgstr "Somente leitura" msgid "Read-only filesystem" msgstr "Sistema de arquivos somente leitura" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Objeto de leitura apenas" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "A resposta recebida foi inválida" @@ -2795,6 +2795,10 @@ msgstr "não é possível definir o tamanho de 512 blocos" msgid "can't set attribute" msgstr "não é possível definir o atributo" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "não é possível armazenar '%q'" @@ -3165,10 +3169,6 @@ msgstr "a fonte deve ter 2048 bytes de comprimento" msgid "format requires a dict" msgstr "formato requer um dict" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "nesta placa, a frequência é de apenas leitura" - #: py/objdeque.c msgid "full" msgstr "cheio" @@ -4451,6 +4451,12 @@ 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 "Read-only object" +#~ msgstr "Objeto de leitura apenas" + +#~ msgid "frequency is read-only for this board" +#~ msgstr "nesta placa, a frequência é de apenas leitura" + #~ msgid "Pins 21+ not supported from ULP" #~ msgstr "Os pinos 21+ não são suportados pelo ULP" diff --git a/locale/ru.po b/locale/ru.po index 3d7f536335..5549e7e3f9 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -135,6 +135,10 @@ msgstr "Инициализация %q не удалась" msgid "%q is %q" msgstr "%q является %q" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "Длинна %q должна быть %d" @@ -309,7 +313,7 @@ msgstr "Объект '%s' не поддерживает присвоение э msgid "'%s' object doesn't support item deletion" msgstr "Объект '%s' не поддерживает удаление элементов" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "Объект '%s' не имеет атрибута '%q'" @@ -1924,7 +1928,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -1932,10 +1936,6 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2780,6 +2780,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" @@ -3141,10 +3145,6 @@ msgstr "" msgid "format requires a dict" msgstr "" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index 1a2079f605..c64ff356c0 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -132,6 +132,10 @@ msgstr "%q init misslyckades" msgid "%q is %q" msgstr "%q är %q" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "längden på %q måste vara %d" @@ -308,7 +312,7 @@ msgstr "Objektet '%s' stöder inte tilldelning" msgid "'%s' object doesn't support item deletion" msgstr "Objektet '%s' stöder inte borttagning" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "Objektet '%s' har inget attribut '%q'" @@ -1892,7 +1896,7 @@ msgid "Random number generation error" msgstr "Fel vid generering av slumptal" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Skrivskyddad" @@ -1900,10 +1904,6 @@ msgstr "Skrivskyddad" msgid "Read-only filesystem" msgstr "Skrivskyddat filsystem" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Skrivskyddat objekt" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "Mottaget svar var ogiltigt" @@ -2766,6 +2766,10 @@ msgstr "kan inte sätta blockstorlek 512" msgid "can't set attribute" msgstr "kan inte att ange attribut" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "kan inte lagra '%q'" @@ -3134,10 +3138,6 @@ msgstr "typsnitt måste vara 2048 bytes långt" msgid "format requires a dict" msgstr "formatet kräver en dict" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "frekvens är skrivskyddad för detta kort" - #: py/objdeque.c msgid "full" msgstr "full" @@ -4413,6 +4413,12 @@ 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 "Read-only object" +#~ msgstr "Skrivskyddat objekt" + +#~ msgid "frequency is read-only for this board" +#~ msgstr "frekvens är skrivskyddad för detta kort" + #~ msgid "Pins 21+ not supported from ULP" #~ msgstr "Pins 21+ stöds inte av ULP" diff --git a/locale/tr.po b/locale/tr.po index e7ed5b06bf..e25e81d679 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -136,6 +136,10 @@ msgstr "%q init başarısız oldu" msgid "%q is %q" msgstr "%q %q dir" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "%q boyutu %d olmalıdır" @@ -310,7 +314,7 @@ msgstr "'%s' nesnesi, öğe atamasını desteklemiyor" msgid "'%s' object doesn't support item deletion" msgstr "'%s' nesnesi, öğe silmeyi desteklemiyor" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' nesnesinin '%q' özelliği yok" @@ -1882,7 +1886,7 @@ msgid "Random number generation error" msgstr "" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "" @@ -1890,10 +1894,6 @@ msgstr "" msgid "Read-only filesystem" msgstr "" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "" - #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Received response was invalid" msgstr "" @@ -2736,6 +2736,10 @@ msgstr "" msgid "can't set attribute" msgstr "" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "" @@ -3097,10 +3101,6 @@ msgstr "" msgid "format requires a dict" msgstr "" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "" - #: py/objdeque.c msgid "full" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 088a006c44..8599c77f2e 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -135,6 +135,10 @@ msgstr "%q chūshǐhuà shībài" msgid "%q is %q" msgstr "%q shì %q" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "%q is read-only for this board" +msgstr "" + #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" msgstr "%q de chángdù bìxū shì %d" @@ -310,7 +314,7 @@ msgstr "'%s' duìxiàng bù zhīchí yuánsù fùzhí" msgid "'%s' object doesn't support item deletion" msgstr "'%s' duìxiàng bù zhīchí yuánsù shānchú" -#: ports/raspberrypi/common-hal/wifi/Radio.c py/runtime.c +#: py/runtime.c msgid "'%s' object has no attribute '%q'" msgstr "'%s' duìxiàng méiyǒu shǔxìng '%q'" @@ -1896,7 +1900,7 @@ msgid "Random number generation error" msgstr "Suíjī shù shēngchéng cuòwù" #: shared-bindings/memorymonitor/AllocationSize.c -#: shared-bindings/pulseio/PulseIn.c +#: shared-bindings/pulseio/PulseIn.c shared-module/displayio/Bitmap.c msgid "Read-only" msgstr "Zhǐ dú" @@ -1904,10 +1908,6 @@ msgstr "Zhǐ dú" msgid "Read-only filesystem" msgstr "Zhǐ dú wénjiàn xìtǒng" -#: shared-module/displayio/Bitmap.c -msgid "Read-only object" -msgstr "Zhǐ dú duìxiàng" - #: ports/espressif/common-hal/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" @@ -2771,6 +2771,10 @@ msgstr "wúfǎ shèzhì 512 kuài dàxiǎo" msgid "can't set attribute" msgstr "wúfǎ shèzhì shǔxìng" +#: py/runtime.c +msgid "can't set attribute '%q'" +msgstr "" + #: py/emitnative.c msgid "can't store '%q'" msgstr "wúfǎ cúnchú '%q'" @@ -3140,10 +3144,6 @@ msgstr "zìtǐ bìxū wèi 2048 zì jié" msgid "format requires a dict" msgstr "géshì yāoqiú yīgè yǔjù" -#: shared-bindings/microcontroller/Processor.c -msgid "frequency is read-only for this board" -msgstr "cǐ zhǔ bǎn de pín lǜ wéi zhǐ dú" - #: py/objdeque.c msgid "full" msgstr "chōngfèn" @@ -4419,6 +4419,12 @@ 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 "Read-only object" +#~ msgstr "Zhǐ dú duìxiàng" + +#~ msgid "frequency is read-only for this board" +#~ msgstr "cǐ zhǔ bǎn de pín lǜ wéi zhǐ dú" + #~ msgid "Unable to write" #~ msgstr "wú fǎ xiě rù"