From 0f9e3eed01aef6b4b39fc4b8b07fbc1940698ee6 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Tue, 26 Oct 2021 21:48:11 -0600 Subject: [PATCH 001/258] initial commit for Seeed Review --- .../boards/seeeduino_xiao_rp2040/board.c | 40 ++++++++++++++++ .../seeeduino_xiao_rp2040/mpconfigboard.h | 15 ++++++ .../seeeduino_xiao_rp2040/mpconfigboard.mk | 9 ++++ .../pico-sdk-configboard.h | 4 ++ .../boards/seeeduino_xiao_rp2040/pins.c | 46 +++++++++++++++++++ 5 files changed, 114 insertions(+) create mode 100644 ports/raspberrypi/boards/seeeduino_xiao_rp2040/board.c create mode 100644 ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/seeeduino_xiao_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/board.c b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..a0ea3c51a0 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.h @@ -0,0 +1,15 @@ +#define MICROPY_HW_BOARD_NAME "Seeeduino XIAO RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO12) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO11) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO7) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO6) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO2) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..6376bd94f1 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x2886 +USB_PID = 0x003f +USB_PRODUCT = "Seeeduino XIAO RP2040" +USB_MANUFACTURER = "Seeed" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c new file mode 100644 index 0000000000..dca7161ba2 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c @@ -0,0 +1,46 @@ +#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_D0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO11) }, + + { 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 c9f834f3a17c4ae89edf00a51738c895ac447325 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Tue, 26 Oct 2021 21:55:38 -0600 Subject: [PATCH 002/258] added LEDs --- ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c index dca7161ba2..8c8ed1197c 100644 --- a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c @@ -36,6 +36,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO3) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_TX_LED), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_RX_LED), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_YELLOW_LED), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO11) }, From ceeec6f1a0f096ebeef0d2e6e730fe6f4b18038e Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Wed, 27 Oct 2021 08:10:47 -0600 Subject: [PATCH 003/258] updated USB PID to match one received from MengDu from Seeed --- ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk index 6376bd94f1..f9a003a52d 100644 --- a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2886 -USB_PID = 0x003f +USB_PID = 0x0042 USB_PRODUCT = "Seeeduino XIAO RP2040" USB_MANUFACTURER = "Seeed" From a75473af968b06f9fa18eb5623acc4208f6f1b68 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Tue, 2 Nov 2021 20:52:58 -0600 Subject: [PATCH 004/258] update to EXTERNAL_FLASH_DEVICES to Puya P25Q16H --- ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk index f9a003a52d..1540642cd5 100644 --- a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Seeed" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "GD25Q16C" +EXTERNAL_FLASH_DEVICES = "P25Q16H" From 2e12956c408ec3f6cc4ed6f19207a9ee5b1a1a4e Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Tue, 2 Nov 2021 23:07:00 -0600 Subject: [PATCH 005/258] updated nvm.toml module --- data/nvm.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/nvm.toml b/data/nvm.toml index e5b149599d..73cedb3547 160000 --- a/data/nvm.toml +++ b/data/nvm.toml @@ -1 +1 @@ -Subproject commit e5b149599d14a8841167fe552846ca36925b87a0 +Subproject commit 73cedb3547481c15405ab5a88e2b39392ff13e78 From c6051719f56b0cb798882dee16ec327cd09ad1f2 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 4 Nov 2021 08:56:14 -0600 Subject: [PATCH 006/258] update nvm.toml module to latest --- data/nvm.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/nvm.toml b/data/nvm.toml index 73cedb3547..266ea20ed8 160000 --- a/data/nvm.toml +++ b/data/nvm.toml @@ -1 +1 @@ -Subproject commit 73cedb3547481c15405ab5a88e2b39392ff13e78 +Subproject commit 266ea20ed80104c315dcb124b482fa5f9f48cdec From ce7cd221166f9b9999b878eac16f270a74ce06a7 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Sun, 14 Nov 2021 21:56:18 -0600 Subject: [PATCH 007/258] updated pins.c to enable support for PyKey87 --- ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c index b33373c9a0..c904b1e29f 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c @@ -22,16 +22,19 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO27) }, { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, From 0ff3c0dac07955720e6fddb4998d307bf69fde6e Mon Sep 17 00:00:00 2001 From: Nathan Young <77929198+NathanY3G@users.noreply.github.com> Date: Wed, 17 Nov 2021 19:18:28 +0100 Subject: [PATCH 008/258] Board definition for SparkFun Thing Plus - STM32 --- .../boards/sparkfun_stm32_thing_plus/board.c | 38 ++++++++++++ .../sparkfun_stm32_thing_plus/mpconfigboard.h | 58 ++++++++++++++++++ .../mpconfigboard.mk | 20 +++++++ .../boards/sparkfun_stm32_thing_plus/pins.c | 60 +++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 ports/stm/boards/sparkfun_stm32_thing_plus/board.c create mode 100644 ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.h create mode 100644 ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk create mode 100644 ports/stm/boards/sparkfun_stm32_thing_plus/pins.c diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/board.c b/ports/stm/boards/sparkfun_stm32_thing_plus/board.c new file mode 100644 index 0000000000..5fca974e9e --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.h b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.h new file mode 100644 index 0000000000..b1412d9186 --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.h @@ -0,0 +1,58 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Lucian Copeland for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "SparkFun Thing Plus - STM32" +#define MICROPY_HW_MCU_NAME "STM32F405RG" + +#define FLASH_SIZE (0x100000) +#define FLASH_PAGE_SIZE (0x4000) + +#define HSE_VALUE ((uint32_t)12000000U) +#define LSE_VALUE ((uint32_t)32768) +#define BOARD_HAS_LOW_SPEED_CRYSTAL (1) + +// On-board flash +#define SPI_FLASH_MOSI_PIN (&pin_PB05) +#define SPI_FLASH_MISO_PIN (&pin_PB04) +#define SPI_FLASH_SCK_PIN (&pin_PB03) +#define SPI_FLASH_CS_PIN (&pin_PA15) + +// Bootloader only +#ifdef UF2_BOOTLOADER_ENABLED + #define BOARD_VTOR_DEFER (1) // Leave VTOR relocation to bootloader +#endif + +#define DEFAULT_I2C_BUS_SCL (&pin_PB06) +#define DEFAULT_I2C_BUS_SDA (&pin_PB07) + +#define DEFAULT_SPI_BUS_SCK (&pin_PB13) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB15) +#define DEFAULT_SPI_BUS_MISO (&pin_PB14) + +#define DEFAULT_UART_BUS_RX (&pin_PB11) +#define DEFAULT_UART_BUS_TX (&pin_PB10) diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk new file mode 100644 index 0000000000..ad00c5b45f --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk @@ -0,0 +1,20 @@ +USB_VID = 0x0483 +USB_PID = 0x5740 +USB_PRODUCT = "SparkFun Thing Plus - STM32" +USB_MANUFACTURER = "SparkFun Electronics" + +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = W25Q128JVxM + +MCU_SERIES = F4 +MCU_VARIANT = STM32F405xx +MCU_PACKAGE = LQFP64 + +LD_COMMON = boards/common_default.ld +LD_DEFAULT = boards/STM32F405_default.ld + +# UF2 boot option +LD_BOOT = boards/STM32F405_boot.ld +UF2_OFFSET = 0x8010000 + +CIRCUITPY_RGBMATRIX ?= 1 diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/pins.c b/ports/stm/boards/sparkfun_stm32_thing_plus/pins.c new file mode 100644 index 0000000000..3c1d41b42a --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/pins.c @@ -0,0 +1,60 @@ +#include "py/objtuple.h" +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { + {&mp_type_tuple}, + 4, + { + MP_ROM_PTR(&pin_PC08), + MP_ROM_PTR(&pin_PC09), + MP_ROM_PTR(&pin_PC10), + MP_ROM_PTR(&pin_PC11), + } +}; + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PC04) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC05) }, + + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC07) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PC06) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PC03) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PC02) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PC01) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PC01) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB07) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB06) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB13) }, + { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_PB14) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB14) }, + { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_PB15) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB15) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB11) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_SDIO_CLOCK), MP_ROM_PTR(&pin_PC12) }, + { MP_ROM_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_PD02) }, + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA), MP_ROM_PTR(&sdio_data_tuple) }, + + { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB09) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 7afb4f1129411430a3c49a7f12ebc5b1f52a1b8b Mon Sep 17 00:00:00 2001 From: Nathan Young <77929198+NathanY3G@users.noreply.github.com> Date: Sat, 20 Nov 2021 13:10:41 +0100 Subject: [PATCH 009/258] Temporary: Use same USB PID as the MicroMod STM32 --- .../stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk index ad00c5b45f..a2b982e05a 100644 --- a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk @@ -1,5 +1,8 @@ -USB_VID = 0x0483 -USB_PID = 0x5740 +USB_VID = 0X1B4F + +# TODO: Replace the Product ID below with the official value once known. +USB_PID = 0x0027 # Same PID as the SparkFun MicroMod STM32 + USB_PRODUCT = "SparkFun Thing Plus - STM32" USB_MANUFACTURER = "SparkFun Electronics" From b1a3ccb36c87598b63a2045b8c2fff05a8c61069 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 23 Nov 2021 12:34:03 -0600 Subject: [PATCH 010/258] clear out interrupt when freeing the timer Closes #5418 --- ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c b/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c index f150422e3c..8ab4edb598 100644 --- a/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c +++ b/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c @@ -33,6 +33,7 @@ #include "shared-module/rgbmatrix/RGBMatrix.h" #include "src/rp2_common/hardware_pwm/include/hardware/pwm.h" +#include "src/rp2_common/hardware_irq/include/hardware/irq.h" void *common_hal_rgbmatrix_timer_allocate(rgbmatrix_rgbmatrix_obj_t *self) { // Choose a PWM channel based on the first RGB pin @@ -65,6 +66,8 @@ void common_hal_rgbmatrix_timer_free(void *ptr) { uint8_t slice = value & 0xff; uint8_t channel = value >> 8; pwm_set_enabled(slice, false); + irq_set_enabled(PWM_IRQ_WRAP, false); + pwm_clear_irq(slice); pwmout_free(slice, channel); return; } From 7ba5513f9a2f8010601e8b11877788aa2148d0c9 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 24 Nov 2021 00:00:00 +0530 Subject: [PATCH 011/258] update espressif port - update esp-idf to v4.4 - add esp32s3 support - add analogio on esp32c3 - disable rgbmatrix on all espressif soc Co-authored-by: Scott Shawcroft Co-authored-by: Seon Rozenblum --- .gitmodules | 2 +- ports/espressif/Makefile | 49 +++++++----- ports/espressif/cam.c | 5 ++ .../espressif/common-hal/alarm/pin/PinAlarm.c | 2 +- .../espressif/common-hal/analogio/AnalogIn.c | 6 ++ .../espressif/common-hal/analogio/AnalogOut.c | 10 +++ .../common-hal/frequencyio/FrequencyIn.c | 10 ++- .../common-hal/microcontroller/Processor.c | 4 + .../common-hal/microcontroller/__init__.c | 7 +- ports/espressif/esp-idf | 2 +- ports/espressif/mpconfigport.mk | 9 ++- ports/espressif/mphalport.c | 13 +-- ports/espressif/peripherals/esp32s3/pins.c | 73 +++++++++++++++++ ports/espressif/peripherals/esp32s3/pins.h | 80 +++++++++++++++++++ ports/espressif/peripherals/pcnt.h | 1 + ports/espressif/peripherals/pins.h | 4 +- ports/espressif/supervisor/port.c | 16 ++-- ports/espressif/supervisor/usb.c | 7 +- 18 files changed, 243 insertions(+), 57 deletions(-) create mode 100644 ports/espressif/peripherals/esp32s3/pins.c create mode 100644 ports/espressif/peripherals/esp32s3/pins.h diff --git a/.gitmodules b/.gitmodules index e26d3dd76b..afc3add5fc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -149,7 +149,7 @@ [submodule "ports/espressif/esp-idf"] path = ports/espressif/esp-idf url = https://github.com/espressif/esp-idf.git - branch = release/v4.3 + branch = release/v4.4 [submodule "ports/espressif/certificates/nina-fw"] path = ports/espressif/certificates/nina-fw url = https://github.com/adafruit/nina-fw.git diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 7a034c9d2a..b29c9f35cf 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -59,12 +59,12 @@ include $(TOP)/supervisor/supervisor.mk # Include make rules and variables common across CircuitPython builds. include $(TOP)/py/circuitpy_defns.mk -ifeq ($(IDF_TARGET),esp32s2) -IDF_TARGET_ARCH = xtensa -CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- -else ifeq ($(IDF_TARGET),esp32c3) +ifeq ($(IDF_TARGET),esp32c3) IDF_TARGET_ARCH = riscv CROSS_COMPILE = riscv32-esp-elf- +else +IDF_TARGET_ARCH = xtensa +CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- endif ####################################### @@ -92,6 +92,7 @@ INC += -I.\ -isystem esp-idf/components/esp_common/include \ -isystem esp-idf/components/esp_event/include \ -isystem esp-idf/components/esp_hw_support/include \ + -isystem esp-idf/components/esp_hw_support/include/soc \ -isystem esp-idf/components/esp_netif/include \ -isystem esp-idf/components/esp_pm/include \ -isystem esp-idf/components/esp_ringbuf/include \ @@ -101,6 +102,8 @@ INC += -I.\ -isystem esp-idf/components/esp_wifi/include \ -isystem esp-idf/components/freertos/include \ -isystem esp-idf/components/freertos/include/freertos \ + -isystem esp-idf/components/freertos/include/esp_additions \ + -isystem esp-idf/components/freertos/include/esp_additions/freertos \ -isystem esp-idf/components/freertos/port/$(IDF_TARGET_ARCH)/include \ -isystem esp-idf/components/hal/include \ -isystem esp-idf/components/hal/$(IDF_TARGET)/include \ @@ -158,12 +161,11 @@ endif LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTopUsedPriority -LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/$(IDF_TARGET) \ - -L$(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/ld \ - -Lesp-idf/components/$(IDF_TARGET)/ld \ +LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/esp_system/ld \ -Lesp-idf/components/esp_rom/$(IDF_TARGET)/ld \ - -T$(IDF_TARGET)_out.ld \ - -T$(IDF_TARGET).project.ld \ + -Lesp-idf/components/soc/$(IDF_TARGET)/ld \ + -Tmemory.ld \ + -Tsections.ld \ -T$(IDF_TARGET).peripherals.ld \ -T$(IDF_TARGET).rom.ld \ -T$(IDF_TARGET).rom.api.ld \ @@ -174,10 +176,13 @@ ifeq ($(IDF_TARGET),esp32c3) LDFLAGS += -Tesp32c3.rom.newlib.ld \ -Tesp32c3.rom.version.ld \ -Tesp32c3.rom.eco3.ld -else +else ifeq ($(IDF_TARGET),esp32s2) LDFLAGS += -T$(IDF_TARGET).rom.newlib-data.ld \ -T$(IDF_TARGET).rom.newlib-funcs.ld \ -T$(IDF_TARGET).rom.spiflash.ld +else ifeq ($(IDF_TARGET),esp32s3) +LDFLAGS += -Tesp32s3.rom.newlib.ld \ + -Tesp32s3.rom.version.ld endif LDFLAGS += -Wl,-Bstatic \ @@ -224,10 +229,14 @@ SRC_C += \ peripherals/timer.c \ peripherals/$(IDF_TARGET)/pins.c -ifneq ($(IDF_TARGET),esp32c3) +ifeq ($(IDF_TARGET),esp32s2) SRC_C += \ cam.c \ - i2s_lcd_esp32s2_driver.c \ + i2s_lcd_esp32s2_driver.c +endif + +ifneq ($(IDF_TARGET),esp32c3) +SRC_C += \ peripherals/pcnt.c \ peripherals/touch.c endif @@ -315,20 +324,15 @@ menuconfig: $(BUILD)/esp-idf/config # qstr builds include headers so we need to make sure they are up to date $(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h -ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET) $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_netif esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant +BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a +BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) +ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_ipc esp_netif esp_pm esp_phy esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant ESP_IDF_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a) -ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a) MBEDTLS_COMPONENTS_LINK = crypto tls x509 MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libmbed$(component).a) -BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libphy.a -ifneq ($(IDF_TARGET),esp32c3) -BINARY_WIFI_BLOBS += librtc.a -endif -BINARY_BLOBS = $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) - ifeq ($(IDF_TARGET_ARCH),xtensa) BINARY_BLOBS += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a @@ -360,17 +364,18 @@ endif esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h $(Q)ninja -C $(BUILD)/esp-idf \ bootloader/bootloader.bin \ + esp-idf/esp_system/__ldgen_output_sections.ld \ esp-idf/app_update/libapp_update.a \ esp-idf/bootloader_support/libbootloader_support.a \ esp-idf/driver/libdriver.a \ esp-idf/efuse/libefuse.a \ - esp-idf/$(IDF_TARGET)/lib$(IDF_TARGET).a \ - esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld \ esp-idf/esp_adc_cal/libesp_adc_cal.a \ esp-idf/esp_common/libesp_common.a \ esp-idf/esp_event/libesp_event.a \ esp-idf/esp_hw_support/libesp_hw_support.a \ + esp-idf/esp_ipc/libesp_ipc.a \ esp-idf/esp_netif/libesp_netif.a \ + esp-idf/esp_phy/libesp_phy.a \ esp-idf/esp_pm/libesp_pm.a \ esp-idf/esp_ringbuf/libesp_ringbuf.a \ esp-idf/esp_rom/libesp_rom.a \ diff --git a/ports/espressif/cam.c b/ports/espressif/cam.c index 146df43a41..ea50785cd9 100644 --- a/ports/espressif/cam.c +++ b/ports/espressif/cam.c @@ -21,8 +21,13 @@ #include "esp_log.h" #include "soc/i2s_struct.h" #include "soc/apb_ctrl_reg.h" +#ifdef CONFIG_IDF_TARGET_ESP32S2 #include "esp32s2/rom/lldesc.h" #include "esp32s2/rom/cache.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "esp32s3/rom/lldesc.h" +#include "esp32s3/rom/cache.h" +#endif #include "soc/dport_access.h" #include "soc/dport_reg.h" #include "driver/ledc.h" diff --git a/ports/espressif/common-hal/alarm/pin/PinAlarm.c b/ports/espressif/common-hal/alarm/pin/PinAlarm.c index 754902f678..6318cc2cca 100644 --- a/ports/espressif/common-hal/alarm/pin/PinAlarm.c +++ b/ports/espressif/common-hal/alarm/pin/PinAlarm.c @@ -32,11 +32,11 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/__init__.h" +#include "esp_sleep.h" #include "hal/gpio_ll.h" #include "esp_debug_helpers.h" #include "components/driver/include/driver/rtc_io.h" -#include "components/esp_system/include/esp_sleep.h" #include "components/freertos/include/freertos/FreeRTOS.h" void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, const mcu_pin_obj_t *pin, bool value, bool edge, bool pull) { diff --git a/ports/espressif/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c index df39b30c63..ba85d42735 100644 --- a/ports/espressif/common-hal/analogio/AnalogIn.c +++ b/ports/espressif/common-hal/analogio/AnalogIn.c @@ -40,7 +40,13 @@ #define DEFAULT_VREF 1100 #define NO_OF_SAMPLES 2 #define ATTENUATION ADC_ATTEN_DB_11 +#ifdef CONFIG_IDF_TARGET_ESP32C3 +#define DATA_WIDTH ADC_WIDTH_BIT_12 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #define DATA_WIDTH ADC_WIDTH_BIT_13 +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#define DATA_WIDTH ADC_WIDTH_BIT_12 +#endif void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self, const mcu_pin_obj_t *pin) { diff --git a/ports/espressif/common-hal/analogio/AnalogOut.c b/ports/espressif/common-hal/analogio/AnalogOut.c index 589c477a78..2c79124759 100644 --- a/ports/espressif/common-hal/analogio/AnalogOut.c +++ b/ports/espressif/common-hal/analogio/AnalogOut.c @@ -41,6 +41,7 @@ void common_hal_analogio_analogout_construct(analogio_analogout_obj_t *self, const mcu_pin_obj_t *pin) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 if (pin == &pin_GPIO17) { self->channel = DAC_CHANNEL_1; } else if (pin == &pin_GPIO18) { @@ -49,6 +50,9 @@ void common_hal_analogio_analogout_construct(analogio_analogout_obj_t *self, mp_raise_ValueError(translate("Invalid DAC pin supplied")); } dac_output_enable(self->channel); + #else + mp_raise_NotImplementedError(NULL); + #endif } bool common_hal_analogio_analogout_deinited(analogio_analogout_obj_t *self) { @@ -56,18 +60,24 @@ bool common_hal_analogio_analogout_deinited(analogio_analogout_obj_t *self) { } void common_hal_analogio_analogout_deinit(analogio_analogout_obj_t *self) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 dac_output_disable(self->channel); self->channel = DAC_CHANNEL_MAX; + #endif } void common_hal_analogio_analogout_set_value(analogio_analogout_obj_t *self, uint16_t value) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 uint8_t dac_value = (value * 255) / 65535; dac_output_enable(self->channel); dac_output_voltage(self->channel, dac_value); + #endif } void analogout_reset(void) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 dac_output_disable(DAC_CHANNEL_1); dac_output_disable(DAC_CHANNEL_2); + #endif } diff --git a/ports/espressif/common-hal/frequencyio/FrequencyIn.c b/ports/espressif/common-hal/frequencyio/FrequencyIn.c index cd13cddc66..e4d65c95bd 100644 --- a/ports/espressif/common-hal/frequencyio/FrequencyIn.c +++ b/ports/espressif/common-hal/frequencyio/FrequencyIn.c @@ -56,11 +56,15 @@ static void IRAM_ATTR timer_interrupt_handler(void *self_in) { // reset interrupt timg_dev_t *device = self->timer.group ? &(TIMERG1) : &(TIMERG0); if (self->timer.idx) { - device->int_clr.t1 = 1; + device->int_clr_timers.t1_int_clr = 1; } else { - device->int_clr.t0 = 1; + device->int_clr_timers.t0_int_clr = 1; } - device->hw_timer[self->timer.idx].config.alarm_en = 1; + #ifdef CONFIG_IDF_TARGET_ESP32S2 + device->hw_timer[self->timer.idx].config.tx_alarm_en = 1; + #elif defined(CONFIG_IDF_TARGET_ESP32S3) + device->hw_timer[self->timer.idx].config.tn_alarm_en = 1; + #endif } static void init_pcnt(frequencyio_frequencyin_obj_t *self) { diff --git a/ports/espressif/common-hal/microcontroller/Processor.c b/ports/espressif/common-hal/microcontroller/Processor.c index c50c6fbf7a..500d1f6d3e 100644 --- a/ports/espressif/common-hal/microcontroller/Processor.c +++ b/ports/espressif/common-hal/microcontroller/Processor.c @@ -43,11 +43,15 @@ float common_hal_mcu_processor_get_temperature(void) { float tsens_out; + #ifdef CONFIG_IDF_TARGET_ESP32S3 + mp_raise_NotImplementedError(NULL); + #else temp_sensor_config_t temp_sensor = TSENS_CONFIG_DEFAULT(); // DEFAULT: range:-10℃ ~ 80℃, error < 1℃. temp_sensor_set_config(temp_sensor); temp_sensor_start(); temp_sensor_read_celsius(&tsens_out); temp_sensor_stop(); + #endif return tsens_out; } diff --git a/ports/espressif/common-hal/microcontroller/__init__.c b/ports/espressif/common-hal/microcontroller/__init__.c index 909ce19b00..3cf41ba7f0 100644 --- a/ports/espressif/common-hal/microcontroller/__init__.c +++ b/ports/espressif/common-hal/microcontroller/__init__.c @@ -47,13 +47,16 @@ #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "esp32c3/rom/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "esp32s2/rom/rtc.h" #include "esp32s2/rom/usb/usb_persist.h" #include "esp32s2/rom/usb/chip_usb_dw_wrapper.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "esp32s3/rom/rtc.h" +#include "esp32s3/rom/usb/usb_persist.h" +#include "esp32s3/rom/usb/chip_usb_dw_wrapper.h" #endif - void common_hal_mcu_delay_us(uint32_t delay) { mp_hal_delay_us(delay); } diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index e493a4c30e..ddc44956bf 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit e493a4c30e1b2f7c54a376327388b9e12262cbbf +Subproject commit ddc44956bf718540d5451e17e1becf6c7dffe5b8 diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index a7b69e0933..21459e01f5 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -26,7 +26,7 @@ CIRCUITPY_FRAMEBUFFERIO ?= 1 CIRCUITPY_FREQUENCYIO ?= 1 CIRCUITPY_IMAGECAPTURE ?= 1 CIRCUITPY_I2CPERIPHERAL ?= 1 -CIRCUITPY_RGBMATRIX ?= 1 +CIRCUITPY_RGBMATRIX ?= 0 CIRCUITPY_ROTARYIO ?= 1 CIRCUITPY_NVM ?= 1 CIRCUITPY_PS2IO ?= 1 @@ -43,17 +43,18 @@ CIRCUITPY_USB = 0 CIRCUITPY_ALARM = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_ANALOGIO = 0 -CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_TOUCHIO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE = 0 +else ifeq ($(IDF_TARGET),esp32s3) +CIRCUITPY_IMAGECAPTURE = 0 +CIRCUITPY_PARALLELDISPLAY = 0 endif -# From the ESP32-S2 datasheet: +# From ESP32-S2/S3 Technical Reference Manual: # # Endpoint number 0 always present (bi-directional, consisting of EP0 IN and EP0 OUT) # Six additional endpoints (endpoint numbers 1 to 6), configurable as IN or OUT diff --git a/ports/espressif/mphalport.c b/ports/espressif/mphalport.c index f22856f0a4..39b080fba3 100644 --- a/ports/espressif/mphalport.c +++ b/ports/espressif/mphalport.c @@ -25,22 +25,17 @@ * THE SOFTWARE. */ -#include - #include "py/mphal.h" -#include "py/mpstate.h" -#include "py/gc.h" - -#include "esp_debug_helpers.h" +#include "supervisor/cpu.h" #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "components/esp_rom/include/esp32c3/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "components/esp_rom/include/esp32s2/rom/ets_sys.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "components/esp_rom/include/esp32s3/rom/ets_sys.h" #endif -#include "supervisor/cpu.h" - void mp_hal_delay_us(mp_uint_t delay) { ets_delay_us(delay); } diff --git a/ports/espressif/peripherals/esp32s3/pins.c b/ports/espressif/peripherals/esp32s3/pins.c new file mode 100644 index 0000000000..891cc398ae --- /dev/null +++ b/ports/espressif/peripherals/esp32s3/pins.c @@ -0,0 +1,73 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "peripherals/pins.h" + +const mcu_pin_obj_t pin_GPIO0 = PIN(0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH_PAD_NUM1); +const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM2); +const mcu_pin_obj_t pin_GPIO3 = PIN(3, ADC_UNIT_1, ADC_CHANNEL_2, TOUCH_PAD_NUM3); +const mcu_pin_obj_t pin_GPIO4 = PIN(4, ADC_UNIT_1, ADC_CHANNEL_3, TOUCH_PAD_NUM4); +const mcu_pin_obj_t pin_GPIO5 = PIN(5, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH_PAD_NUM5); +const mcu_pin_obj_t pin_GPIO6 = PIN(6, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH_PAD_NUM6); +const mcu_pin_obj_t pin_GPIO7 = PIN(7, ADC_UNIT_1, ADC_CHANNEL_6, TOUCH_PAD_NUM7); +const mcu_pin_obj_t pin_GPIO8 = PIN(8, ADC_UNIT_1, ADC_CHANNEL_7, TOUCH_PAD_NUM8); +const mcu_pin_obj_t pin_GPIO9 = PIN(9, ADC_UNIT_1, ADC_CHANNEL_8, TOUCH_PAD_NUM9); +const mcu_pin_obj_t pin_GPIO10 = PIN(10, ADC_UNIT_1, ADC_CHANNEL_9, TOUCH_PAD_NUM10); +const mcu_pin_obj_t pin_GPIO11 = PIN(11, ADC_UNIT_2, ADC_CHANNEL_0, TOUCH_PAD_NUM11); +const mcu_pin_obj_t pin_GPIO12 = PIN(12, ADC_UNIT_2, ADC_CHANNEL_1, TOUCH_PAD_NUM12); +const mcu_pin_obj_t pin_GPIO13 = PIN(13, ADC_UNIT_2, ADC_CHANNEL_2, TOUCH_PAD_NUM13); +const mcu_pin_obj_t pin_GPIO14 = PIN(14, ADC_UNIT_2, ADC_CHANNEL_3, TOUCH_PAD_NUM14); +const mcu_pin_obj_t pin_GPIO15 = PIN(15, ADC_UNIT_2, ADC_CHANNEL_4, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO16 = PIN(16, ADC_UNIT_2, ADC_CHANNEL_5, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO17 = PIN(17, ADC_UNIT_2, ADC_CHANNEL_6, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO18 = PIN(18, ADC_UNIT_2, ADC_CHANNEL_7, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO19 = PIN(19, ADC_UNIT_2, ADC_CHANNEL_8, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO20 = PIN(20, ADC_UNIT_2, ADC_CHANNEL_9, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO21 = PIN(21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO26 = PIN(26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO27 = PIN(27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO28 = PIN(28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO29 = PIN(29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO30 = PIN(30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO31 = PIN(31, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO32 = PIN(32, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO33 = PIN(33, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO34 = PIN(34, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO35 = PIN(35, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO36 = PIN(36, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO37 = PIN(37, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO38 = PIN(38, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO39 = PIN(39, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO40 = PIN(40, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO41 = PIN(41, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO42 = PIN(42, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO43 = PIN(43, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO44 = PIN(44, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO45 = PIN(45, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO46 = PIN(46, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO47 = PIN(47, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO48 = PIN(48, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); diff --git a/ports/espressif/peripherals/esp32s3/pins.h b/ports/espressif/peripherals/esp32s3/pins.h new file mode 100644 index 0000000000..c2a932f572 --- /dev/null +++ b/ports/espressif/peripherals/esp32s3/pins.h @@ -0,0 +1,80 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// DO NOT include this file directly. +// Use shared-bindings/microcontroller/Pin.h instead. +// This ensures that all necessary includes are already included. + +#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S3_PINS_H +#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S3_PINS_H + +extern const mcu_pin_obj_t pin_GPIO0; +extern const mcu_pin_obj_t pin_GPIO1; +extern const mcu_pin_obj_t pin_GPIO2; +extern const mcu_pin_obj_t pin_GPIO3; +extern const mcu_pin_obj_t pin_GPIO4; +extern const mcu_pin_obj_t pin_GPIO5; +extern const mcu_pin_obj_t pin_GPIO6; +extern const mcu_pin_obj_t pin_GPIO7; +extern const mcu_pin_obj_t pin_GPIO8; +extern const mcu_pin_obj_t pin_GPIO9; +extern const mcu_pin_obj_t pin_GPIO10; +extern const mcu_pin_obj_t pin_GPIO11; +extern const mcu_pin_obj_t pin_GPIO12; +extern const mcu_pin_obj_t pin_GPIO13; +extern const mcu_pin_obj_t pin_GPIO14; +extern const mcu_pin_obj_t pin_GPIO15; +extern const mcu_pin_obj_t pin_GPIO16; +extern const mcu_pin_obj_t pin_GPIO17; +extern const mcu_pin_obj_t pin_GPIO18; +extern const mcu_pin_obj_t pin_GPIO19; +extern const mcu_pin_obj_t pin_GPIO20; +extern const mcu_pin_obj_t pin_GPIO21; +extern const mcu_pin_obj_t pin_GPIO26; +extern const mcu_pin_obj_t pin_GPIO27; +extern const mcu_pin_obj_t pin_GPIO28; +extern const mcu_pin_obj_t pin_GPIO29; +extern const mcu_pin_obj_t pin_GPIO30; +extern const mcu_pin_obj_t pin_GPIO31; +extern const mcu_pin_obj_t pin_GPIO32; +extern const mcu_pin_obj_t pin_GPIO33; +extern const mcu_pin_obj_t pin_GPIO34; +extern const mcu_pin_obj_t pin_GPIO35; +extern const mcu_pin_obj_t pin_GPIO36; +extern const mcu_pin_obj_t pin_GPIO37; +extern const mcu_pin_obj_t pin_GPIO38; +extern const mcu_pin_obj_t pin_GPIO39; +extern const mcu_pin_obj_t pin_GPIO40; +extern const mcu_pin_obj_t pin_GPIO41; +extern const mcu_pin_obj_t pin_GPIO42; +extern const mcu_pin_obj_t pin_GPIO43; +extern const mcu_pin_obj_t pin_GPIO44; +extern const mcu_pin_obj_t pin_GPIO45; +extern const mcu_pin_obj_t pin_GPIO46; +extern const mcu_pin_obj_t pin_GPIO47; +extern const mcu_pin_obj_t pin_GPIO48; + +#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S3_PINS_H diff --git a/ports/espressif/peripherals/pcnt.h b/ports/espressif/peripherals/pcnt.h index 86a90b4444..b2bae7b371 100644 --- a/ports/espressif/peripherals/pcnt.h +++ b/ports/espressif/peripherals/pcnt.h @@ -28,6 +28,7 @@ #define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PCNT_HANDLER_H #include "driver/pcnt.h" +#include "soc/pcnt_struct.h" extern int peripherals_pcnt_init(pcnt_config_t pcnt_config); extern void peripherals_pcnt_deinit(pcnt_unit_t *unit); diff --git a/ports/espressif/peripherals/pins.h b/ports/espressif/peripherals/pins.h index 3bd66d49ac..4958c46410 100644 --- a/ports/espressif/peripherals/pins.h +++ b/ports/espressif/peripherals/pins.h @@ -67,8 +67,10 @@ extern const mp_obj_type_t mcu_pin_type; // Choose based on chip #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "esp32c3/pins.h" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "esp32s2/pins.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "esp32s3/pins.h" #endif #endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PINS_H diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 30106075e7..277777a332 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -58,6 +58,9 @@ #if CIRCUITPY_COUNTIO || CIRCUITPY_ROTARYIO || CIRCUITPY_FREQUENCYIO #include "peripherals/pcnt.h" +#endif + +#if CIRCUITPY_TOUCHIO_USE_NATIVE #include "peripherals/touch.h" #endif @@ -69,17 +72,10 @@ #include "cam.h" #endif -#include "esp_heap_caps.h" -#include "esp_debug_helpers.h" - #include "soc/cache_memory.h" #include "soc/rtc_cntl_reg.h" -#ifdef CONFIG_IDF_TARGET_ESP32C3 -#include "components/esp_rom/include/esp32c3/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "components/esp_rom/include/esp32s2/rom/ets_sys.h" -#endif +#include "esp_debug_helpers.h" #define HEAP_SIZE (48 * 1024) @@ -136,7 +132,7 @@ safe_mode_t port_init(void) { #ifdef CONFIG_IDF_TARGET_ESP32C3 common_hal_never_reset_pin(&pin_GPIO20); common_hal_never_reset_pin(&pin_GPIO21); - #elif CONFIG_IDF_TARGET_ESP32S2 + #elif defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif @@ -153,7 +149,7 @@ safe_mode_t port_init(void) { common_hal_never_reset_pin(&pin_GPIO5); common_hal_never_reset_pin(&pin_GPIO6); common_hal_never_reset_pin(&pin_GPIO7); - #elif CONFIG_IDF_TARGET_ESP32S2 + #elif defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) common_hal_never_reset_pin(&pin_GPIO39); common_hal_never_reset_pin(&pin_GPIO40); common_hal_never_reset_pin(&pin_GPIO41); diff --git a/ports/espressif/supervisor/usb.c b/ports/espressif/supervisor/usb.c index 2137a7b0a4..7be3e84536 100644 --- a/ports/espressif/supervisor/usb.c +++ b/ports/espressif/supervisor/usb.c @@ -33,6 +33,7 @@ #include "shared/readline/readline.h" #include "hal/gpio_ll.h" +#include "hal/usb_hal.h" #include "soc/usb_periph.h" #include "components/driver/include/driver/gpio.h" @@ -40,15 +41,15 @@ #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "components/esp_rom/include/esp32c3/rom/gpio.h" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "components/esp_rom/include/esp32s2/rom/gpio.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "components/esp_rom/include/esp32s3/rom/gpio.h" #endif #include "freertos/FreeRTOS.h" #include "freertos/task.h" -#include "hal/usb_hal.h" - #include "tusb.h" #ifdef CFG_TUSB_DEBUG From e5c125d15342d1c581f72f5ae43fe067f2f17391 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 24 Nov 2021 10:00:01 +0530 Subject: [PATCH 012/258] update espressif makefile formatting --- ports/espressif/Makefile | 190 +++++++++++++++++++-------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index b29c9f35cf..fd8c2b251d 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -71,67 +71,69 @@ endif # CFLAGS ####################################### -INC += -I.\ - -I./boards \ - -I./boards/$(BOARD) \ - -I./peripherals \ - -I../.. \ - -I../../lib/mp-readline \ - -I../../lib/tinyusb/src \ - -I../../supervisor/shared/usb \ - -I$(BUILD) \ - -I$(BUILD)/genhdr \ - -I$(BUILD)/esp-idf/config \ - -isystem esp-idf \ - -isystem esp-idf/components/app_update/include \ - -isystem esp-idf/components/bootloader_support/include \ - -isystem esp-idf/components/driver/include \ - -isystem esp-idf/components/driver/$(IDF_TARGET)/include \ - -isystem esp-idf/components/$(IDF_TARGET)/include \ - -isystem esp-idf/components/esp_adc_cal/include \ - -isystem esp-idf/components/esp_common/include \ - -isystem esp-idf/components/esp_event/include \ - -isystem esp-idf/components/esp_hw_support/include \ - -isystem esp-idf/components/esp_hw_support/include/soc \ - -isystem esp-idf/components/esp_netif/include \ - -isystem esp-idf/components/esp_pm/include \ - -isystem esp-idf/components/esp_ringbuf/include \ - -isystem esp-idf/components/esp_rom/include \ - -isystem esp-idf/components/esp_system/include \ - -isystem esp-idf/components/esp_timer/include \ - -isystem esp-idf/components/esp_wifi/include \ - -isystem esp-idf/components/freertos/include \ - -isystem esp-idf/components/freertos/include/freertos \ - -isystem esp-idf/components/freertos/include/esp_additions \ - -isystem esp-idf/components/freertos/include/esp_additions/freertos \ - -isystem esp-idf/components/freertos/port/$(IDF_TARGET_ARCH)/include \ - -isystem esp-idf/components/hal/include \ - -isystem esp-idf/components/hal/$(IDF_TARGET)/include \ - -isystem esp-idf/components/hal/platform_port/include \ - -isystem esp-idf/components/heap/include \ - -isystem esp-idf/components/log/include \ - -isystem esp-idf/components/lwip/include \ - -isystem esp-idf/components/lwip/lwip/src/include \ - -isystem esp-idf/components/lwip/port/esp32/include \ - -isystem esp-idf/components/mbedtls/esp_crt_bundle/include \ - -isystem esp-idf/components/mbedtls/mbedtls/include \ - -isystem esp-idf/components/mbedtls/port/include \ - -isystem esp-idf/components/newlib/platform_include \ - -isystem esp-idf/components/nvs_flash/include \ - -isystem esp-idf/components/soc/include \ - -isystem esp-idf/components/soc/$(IDF_TARGET)/include \ - -isystem esp-idf/components/spi_flash/include \ - -isystem esp-idf/components/$(IDF_TARGET_ARCH)/include \ - -isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include +INC += \ + -I.\ + -I./boards \ + -I./boards/$(BOARD) \ + -I./peripherals \ + -I../.. \ + -I../../lib/mp-readline \ + -I../../lib/tinyusb/src \ + -I../../supervisor/shared/usb \ + -I$(BUILD) \ + -I$(BUILD)/genhdr \ + -I$(BUILD)/esp-idf/config \ + -isystem esp-idf \ + -isystem esp-idf/components/app_update/include \ + -isystem esp-idf/components/bootloader_support/include \ + -isystem esp-idf/components/driver/include \ + -isystem esp-idf/components/driver/$(IDF_TARGET)/include \ + -isystem esp-idf/components/$(IDF_TARGET)/include \ + -isystem esp-idf/components/esp_adc_cal/include \ + -isystem esp-idf/components/esp_common/include \ + -isystem esp-idf/components/esp_event/include \ + -isystem esp-idf/components/esp_hw_support/include \ + -isystem esp-idf/components/esp_hw_support/include/soc \ + -isystem esp-idf/components/esp_netif/include \ + -isystem esp-idf/components/esp_pm/include \ + -isystem esp-idf/components/esp_ringbuf/include \ + -isystem esp-idf/components/esp_rom/include \ + -isystem esp-idf/components/esp_system/include \ + -isystem esp-idf/components/esp_timer/include \ + -isystem esp-idf/components/esp_wifi/include \ + -isystem esp-idf/components/freertos/include \ + -isystem esp-idf/components/freertos/include/freertos \ + -isystem esp-idf/components/freertos/include/esp_additions \ + -isystem esp-idf/components/freertos/include/esp_additions/freertos \ + -isystem esp-idf/components/freertos/port/$(IDF_TARGET_ARCH)/include \ + -isystem esp-idf/components/hal/include \ + -isystem esp-idf/components/hal/$(IDF_TARGET)/include \ + -isystem esp-idf/components/hal/platform_port/include \ + -isystem esp-idf/components/heap/include \ + -isystem esp-idf/components/log/include \ + -isystem esp-idf/components/lwip/include \ + -isystem esp-idf/components/lwip/lwip/src/include \ + -isystem esp-idf/components/lwip/port/esp32/include \ + -isystem esp-idf/components/mbedtls/esp_crt_bundle/include \ + -isystem esp-idf/components/mbedtls/mbedtls/include \ + -isystem esp-idf/components/mbedtls/port/include \ + -isystem esp-idf/components/newlib/platform_include \ + -isystem esp-idf/components/nvs_flash/include \ + -isystem esp-idf/components/soc/include \ + -isystem esp-idf/components/soc/$(IDF_TARGET)/include \ + -isystem esp-idf/components/spi_flash/include \ + -isystem esp-idf/components/$(IDF_TARGET_ARCH)/include \ + -isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include # See https://github.com/espressif/esp-idf/issues/6906 ifeq ($(IDF_TARGET),esp32c3) CFLAGS += -include "esp32c3_fix.h" endif -CFLAGS += -DHAVE_CONFIG_H \ - -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" \ - -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX +CFLAGS += \ + -DHAVE_CONFIG_H \ + -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" \ + -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX # Make our canary value match FreeRTOS's # This define is in FreeRTOS as tskSTACK_FILL_BYTE 0xa5U which we expand out to a full word. @@ -161,35 +163,38 @@ endif LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTopUsedPriority -LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/esp_system/ld \ - -Lesp-idf/components/esp_rom/$(IDF_TARGET)/ld \ - -Lesp-idf/components/soc/$(IDF_TARGET)/ld \ - -Tmemory.ld \ - -Tsections.ld \ - -T$(IDF_TARGET).peripherals.ld \ - -T$(IDF_TARGET).rom.ld \ - -T$(IDF_TARGET).rom.api.ld \ - -T$(IDF_TARGET).rom.libgcc.ld \ - -T$(IDF_TARGET).rom.newlib-nano.ld +LDFLAGS += \ + -L$(BUILD)/esp-idf/esp-idf/esp_system/ld \ + -Lesp-idf/components/esp_rom/$(IDF_TARGET)/ld \ + -Lesp-idf/components/soc/$(IDF_TARGET)/ld \ + -Tmemory.ld \ + -Tsections.ld \ + -T$(IDF_TARGET).peripherals.ld \ + -T$(IDF_TARGET).rom.ld \ + -T$(IDF_TARGET).rom.api.ld \ + -T$(IDF_TARGET).rom.libgcc.ld \ + -T$(IDF_TARGET).rom.newlib-nano.ld \ + -Wl,-Bstatic \ + -Wl,--no-warn-mismatch \ + -Wl,--build-id=none \ + -fno-rtti ifeq ($(IDF_TARGET),esp32c3) -LDFLAGS += -Tesp32c3.rom.newlib.ld \ - -Tesp32c3.rom.version.ld \ - -Tesp32c3.rom.eco3.ld +LDFLAGS += \ + -Tesp32c3.rom.newlib.ld \ + -Tesp32c3.rom.version.ld \ + -Tesp32c3.rom.eco3.ld else ifeq ($(IDF_TARGET),esp32s2) -LDFLAGS += -T$(IDF_TARGET).rom.newlib-data.ld \ - -T$(IDF_TARGET).rom.newlib-funcs.ld \ - -T$(IDF_TARGET).rom.spiflash.ld +LDFLAGS += \ + -T$(IDF_TARGET).rom.newlib-data.ld \ + -T$(IDF_TARGET).rom.newlib-funcs.ld \ + -T$(IDF_TARGET).rom.spiflash.ld else ifeq ($(IDF_TARGET),esp32s3) -LDFLAGS += -Tesp32s3.rom.newlib.ld \ - -Tesp32s3.rom.version.ld +LDFLAGS += \ + -Tesp32s3.rom.newlib.ld \ + -Tesp32s3.rom.version.ld endif -LDFLAGS += -Wl,-Bstatic \ - -Wl,--no-warn-mismatch \ - -Wl,--build-id=none \ - -fno-rtti - LIBS := -lgcc -lc -lstdc++ # Use toolchain libm if we're not using our own. @@ -229,16 +234,15 @@ SRC_C += \ peripherals/timer.c \ peripherals/$(IDF_TARGET)/pins.c +ifneq ($(IDF_TARGET),esp32c3) +SRC_C += \ + peripherals/pcnt.c \ + peripherals/touch.c ifeq ($(IDF_TARGET),esp32s2) SRC_C += \ cam.c \ i2s_lcd_esp32s2_driver.c endif - -ifneq ($(IDF_TARGET),esp32c3) -SRC_C += \ - peripherals/pcnt.c \ - peripherals/touch.c endif $(BUILD)/i2s_lcd_esp32s2_driver.o: CFLAGS += -Wno-sign-compare @@ -247,16 +251,15 @@ ifneq ($(CIRCUITPY_USB),0) SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c endif -SRC_S = - -SRC_COMMON_HAL_EXPANDED = $(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \ - $(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \ - $(addprefix common-hal/, $(SRC_COMMON_HAL)) - -SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) \ - $(addprefix shared-module/, $(SRC_SHARED_MODULE)) \ - $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) +SRC_COMMON_HAL_EXPANDED = \ + $(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \ + $(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \ + $(addprefix common-hal/, $(SRC_COMMON_HAL)) +SRC_SHARED_MODULE_EXPANDED = \ + $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) \ + $(addprefix shared-module/, $(SRC_SHARED_MODULE)) \ + $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) ifneq ($(FROZEN_MPY_DIR),) FROZEN_MPY_PY_FILES := $(shell find -L $(FROZEN_MPY_DIR) -type f -name '*.py') @@ -270,7 +273,6 @@ ifeq ($(INTERNAL_LIBM),1) OBJ += $(addprefix $(BUILD)/, $(SRC_LIBM:.c=.o)) endif OBJ += $(addprefix $(BUILD)/, $(SRC_CIRCUITPY_COMMON:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(SRC_S:.S=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) $(BUILD)/$(FATFS_DIR)/ff.o: COPT += -Os @@ -280,8 +282,6 @@ $(BUILD)/lib/protomatter/src/core.o: CFLAGS += -DESP32 # List of sources for qstr extraction SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_MOD) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) -# Sources that only hold QSTRs after pre-processing. -SRC_QSTR_PREPROCESSOR += # IDF build commands IDF_PATH = $(realpath ./esp-idf) From dddc282e34a318d15a3ecba00ea8e482fb82ad82 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Fri, 26 Nov 2021 22:44:22 +0530 Subject: [PATCH 013/258] update default sdkconfig and correct bootloader offset --- ports/espressif/Makefile | 11 ++++++----- ports/espressif/esp-idf-config/sdkconfig.defaults | 14 ++++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index fd8c2b251d..c997dc6a0a 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -338,13 +338,14 @@ BINARY_BLOBS += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a endif -ifeq ($(IDF_TARGET), esp32c3) -ESPTOOL_BAUDRATE = 230400 -BOOTLOADER_OFFSET = 0x0000 +ifeq ($(IDF_TARGET),esp32c3) +BOOTLOADER_OFFSET = 0x0 +else ifeq ($(IDF_TARGET),esp32s3) +BOOTLOADER_OFFSET = 0x0 else -ESPTOOL_BAUDRATE = 460800 BOOTLOADER_OFFSET = 0x1000 endif + PARTITION_TABLE_OFFSET = 0x8000 FIRMWARE_OFFSET = 0x10000 @@ -352,7 +353,7 @@ ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/$(IDF_TARGET)_out.ld $(B FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE) -ESPTOOL_FLAGS ?= -b $(ESPTOOL_BAUDRATE) --before=default_reset --after=no_reset +ESPTOOL_FLAGS ?= --before=default_reset --after=no_reset ifeq ($(IDF_TARGET),esp32c3) all: $(BUILD)/firmware.bin diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 25e2f103d5..67e2594339 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -1,9 +1,3 @@ -# -# Bootloader config -# -# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set -# end of Bootloader config - # # Serial flasher config # @@ -50,6 +44,14 @@ CONFIG_ESP32S2_DATA_CACHE_16KB=y # end of Cache config # end of ESP32S2-specific +# +# ESP32S3-specific +# +# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_160 is not set +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=240 +# end of ESP32S3-specific + # # Common ESP-related # From 0e56c5aa8abd9e999ccf61360238fc897f668203 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Thu, 2 Dec 2021 16:45:43 +0000 Subject: [PATCH 014/258] Added definitions for 2MB Tiny2040 --- .../boards/pimoroni_tiny2040/mpconfigboard.h | 2 +- .../boards/pimoroni_tiny2040/mpconfigboard.mk | 2 +- .../boards/pimoroni_tiny2040_2mb/board.c | 40 +++++++++++++++++++ .../pimoroni_tiny2040_2mb/mpconfigboard.h | 7 ++++ .../pimoroni_tiny2040_2mb/mpconfigboard.mk | 11 +++++ .../pico-sdk-configboard.h | 1 + .../boards/pimoroni_tiny2040_2mb/pins.c | 37 +++++++++++++++++ 7 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 ports/raspberrypi/boards/pimoroni_tiny2040_2mb/board.c create mode 100644 ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pins.c diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h index 4184f35a7a..8059472780 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040" +#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040 (8MB)" #define MICROPY_HW_MCU_NAME "rp2040" #define CIRCUITPY_RGB_STATUS_INVERTED_PWM diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk index 7487782237..e63e53ea55 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x16D0 USB_PID = 0x08C7 -USB_PRODUCT = "Tiny 2040" +USB_PRODUCT = "Tiny 2040 (8MB)" USB_MANUFACTURER = "Pimoroni" CHIP_VARIANT = RP2040 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/board.c b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.h new file mode 100644 index 0000000000..9f9219fc60 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.h @@ -0,0 +1,7 @@ +#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040 (2MB)" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define CIRCUITPY_RGB_STATUS_INVERTED_PWM +#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO18) +#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO19) +#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO20) diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk new file mode 100644 index 0000000000..33cefb3630 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x2E8A +USB_PID = 0x08C7 +USB_PRODUCT = "Tiny 2040 (2MB)" +USB_MANUFACTURER = "Pimoroni" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pins.c b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pins.c new file mode 100644 index 0000000000..6dd90a90bb --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pins.c @@ -0,0 +1,37 @@ +#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_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 9e286432d2546c658cb942ea516bad9603f7f192 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Fri, 3 Dec 2021 20:30:40 +0530 Subject: [PATCH 015/258] add esp32s3 documentation in readme --- README.rst | 4 +- ports/espressif/README.rst | 84 ++++++++++++++++++++++++++++++++++---- 2 files changed, 79 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index dafc8ee96e..801466cbad 100644 --- a/README.rst +++ b/README.rst @@ -213,7 +213,7 @@ Supported Support status ================ ============================================================ atmel-samd ``SAMD21`` stable | ``SAMD51`` stable cxd56 stable -espressif ``ESP32-C3`` beta | ``ESP32-S2`` stable +espressif ``ESP32-C3`` beta | ``ESP32-S2`` stable | ``ESP32-S3`` beta litex alpha mimxrt10xx alpha nrf stable @@ -229,7 +229,7 @@ unix alpha Boards ~~~~~~ -- Each ``port`` has a ``boards`` directory containing variations of boards +- Each ``port`` has a ``boards`` directory containing boards which belong to a specific microcontroller line. - A list of native modules supported by a particular board can be found `here `__. diff --git a/ports/espressif/README.rst b/ports/espressif/README.rst index 165f7a161e..7ef0fc5dc6 100644 --- a/ports/espressif/README.rst +++ b/ports/espressif/README.rst @@ -11,6 +11,7 @@ Support Status: ESP32-C3, "beta" ESP32-S2, "stable" + ESP32-S3, "beta" How this port is organized: --------------------------------------- @@ -31,9 +32,11 @@ Connecting to the ESP32-C3 **USB Connetion:** -On ESP32-C3 REV3 chips, a USB Serial/JTAG Controller is available. Note: The USB connection cannot be used for a ``CIRCUITPY`` drive. +On ESP32-C3 REV3 chips, a USB Serial/JTAG Controller is available. Note: This USB connection cannot be used for a ``CIRCUITPY`` drive. -Depending on the board you have the USB port may or may not be connected to native USB, if it isn't connected to native USB then following connections need to be made to get serial console, REPL interface, flashing CircuitPython and JTAG debugging. +Depending on the board you have, the USB port may or may not be connected to native USB. + +Following connections need to be made if native USB isn't available on USB port: .. csv-table:: :header: GPIO, USB @@ -47,7 +50,9 @@ Connect these pins using a `USB adapter ` **UART Connection:** -A `USB to UART convertor `_ can be used for connecting to ESP32-C3 to get serial console, REPL interface and flashing CircuitPython. Following connections need to be made in this case. +A `USB to UART convertor `_ can be used for connecting to ESP32-C3 to get serial console, REPL interface and flashing CircuitPython. + +Following connections need to be made in this case. .. csv-table:: :header: GPIO, UART @@ -66,7 +71,9 @@ Connecting to the ESP32-S2 **USB Connetion:** -Depending on the board you have the USB port may or may not be connected to native USB, if it isn't connected to native USB then following connections need to be made to get CircuitPython working. +Depending on the board you have, the USB port may or may not be connected to native USB. + +Following connections need to be made if native USB isn't available on USB port: .. csv-table:: :header: GPIO, USB @@ -78,16 +85,79 @@ Depending on the board you have the USB port may or may not be connected to nati Connect these pins using a `USB adapter `_ or `breakout cable `_ to access the CircuitPython drive. +**UART Connection:** + +A `USB to UART convertor `_ can be used for connecting to ESP32-S2 to get serial console and flashing CircuitPython. + +Following connections need to be made in this case: + +.. csv-table:: + :header: GPIO, UART + + 43, "RX" + 44, "TX" + GND, "GND" + 5V, "5V" + +**BLE Connection:** + +This feature isn't available on ESP32-S2. + +Connecting to the ESP32-S3 +--------------------------------------- + +**USB Connetion:** + +Depending on the board you have, the USB port may or may not be connected to native USB. + +Following connections need to be made if native USB isn't available on USB port: + +.. csv-table:: + :header: GPIO, USB + + 20, "D+ (green)" + 19, "D- (white)" + GND, "GND (black)" + 5V, "5V (red)" + +Connect these pins using a `USB adapter `_ or `breakout cable `_ to access the CircuitPython drive. + +**UART Connection:** + +A `USB to UART convertor `_ can be used for connecting to ESP32-S3 to get serial console and flashing CircuitPython. + +Following connections need to be made in this case: + +.. csv-table:: + :header: GPIO, UART + + 43, "RX" + 44, "TX" + GND, "GND" + 5V, "5V" + +**BLE Connection:** + +This feature is not yet available and currently under development. + Building and flashing --------------------------------------- -Before building or flashing the, you must `install the esp-idf `_. This must be re-done every time the esp-idf is updated, but not every time you build. Run ``cd ports/espressif`` from ``circuitpython/`` to move to the espressif port root, and run: +Before building or flashing the, you must `install the esp-idf `_. + +Note: This must be re-done every time the esp-idf is updated, but not every time you build. + +Run ``cd ports/espressif`` from ``circuitpython/`` to move to the espressif port root, and run: .. code-block:: ./esp-idf/install.sh -After this initial installation, you must add the esp-idf tools to your path. You must also do this **any time you open a new bash environment for building or flashing**: +After this initial installation, you must add the esp-idf tools to your path. + +Note: This must be re-done every time you open a new bash environment for building or flashing. + +Run ``cd ports/espressif`` from ``circuitpython/`` to move to the espressif port root, and run: .. code-block:: @@ -106,7 +176,7 @@ Building boards is typically done through ``make BOARD=board_id``. The default p Debugging --------------------------------------- -TODO: Add documentation for ESP32-C3 JTAG feature. +TODO: Add documentation for ESP32-C3/S3 JTAG feature. The ESP32-S2 supports JTAG debugging over OpenOCD using a JLink or other probe hardware. The official tutorials can be found on the Espressif website `here `_, but they are mostly for the ESP32-S2 Kaluga, which has built-in debugging. From 659babc6206c99386d83c651b64e7a0d9d7d1ea2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 26 Nov 2021 13:43:57 -0600 Subject: [PATCH 016/258] Add the esp32s3 devkitc (psram variant) --- locale/circuitpython.pot | 13 ++-- .../espressif_esp32s3_devkitc_1/board.c | 61 +++++++++++++++++++ .../mpconfigboard.h | 38 ++++++++++++ .../mpconfigboard.mk | 17 ++++++ .../boards/espressif_esp32s3_devkitc_1/pins.c | 45 ++++++++++++++ .../espressif_esp32s3_devkitc_1/sdkconfig | 40 ++++++++++++ 6 files changed, 209 insertions(+), 5 deletions(-) create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1/board.c create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1/pins.c create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1/sdkconfig diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 835ef9538b..c51d074ad0 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -574,7 +574,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1462,7 +1462,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2090,7 +2090,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2351,7 +2351,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3950,12 +3950,14 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3970,6 +3972,7 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4462,7 +4465,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1/board.c new file mode 100644 index 0000000000..dd24db581b --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1/board.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif + + // SPI Flash and RAM + common_hal_never_reset_pin(&pin_GPIO26); + common_hal_never_reset_pin(&pin_GPIO27); + common_hal_never_reset_pin(&pin_GPIO28); + common_hal_never_reset_pin(&pin_GPIO29); + common_hal_never_reset_pin(&pin_GPIO30); + common_hal_never_reset_pin(&pin_GPIO31); + common_hal_never_reset_pin(&pin_GPIO32); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h new file mode 100644 index 0000000000..df83110453 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk new file mode 100644 index 0000000000..aadc71a3d6 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-DevKitC-1" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=8MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1/pins.c new file mode 100644 index 0000000000..b1d515c306 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1/pins.c @@ -0,0 +1,45 @@ +#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_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_TXD0), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_TXD1), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1/sdkconfig new file mode 100644 index 0000000000..085c832318 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1/sdkconfig @@ -0,0 +1,40 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + From 23e0a25aa2b3ad84191b507e55c73f369356fe4d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 3 Dec 2021 15:20:11 -0600 Subject: [PATCH 017/258] add nopsram version of the devkit C --- .../board.c | 61 +++++++++++++++++++ .../mpconfigboard.h | 38 ++++++++++++ .../mpconfigboard.mk | 17 ++++++ .../pins.c | 45 ++++++++++++++ .../sdkconfig | 8 +++ 5 files changed, 169 insertions(+) create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/board.c create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/pins.c create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/sdkconfig diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/board.c new file mode 100644 index 0000000000..dd24db581b --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/board.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif + + // SPI Flash and RAM + common_hal_never_reset_pin(&pin_GPIO26); + common_hal_never_reset_pin(&pin_GPIO27); + common_hal_never_reset_pin(&pin_GPIO28); + common_hal_never_reset_pin(&pin_GPIO29); + common_hal_never_reset_pin(&pin_GPIO30); + common_hal_never_reset_pin(&pin_GPIO31); + common_hal_never_reset_pin(&pin_GPIO32); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h new file mode 100644 index 0000000000..c6df735975 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-nopsram" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk new file mode 100644 index 0000000000..f850a9c5b3 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-DevKitC-1-nopsram" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=8MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/pins.c new file mode 100644 index 0000000000..b1d515c306 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/pins.c @@ -0,0 +1,45 @@ +#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_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_TXD0), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_TXD1), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/sdkconfig new file mode 100644 index 0000000000..a162344cfb --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/sdkconfig @@ -0,0 +1,8 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=n + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + From d6665e2a595bb319865bf08f22154a1fe456dd0b Mon Sep 17 00:00:00 2001 From: Clay Date: Fri, 3 Dec 2021 11:44:28 +0000 Subject: [PATCH 018/258] Translated using Weblate (Russian) Currently translated at 35.8% (369 of 1028 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/ --- locale/ru.po | 54 ++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/locale/ru.po b/locale/ru.po index cb190dede4..9c8da59303 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2021-11-29 12:53+0000\n" +"PO-Revision-Date: 2021-12-04 12:51+0000\n" "Last-Translator: Clay \n" "Language-Team: none\n" "Language: ru\n" @@ -74,16 +74,17 @@ msgstr "%%c требует int или char" #, c-format msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" -msgstr "" -"%d адресные выводы, %d rgb выводы и %d плитки указывают высоту %d а не %d" +msgstr "%d адресные пины, %d rgb пины и %d плитки указывают высоту %d а не %d" #: shared-bindings/microcontroller/Pin.c +#, fuzzy msgid "%q and %q contain duplicate pins" -msgstr "%q и %q содержат повторяющиеся выводы" +msgstr "%q и %q содержат пины-дупликаты" #: shared-bindings/microcontroller/Pin.c +#, fuzzy msgid "%q contains duplicate pins" -msgstr "%q содержит повторяющиеся выводы" +msgstr "%q содержит пины-дупликаты" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" @@ -170,7 +171,7 @@ msgstr "%q вне диапазона" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" -msgstr "Вывод %q не допустим" +msgstr "Пин %q не допустим" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" @@ -434,7 +435,7 @@ msgstr "Все каналы событий синхронизации уже и #: shared-bindings/pwmio/PWMOut.c msgid "All timers for this pin are in use" -msgstr "Все таймеры для этого вывода уже используются" +msgstr "Все таймеры для этого Пина уже используются" #: ports/atmel-samd/common-hal/_pew/PewPew.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -472,7 +473,7 @@ msgstr "Поиск сетей wifi уже происходит" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" -msgstr "AnalogIn не поддерживается на данном выводе" +msgstr "AnalogIn не поддерживается на данном пине" #: ports/cxd56/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c @@ -487,7 +488,7 @@ msgstr "AnalogOut имеет только 16 бит. Значение должн #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "AnalogOut not supported on given pin" -msgstr "AnalogOut не поддерживается на данном выводе" +msgstr "AnalogOut не поддерживается на данном пине" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" @@ -556,8 +557,7 @@ msgstr "Ниже минимальной частоты кадров" #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must be sequential pins" msgstr "" -"Битовый тактовый генератор и выбор слова должны быть последовательными " -"выводами" +"Битовый тактовый генератор и выбор слова должны быть последовательными пинами" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must share a clock unit" @@ -588,7 +588,7 @@ msgstr "Для управления потоком требуется как RX, #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" -msgstr "Оба вывода должны поддерживать аппаратные прерывания" +msgstr "Оба пина должны поддерживать аппаратные прерывания" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -663,7 +663,7 @@ msgstr "Буферы должны быть одинакового размера #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" -msgstr "Вывод шины %d уже используется" +msgstr "Пин шины %d уже используется" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." @@ -687,7 +687,7 @@ msgstr "Вызовите super().__init__() перед обращением к #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." -msgstr "Сигнал из глубокого сна может подаваться только на выводе RTC IO." +msgstr "Сигнал из глубокого сна может подаваться только на пине RTC IO." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." @@ -1265,8 +1265,9 @@ msgid "Insufficient encryption" msgstr "Недостаточное шифрование" #: ports/espressif/common-hal/wifi/Radio.c +#, fuzzy msgid "Interface must be started" -msgstr "" +msgstr "Интерфейс должен быть запущен" #: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" @@ -1561,9 +1562,9 @@ msgstr "" "Отсутствует first_out_pin. Инструкция %d вводит (shifts out) на вывод(ы)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format +#, c-format, fuzzy msgid "Missing first_in_pin. Instruction %d waits based on pin" -msgstr "" +msgstr "Отсутствует first_in_pin. Инструкция %d ожидает на основе вывода" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format @@ -1687,7 +1688,7 @@ msgstr "Свободные GCLK отсутствуют" #: shared-bindings/os/__init__.c msgid "No hardware random available" -msgstr "" +msgstr "Отсутствует аппаратный генератор случайных чисел" #: ports/atmel-samd/common-hal/ps2io/Ps2.c msgid "No hardware support on clk pin" @@ -1705,7 +1706,7 @@ msgstr "Нет in в программе" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No in or out in program" -msgstr "" +msgstr "В программе отсутствует ввод или вывод" #: shared-bindings/aesio/aes.c msgid "No key was specified" @@ -1718,7 +1719,7 @@ msgstr "Нет поддержки длинных целых чисел (long int #: shared-module/usb_hid/__init__.c #, c-format msgid "No more than %d HID devices allowed" -msgstr "" +msgstr "Допускается не более %d HID устройств" #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" @@ -1726,7 +1727,7 @@ msgstr "Нет сети с этим ssid" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No out in program" -msgstr "" +msgstr "В программе отсутствует вывод" #: ports/atmel-samd/common-hal/busio/I2C.c #: ports/espressif/common-hal/busio/I2C.c @@ -1773,11 +1774,12 @@ msgstr "Не подключено" #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c #: shared-bindings/audiopwmio/PWMAudioOut.c msgid "Not playing" -msgstr "" +msgstr "Не играет" #: shared-bindings/_bleio/__init__.c +#, fuzzy msgid "Not settable" -msgstr "" +msgstr "Не устанавливается" #: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -1797,8 +1799,9 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/raspberrypi/common-hal/audiobusio/PDMIn.c +#, fuzzy msgid "Only 8 or 16 bit mono with " -msgstr "" +msgstr "Только 8- или 16-битное моно с " #: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" @@ -4576,8 +4579,9 @@ msgid "zi must be an ndarray" msgstr "" #: extmod/ulab/code/scipy/signal/signal.c +#, fuzzy msgid "zi must be of float type" -msgstr "" +msgstr "zi должно быть типа float" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" From 1a99ce5eb37cef6ee879c57f1027af905b18d4c4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 4 Dec 2021 08:56:42 -0600 Subject: [PATCH 019/258] espressif: busio.SPI: Use SPI_DMA_CH_AUTO All 3 micros we care about (S2, S3, C3) state in the documentation that DMA channel can be specified as SPI_DMA_CH_AUTO. Specifying a specific DMA channel explicitly doesn't _ever_ work on ESP32-S3, so no SPI bus could be used. Testing performed: On the ESP32-S3-DevKitC, used neopixel_spi to turn the onboard neopixel red, green, and blue --- ports/espressif/common-hal/busio/SPI.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/busio/SPI.c b/ports/espressif/common-hal/busio/SPI.c index fee533e755..09c29084ac 100644 --- a/ports/espressif/common-hal/busio/SPI.c +++ b/ports/espressif/common-hal/busio/SPI.c @@ -93,7 +93,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, mp_raise_ValueError(translate("All SPI peripherals are in use")); } - esp_err_t result = spi_bus_initialize(self->host_id, &bus_config, self->host_id /* dma channel */); + esp_err_t result = spi_bus_initialize(self->host_id, &bus_config, SPI_DMA_CH_AUTO); if (result == ESP_ERR_NO_MEM) { mp_raise_msg(&mp_type_MemoryError, translate("ESP-IDF memory allocation failed")); } else if (result == ESP_ERR_INVALID_ARG) { From 1207bfced987bd4c47ddc9c436a62b8dd22abf76 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 4 Dec 2021 08:16:37 -0600 Subject: [PATCH 020/258] espressif: Use detected size of spiram --- ports/espressif/supervisor/port.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 277777a332..c8cb344aae 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -77,6 +77,10 @@ #include "esp_debug_helpers.h" +#ifdef CONFIG_SPIRAM +#include "esp32/spiram.h" +#endif + #define HEAP_SIZE (48 * 1024) uint32_t *heap; @@ -158,8 +162,11 @@ safe_mode_t port_init(void) { #endif #ifdef CONFIG_SPIRAM - heap = (uint32_t *)(DRAM0_CACHE_ADDRESS_HIGH - CONFIG_SPIRAM_SIZE); - heap_size = CONFIG_SPIRAM_SIZE / sizeof(uint32_t); + if (esp_spiram_is_initialized()) { + size_t spiram_size = esp_spiram_get_size(); + heap = (uint32_t *)(SOC_EXTRAM_DATA_HIGH - spiram_size); + heap_size = spiram_size / sizeof(uint32_t); + } #endif if (heap == NULL) { From bc7f024545fb6d9c6655a4f91ebf6fa6824162b9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 4 Dec 2021 08:12:19 -0600 Subject: [PATCH 021/258] espressif: Add esp32s3_box This module has 16MB flash, 8MB PSRAM, as well as a display & speakers. --- .../boards/espressif_esp32s3_box/board.c | 66 +++++++++++++++++++ .../espressif_esp32s3_box/mpconfigboard.h | 36 ++++++++++ .../espressif_esp32s3_box/mpconfigboard.mk | 17 +++++ .../boards/espressif_esp32s3_box/pins.c | 64 ++++++++++++++++++ .../boards/espressif_esp32s3_box/sdkconfig | 9 +++ 5 files changed, 192 insertions(+) create mode 100644 ports/espressif/boards/espressif_esp32s3_box/board.c create mode 100644 ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32s3_box/pins.c create mode 100644 ports/espressif/boards/espressif_esp32s3_box/sdkconfig diff --git a/ports/espressif/boards/espressif_esp32s3_box/board.c b/ports/espressif/boards/espressif_esp32s3_box/board.c new file mode 100644 index 0000000000..dbe64077de --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/board.c @@ -0,0 +1,66 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif + + // SPI Flash and RAM + common_hal_never_reset_pin(&pin_GPIO26); + common_hal_never_reset_pin(&pin_GPIO27); + common_hal_never_reset_pin(&pin_GPIO28); + common_hal_never_reset_pin(&pin_GPIO29); + common_hal_never_reset_pin(&pin_GPIO30); + common_hal_never_reset_pin(&pin_GPIO31); + common_hal_never_reset_pin(&pin_GPIO32); + common_hal_never_reset_pin(&pin_GPIO33); + common_hal_never_reset_pin(&pin_GPIO34); + common_hal_never_reset_pin(&pin_GPIO35); + common_hal_never_reset_pin(&pin_GPIO36); + common_hal_never_reset_pin(&pin_GPIO37); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h new file mode 100644 index 0000000000..b8a2207f93 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h @@ -0,0 +1,36 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-S3-Box-2.5" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk new file mode 100644 index 0000000000..eb3cf3a30e --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-Box-2.5" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=16MB diff --git a/ports/espressif/boards/espressif_esp32s3_box/pins.c b/ports/espressif/boards/espressif_esp32s3_box/pins.c new file mode 100644 index 0000000000..b4fd11a298 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/pins.c @@ -0,0 +1,64 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // First PMOD connector + { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_U0TXD), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_G43), MP_ROM_PTR(&pin_GPIO43) }, + + { MP_ROM_QSTR(MP_QSTR_U0RXD), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_G44), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_G11), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_G13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_G12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_G14), MP_ROM_PTR(&pin_GPIO14) }, + + // Second PMOD connector + { MP_ROM_QSTR(MP_QSTR_G38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_G39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_SCL2), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_G40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_SDA2), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_G41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_G42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_G21), MP_ROM_PTR(&pin_GPIO21) }, + + // LCD & touchscreen + { MP_ROM_QSTR(MP_QSTR_LCD_DC), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_LCD_SCK), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_LCD_CTRL), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_CTP_INT), MP_ROM_PTR(&pin_GPIO3) }, + + // Audio + { MP_ROM_QSTR(MP_QSTR_I2S_ADC_SDOUT), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MCLK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SCLK), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_I2S_LRCK), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_I2S_CODEC_DSDIN), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_PA_CTRL), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_MUTE_STATUS), MP_ROM_PTR(&pin_GPIO1) }, + + // Internal I2C bus + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO18) }, + + // boot button, also usable as a software button + { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO0) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig new file mode 100644 index 0000000000..73661c9f92 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -0,0 +1,9 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +CONFIG_SPIRAM_BOOT_INIT=y +CONFIG_SPIRAM_MEMTEST=y +CONFIG_SPIRAM_MODE_OCT=y +CONFIG_SPIRAM_SPEED_80M=y +CONFIG_SPIRAM_TYPE_AUTO=y +CONFIG_SPIRAM_USE_MALLOC=n +CONFIG_SPIRAM=y From e2abb0e0593c84c80ab6c95b68280d0f54d5fa33 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 4 Dec 2021 10:19:19 -0600 Subject: [PATCH 022/258] devkitc: update vid/pid in anticipation of allocation from espressif --- .../boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk | 2 +- .../espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk index aadc71a3d6..b3c18a55fe 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk @@ -1,4 +1,4 @@ -USB_VID = 0x239A +USB_VID = 0x303A USB_PID = 0x7003 USB_PRODUCT = "ESP32-S3-DevKitC-1" USB_MANUFACTURER = "Espressif" diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk index f850a9c5b3..95cc39a376 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x239A -USB_PID = 0x7003 +USB_VID = 0x303A +USB_PID = 0x7005 USB_PRODUCT = "ESP32-S3-DevKitC-1-nopsram" USB_MANUFACTURER = "Espressif" From 2ad877a907f6b883fd8a212151060ff61e964940 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 4 Dec 2021 14:58:48 -0600 Subject: [PATCH 023/258] Fix VID/PID of esp32-box --- ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk index eb3cf3a30e..285957b4e8 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x239A -USB_PID = 0x7003 +USB_VID = 0x303A +USB_PID = 0x7007 USB_PRODUCT = "ESP32-S3-Box-2.5" USB_MANUFACTURER = "Espressif" From e352048db91bbd2f267ffdf850d841607f84cfc6 Mon Sep 17 00:00:00 2001 From: Seth Kerr Date: Sun, 5 Dec 2021 14:49:48 -0700 Subject: [PATCH 024/258] Add ODT Cast-Away RP2040 --- .../boards/odt_cast_away_rp2040/board.c | 40 ++++++++++++++++++ .../odt_cast_away_rp2040/mpconfigboard.h | 14 +++++++ .../odt_cast_away_rp2040/mpconfigboard.mk | 11 +++++ .../pico-sdk-configboard.h | 3 ++ .../boards/odt_cast_away_rp2040/pins.c | 41 +++++++++++++++++++ 5 files changed, 109 insertions(+) create mode 100644 ports/raspberrypi/boards/odt_cast_away_rp2040/board.c create mode 100644 ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/odt_cast_away_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/odt_cast_away_rp2040/pins.c diff --git a/ports/raspberrypi/boards/odt_cast_away_rp2040/board.c b/ports/raspberrypi/boards/odt_cast_away_rp2040/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..db2b871bb0 --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.h @@ -0,0 +1,14 @@ +#define MICROPY_HW_BOARD_NAME "Oak Dev Tech Cast-Away RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO0) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO2) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO14) +#define DEFAULT_UART_BUS_TX (&pin_GPIO15) diff --git a/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..40f3582005 --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1209 +USB_PID = 0x4DF2 +USB_PRODUCT = "CAST AWAY RP2040" +USB_MANUFACTURER = "Oak Dev Tech" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/odt_cast_away_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/odt_cast_away_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..7d1b96b85a --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/pico-sdk-configboard.h @@ -0,0 +1,3 @@ +// 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/odt_cast_away_rp2040/pins.c b/ports/raspberrypi/boards/odt_cast_away_rp2040/pins.c new file mode 100644 index 0000000000..8686f7ae0b --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/pins.c @@ -0,0 +1,41 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From db6e58dc2d789502af2deaa435e5402c1ae801d3 Mon Sep 17 00:00:00 2001 From: Seth Kerr Date: Sun, 5 Dec 2021 15:02:18 -0700 Subject: [PATCH 025/258] run precommit locally and passed --- locale/circuitpython.pot | 12 +++++++----- .../boards/adafruit_feather_esp32s2_tft/board.c | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 835ef9538b..4cd4de67d1 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -574,7 +574,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1462,7 +1462,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2090,7 +2090,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2351,7 +2351,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3950,12 +3950,14 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4462,7 +4464,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index adc4ae1b01..c6d9b581b3 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -86,7 +86,7 @@ void board_init(void) { common_hal_busio_spi_never_reset(spi); - displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; + displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; common_hal_displayio_fourwire_construct( @@ -99,7 +99,7 @@ void board_init(void) { 0, // polarity 0 // phase ); - displayio_display_obj_t* display = &displays[0].display; + displayio_display_obj_t *display = &displays[0].display; display->base.type = &displayio_display_type; // workaround as board_init() is called before reset_port() in main.c From 1a1f0158951d0e71f654806014608e606298620d Mon Sep 17 00:00:00 2001 From: Seth Kerr Date: Sun, 5 Dec 2021 15:09:56 -0700 Subject: [PATCH 026/258] fixing files changed by precommit --- locale/circuitpython.pot | 12 +++++------- .../boards/adafruit_feather_esp32s2_tft/board.c | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 4cd4de67d1..835ef9538b 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -574,7 +574,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/IS31FL3741.c +#: shared-bindings/is31fl3741/is31fl3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1462,7 +1462,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/IS31FL3741.c +#: shared-module/is31fl3741/is31fl3741.c msgid "LED mappings must match display size" msgstr "" @@ -2090,7 +2090,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/IS31FL3741.c +#: shared-bindings/is31fl3741/is31fl3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2351,7 +2351,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3950,14 +3950,12 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h -#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4464,7 +4462,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/IS31FL3741.c +#: shared-bindings/is31fl3741/is31fl3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index c6d9b581b3..adc4ae1b01 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -86,7 +86,7 @@ void board_init(void) { common_hal_busio_spi_never_reset(spi); - displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; + displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; common_hal_displayio_fourwire_construct( @@ -99,7 +99,7 @@ void board_init(void) { 0, // polarity 0 // phase ); - displayio_display_obj_t *display = &displays[0].display; + displayio_display_obj_t* display = &displays[0].display; display->base.type = &displayio_display_type; // workaround as board_init() is called before reset_port() in main.c From bde65d0f28365da5214f9df4449f2a23bcf7408f Mon Sep 17 00:00:00 2001 From: Kong Wai Weng Date: Mon, 6 Dec 2021 17:26:00 +0800 Subject: [PATCH 027/258] Added Maker Nano RP2040 --- .../boards/cytron_maker_nano_rp2040/board.c | 40 ++++++++++++++ .../cytron_maker_nano_rp2040/mpconfigboard.h | 12 ++++ .../cytron_maker_nano_rp2040/mpconfigboard.mk | 15 +++++ .../pico-sdk-configboard.h | 4 ++ .../boards/cytron_maker_nano_rp2040/pins.c | 55 +++++++++++++++++++ 5 files changed, 126 insertions(+) create mode 100644 ports/raspberrypi/boards/cytron_maker_nano_rp2040/board.c create mode 100644 ports/raspberrypi/boards/cytron_maker_nano_rp2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/cytron_maker_nano_rp2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/cytron_maker_nano_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c diff --git a/ports/raspberrypi/boards/cytron_maker_nano_rp2040/board.c b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/board.c new file mode 100644 index 0000000000..b583e7bf11 --- /dev/null +++ b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Wai Weng for Cytron Technologies + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/cytron_maker_nano_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..2d182e78c9 --- /dev/null +++ b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/mpconfigboard.h @@ -0,0 +1,12 @@ +#define MICROPY_HW_BOARD_NAME "Cytron Maker Nano RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO0) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO18) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO19) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO16) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) diff --git a/ports/raspberrypi/boards/cytron_maker_nano_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..fc5f8ead36 --- /dev/null +++ b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/mpconfigboard.mk @@ -0,0 +1,15 @@ +USB_VID = 0x2E8A +USB_PID = 0x100f +USB_PRODUCT = "Maker Nano RP2040" +USB_MANUFACTURER = "Cytron" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SimpleIO diff --git a/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c new file mode 100644 index 0000000000..30fe8d64a9 --- /dev/null +++ b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c @@ -0,0 +1,55 @@ +#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_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_RGB), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_BUZZER), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 7ee825370e0361bb28a720997800a5824f5c936c Mon Sep 17 00:00:00 2001 From: Kong Wai Weng Date: Mon, 6 Dec 2021 17:28:45 +0800 Subject: [PATCH 028/258] Use 4x space instead of tab. --- ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c index 30fe8d64a9..19b4ffc6fa 100644 --- a/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c +++ b/ports/raspberrypi/boards/cytron_maker_nano_rp2040/pins.c @@ -6,7 +6,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, @@ -17,7 +17,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, - { MP_ROM_QSTR(MP_QSTR_RGB), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_RGB), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, @@ -30,7 +30,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, - { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_BUZZER), MP_ROM_PTR(&pin_GPIO22) }, @@ -48,7 +48,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, - { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, }; From 7cbb30806aa6c31f83b02e8b102c986bad9042fb Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 6 Dec 2021 08:36:24 -0500 Subject: [PATCH 029/258] minor .py changes due to blacken update --- tests/extmod/utimeq1.py | 1 - tools/pydfu.py | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/extmod/utimeq1.py b/tests/extmod/utimeq1.py index 234d7a31dd..ddbc969afb 100644 --- a/tests/extmod/utimeq1.py +++ b/tests/extmod/utimeq1.py @@ -17,7 +17,6 @@ if DEBUG: def dprint(*v): print(*v) - else: def dprint(*v): diff --git a/tools/pydfu.py b/tools/pydfu.py index 26e40f5613..ce34b08a58 100755 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -83,7 +83,6 @@ if "length" in inspect.getfullargspec(usb.util.get_string).args: def get_string(dev, index): return usb.util.get_string(dev, 255, index) - else: # PyUSB 1.0.0.b2 dropped the length argument def get_string(dev, index): From fae6d47a458778797a10a6fdcc7d3f6b3be77d12 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 6 Dec 2021 09:52:20 -0600 Subject: [PATCH 030/258] espressif: keep never_reset_pins marked as in use --- ports/espressif/common-hal/microcontroller/Pin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 462fef3ca1..4648fec64d 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -95,8 +95,8 @@ void reset_all_pins(void) { } floating_gpio_reset(i); } - in_use[0] = 0; - in_use[1] = 0; + in_use[0] = never_reset_pins[0]; + in_use[1] = never_reset_pins[1]; } void claim_pin_number(gpio_num_t pin_number) { From b722a2bca1af2a17b6eeacfe98ee8144077c02e9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 6 Dec 2021 09:52:55 -0600 Subject: [PATCH 031/258] espressif: pwmout: get rid of not_first_reset special case --- ports/espressif/common-hal/pwmio/PWMOut.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/espressif/common-hal/pwmio/PWMOut.c b/ports/espressif/common-hal/pwmio/PWMOut.c index 71cf5c19d0..9ca39c223b 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.c +++ b/ports/espressif/common-hal/pwmio/PWMOut.c @@ -32,10 +32,9 @@ #define INDEX_EMPTY 0xFF -STATIC bool not_first_reset = false; STATIC uint32_t reserved_timer_freq[LEDC_TIMER_MAX]; STATIC bool varfreq_timers[LEDC_TIMER_MAX]; -STATIC uint8_t reserved_channels[LEDC_CHANNEL_MAX]; +STATIC uint8_t reserved_channels[LEDC_CHANNEL_MAX] = { [0 ... LEDC_CHANNEL_MAX - 1] = INDEX_EMPTY}; STATIC bool never_reset_tim[LEDC_TIMER_MAX]; STATIC bool never_reset_chan[LEDC_CHANNEL_MAX]; @@ -56,7 +55,7 @@ STATIC uint32_t calculate_duty_cycle(uint32_t frequency) { void pwmout_reset(void) { for (size_t i = 0; i < LEDC_CHANNEL_MAX; i++) { - if (reserved_channels[i] != INDEX_EMPTY && not_first_reset) { + if (reserved_channels[i] != INDEX_EMPTY) { ledc_stop(LEDC_LOW_SPEED_MODE, i, 0); } if (!never_reset_chan[i]) { @@ -72,7 +71,6 @@ void pwmout_reset(void) { varfreq_timers[i] = false; } } - not_first_reset = true; } pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, From 1b5e98e2faecba9310e34945aec83ad4dac43017 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 6 Dec 2021 09:53:18 -0600 Subject: [PATCH 032/258] esp32s3 box: add display --- .../boards/espressif_esp32s3_box/board.c | 61 +++++++++++++++++++ .../boards/espressif_esp32s3_box/pins.c | 3 + 2 files changed, 64 insertions(+) diff --git a/ports/espressif/boards/espressif_esp32s3_box/board.c b/ports/espressif/boards/espressif_esp32s3_box/board.c index dbe64077de..c425c5c24e 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/board.c +++ b/ports/espressif/boards/espressif_esp32s3_box/board.c @@ -28,7 +28,68 @@ #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" + +uint8_t display_init_sequence[] = { + 0x01, 0x80, 0x96, // _SWRESET and Delay 150ms + 0x11, 0x80, 0xFF, // _SLPOUT and Delay 500ms + 0x3A, 0x81, 0x55, 0x0A, // _COLMOD and Delay 10ms + 0x36, 0x01, 0x08, // _MADCTL + 0x13, 0x80, 0x0A, // _NORON and Delay 10ms + 0x36, 0x01, 0xC0, // _MADCTL + 0x29, 0x80, 0xFF, // _DISPON and Delay 500ms +}; + void board_init(void) { + busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; + common_hal_busio_spi_construct(spi, &pin_GPIO7, &pin_GPIO6, NULL); + common_hal_busio_spi_never_reset(spi); + + displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + spi, + &pin_GPIO4, // TFT_DC Command or data + &pin_GPIO5, // TFT_CS Chip select + &pin_GPIO48, // TFT_RST Reset + 60000000, // Baudrate + 0, // Polarity + 0); // Phase + + displayio_display_obj_t *display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 320, // Width + 240, // Height + 0, // column start + 0, // row start + 0, // rotation + 16, // Color depth + false, // Grayscale + false, // pixels in a byte share a row. Only valid for depths < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_pixels_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO45, // backlight pin + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false, // data_as_commands + true, // auto_refresh + 60, // native_frames_per_second + true, // backlight_on_high + false); // SH1107_addressing + // USB common_hal_never_reset_pin(&pin_GPIO19); common_hal_never_reset_pin(&pin_GPIO20); diff --git a/ports/espressif/boards/espressif_esp32s3_box/pins.c b/ports/espressif/boards/espressif_esp32s3_box/pins.c index b4fd11a298..73ef15697c 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_box/pins.c @@ -1,4 +1,5 @@ #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 @@ -60,5 +61,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // boot button, also usable as a software button { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From ea92303b0f42bce1f84b449eed40a5a3daa1f40b Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 6 Dec 2021 19:47:17 +0100 Subject: [PATCH 033/258] 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 | 13 ++++++++----- locale/cs.po | 13 ++++++++----- locale/de_DE.po | 13 ++++++++----- locale/el.po | 13 ++++++++----- locale/en_GB.po | 13 ++++++++----- locale/es.po | 13 ++++++++----- locale/fil.po | 13 ++++++++----- locale/fr.po | 13 ++++++++----- locale/hi.po | 13 ++++++++----- locale/it_IT.po | 13 ++++++++----- locale/ja.po | 13 ++++++++----- locale/ko.po | 13 ++++++++----- locale/nl.po | 13 ++++++++----- locale/pl.po | 13 ++++++++----- locale/pt_BR.po | 13 ++++++++----- locale/ru.po | 15 +++++++++------ locale/sv.po | 13 ++++++++----- locale/zh_Latn_pinyin.po | 13 ++++++++----- 18 files changed, 145 insertions(+), 91 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index a145d0048e..b514da6672 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -584,7 +584,7 @@ msgstr "Kedua pin harus mendukung hardware interrut" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Kecerahan harus di antara 0-1.0" @@ -1483,7 +1483,7 @@ msgstr "Panjang kata/bit tidak valid" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Panjang kunci harus 16, 24, atau 32 byte" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2125,7 +2125,7 @@ msgstr "Tingkat sampel harus positif" msgid "Sample rate too high. It must be less than %d" msgstr "Nilai sampel terlalu tinggi. Nilai harus kurang dari %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2386,7 +2386,7 @@ msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Tidak dapat menemukan Tampilan I2C di %x" @@ -3988,12 +3988,14 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4008,6 +4010,7 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4500,7 +4503,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 8a3a920fbb..d587a10fa2 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -577,7 +577,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1465,7 +1465,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2093,7 +2093,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2354,7 +2354,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3953,12 +3953,14 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3973,6 +3975,7 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4465,7 +4468,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 2ee5eda3e9..407fe3aa10 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -585,7 +585,7 @@ msgstr "Beide pins müssen Hardware Interrupts unterstützen" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Die Helligkeit muss zwischen 0 und 1.0 liegen" @@ -1482,7 +1482,7 @@ msgstr "Ungültige Wort- / Bitlänge" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Der Schlüssel muss 16, 24 oder 32 Byte lang sein" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2122,7 +2122,7 @@ msgstr "Abtastrate muss positiv sein" msgid "Sample rate too high. It must be less than %d" msgstr "Abtastrate zu hoch. Wert muss unter %d liegen" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2386,7 +2386,7 @@ msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Konnte kein I2C Display finden an %x" @@ -4016,12 +4016,14 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4036,6 +4038,7 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4533,7 +4536,7 @@ msgstr "watchdog Zeitlimit muss größer als 0 sein" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "breite muss zwischen (inklusive) 2 und 8 liegen, nicht %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "breite muss größer als 0 sein" diff --git a/locale/el.po b/locale/el.po index de46c6c73d..fa9c878990 100644 --- a/locale/el.po +++ b/locale/el.po @@ -574,7 +574,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1462,7 +1462,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2090,7 +2090,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2351,7 +2351,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3950,12 +3950,14 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3970,6 +3972,7 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4462,7 +4465,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 9301346a34..9a4519d444 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -585,7 +585,7 @@ msgstr "Both pins must support hardware interrupts" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Brightness must be 0-1.0" @@ -1477,7 +1477,7 @@ msgstr "Invalid word/bit length" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Key must be 16, 24, or 32 bytes long" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2114,7 +2114,7 @@ msgstr "Sample rate must be positive" msgid "Sample rate too high. It must be less than %d" msgstr "Sample rate too high. It must be less than %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2382,7 +2382,7 @@ msgstr "Unable to allocate buffers for signed conversion" msgid "Unable to create lock" msgstr "Unable to create lock" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Unable to find I2C display at %x" @@ -3987,12 +3987,14 @@ msgstr "pow() with 3 arguments requires integers" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4007,6 +4009,7 @@ msgstr "pow() with 3 arguments requires integers" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4501,7 +4504,7 @@ msgstr "WatchDog timeout must be greater than 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "width must be from 2 to 8 (inclusive), not %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "width must be greater than zero" diff --git a/locale/es.po b/locale/es.po index 330eda2c2a..c13ce15161 100644 --- a/locale/es.po +++ b/locale/es.po @@ -589,7 +589,7 @@ msgstr "Ambos pines deben soportar interrupciones por hardware" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "El brillo debe ser 0-1.0" @@ -1495,7 +1495,7 @@ msgstr "Tamaño no válido de palabra/bit" msgid "Key must be 16, 24, or 32 bytes long" msgstr "La llave debe tener 16, 24 o 32 bytes de longitud" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2142,7 +2142,7 @@ msgstr "Sample rate debe ser positivo" msgid "Sample rate too high. It must be less than %d" msgstr "Frecuencia de muestreo demasiado alta. Debe ser menor a %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2413,7 +2413,7 @@ msgstr "No se pudieron asignar buffers para la conversión con signo" msgid "Unable to create lock" msgstr "No se puede crear bloqueo" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "No se puede encontrar la pantalla I2C en %x" @@ -4033,12 +4033,14 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4053,6 +4055,7 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4548,7 +4551,7 @@ msgstr "el tiempo de espera del perro guardián debe ser mayor a 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "ancho debe estar entre 2 y 8 (inclusivamente), no %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "el ancho debe ser mayor que cero" diff --git a/locale/fil.po b/locale/fil.po index cdf24b9389..b1e47bf1a1 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -581,7 +581,7 @@ msgstr "Ang parehong mga pin ay dapat na sumusuporta sa hardware interrupts" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1477,7 +1477,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2110,7 +2110,7 @@ msgstr "Sample rate ay dapat positibo" msgid "Sample rate too high. It must be less than %d" msgstr "Sample rate ay masyadong mataas. Ito ay dapat hindi hiigit sa %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2371,7 +2371,7 @@ msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3991,12 +3991,14 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4011,6 +4013,7 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4507,7 +4510,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 4e938bae59..bac854ed73 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -591,7 +591,7 @@ msgstr "Les deux broches doivent supporter les interruptions matérielles" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "La luminosité doit être de 0 à 1.0" @@ -1508,7 +1508,7 @@ msgstr "Longueur de mot / bit invalide" msgid "Key must be 16, 24, or 32 bytes long" msgstr "La clé doit comporter 16, 24 ou 32 octets" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "La disposition des LED doit correspondre à la taille de l'écran" @@ -2154,7 +2154,7 @@ msgstr "Le taux d'échantillonage doit être positif" msgid "Sample rate too high. It must be less than %d" msgstr "Taux d'échantillonage trop élevé. Doit être inférieur à %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "La dimension d'échelle doit être un multiple de 3" @@ -2429,7 +2429,7 @@ msgstr "Impossible d'allouer des tampons pour une conversion signée" msgid "Unable to create lock" msgstr "Impossible de créer un verrou ('lock')" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Impossible de trouver l'affichage I2C à %x" @@ -4065,12 +4065,14 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4085,6 +4087,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4580,7 +4583,7 @@ msgstr "watchdog timeout doit être supérieur à 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "width doit être entre 2 et 8 (inclusivement), non %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "width doit être plus que zero" diff --git a/locale/hi.po b/locale/hi.po index 7d6327a2ee..12fff21485 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -574,7 +574,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1462,7 +1462,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2090,7 +2090,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2351,7 +2351,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3950,12 +3950,14 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3970,6 +3972,7 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4462,7 +4465,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 0f57f5ba80..4ebfa3dedf 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -589,7 +589,7 @@ msgstr "Entrambi i pin devono supportare gli interrupt hardware" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "La luminosità deve essere tra 0-1.0" @@ -1487,7 +1487,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2129,7 +2129,7 @@ msgid "Sample rate too high. It must be less than %d" msgstr "" "Frequenza di campionamento troppo alta. Il valore deve essere inferiore a %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2390,7 +2390,7 @@ msgstr "Ipossibilitato ad allocare buffer per la conversione con segno" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -4013,12 +4013,14 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4033,6 +4035,7 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4529,7 +4532,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 5c76879f82..56b92bbbf3 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -581,7 +581,7 @@ msgstr "両方のピンにハードウェア割り込み対応が必要" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "brightnessは0から1.0まででなければなりません" @@ -1473,7 +1473,7 @@ msgstr "不正なワード/ビット長" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Keyの長さは、16, 24, 32バイトのいずれかでなければなりません" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2104,7 +2104,7 @@ msgstr "サンプルレートは正数でなければなりません" msgid "Sample rate too high. It must be less than %d" msgstr "サンプルレートは%d以下でなければなりません" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2366,7 +2366,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "I2Cディスプレイを %x に見つけられません" @@ -3972,12 +3972,14 @@ msgstr "pow()の第3引数には整数が必要" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3992,6 +3994,7 @@ msgstr "pow()の第3引数には整数が必要" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4485,7 +4488,7 @@ msgstr "watchdogのtimeoutは0以上でなければなりません" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index b6a7791ae6..953ffcef49 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -577,7 +577,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1465,7 +1465,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2093,7 +2093,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2355,7 +2355,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3954,12 +3954,14 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3974,6 +3976,7 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4466,7 +4469,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 2d888bc99a..e8ca7390d6 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -579,7 +579,7 @@ msgstr "Beide pinnen moeten hardware interrupts ondersteunen" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Helderheid moet tussen de 0 en 1.0 liggen" @@ -1474,7 +1474,7 @@ msgstr "Ongeldig woord/bit lengte" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Sleutel moet 16, 24, of 32 bytes lang zijn" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2116,7 +2116,7 @@ msgstr "Sample rate moet positief zijn" msgid "Sample rate too high. It must be less than %d" msgstr "Sample rate is te hoog. Moet minder dan %d zijn" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2377,7 +2377,7 @@ msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren" msgid "Unable to create lock" msgstr "Kan vergrendeling niet maken" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Geen I2C beeldscherm gevonden bij %x" @@ -3991,12 +3991,14 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4011,6 +4013,7 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4505,7 +4508,7 @@ msgstr "watchdog time-out moet groter zijn dan 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "breedte moet groter dan nul zijn" diff --git a/locale/pl.po b/locale/pl.po index 77d99ea668..87e00d4bab 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -581,7 +581,7 @@ msgstr "Obie nóżki muszą wspierać przerwania sprzętowe" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Jasność musi wynosić 0-1,0" @@ -1473,7 +1473,7 @@ msgstr "Niepoprawna długość słowa/bitu" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Klucz musi mieć długość 16, 24 lub 32 bajtów" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2101,7 +2101,7 @@ msgstr "Częstotliwość próbkowania musi być dodatnia" msgid "Sample rate too high. It must be less than %d" msgstr "Zbyt wysoka częstotliwość próbkowania. Musi być mniejsza niż %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2362,7 +2362,7 @@ msgstr "Nie udała się alokacja buforów do konwersji ze znakiem" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3963,12 +3963,14 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3983,6 +3985,7 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4476,7 +4479,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "szerokość musi być większa niż zero" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 4e79af465e..396b99e010 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -594,7 +594,7 @@ msgstr "Ambos os pinos devem suportar interrupções de hardware" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "O brilho deve ser 0-1,0" @@ -1499,7 +1499,7 @@ msgstr "O comprimento do bit/palavra são inválidos" msgid "Key must be 16, 24, or 32 bytes long" msgstr "A chave deve ter 16, 24 ou 32 bytes de comprimento" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "Os mapeamentos do led devem corresponder ao tamanho do display" @@ -2146,7 +2146,7 @@ msgstr "A taxa de amostragem deve ser positiva" msgid "Sample rate too high. It must be less than %d" msgstr "Taxa de amostragem muito alta. Deve ser menor que %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "As dimensões da escala devem ser poder ser divididas por 3" @@ -2422,7 +2422,7 @@ msgstr "Não é possível alocar buffers para conversão assinada" msgid "Unable to create lock" msgstr "Não é possível criar um lock" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Não foi possível encontrar a tela I2C no %x" @@ -4054,12 +4054,14 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4074,6 +4076,7 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4568,7 +4571,7 @@ msgstr "o tempo limite do watchdog deve ser maior que 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "a largura deve ser entre 2 a 8 (inclusive), não %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "a largura deve ser maior que zero" diff --git a/locale/ru.po b/locale/ru.po index 9c8da59303..37743afe94 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -592,7 +592,7 @@ msgstr "Оба пина должны поддерживать аппаратны #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Яркость должна быть в диапазоне от 0 до 1.0" @@ -1505,7 +1505,7 @@ msgstr "Недопустимая длина слова/бита" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Ключ должен быть длинной 16, 24 или 32 байта" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1562,7 +1562,7 @@ msgstr "" "Отсутствует first_out_pin. Инструкция %d вводит (shifts out) на вывод(ы)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "Missing first_in_pin. Instruction %d waits based on pin" msgstr "Отсутствует first_in_pin. Инструкция %d ожидает на основе вывода" @@ -2145,7 +2145,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2406,7 +2406,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -4005,12 +4005,14 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4025,6 +4027,7 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4517,7 +4520,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index 7e6ae3e77c..d41f8a0af3 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -584,7 +584,7 @@ msgstr "Båda pinnarna måste stödja maskinvaruavbrott" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Ljusstyrkan måste vara mellan 0 och 1,0" @@ -1481,7 +1481,7 @@ msgstr "Ogiltig word-/bitlängd" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Nyckeln måste vara 16, 24 eller 32 byte lång" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "LED-mappning måste matcha displaystorlek" @@ -2122,7 +2122,7 @@ msgstr "Samplingsfrekvensen måste vara positiv" msgid "Sample rate too high. It must be less than %d" msgstr "Samplingsfrekvensen är för hög. Den måste vara mindre än %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "Skaldimension måste vara delbar med 3" @@ -2393,7 +2393,7 @@ msgstr "Det går inte att allokera buffert för signerad konvertering" msgid "Unable to create lock" msgstr "Kan inte skapa lås" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Det gick inte att hitta I2C-display på %x" @@ -4011,12 +4011,14 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4031,6 +4033,7 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4525,7 +4528,7 @@ msgstr "watchdog timeout måste vara större än 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "width måste vara mellan 2 och 8, inte %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "width måste vara större än noll" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 07188c8f99..7a09f0f025 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -591,7 +591,7 @@ msgstr "liǎnggè yǐnjiǎo dōu bìxū zhīchí yìngjiàn zhōngduàn" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Liàngdù bìxū wèi 0-1.0" @@ -1492,7 +1492,7 @@ msgstr "Wúxiào de zì/wèi chángdù" msgid "Key must be 16, 24, or 32 bytes long" msgstr "mì yào bì xū wéi 16, 24 huò 32 zì jié cháng" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2132,7 +2132,7 @@ msgstr "Cǎiyàng lǜ bìxū wèi zhèng shù" msgid "Sample rate too high. It must be less than %d" msgstr "Cǎiyàng lǜ tài gāo. Tā bìxū xiǎoyú %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2402,7 +2402,7 @@ msgstr "Wúfǎ fēnpèi huǎnchōng qū yòng yú qiānmíng zhuǎnhuàn" msgid "Unable to create lock" msgstr "Wúfǎ chuàngjiàn suǒ" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Wúfǎ zài%x zhǎodào I2C xiǎnshìqì" @@ -4018,12 +4018,14 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4038,6 +4040,7 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h @@ -4535,7 +4538,7 @@ msgstr "kān mén gǒu chāoshí bìxū dàyú 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "kuān dù bì xū cóng 2 dào 8 ( hán ), ér bù shì %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "kuāndù bìxū dàyú líng" From 92a4261ad505f6dfab9b6574f842fdbcf43c4b5e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 3 Dec 2021 13:15:24 -0800 Subject: [PATCH 034/258] Full UART support for RPI This adds PL011 UART support which is more plentiful. It also: * Fixes PI4 build by including .dtb files on the SD card. * Enables the activity LED as the status LED on PI4 and CM4 I/O. * Adds that LED as board.LED. Fixes #5650 and progress on #5629 --- main.c | 1 + ports/broadcom/Makefile | 2 +- .../boards/raspberrypi_cm4io/mpconfigboard.h | 2 + .../broadcom/boards/raspberrypi_cm4io/pins.c | 2 + .../boards/raspberrypi_pi4b/mpconfigboard.h | 2 + .../boards/raspberrypi_pi4b/mpconfigboard.mk | 2 +- ports/broadcom/boards/raspberrypi_pi4b/pins.c | 2 + ports/broadcom/common-hal/busio/I2C.c | 3 +- ports/broadcom/common-hal/busio/UART.c | 303 +++++++++++++++--- ports/broadcom/common-hal/busio/UART.h | 1 + ports/broadcom/firmware | 2 +- ports/broadcom/peripherals | 2 +- 12 files changed, 269 insertions(+), 55 deletions(-) diff --git a/main.c b/main.c index b1b482f985..c019237362 100644 --- a/main.c +++ b/main.c @@ -56,6 +56,7 @@ #include "supervisor/shared/safe_mode.h" #include "supervisor/shared/stack.h" #include "supervisor/shared/status_leds.h" +#include "supervisor/shared/tick.h" #include "supervisor/shared/traceback.h" #include "supervisor/shared/translate.h" #include "supervisor/shared/workflow.h" diff --git a/ports/broadcom/Makefile b/ports/broadcom/Makefile index 16b44f7501..401d601528 100644 --- a/ports/broadcom/Makefile +++ b/ports/broadcom/Makefile @@ -166,7 +166,7 @@ $(BUILD)/firmware.disk.img.zip: $(BUILD)/kernel8.img $(Q)parted -s $(BUILD)/circuitpython-disk.img mkpart primary fat32 0% 100% $(Q)mkfs.fat -F 32 -n BOOT --offset=2048 $(BUILD)/circuitpython-disk.img - $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M config.txt firmware/bootcode.bin firmware/fixup* firmware/start* :: + $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M config.txt firmware/bootcode.bin firmware/fixup* firmware/start* firmware/*.dtb :: $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M $(BUILD)/kernel8.img :: $(Q)zip $@ $(BUILD)/circuitpython-disk.img $(Q)rm $(BUILD)/circuitpython-disk.img diff --git a/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.h index 4211568bfa..9acfb32626 100644 --- a/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.h +++ b/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.h @@ -2,3 +2,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO42) diff --git a/ports/broadcom/boards/raspberrypi_cm4io/pins.c b/ports/broadcom/boards/raspberrypi_cm4io/pins.c index 0dfbe4cbd5..db4eb91710 100644 --- a/ports/broadcom/boards/raspberrypi_cm4io/pins.c +++ b/ports/broadcom/boards/raspberrypi_cm4io/pins.c @@ -57,6 +57,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, }; diff --git a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.h index be77d35ac7..2980b0f9a5 100644 --- a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.h +++ b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.h @@ -2,3 +2,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO42) diff --git a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk index 4567e9c15e..67b1c1dc85 100644 --- a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk @@ -3,4 +3,4 @@ USB_PID = 0xF001 USB_PRODUCT = "Raspberry Pi 4B" USB_MANUFACTURER = "Raspberry Pi" -CHIP_VARIANT = bcm2711 +CHIP_VARIANT = "bcm2711" diff --git a/ports/broadcom/boards/raspberrypi_pi4b/pins.c b/ports/broadcom/boards/raspberrypi_pi4b/pins.c index 0dfbe4cbd5..db4eb91710 100644 --- a/ports/broadcom/boards/raspberrypi_pi4b/pins.c +++ b/ports/broadcom/boards/raspberrypi_pi4b/pins.c @@ -57,6 +57,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, }; diff --git a/ports/broadcom/common-hal/busio/I2C.c b/ports/broadcom/common-hal/busio/I2C.c index 9726f394d2..8e135ab4d7 100644 --- a/ports/broadcom/common-hal/busio/I2C.c +++ b/ports/broadcom/common-hal/busio/I2C.c @@ -72,7 +72,8 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, uint8_t sda_alt = 0; for (scl_alt = 0; scl_alt < 6; scl_alt++) { if (scl->functions[scl_alt].type != PIN_FUNCTION_I2C || - i2c_in_use[scl->functions[scl_alt].index]) { + i2c_in_use[scl->functions[scl_alt].index] || + scl->functions[scl_alt].function != I2C_FUNCTION_SCL) { continue; } for (sda_alt = 0; sda_alt < 6; sda_alt++) { diff --git a/ports/broadcom/common-hal/busio/UART.c b/ports/broadcom/common-hal/busio/UART.c index 85dc36e755..b23aa85b92 100644 --- a/ports/broadcom/common-hal/busio/UART.c +++ b/ports/broadcom/common-hal/busio/UART.c @@ -41,7 +41,14 @@ #define NO_PIN 0xff -#define UART_INST(uart) (((uart) ? uart1 : uart0)) +// UART1 is a different peripheral than the rest so it is hardcoded below. +#if BCM_VERSION == 2711 +#define NUM_UART (6) +STATIC ARM_UART_PL011_Type *uart[NUM_UART] = {UART0, NULL, UART2, UART3, UART4, UART5}; +#else +#define NUM_UART (2) +STATIC ARM_UART_PL011_Type *uart[NUM_UART] = {UART0, NULL}; +#endif typedef enum { STATUS_FREE = 0, @@ -49,29 +56,62 @@ typedef enum { STATUS_NEVER_RESET } uart_status_t; -// The Broadcom chips have two different types of UARTs. UART1 is the "mini-UART" -// that is most available so we've implemented it first. The ARM PL011 UART -// support will be added later. We set NUM_UARTS to 2 here so that we can match -// the indexing even though UART0 isn't supported yet. We currently use this -// UART for debugging so we don't support user use of UART yet. -#define NUM_UARTS 2 - -static uart_status_t uart_status[NUM_UARTS]; +static uart_status_t uart_status[NUM_UART]; +static busio_uart_obj_t *active_uart[NUM_UART]; void reset_uart(void) { - for (uint8_t num = 0; num < NUM_UARTS; num++) { + bool any_pl011_active = false; + for (uint8_t num = 0; num < NUM_UART; num++) { if (uart_status[num] == STATUS_BUSY) { + if (num == 1) { + UART1->IER_b.DATA_READY = false; + UART1->CNTL = 0; + COMPLETE_MEMORY_READS; + AUX->ENABLES_b.UART_1 = false; + } else { + ARM_UART_PL011_Type *pl011 = uart[num]; + pl011->CR = 0; + } + active_uart[num] = NULL; uart_status[num] = STATUS_FREE; + } else { + any_pl011_active = any_pl011_active || (num != 1 && uart_status[num] == STATUS_NEVER_RESET); + } + } + if (!any_pl011_active) { + BP_DisableIRQ(UART_IRQn); + } + COMPLETE_MEMORY_READS; + if (AUX->ENABLES == 0) { + BP_DisableIRQ(AUX_IRQn); + } +} + +STATIC void fetch_all_from_fifo(busio_uart_obj_t *self) { + if (self->uart_id == 1) { + while (UART1->STAT_b.DATA_READY && ringbuf_num_empty(&self->ringbuf) > 0) { + int c = UART1->IO_b.DATA; + if (self->sigint_enabled && c == mp_interrupt_char) { + mp_sched_keyboard_interrupt(); + continue; + } + ringbuf_put(&self->ringbuf, c); + } + } else { + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + while (!pl011->FR_b.RXFE && ringbuf_num_empty(&self->ringbuf) > 0) { + int c = pl011->DR_b.DATA; + if (self->sigint_enabled && c == mp_interrupt_char) { + mp_sched_keyboard_interrupt(); + continue; + } + ringbuf_put(&self->ringbuf, c); } } } -static busio_uart_obj_t *active_uarts[NUM_UARTS]; - void UART1_IRQHandler(void) { - while (UART1->STAT_b.DATA_READY && ringbuf_num_empty(&active_uarts[1]->ringbuf) > 0) { - ringbuf_put(&active_uarts[1]->ringbuf, (uint8_t)UART1->IO_b.DATA); - } + fetch_all_from_fifo(active_uart[1]); // We couldn't read all pending data (overrun) so clear the FIFO so that the interrupt // can finish. if (UART1->STAT_b.DATA_READY) { @@ -79,6 +119,33 @@ void UART1_IRQHandler(void) { } } +void pl011_IRQHandler(uint8_t index) { + fetch_all_from_fifo(active_uart[index]); + // Clear the interrupt in case we weren't able to clear it by emptying the + // FIFO. (This won't clear the FIFO.) + ARM_UART_PL011_Type *pl011 = uart[index]; + pl011->ICR = UART0_ICR_RXIC_Msk; +} + +void UART0_IRQHandler(void) { + pl011_IRQHandler(0); +} + +#if BCM_VERSION == 2711 +void UART2_IRQHandler(void) { + pl011_IRQHandler(2); +} +void UART3_IRQHandler(void) { + pl011_IRQHandler(3); +} +void UART4_IRQHandler(void) { + pl011_IRQHandler(4); +} +void UART5_IRQHandler(void) { + pl011_IRQHandler(5); +} +#endif + void common_hal_busio_uart_never_reset(busio_uart_obj_t *self) { uart_status[self->uart_id] = STATUS_NEVER_RESET; } @@ -103,14 +170,43 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, mp_raise_NotImplementedError(translate("RS485 Not yet supported on this device")); } - if (tx == &pin_GPIO14) { - if (rx == &pin_GPIO15) { - self->uart_id = 1; + size_t instance_index = NUM_UART; + BP_Function_Enum tx_alt = 0; + BP_Function_Enum rx_alt = 0; + BP_Function_Enum rts_alt = 0; + BP_Function_Enum cts_alt = 0; + for (size_t i = 0; i < NUM_UART; i++) { + if (uart_status[i] != STATUS_FREE) { + continue; } + if (tx != NULL) { + if (!pin_find_alt(tx, PIN_FUNCTION_UART, i, UART_FUNCTION_TXD, &tx_alt)) { + continue; + } + if (rts != NULL && !pin_find_alt(rts, PIN_FUNCTION_UART, i, UART_FUNCTION_RTS, &rts_alt)) { + continue; + } + } + if (rx != NULL) { + if (!pin_find_alt(rx, PIN_FUNCTION_UART, i, UART_FUNCTION_RXD, &rx_alt)) { + continue; + } + if (cts != NULL && !pin_find_alt(cts, PIN_FUNCTION_UART, i, UART_FUNCTION_CTS, &cts_alt)) { + continue; + } + } + instance_index = i; + break; + } + if (instance_index == NUM_UART) { + mp_raise_ValueError(translate("Invalid pins")); } self->rx_pin = rx; self->tx_pin = tx; + self->rts_pin = rts; + self->cts_pin = cts; + self->sigint_enabled = sigint_enabled; if (rx != NULL) { if (receiver_buffer != NULL) { @@ -129,8 +225,11 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, } } + active_uart[self->uart_id] = self; + + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + if (self->uart_id == 1) { - active_uarts[1] = self; AUX->ENABLES_b.UART_1 = true; UART1->IER = 0; @@ -145,22 +244,80 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, // Clear interrupts UART1->IIR = 0xff; - uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_CORE); - UART1->BAUD = ((source_clock / (baudrate * 8)) - 1); + common_hal_busio_uart_set_baudrate(self, baudrate); if (tx != NULL) { UART1->CNTL |= UART1_CNTL_TX_ENABLE_Msk; - gpio_set_pull(14, BP_PULL_NONE); - gpio_set_function(14, GPIO_GPFSEL1_FSEL14_TXD1); } if (rx != NULL) { UART1->CNTL |= UART1_CNTL_RX_ENABLE_Msk; - gpio_set_pull(15, BP_PULL_NONE); - gpio_set_function(15, GPIO_GPFSEL1_FSEL15_RXD1); } + } else { + // Ensure the UART is disabled as we configure it. + pl011->CR_b.UARTEN = false; + pl011->IMSC = 0; + pl011->ICR = 0x3ff; + + common_hal_busio_uart_set_baudrate(self, baudrate); + + uint32_t line_control = UART0_LCR_H_FEN_Msk; + line_control |= (bits - 5) << UART0_LCR_H_WLEN_Pos; + if (stop == 2) { + line_control |= UART0_LCR_H_STP2_Msk; + } + if (parity != BUSIO_UART_PARITY_NONE) { + line_control |= UART0_LCR_H_PEN_Msk; + } + if (parity == BUSIO_UART_PARITY_EVEN) { + line_control |= UART0_LCR_H_EPS_Msk; + } + pl011->LCR_H = line_control; + + uint32_t control = UART0_CR_UARTEN_Msk; + if (tx != NULL) { + control |= UART0_CR_TXE_Msk; + } + if (rx != NULL) { + control |= UART0_CR_RXE_Msk; + } + if (cts != NULL) { + control |= UART0_CR_CTSEN_Msk; + } + if (rts != NULL) { + control |= UART0_CR_RTSEN_Msk; + } + pl011->CR = control; + } + + // Setup the pins after waiting for UART stuff + COMPLETE_MEMORY_READS; + if (tx != NULL) { + gpio_set_pull(tx->number, BP_PULL_NONE); + gpio_set_function(tx->number, tx_alt); + } + if (rx != NULL) { + gpio_set_pull(rx->number, BP_PULL_NONE); + gpio_set_function(rx->number, rx_alt); + } + if (rts != NULL) { + gpio_set_pull(rts->number, BP_PULL_NONE); + gpio_set_function(rts->number, rts_alt); + } + if (cts != NULL) { + gpio_set_pull(cts->number, BP_PULL_NONE); + gpio_set_function(cts->number, cts_alt); + } + + // Turn on interrupts + COMPLETE_MEMORY_READS; + if (self->uart_id == 1) { UART1->IER_b.DATA_READY = true; // Never disable this in case the SPIs are used. They can each be // disabled at the peripheral itself. BP_EnableIRQ(AUX_IRQn); + } else { + pl011->IMSC_b.RXIM = true; + // Never disable this in case the other PL011 UARTs are used. + BP_EnableIRQ(UART_IRQn); } } @@ -176,8 +333,11 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { UART1->IER_b.DATA_READY = false; UART1->CNTL = 0; AUX->ENABLES_b.UART_1 = false; - active_uarts[1] = NULL; + } else { + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + pl011->CR = 0; } + active_uart[self->uart_id] = NULL; ringbuf_free(&self->ringbuf); uart_status[self->uart_id] = STATUS_FREE; common_hal_reset_pin(self->tx_pin); @@ -196,20 +356,46 @@ size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, mp_raise_ValueError(translate("No TX pin")); } - if (self->uart_id == 1) { - COMPLETE_MEMORY_READS; - for (size_t i = 0; i < len; i++) { + COMPLETE_MEMORY_READS; + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + for (size_t i = 0; i < len; i++) { + if (self->uart_id == 1) { // Wait for the FIFO to have space. while (!UART1->STAT_b.TX_READY) { RUN_BACKGROUND_TASKS; } UART1->IO = data[i]; + } else { + while (pl011->FR_b.TXFF) { + RUN_BACKGROUND_TASKS; + } + pl011->DR_b.DATA = data[i]; } - COMPLETE_MEMORY_READS; - return len; } + // Wait for the data to be shifted out + if (self->uart_id == 1) { + while (!UART1->STAT_b.TX_DONE) { + RUN_BACKGROUND_TASKS; + } + } else { + while (pl011->FR_b.BUSY) { + RUN_BACKGROUND_TASKS; + } + } + COMPLETE_MEMORY_READS; + return len; +} - return 0; +STATIC void disable_interrupt(busio_uart_obj_t *self) { + if (self->uart_id == 1) { + UART1->IER_b.DATA_READY = false; + } +} + +STATIC void enable_interrupt(busio_uart_obj_t *self) { + if (self->uart_id == 1) { + UART1->IER_b.DATA_READY = true; + } } // Read characters. @@ -225,9 +411,7 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t COMPLETE_MEMORY_READS; // Prevent conflict with uart irq. - if (self->uart_id == 1) { - UART1->IER_b.DATA_READY = false; - } + disable_interrupt(self); // Copy as much received data as available, up to len bytes. size_t total_read = ringbuf_get_n(&self->ringbuf, data, len); @@ -238,14 +422,11 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t uint64_t start_ticks = supervisor_ticks_ms64(); // Busy-wait until timeout or until we've read enough chars. while (len > 0 && (supervisor_ticks_ms64() - start_ticks < self->timeout_ms)) { - if (UART1->STAT_b.DATA_READY) { - // Read and advance. - data[total_read] = UART1->IO_b.DATA; - - // Adjust the counters. - len--; - total_read++; - + fetch_all_from_fifo(self); + size_t additional_read = ringbuf_get_n(&self->ringbuf, data + total_read, len); + len -= additional_read; + total_read += additional_read; + if (additional_read > 0) { // Reset the timeout on every character read. start_ticks = supervisor_ticks_ms64(); } @@ -260,14 +441,10 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t // Now that we've emptied the ringbuf some, fill it up with anything in the // FIFO. This ensures that we'll empty the FIFO as much as possible and // reset the interrupt when we catch up. - while (UART1->STAT_b.DATA_READY && ringbuf_num_empty(&self->ringbuf) > 0) { - ringbuf_put(&self->ringbuf, (uint8_t)UART1->IO_b.DATA); - } + fetch_all_from_fifo(self); // Re-enable irq. - if (self->uart_id == 1) { - UART1->IER_b.DATA_READY = true; - } + enable_interrupt(self); COMPLETE_MEMORY_READS; if (total_read == 0) { @@ -283,6 +460,31 @@ uint32_t common_hal_busio_uart_get_baudrate(busio_uart_obj_t *self) { } void common_hal_busio_uart_set_baudrate(busio_uart_obj_t *self, uint32_t baudrate) { + if (self->uart_id == 1) { + uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_CORE); + UART1->BAUD = ((source_clock / (baudrate * 8)) - 1); + } else { + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + bool reenable = false; + if (pl011->CR_b.UARTEN) { + pl011->CR_b.UARTEN = false; + reenable = true; + } + uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_UART); + uint32_t divisor = 16 * baudrate; + pl011->IBRD = source_clock / divisor; + // The fractional divisor is 64ths. + uint32_t remainder = source_clock % divisor; + uint32_t per_tick = (divisor / 64) + 1; + uint32_t adjust = 0; + if (remainder % per_tick > 0) { + adjust = 1; + } + pl011->FBRD = remainder / per_tick + adjust; + if (reenable) { + pl011->CR_b.UARTEN = true; + } + } self->baudrate = baudrate; } @@ -295,6 +497,7 @@ void common_hal_busio_uart_set_timeout(busio_uart_obj_t *self, mp_float_t timeou } uint32_t common_hal_busio_uart_rx_characters_available(busio_uart_obj_t *self) { + fetch_all_from_fifo(self); return ringbuf_num_filled(&self->ringbuf); } @@ -309,5 +512,5 @@ bool common_hal_busio_uart_ready_to_tx(busio_uart_obj_t *self) { if (self->uart_id == 1) { return UART1->STAT_b.TX_READY; } - return false; + return !uart[self->uart_id]->FR_b.TXFF; } diff --git a/ports/broadcom/common-hal/busio/UART.h b/ports/broadcom/common-hal/busio/UART.h index 8ef4073f8e..0590bc28b6 100644 --- a/ports/broadcom/common-hal/busio/UART.h +++ b/ports/broadcom/common-hal/busio/UART.h @@ -39,6 +39,7 @@ typedef struct { uint8_t uart_id; uint32_t baudrate; uint32_t timeout_ms; + bool sigint_enabled; ringbuf_t ringbuf; } busio_uart_obj_t; diff --git a/ports/broadcom/firmware b/ports/broadcom/firmware index 6a5207946e..bf96d0eda5 160000 --- a/ports/broadcom/firmware +++ b/ports/broadcom/firmware @@ -1 +1 @@ -Subproject commit 6a5207946edcd45813d1dd1572ca8bd8101b68b6 +Subproject commit bf96d0eda5952595d717fedb797aeb168483e9fa diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index 2e7b56bbe9..a0666ce987 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit 2e7b56bbe941311e54fba66f0b32336bfea4388d +Subproject commit a0666ce987ae96a58e587a04b9f89c7c5707dd13 From ab4f789e9aa30d7e8140fc107a7f5915bff75ba2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 7 Dec 2021 13:29:46 -0800 Subject: [PATCH 035/258] Fix Pi Zero 2 W build --- ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk | 2 +- ports/broadcom/peripherals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk index 8ba37dbba7..25f113b856 100644 --- a/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk @@ -3,4 +3,4 @@ USB_PID = 0xF002 USB_PRODUCT = "Raspberry Pi Zero 2W" USB_MANUFACTURER = "Raspberry Pi" -CHIP_VARIANT = rp3a0 +CHIP_VARIANT = "bcm2837" diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index a0666ce987..c236f5a5ff 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit a0666ce987ae96a58e587a04b9f89c7c5707dd13 +Subproject commit c236f5a5ff93b50b8b948c904715e89f6d4fafe8 From 201fae834223abcab14acfc6799b954035506cd2 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Wed, 8 Dec 2021 16:48:32 +0000 Subject: [PATCH 036/258] Added final USB PID --- ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk index 33cefb3630..b92946c130 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2E8A -USB_PID = 0x08C7 +USB_PID = 0x1016 USB_PRODUCT = "Tiny 2040 (2MB)" USB_MANUFACTURER = "Pimoroni" From e946dcfffff727b7045cf82cc81be26752658abe Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 7 Oct 2021 21:55:13 -0600 Subject: [PATCH 037/258] initial BlueMicro8333 Files --- ports/nrf/boards/bluemicro833/board.c | 65 +++++++++++++++++++ ports/nrf/boards/bluemicro833/mpconfigboard.h | 58 +++++++++++++++++ .../nrf/boards/bluemicro833/mpconfigboard.mk | 42 ++++++++++++ ports/nrf/boards/bluemicro833/pins.c | 56 ++++++++++++++++ 4 files changed, 221 insertions(+) create mode 100644 ports/nrf/boards/bluemicro833/board.c create mode 100644 ports/nrf/boards/bluemicro833/mpconfigboard.h create mode 100644 ports/nrf/boards/bluemicro833/mpconfigboard.mk create mode 100644 ports/nrf/boards/bluemicro833/pins.c diff --git a/ports/nrf/boards/bluemicro833/board.c b/ports/nrf/boards/bluemicro833/board.c new file mode 100644 index 0000000000..0e24001a47 --- /dev/null +++ b/ports/nrf/boards/bluemicro833/board.c @@ -0,0 +1,65 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "py/obj.h" +#include "peripherals/nrf/pins.h" +#include "supervisor/shared/board.h" + +#include "nrf_gpio.h" + +void board_init(void) { + // Turn on power to sensors and neopixels. + nrf_gpio_cfg(POWER_SWITCH_PIN->number, + NRF_GPIO_PIN_DIR_OUTPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + nrf_gpio_pin_write(POWER_SWITCH_PIN->number, true); +} + +void board_deinit(void) { + // Turn off power to sensors and neopixels. + nrf_gpio_cfg(POWER_SWITCH_PIN->number, + NRF_GPIO_PIN_DIR_OUTPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + board_reset_user_neopixels(&pin_P0_7, 1); +} diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.h b/ports/nrf/boards/bluemicro833/mpconfigboard.h new file mode 100644 index 0000000000..14930d8c16 --- /dev/null +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.h @@ -0,0 +1,58 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2018 Dan Halbert 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 "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "BlueMicro833" +#define MICROPY_HW_MCU_NAME "nRF52833" + +#define MICROPY_HW_NEOPIXEL (&pin_P0_7) +#define MICROPY_HW_LED_STATUS (&pin_P0_25) + +#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (60 * 1024) + +#define CIRCUITPY_BLE_CONFIG_SIZE (12 * 1024) + +#define BOARD_HAS_CRYSTAL 1 + +// Take 1k RAM to save 1k flash. +#define CIRCUITPY_PRECOMPUTE_QSTR_ATTR (0) + +// Reduce nRF SoftRadio memory usage +#define BLEIO_VS_UUID_COUNT 10 +#define BLEIO_HVN_TX_QUEUE_SIZE 2 +#define BLEIO_CENTRAL_ROLE_COUNT 2 +#define BLEIO_PERIPH_ROLE_COUNT 2 +#define BLEIO_TOTAL_CONNECTION_COUNT 2 +#define BLEIO_ATTR_TAB_SIZE (BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 2) + +#define SOFTDEVICE_RAM_SIZE (32 * 1024) + +#define MICROPY_FATFS_EXFAT 0 + +#define POWER_SWITCH_PIN (&pin_P0_12) diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.mk b/ports/nrf/boards/bluemicro833/mpconfigboard.mk new file mode 100644 index 0000000000..30aa9f0236 --- /dev/null +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.mk @@ -0,0 +1,42 @@ +USB_VID = 0x1D50 +USB_PID = 0x6152 +USB_PRODUCT = "BlueMicro840" +USB_MANUFACTURER = "nrf52.jpconstantineau.com" + +MCU_CHIP = nrf52833 + +INTERNAL_FLASH_FILESYSTEM = 1 + +CIRCUITPY_AESIO = 0 +CIRCUITPY_ALARM = 0 +CIRCUITPY_AUDIOMP3 = 0 +CIRCUITPY_BINASCII = 0 +CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_BITMAPTOOLS = 0 +CIRCUITPY_BUSDEVICE = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_DISPLAYIO = 0 +CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_JSON = 0 +CIRCUITPY_KEYPAD = 1 +CIRCUITPY_MSGPACK = 0 +CIRCUITPY_NEOPIXEL_WRITE = 0 +CIRCUITPY_NVM = 0 +CIRCUITPY_PIXELBUF = 0 +CIRCUITPY_RE = 0 +CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_SDCARDIO = 0 +CIRCUITPY_SYNTHIO = 0 +CIRCUITPY_ULAB = 0 +CIRCUITPY_USB_MIDI = 0 +CIRCUITPY_VECTORIO = 0 + +MICROPY_PY_ASYNC_AWAIT = 0 + +SUPEROPT_GC = 0 +SUPEROPT_VM = 0 + +# Override optimization to keep binary small +OPTIMIZATION_FLAGS = -Os diff --git a/ports/nrf/boards/bluemicro833/pins.c b/ports/nrf/boards/bluemicro833/pins.c new file mode 100644 index 0000000000..68d87d0e8f --- /dev/null +++ b/ports/nrf/boards/bluemicro833/pins.c @@ -0,0 +1,56 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_03) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P0_17) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_19) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_21) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_22) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_23) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_P0_00) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_P0_01) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_P0_16) }, + { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_P0_18) }, + { MP_ROM_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_P1_09) }, + + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_LED3), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_LED4), MP_ROM_PTR(&pin_P0_16) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON1_DEFAULT), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON1_OPTIONAL), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON2_DEFAULT), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON2_OPTIONAL), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON3), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON4), MP_ROM_PTR(&pin_P0_25) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 4cad5beb90f8f4d49233c77e5b6455ebb777a776 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Fri, 15 Oct 2021 16:23:29 -0600 Subject: [PATCH 038/258] minor udate to USB desc --- ports/nrf/boards/bluemicro833/mpconfigboard.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.mk b/ports/nrf/boards/bluemicro833/mpconfigboard.mk index 30aa9f0236..f3f8954788 100644 --- a/ports/nrf/boards/bluemicro833/mpconfigboard.mk +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x1D50 USB_PID = 0x6152 -USB_PRODUCT = "BlueMicro840" +USB_PRODUCT = "BlueMicro833" USB_MANUFACTURER = "nrf52.jpconstantineau.com" MCU_CHIP = nrf52833 @@ -22,7 +22,7 @@ CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_JSON = 0 CIRCUITPY_KEYPAD = 1 CIRCUITPY_MSGPACK = 0 -CIRCUITPY_NEOPIXEL_WRITE = 0 +CIRCUITPY_NEOPIXEL_WRITE = 1 CIRCUITPY_NVM = 0 CIRCUITPY_PIXELBUF = 0 CIRCUITPY_RE = 0 From 53f4137d6fd916d30c1e13ba9f2a9215d04259cf Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Fri, 15 Oct 2021 18:25:03 -0600 Subject: [PATCH 039/258] updated pin defs --- ports/nrf/boards/bluemicro833/board.c | 29 +------------------ ports/nrf/boards/bluemicro833/mpconfigboard.h | 2 +- .../nrf/boards/bluemicro833/mpconfigboard.mk | 2 ++ ports/nrf/boards/bluemicro833/pins.c | 2 +- 4 files changed, 5 insertions(+), 30 deletions(-) diff --git a/ports/nrf/boards/bluemicro833/board.c b/ports/nrf/boards/bluemicro833/board.c index 0e24001a47..94ee5d6957 100644 --- a/ports/nrf/boards/bluemicro833/board.c +++ b/ports/nrf/boards/bluemicro833/board.c @@ -26,34 +26,7 @@ #include "supervisor/board.h" -#include "supervisor/board.h" -#include "mpconfigboard.h" -#include "py/obj.h" -#include "peripherals/nrf/pins.h" -#include "supervisor/shared/board.h" - -#include "nrf_gpio.h" - void board_init(void) { - // Turn on power to sensors and neopixels. - nrf_gpio_cfg(POWER_SWITCH_PIN->number, - NRF_GPIO_PIN_DIR_OUTPUT, - NRF_GPIO_PIN_INPUT_DISCONNECT, - NRF_GPIO_PIN_NOPULL, - NRF_GPIO_PIN_S0S1, - NRF_GPIO_PIN_NOSENSE); - nrf_gpio_pin_write(POWER_SWITCH_PIN->number, true); -} - -void board_deinit(void) { - // Turn off power to sensors and neopixels. - nrf_gpio_cfg(POWER_SWITCH_PIN->number, - NRF_GPIO_PIN_DIR_OUTPUT, - NRF_GPIO_PIN_INPUT_DISCONNECT, - NRF_GPIO_PIN_NOPULL, - NRF_GPIO_PIN_S0S1, - NRF_GPIO_PIN_NOSENSE); - nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false); } bool board_requests_safe_mode(void) { @@ -61,5 +34,5 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - board_reset_user_neopixels(&pin_P0_7, 1); + } diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.h b/ports/nrf/boards/bluemicro833/mpconfigboard.h index 14930d8c16..0a07f223e3 100644 --- a/ports/nrf/boards/bluemicro833/mpconfigboard.h +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.h @@ -30,7 +30,7 @@ #define MICROPY_HW_BOARD_NAME "BlueMicro833" #define MICROPY_HW_MCU_NAME "nRF52833" -#define MICROPY_HW_NEOPIXEL (&pin_P0_7) +#define MICROPY_HW_NEOPIXEL (&pin_P0_07) #define MICROPY_HW_LED_STATUS (&pin_P0_25) #define CIRCUITPY_INTERNAL_NVM_SIZE 0 diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.mk b/ports/nrf/boards/bluemicro833/mpconfigboard.mk index f3f8954788..cbc9a6a879 100644 --- a/ports/nrf/boards/bluemicro833/mpconfigboard.mk +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.mk @@ -10,6 +10,8 @@ INTERNAL_FLASH_FILESYSTEM = 1 CIRCUITPY_AESIO = 0 CIRCUITPY_ALARM = 0 CIRCUITPY_AUDIOMP3 = 0 +CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_AUDIOMIXER = 0 CIRCUITPY_BINASCII = 0 CIRCUITPY_BITBANGIO = 0 CIRCUITPY_BITMAPTOOLS = 0 diff --git a/ports/nrf/boards/bluemicro833/pins.c b/ports/nrf/boards/bluemicro833/pins.c index 68d87d0e8f..cb79353cf1 100644 --- a/ports/nrf/boards/bluemicro833/pins.c +++ b/ports/nrf/boards/bluemicro833/pins.c @@ -53,4 +53,4 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_BUTTON4), MP_ROM_PTR(&pin_P0_25) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); \ No newline at end of file From 448a96ce1b9492f570d52672eb3edd28b0ad56dd Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Sat, 4 Dec 2021 21:48:22 -0600 Subject: [PATCH 040/258] added CIRCUITPY_IS31FL3741 = 0 --- ports/nrf/boards/bluemicro833/board.c | 25 ++++ ports/nrf/boards/bluemicro833/mpconfigboard.h | 2 + .../nrf/boards/bluemicro833/mpconfigboard.mk | 13 +- ports/nrf/boards/bluemicro833/pins.c | 114 ++++++++++-------- 4 files changed, 101 insertions(+), 53 deletions(-) diff --git a/ports/nrf/boards/bluemicro833/board.c b/ports/nrf/boards/bluemicro833/board.c index 94ee5d6957..0b010285c5 100644 --- a/ports/nrf/boards/bluemicro833/board.c +++ b/ports/nrf/boards/bluemicro833/board.c @@ -25,8 +25,33 @@ */ #include "supervisor/board.h" +#include "mpconfigboard.h" +#include "py/obj.h" +#include "peripherals/nrf/pins.h" +#include "supervisor/shared/board.h" + +#include "nrf_gpio.h" void board_init(void) { + // Turn on power to sensors and neopixels. + nrf_gpio_cfg(POWER_SWITCH_PIN->number, + NRF_GPIO_PIN_DIR_OUTPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + nrf_gpio_pin_write(POWER_SWITCH_PIN->number, true); +} + +void board_deinit(void) { + // Turn off power to sensors and neopixels. + nrf_gpio_cfg(POWER_SWITCH_PIN->number, + NRF_GPIO_PIN_DIR_OUTPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false); } bool board_requests_safe_mode(void) { diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.h b/ports/nrf/boards/bluemicro833/mpconfigboard.h index 0a07f223e3..2340cdc988 100644 --- a/ports/nrf/boards/bluemicro833/mpconfigboard.h +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.h @@ -32,6 +32,8 @@ #define MICROPY_HW_NEOPIXEL (&pin_P0_07) #define MICROPY_HW_LED_STATUS (&pin_P0_25) +#define MICROPY_HW_NEOPIXEL_COUNT (1) + #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (60 * 1024) diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.mk b/ports/nrf/boards/bluemicro833/mpconfigboard.mk index cbc9a6a879..71ae39ee80 100644 --- a/ports/nrf/boards/bluemicro833/mpconfigboard.mk +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.mk @@ -9,28 +9,35 @@ INTERNAL_FLASH_FILESYSTEM = 1 CIRCUITPY_AESIO = 0 CIRCUITPY_ALARM = 0 -CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_AUDIOBUSIO = 0 +#CIRCUITPY_AUDIOCORE = 0 +#CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOMIXER = 0 +CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_BINASCII = 0 CIRCUITPY_BITBANGIO = 0 CIRCUITPY_BITMAPTOOLS = 0 +CIRCUITPY_BUILTINS_POW3=0 CIRCUITPY_BUSDEVICE = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_IS31FL3741 = 0 CIRCUITPY_JSON = 0 CIRCUITPY_KEYPAD = 1 CIRCUITPY_MSGPACK = 0 -CIRCUITPY_NEOPIXEL_WRITE = 1 +#CIRCUITPY_NEOPIXEL_WRITE = 1 +CIRCUITPY_ONEWIREIO = 0 CIRCUITPY_NVM = 0 -CIRCUITPY_PIXELBUF = 0 +CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_PULSEIO = 1 CIRCUITPY_RE = 0 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_SDCARDIO = 0 CIRCUITPY_SYNTHIO = 0 +CIRCUITPY_TOUCHIO = 0 CIRCUITPY_ULAB = 0 CIRCUITPY_USB_MIDI = 0 CIRCUITPY_VECTORIO = 0 diff --git a/ports/nrf/boards/bluemicro833/pins.c b/ports/nrf/boards/bluemicro833/pins.c index cb79353cf1..e8c8cdcec5 100644 --- a/ports/nrf/boards/bluemicro833/pins.c +++ b/ports/nrf/boards/bluemicro833/pins.c @@ -2,55 +2,69 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - - { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, - { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, - - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_01) }, - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P1_02) }, - { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_03) }, - { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_04) }, - { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_05) }, - { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_06) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_07) }, - { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_08) }, - { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P0_17) }, - { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_19) }, - { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_20) }, - { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_21) }, - { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_22) }, - { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_23) }, - { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_P0_00) }, - { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_P0_01) }, - { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_P0_05) }, - { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_P0_06) }, - { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_P0_07) }, - { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_P0_08) }, - { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_P0_09) }, - { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_P0_10) }, - { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_P0_11) }, - { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_P0_12) }, - { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_P0_13) }, - { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_P0_14) }, - { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_P0_15) }, - { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_P0_16) }, - { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_P0_18) }, - { MP_ROM_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_P0_24) }, - { MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_P0_25) }, - { MP_ROM_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_P1_00) }, - { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_P1_09) }, - - { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_13) }, - { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P0_14) }, - { MP_ROM_QSTR(MP_QSTR_LED3), MP_ROM_PTR(&pin_P0_15) }, - { MP_ROM_QSTR(MP_QSTR_LED4), MP_ROM_PTR(&pin_P0_16) }, - - { MP_ROM_QSTR(MP_QSTR_BUTTON1_DEFAULT), MP_ROM_PTR(&pin_P0_11) }, - { MP_ROM_QSTR(MP_QSTR_BUTTON1_OPTIONAL), MP_ROM_PTR(&pin_P1_07) }, - { MP_ROM_QSTR(MP_QSTR_BUTTON2_DEFAULT), MP_ROM_PTR(&pin_P0_12) }, - { MP_ROM_QSTR(MP_QSTR_BUTTON2_OPTIONAL), MP_ROM_PTR(&pin_P1_08) }, - { MP_ROM_QSTR(MP_QSTR_BUTTON3), MP_ROM_PTR(&pin_P0_24) }, - { MP_ROM_QSTR(MP_QSTR_BUTTON4), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_P0_05), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_P0_07), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_P0_08), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) }, + { MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) }, + { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, + { MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, + { MP_ROM_QSTR(MP_QSTR_P0_22), MP_ROM_PTR(&pin_P0_22) }, + { MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) }, + { MP_ROM_QSTR(MP_QSTR_P0_24), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_P0_25), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_P0_26), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_P0_27), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_P0_28), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_P0_30), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) }, + { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_17) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_VCC_ON), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; -MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); \ No newline at end of file +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 7137f1b1c0dacfc6a103b8eba47146c26b2b29b4 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Wed, 8 Dec 2021 17:29:53 -0600 Subject: [PATCH 041/258] added never_reset to board_init --- ports/nrf/boards/bluemicro833/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/nrf/boards/bluemicro833/board.c b/ports/nrf/boards/bluemicro833/board.c index 0b010285c5..104cea6274 100644 --- a/ports/nrf/boards/bluemicro833/board.c +++ b/ports/nrf/boards/bluemicro833/board.c @@ -33,6 +33,8 @@ #include "nrf_gpio.h" void board_init(void) { + // "never_reset" the pin here because CircuitPython will try to reset pins after a VM run otherwise. + never_reset_pin_number(POWER_SWITCH_PIN->number); // Turn on power to sensors and neopixels. nrf_gpio_cfg(POWER_SWITCH_PIN->number, NRF_GPIO_PIN_DIR_OUTPUT, From 937e0740f47363f8652267e64de361c7015e4c5d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 8 Dec 2021 20:27:34 -0600 Subject: [PATCH 042/258] Fix PIDs to match official espressif list See the slightly deceptively titled * https://github.com/espressif/usb-pids/pull/29 --- ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk | 2 +- .../boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk index 285957b4e8..6664ba8c98 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x303A -USB_PID = 0x7007 +USB_PID = 0x7005 USB_PRODUCT = "ESP32-S3-Box-2.5" USB_MANUFACTURER = "Espressif" diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk index 95cc39a376..58b2d2e85c 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x303A -USB_PID = 0x7005 +USB_PID = 0x7003 USB_PRODUCT = "ESP32-S3-DevKitC-1-nopsram" USB_MANUFACTURER = "Espressif" From 9ec9a6d500b3f3d82164037680f526e7be43ed23 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 8 Dec 2021 20:47:02 -0600 Subject: [PATCH 043/258] these duplicates are OK --- tools/ci_check_duplicate_usb_vid_pid.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index 6f15a28c46..1a7fdd2998 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -51,6 +51,8 @@ DEFAULT_IGNORELIST = [ "unexpectedmaker_feathers2_prerelease", "espressif_kaluga_1", "espressif_kaluga_1.3", + "espressif_esp32s3_devkitc_1", + "espressif_esp32s3_devkitc_1_nopsram", ] cli_parser = argparse.ArgumentParser(description="USB VID/PID Duplicate Checker") From d692afea8584b5624cd826c3662b5fc924f1ae1a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 3 Dec 2021 11:39:15 -0800 Subject: [PATCH 044/258] Create notify.yml --- .github/workflows/notify.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/notify.yml diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml new file mode 100644 index 0000000000..4cfb22298f --- /dev/null +++ b/.github/workflows/notify.yml @@ -0,0 +1,14 @@ +name: Notify users based on issue labels + +on: + issues: + types: [labeled] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - uses: jenschelkopf/issue-label-notification-action@1.3 + with: + recipients: | + ulab=@v923z From d72311f76a93e03c90f74b9676e3e6500c9f66ab Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Fri, 10 Dec 2021 09:39:31 +1100 Subject: [PATCH 045/258] Update xiao rp2040 pins --- ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c index 8c8ed1197c..a53cb3f11a 100644 --- a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c @@ -36,10 +36,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO3) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO3) }, - { MP_ROM_QSTR(MP_QSTR_TX_LED), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_RX_LED), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_YELLOW_LED), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_LED_BLUE), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO11) }, From 6626319338dcc1312363726b4d3096e08217ebdb Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 7 Dec 2021 18:07:38 -0800 Subject: [PATCH 046/258] Add SPI support It uses both SPI and AUX SPI peripherals --- ports/broadcom/common-hal/busio/SPI.c | 222 +++++++++++++++++- ports/broadcom/common-hal/busio/SPI.h | 1 + ports/broadcom/common-hal/busio/UART.c | 4 + .../broadcom/common-hal/microcontroller/Pin.c | 14 +- ports/broadcom/peripherals | 2 +- ports/broadcom/supervisor/port.c | 2 +- 6 files changed, 230 insertions(+), 15 deletions(-) diff --git a/ports/broadcom/common-hal/busio/SPI.c b/ports/broadcom/common-hal/busio/SPI.c index 230bd487e9..e11d7bab51 100644 --- a/ports/broadcom/common-hal/busio/SPI.c +++ b/ports/broadcom/common-hal/busio/SPI.c @@ -34,28 +34,104 @@ #include "common-hal/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Pin.h" -#define NO_INSTANCE 0xff +#include "peripherals/broadcom/cpu.h" +#include "peripherals/broadcom/defines.h" +#include "peripherals/broadcom/gpio.h" +#include "peripherals/broadcom/pins.h" +#include "peripherals/broadcom/vcmailbox.h" -STATIC bool never_reset_spi[2]; +#if BCM_VERSION == 2711 +#define NUM_SPI (7) +STATIC SPI0_Type *spi[NUM_SPI] = {SPI0, NULL, NULL, SPI3, SPI4, SPI5, SPI6}; +STATIC SPI1_Type *aux_spi[NUM_SPI] = {NULL, SPI1, SPI2, NULL, NULL, NULL, NULL}; +#else +#define NUM_SPI (3) +STATIC SPI0_Type *spi[NUM_SPI] = {SPI0, NULL, NULL}; +STATIC SPI1_Type *aux_spi[NUM_SPI] = {NULL, SPI1, SPI2}; +#endif + +STATIC bool never_reset_spi[NUM_SPI]; +STATIC bool spi_in_use[NUM_SPI]; void reset_spi(void) { - for (size_t i = 0; i < 2; i++) { + for (size_t i = 0; i < NUM_SPI; i++) { if (never_reset_spi[i]) { continue; } - // TODO + if (i == 1 || i == 2) { + if (i == 1) { + AUX->ENABLES_b.SPI_1 = false; + } else { + AUX->ENABLES_b.SPI_2 = false; + } + aux_spi[i]->CNTL0 = 0; + } else { + // Set CS back to default. All 0 except read enable. + spi[i]->CS = SPI0_CS_REN_Msk; + } + + spi_in_use[i] = false; } } void common_hal_busio_spi_construct(busio_spi_obj_t *self, const mcu_pin_obj_t *clock, const mcu_pin_obj_t *mosi, const mcu_pin_obj_t *miso) { + size_t instance_index = NUM_SPI; + BP_Function_Enum clock_alt = 0; + BP_Function_Enum mosi_alt = 0; + BP_Function_Enum miso_alt = 0; + for (size_t i = 0; i < NUM_SPI; i++) { + if (spi_in_use[i]) { + continue; + } + if (!pin_find_alt(clock, PIN_FUNCTION_SPI, i, SPI_FUNCTION_SCLK, &clock_alt)) { + continue; + } + if (mosi != NULL && !pin_find_alt(mosi, PIN_FUNCTION_SPI, i, SPI_FUNCTION_MOSI, &mosi_alt)) { + continue; + } + if (miso != NULL && !pin_find_alt(miso, PIN_FUNCTION_SPI, i, SPI_FUNCTION_MISO, &miso_alt)) { + continue; + } + instance_index = i; + break; + } + if (instance_index == NUM_SPI) { + mp_raise_ValueError(translate("Invalid pins")); + } + self->clock = clock; + self->MOSI = mosi; + self->MISO = miso; + self->index = instance_index; + spi_in_use[instance_index] = true; + + + if (instance_index == 1) { + AUX->ENABLES_b.SPI_1 = true; + } else if (instance_index == 2) { + AUX->ENABLES_b.SPI_2 = true; + } + + common_hal_busio_spi_configure(self, 250000, 0, 0, 8); + + COMPLETE_MEMORY_READS; + gpio_set_pull(clock->number, BP_PULL_NONE); + gpio_set_function(clock->number, clock_alt); + if (mosi != NULL) { + gpio_set_pull(mosi->number, BP_PULL_NONE); + gpio_set_function(mosi->number, mosi_alt); + } + if (miso != NULL) { + gpio_set_pull(miso->number, BP_PULL_NONE); + gpio_set_function(miso->number, miso_alt); + } } void common_hal_busio_spi_never_reset(busio_spi_obj_t *self) { - // never_reset_spi[spi_get_index(self->peripheral)] = true; + never_reset_spi[self->index] = true; common_hal_never_reset_pin(self->clock); common_hal_never_reset_pin(self->MOSI); @@ -70,12 +146,22 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) { if (common_hal_busio_spi_deinited(self)) { return; } - // never_reset_spi[spi_get_index(self->peripheral)] = false; + never_reset_spi[self->index] = false; common_hal_reset_pin(self->clock); common_hal_reset_pin(self->MOSI); common_hal_reset_pin(self->MISO); self->clock = NULL; + + if (self->index == 1 || + self->index == 2) { + aux_spi[self->index]->CNTL0_b.ENABLE = false; + if (self->index == 1) { + AUX->ENABLES_b.SPI_1 = false; + } else if (self->index == 2) { + AUX->ENABLES_b.SPI_2 = false; + } + } } bool common_hal_busio_spi_configure(busio_spi_obj_t *self, @@ -87,13 +173,40 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, return true; } - // TODO + if (self->index == 1 || self->index == 2) { + SPI1_Type *p = aux_spi[self->index]; + uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_CORE); + uint16_t clock_divider = source_clock / baudrate; + if (source_clock % baudrate > 0) { + clock_divider += 2; + } + + p->CNTL0 = (clock_divider / 2 - 1) << SPI1_CNTL0_SPEED_Pos | + SPI1_CNTL0_ENABLE_Msk | + SPI1_CNTL0_MSB_FIRST_Msk | + (polarity == 1? SPI1_CNTL0_INVERT_CLK_Msk : 0) | + (phase == polarity? SPI1_CNTL0_IN_RISING_Msk : SPI1_CNTL0_OUT_RISING_Msk) | + 8 << SPI1_CNTL0_SHIFT_LENGTH_Pos; + p->CNTL1 = SPI1_CNTL1_MSB_FIRST_Msk; + self->real_frequency = source_clock / clock_divider; + } else { + SPI0_Type *p = spi[self->index]; + p->CS = polarity << SPI0_CS_CPOL_Pos | + phase << SPI0_CS_CPHA_Pos; + uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_CORE); + uint16_t clock_divider = source_clock / baudrate; + if (source_clock % baudrate > 0) { + clock_divider += 2; + } + + p->CLK = clock_divider; + self->real_frequency = source_clock / clock_divider; + } self->polarity = polarity; self->phase = phase; self->bits = bits; self->target_frequency = baudrate; - self->real_frequency = baudrate; // TODO return true; } @@ -115,18 +228,103 @@ void common_hal_busio_spi_unlock(busio_spi_obj_t *self) { self->has_lock = false; } +STATIC void _spi_transfer(SPI0_Type *p, + const uint8_t *data_out, size_t out_len, + uint8_t *data_in, size_t in_len) { + size_t len = MAX(out_len, in_len); + COMPLETE_MEMORY_READS; + p->DLEN = len; + p->CS |= SPI0_CS_TA_Msk | SPI0_CS_CLEAR_Msk; + size_t in = 0; + size_t out = 0; + while (in < len) { + while (out < len && p->CS_b.TXD == 1) { + if (out_len == 1) { + p->FIFO = data_out[0]; + } else { + p->FIFO = data_out[out]; + } + out++; + } + // Wait for data to read (also means data has been sent.) + while (p->CS_b.RXD == 0) { + RUN_BACKGROUND_TASKS; + } + while (p->CS_b.RXD == 1) { + uint8_t data = p->FIFO; + if (data_in != NULL) { + data_in[in] = data; + } else { + (void)data; + } + in++; + } + } + p->CS_b.TA = false; + COMPLETE_MEMORY_READS; +} + +STATIC void _aux_spi_transfer(SPI1_Type *p, + const uint8_t *data_out, size_t out_len, + uint8_t *data_in, size_t in_len) { + size_t len = MAX(out_len, in_len); + p->CNTL0 |= SPI1_CNTL0_CLEAR_FIFOS_Msk; + p->CNTL0 &= ~SPI1_CNTL0_CLEAR_FIFOS_Msk; + size_t in = 0; + size_t out = 0; + while (in < len) { + while (out < len && p->STAT_b.TX_FULL == 0) { + if (out_len == 1) { + p->TXHOLD0 = data_out[0] << 24; + } else { + p->TXHOLD0 = data_out[out] << 24; + } + out++; + } + // Wait for data to read (also means data has been sent.) + while (p->STAT_b.RX_EMPTY == 1) { + RUN_BACKGROUND_TASKS; + } + while (p->STAT_b.RX_EMPTY == 0) { + uint8_t data = p->TXHOLD0; + if (data_in != NULL) { + data_in[in] = data; + } else { + (void)data; + } + in++; + } + } +} + bool common_hal_busio_spi_write(busio_spi_obj_t *self, const uint8_t *data, size_t len) { - return false; + if (self->index == 1 || self->index == 2) { + _aux_spi_transfer(aux_spi[self->index], data, len, NULL, 0); + } else { + _spi_transfer(spi[self->index], data, len, NULL, 0); + } + return true; } bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value) { - return false; + if (self->index == 1 || self->index == 2) { + _aux_spi_transfer(aux_spi[self->index], &write_value, 1, data, len); + } else { + _spi_transfer(spi[self->index], &write_value, 1, data, len); + } + return true; } -bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_out, uint8_t *data_in, size_t len) { - return false; +bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, + const uint8_t *data_out, uint8_t *data_in, size_t len) { + if (self->index == 1 || self->index == 2) { + _aux_spi_transfer(aux_spi[self->index], data_out, len, data_in, len); + } else { + _spi_transfer(spi[self->index], data_out, len, data_in, len); + } + return true; } uint32_t common_hal_busio_spi_get_frequency(busio_spi_obj_t *self) { diff --git a/ports/broadcom/common-hal/busio/SPI.h b/ports/broadcom/common-hal/busio/SPI.h index 0bdbf2d8e7..d1d5fbaf69 100644 --- a/ports/broadcom/common-hal/busio/SPI.h +++ b/ports/broadcom/common-hal/busio/SPI.h @@ -42,6 +42,7 @@ typedef struct { uint8_t polarity; uint8_t phase; uint8_t bits; + uint8_t index; } busio_spi_obj_t; void reset_spi(void); diff --git a/ports/broadcom/common-hal/busio/UART.c b/ports/broadcom/common-hal/busio/UART.c index b23aa85b92..ff17d5ff1d 100644 --- a/ports/broadcom/common-hal/busio/UART.c +++ b/ports/broadcom/common-hal/busio/UART.c @@ -148,6 +148,10 @@ void UART5_IRQHandler(void) { void common_hal_busio_uart_never_reset(busio_uart_obj_t *self) { uart_status[self->uart_id] = STATUS_NEVER_RESET; + common_hal_never_reset_pin(self->tx_pin); + common_hal_never_reset_pin(self->rx_pin); + common_hal_never_reset_pin(self->cts_pin); + common_hal_never_reset_pin(self->rts_pin); } void common_hal_busio_uart_construct(busio_uart_obj_t *self, diff --git a/ports/broadcom/common-hal/microcontroller/Pin.c b/ports/broadcom/common-hal/microcontroller/Pin.c index d1e5627bcd..1cf86f2b34 100644 --- a/ports/broadcom/common-hal/microcontroller/Pin.c +++ b/ports/broadcom/common-hal/microcontroller/Pin.c @@ -45,9 +45,15 @@ void never_reset_pin_number(uint8_t pin_number) { } void reset_pin_number(uint8_t pin_number) { - gpio_set_function(pin_number, GPIO_FUNCTION_INPUT); pin_in_use[pin_number] = false; never_reset_pin[pin_number] = false; + // Reset JTAG pins back to JTAG. + if (22 <= pin_number && pin_number <= 27) { + gpio_set_function(pin_number, GPIO_FUNCTION_ALT4); + return; + } else { + gpio_set_function(pin_number, GPIO_FUNCTION_INPUT); + } // Set the pull to match the datasheet. BP_PULL_Enum pull = BP_PULL_NONE; if (pin_number < 9 || @@ -66,10 +72,16 @@ void reset_pin_number(uint8_t pin_number) { } void common_hal_never_reset_pin(const mcu_pin_obj_t *pin) { + if (pin == NULL) { + return; + } never_reset_pin_number(pin->number); } void common_hal_reset_pin(const mcu_pin_obj_t *pin) { + if (pin == NULL) { + return; + } reset_pin_number(pin->number); } diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index c236f5a5ff..e136e38717 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit c236f5a5ff93b50b8b948c904715e89f6d4fafe8 +Subproject commit e136e387177446c3c9979bbf274a4856bf13797d diff --git a/ports/broadcom/supervisor/port.c b/ports/broadcom/supervisor/port.c index ddd24fe540..95ad465a84 100644 --- a/ports/broadcom/supervisor/port.c +++ b/ports/broadcom/supervisor/port.c @@ -106,7 +106,7 @@ void reset_port(void) { audio_dma_reset(); #endif - // reset_all_pins(); + reset_all_pins(); } void reset_to_bootloader(void) { From 8c480832a710ab2e0def71a8117ec198b790927c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 9 Dec 2021 10:45:13 -0800 Subject: [PATCH 047/258] Add generic CM4 board and update PIDs --- ports/broadcom/boards/raspberrypi_cm4/board.c | 56 +++++++++++++++++++ .../boards/raspberrypi_cm4/mpconfigboard.h | 1 + .../boards/raspberrypi_cm4/mpconfigboard.mk | 6 ++ ports/broadcom/boards/raspberrypi_cm4/pins.c | 48 ++++++++++++++++ .../boards/raspberrypi_cm4io/mpconfigboard.mk | 2 +- .../boards/raspberrypi_pi4b/mpconfigboard.mk | 2 +- .../raspberrypi_zero2w/mpconfigboard.mk | 2 +- 7 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 ports/broadcom/boards/raspberrypi_cm4/board.c create mode 100644 ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.h create mode 100644 ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.mk create mode 100644 ports/broadcom/boards/raspberrypi_cm4/pins.c diff --git a/ports/broadcom/boards/raspberrypi_cm4/board.c b/ports/broadcom/boards/raspberrypi_cm4/board.c new file mode 100644 index 0000000000..80bea7f8b6 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_cm4/board.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" + +#include "bindings/videocore/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + videocore_framebuffer_obj_t *fb = &allocate_display_bus()->videocore; + fb->base.type = &videocore_framebuffer_type; + common_hal_videocore_framebuffer_construct(fb, 640, 480); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.h new file mode 100644 index 0000000000..fbd258577e --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.h @@ -0,0 +1 @@ +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Compute Module 4" diff --git a/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.mk new file mode 100644 index 0000000000..ee54efe84b --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.mk @@ -0,0 +1,6 @@ +USB_VID = 0x2E8A +USB_PID = 0x1014 +USB_PRODUCT = "Compute Module 4" +USB_MANUFACTURER = "Raspberry Pi" + +CHIP_VARIANT = "bcm2711" diff --git a/ports/broadcom/boards/raspberrypi_cm4/pins.c b/ports/broadcom/boards/raspberrypi_cm4/pins.c new file mode 100644 index 0000000000..8999066cb3 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_cm4/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // These match the names used in the CM4 datasheet + { MP_ROM_QSTR(MP_QSTR_ID_SD), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_ID_SC), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GPIO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GPIO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GPIO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GPIO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GPIO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GPIO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GPIO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GPIO9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GPIO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GPIO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GPIO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_GPIO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GPIO15), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GPIO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GPIO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GPIO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GPIO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GPIO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GPIO22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GPIO23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GPIO24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GPIO25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GPIO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GPIO27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_LED_nACT), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO42) }, + + { MP_ROM_QSTR(MP_QSTR_SDA0), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_SCL0), MP_ROM_PTR(&pin_GPIO45) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.mk index d430579260..d021462bc6 100644 --- a/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2E8A -USB_PID = 0xf000 +USB_PID = 0x1012 USB_PRODUCT = "Compute Module 4 IO Board" USB_MANUFACTURER = "Raspberry Pi" diff --git a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk index 67b1c1dc85..2c808931da 100644 --- a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2E8A -USB_PID = 0xF001 +USB_PID = 0x1013 USB_PRODUCT = "Raspberry Pi 4B" USB_MANUFACTURER = "Raspberry Pi" diff --git a/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk index 25f113b856..1479cb3b8c 100644 --- a/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2E8A -USB_PID = 0xF002 +USB_PID = 0x1015 USB_PRODUCT = "Raspberry Pi Zero 2W" USB_MANUFACTURER = "Raspberry Pi" From a043f65352598e345912ba49d0b1f9c4abb3fa73 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 9 Dec 2021 23:25:48 -0600 Subject: [PATCH 048/258] adding Pykey family of boards --- docs/shared_bindings_matrix.py | 11 +++++++++++ .../boards/jpconstantineau_pykey60/mpconfigboard.h | 2 +- .../boards/jpconstantineau_pykey60/mpconfigboard.mk | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index 7954e96bfd..0795da6f87 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -41,6 +41,11 @@ aliases_by_board = { "pyportal": ["pyportal_pynt"], "gemma_m0": ["gemma_m0_pycon2018"], "pewpew10": ["pewpew13"], + "jpconstantineau_pykey60": [ + "jpconstantineau_pykey18", + "jpconstantineau_pykey44", + "jpconstantineau_pykey87", + ], } aliases_brand_names = { @@ -56,6 +61,12 @@ aliases_brand_names = { "Adafruit Gemma M0 PyCon 2018", "pewpew13": "PewPew 13", + "jpconstantineau_pykey18": + "PyKey 18 Numpad", + "jpconstantineau_pykey44": + "PyKey 44", + "jpconstantineau_pykey87": + "PyKey 87 TKL", } additional_modules = { diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h index f96edba2f8..4fc2d4bc14 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "PyKey60" +#define MICROPY_HW_BOARD_NAME "PyKey 60" #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO29) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk index 263f7ad3b2..dbefb264cf 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x1d50 USB_PID = 0x6153 -USB_PRODUCT = "Pykey60" +USB_PRODUCT = "PyKey" USB_MANUFACTURER = "JPConstantineau" CHIP_VARIANT = RP2040 From 74fa2e9edd5ebfaefc1a7a87ebe303457f59ae02 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 10 Dec 2021 10:20:36 -0800 Subject: [PATCH 049/258] Fetch tools/adabot submodule for website build It's used by build_board_info.py --- tools/ci_fetch_deps.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/ci_fetch_deps.py b/tools/ci_fetch_deps.py index 8e450e7b57..b85d199b7c 100644 --- a/tools/ci_fetch_deps.py +++ b/tools/ci_fetch_deps.py @@ -73,8 +73,7 @@ elif target == "windows": # This builds one board from a number of ports so fill out a bunch of submodules submodules = ["extmod/", "lib/", "tools/", "ports/", "data/nvm.toml/"] elif target == "website": - # No submodules needed. - pass + submodules = ["tools/adabot/"] else: p = list(pathlib.Path(".").glob(f"ports/*/boards/{target}/mpconfigboard.mk")) if not p: From cf826d33d16f22567f2d0e61df32a025acaca980 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 10 Dec 2021 10:28:49 -0800 Subject: [PATCH 050/258] Exclude ci checks and tests from building boards --- tools/ci_set_matrix.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index 2f74fbec04..d031224914 100644 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -34,6 +34,11 @@ PORT_TO_ARCH = { "stm": "arm", } +IGNORE = [ + "tools/ci_set_matrix.py", + "tools/ci_check_duplicate_usb_vid_pid.py", +] + changed_files = {} try: changed_files = json.loads(os.environ["CHANGED_FILES"]) @@ -80,6 +85,14 @@ def set_boards_to_build(build_all): if port != "unix": boards_to_build.update(port_to_boards[port]) continue + + # Check the ignore list to see if the file isn't used on board builds. + if p in IGNORE: + continue + + # Boards don't run tests so ignore those as well. + if p.startswith("tests"): + continue # Otherwise build it all boards_to_build = all_board_ids From dac71e684d07a1d0b0b9c398d7efac288dedf93b Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Fri, 10 Dec 2021 16:34:06 -0600 Subject: [PATCH 051/258] moved aliased boards down to actual builds --- docs/shared_bindings_matrix.py | 11 ---- .../boards/jpconstantineau_pykey18/board.c | 45 ++++++++++++++++ .../jpconstantineau_pykey18/mpconfigboard.h | 4 ++ .../jpconstantineau_pykey18/mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 4 ++ .../boards/jpconstantineau_pykey18/pins.c | 52 +++++++++++++++++++ .../boards/jpconstantineau_pykey44/board.c | 45 ++++++++++++++++ .../jpconstantineau_pykey44/mpconfigboard.h | 4 ++ .../jpconstantineau_pykey44/mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 4 ++ .../boards/jpconstantineau_pykey44/pins.c | 52 +++++++++++++++++++ .../jpconstantineau_pykey60/mpconfigboard.mk | 2 +- .../boards/jpconstantineau_pykey87/board.c | 45 ++++++++++++++++ .../jpconstantineau_pykey87/mpconfigboard.h | 4 ++ .../jpconstantineau_pykey87/mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 4 ++ .../boards/jpconstantineau_pykey87/pins.c | 52 +++++++++++++++++++ tools/ci_check_duplicate_usb_vid_pid.py | 4 ++ 18 files changed, 353 insertions(+), 12 deletions(-) create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey18/board.c create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey18/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey44/board.c create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey44/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey87/board.c create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey87/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index 0795da6f87..7954e96bfd 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -41,11 +41,6 @@ aliases_by_board = { "pyportal": ["pyportal_pynt"], "gemma_m0": ["gemma_m0_pycon2018"], "pewpew10": ["pewpew13"], - "jpconstantineau_pykey60": [ - "jpconstantineau_pykey18", - "jpconstantineau_pykey44", - "jpconstantineau_pykey87", - ], } aliases_brand_names = { @@ -61,12 +56,6 @@ aliases_brand_names = { "Adafruit Gemma M0 PyCon 2018", "pewpew13": "PewPew 13", - "jpconstantineau_pykey18": - "PyKey 18 Numpad", - "jpconstantineau_pykey44": - "PyKey 44", - "jpconstantineau_pykey87": - "PyKey 87 TKL", } additional_modules = { diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/board.c b/ports/raspberrypi/boards/jpconstantineau_pykey18/board.c new file mode 100644 index 0000000000..e4e5a8bc57 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/board.c @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" +#include "supervisor/shared/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + // turn off any left over LED + board_reset_user_neopixels(&pin_GPIO29, 62); +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.h new file mode 100644 index 0000000000..3394a34a23 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.h @@ -0,0 +1,4 @@ +#define MICROPY_HW_BOARD_NAME "PyKey 18 Numpad" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO29) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.mk new file mode 100644 index 0000000000..fbfe913e06 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1d50 +USB_PID = 0x6153 +USB_PRODUCT = "PyKey18" +USB_MANUFACTURER = "JPConstantineau" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/pico-sdk-configboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey18/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c new file mode 100644 index 0000000000..c904b1e29f --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c @@ -0,0 +1,52 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/board.c b/ports/raspberrypi/boards/jpconstantineau_pykey44/board.c new file mode 100644 index 0000000000..e4e5a8bc57 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/board.c @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" +#include "supervisor/shared/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + // turn off any left over LED + board_reset_user_neopixels(&pin_GPIO29, 62); +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.h new file mode 100644 index 0000000000..15f70ae58a --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.h @@ -0,0 +1,4 @@ +#define MICROPY_HW_BOARD_NAME "PyKey 44 Ergo" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO29) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.mk new file mode 100644 index 0000000000..0e19d10274 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1d50 +USB_PID = 0x6153 +USB_PRODUCT = "PyKey44" +USB_MANUFACTURER = "JPConstantineau" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/pico-sdk-configboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey44/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c new file mode 100644 index 0000000000..c904b1e29f --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c @@ -0,0 +1,52 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk index dbefb264cf..b789e70f01 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x1d50 USB_PID = 0x6153 -USB_PRODUCT = "PyKey" +USB_PRODUCT = "PyKey60" USB_MANUFACTURER = "JPConstantineau" CHIP_VARIANT = RP2040 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/board.c b/ports/raspberrypi/boards/jpconstantineau_pykey87/board.c new file mode 100644 index 0000000000..e4e5a8bc57 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/board.c @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" +#include "supervisor/shared/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + // turn off any left over LED + board_reset_user_neopixels(&pin_GPIO29, 62); +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.h new file mode 100644 index 0000000000..aee9ed27e3 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.h @@ -0,0 +1,4 @@ +#define MICROPY_HW_BOARD_NAME "PyKey 87 TKL" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO29) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.mk new file mode 100644 index 0000000000..83dcb3df52 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1d50 +USB_PID = 0x6153 +USB_PRODUCT = "PyKey87" +USB_MANUFACTURER = "JPConstantineau" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/pico-sdk-configboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey87/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c new file mode 100644 index 0000000000..c904b1e29f --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c @@ -0,0 +1,52 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index 6f15a28c46..40ab2878fd 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -51,6 +51,10 @@ DEFAULT_IGNORELIST = [ "unexpectedmaker_feathers2_prerelease", "espressif_kaluga_1", "espressif_kaluga_1.3", + "jpconstantineau_pykey18", + "jpconstantineau_pykey44", + "jpconstantineau_pykey60", + "jpconstantineau_pykey87", ] cli_parser = argparse.ArgumentParser(description="USB VID/PID Duplicate Checker") From b6858e4ca7158b68074aef5082a46a1058f42079 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Sat, 11 Dec 2021 21:33:12 +0530 Subject: [PATCH 052/258] allow multiple board buses Co-authored-by: Neradoc --- main.c | 4 +- .../boards/hallowing_m0_express/board.c | 2 +- ports/atmel-samd/boards/ugame10/board.c | 2 +- py/circuitpy_mpconfig.h | 47 +++- shared-bindings/board/__init__.c | 94 +++---- shared-bindings/board/__init__.h | 33 ++- shared-module/board/__init__.c | 239 ++++++++++-------- shared-module/board/__init__.h | 2 +- shared-module/displayio/__init__.c | 17 +- .../sharpdisplay/SharpMemoryFramebuffer.c | 4 +- 10 files changed, 254 insertions(+), 190 deletions(-) diff --git a/main.c b/main.c index c019237362..c219885412 100644 --- a/main.c +++ b/main.c @@ -289,10 +289,10 @@ STATIC void cleanup_after_vm(supervisor_allocation *heap, mp_obj_t exception) { keypad_reset(); #endif - // reset_board_busses() first because it may release pins from the never_reset state, so that + // reset_board_buses() first because it may release pins from the never_reset state, so that // reset_port() can reset them. #if CIRCUITPY_BOARD - reset_board_busses(); + reset_board_buses(); #endif reset_port(); reset_board(); diff --git a/ports/atmel-samd/boards/hallowing_m0_express/board.c b/ports/atmel-samd/boards/hallowing_m0_express/board.c index dfa60a5da6..aace060b01 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/board.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/board.c @@ -71,7 +71,7 @@ uint8_t display_init_sequence[] = { void board_init(void) { displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; - busio_spi_obj_t *spi = common_hal_board_create_spi(); + busio_spi_obj_t *spi = common_hal_board_create_spi(0); common_hal_busio_spi_never_reset(spi); common_hal_displayio_fourwire_construct(bus, spi, diff --git a/ports/atmel-samd/boards/ugame10/board.c b/ports/atmel-samd/boards/ugame10/board.c index b732d259db..d75841be54 100644 --- a/ports/atmel-samd/boards/ugame10/board.c +++ b/ports/atmel-samd/boards/ugame10/board.c @@ -72,7 +72,7 @@ uint8_t display_init_sequence[] = { void board_init(void) { displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; - busio_spi_obj_t *spi = common_hal_board_create_spi(); + busio_spi_obj_t *spi = common_hal_board_create_spi(0); common_hal_displayio_fourwire_construct(bus, spi, &pin_PA09, // Command or data diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 6efc341fce..9e8fb076fb 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -259,23 +259,42 @@ typedef long mp_off_t; #error No *_FLASH_FILESYSTEM set! #endif +// Default board buses. + +#ifndef CIRCUITPY_BOARD_I2C +#if defined(DEFAULT_I2C_BUS_SCL) && defined(DEFAULT_I2C_BUS_SDA) +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = DEFAULT_I2C_BUS_SCL, .sda = DEFAULT_I2C_BUS_SDA}} +#else +#define CIRCUITPY_BOARD_I2C (0) +#endif +#endif + +#ifndef CIRCUITPY_BOARD_SPI +#if defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MOSI) && defined(DEFAULT_SPI_BUS_MISO) +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = DEFAULT_SPI_BUS_SCK, .mosi = DEFAULT_SPI_BUS_MOSI, .miso = DEFAULT_SPI_BUS_MISO}} +#else +#define CIRCUITPY_BOARD_SPI (0) +#endif +#endif + +#ifndef CIRCUITPY_BOARD_UART +#if defined(DEFAULT_UART_BUS_TX) && defined(DEFAULT_UART_BUS_RX) +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = DEFAULT_UART_BUS_TX, .rx = DEFAULT_UART_BUS_RX}} +#define BOARD_UART_ROOT_POINTER mp_obj_t board_uart_bus; +#else +#define CIRCUITPY_BOARD_UART (0) +#define BOARD_UART_ROOT_POINTER +#endif +#else +#define BOARD_UART_ROOT_POINTER mp_obj_t board_uart_bus; +#endif + // These CIRCUITPY_xxx values should all be defined in the *.mk files as being on or off. // So if any are not defined in *.mk, they'll throw an error here. -#if CIRCUITPY_BOARD -#define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL)) -#define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI)) -#define BOARD_UART (defined(DEFAULT_UART_BUS_RX) && defined(DEFAULT_UART_BUS_TX)) -// I2C and SPI are always allocated off the heap. -#if BOARD_UART -#define BOARD_UART_ROOT_POINTER mp_obj_t shared_uart_bus; -#else -#define BOARD_UART_ROOT_POINTER -#endif -#else -#define BOARD_UART_ROOT_POINTER -#endif - #if CIRCUITPY_DISPLAYIO #ifndef CIRCUITPY_DISPLAY_LIMIT #define CIRCUITPY_DISPLAY_LIMIT (1) diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index bb273c61a9..4edd455b44 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -28,12 +28,15 @@ #include "py/runtime.h" #include "shared-bindings/board/__init__.h" -#if BOARD_I2C +#if CIRCUITPY_BOARD_I2C #include "shared-bindings/busio/I2C.h" #endif -#if BOARD_SPI +#if CIRCUITPY_BOARD_SPI #include "shared-bindings/busio/SPI.h" #endif +#if CIRCUITPY_BOARD_UART +#include "shared-bindings/busio/UART.h" +#endif //| """Board specific pin names //| @@ -47,84 +50,85 @@ //| """Board ID string. The unique identifier for the board model in //| circuitpython, as well as on circuitpython.org. //| Example: "hallowing_m0_express".""" -//| -//| def I2C() -> busio.I2C: -//| """Returns the `busio.I2C` object for the board designated SDA and SCL pins. It is a singleton.""" +#if CIRCUITPY_BOARD_I2C || CIRCUITPY_BOARD_SPI || CIRCUITPY_BOARD_UART +STATIC mp_int_t board_get_instance(size_t n_args, const mp_obj_t *args, const mp_int_t bus_in) { + if (n_args == 0) { + return 0; + } + const mp_int_t instance = mp_obj_get_int(args[0]); + if (instance >= bus_in || instance < 0) { + mp_raise_ValueError_varg(translate("No default %q bus"), MP_QSTR_UART); + } + return instance; +} +#endif + +//| def I2C(instance: Optional[int] = 0) -> busio.I2C: +//| """Returns the `busio.I2C` object for the board's designated I2C bus(es). It is a singleton. +//| The object created uses the default parameter values for `busio.I2C`.""" //| ... //| - -#if BOARD_I2C -mp_obj_t board_i2c(void) { - mp_obj_t singleton = common_hal_board_get_i2c(); +#if CIRCUITPY_BOARD_I2C +mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args) { + const mp_int_t instance = board_get_instance(n_args, args, CIRCUITPY_BOARD_I2C); + const mp_obj_t singleton = common_hal_board_get_i2c(instance); if (singleton != NULL && !common_hal_busio_i2c_deinited(singleton)) { return singleton; } - assert_pin_free(DEFAULT_I2C_BUS_SDA); - assert_pin_free(DEFAULT_I2C_BUS_SCL); - return common_hal_board_create_i2c(); + return common_hal_board_create_i2c(instance); } #else -mp_obj_t board_i2c(void) { +mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_I2C); return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); +MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_i2c_obj, 0, 1, board_i2c); - -//| def SPI() -> busio.SPI: -//| """Returns the `busio.SPI` object for the board designated SCK, MOSI and MISO pins. It is a -//| singleton.""" +//| def SPI(instance: Optional[int] = 0) -> busio.SPI: +//| """Returns the `busio.SPI` object for the board's designated SPI bus(es). It is a singleton. +//| The object created uses the default parameter values for `busio.SPI`.""" //| ... //| -#if BOARD_SPI -mp_obj_t board_spi(void) { - mp_obj_t singleton = common_hal_board_get_spi(); +#if CIRCUITPY_BOARD_SPI +mp_obj_t board_spi(size_t n_args, const mp_obj_t *args) { + const mp_int_t instance = board_get_instance(n_args, args, CIRCUITPY_BOARD_SPI); + const mp_obj_t singleton = common_hal_board_get_spi(instance); if (singleton != NULL && !common_hal_busio_spi_deinited(singleton)) { return singleton; } - assert_pin_free(DEFAULT_SPI_BUS_SCK); - assert_pin_free(DEFAULT_SPI_BUS_MOSI); - assert_pin_free(DEFAULT_SPI_BUS_MISO); - return common_hal_board_create_spi(); + return common_hal_board_create_spi(instance); } #else -mp_obj_t board_spi(void) { +mp_obj_t board_spi(size_t n_args, const mp_obj_t *args) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_SPI); return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi); +MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_spi_obj, 0, 1, board_spi); -//| def UART() -> busio.UART: -//| """Returns the `busio.UART` object for the board designated TX and RX pins. It is a singleton. -//| -//| The object created uses the default parameter values for `busio.UART`. If you need to set -//| parameters that are not changeable after creation, such as ``receiver_buffer_size``, -//| do not use `board.UART()`; instead create a `busio.UART` object explicitly with the -//| desired parameters.""" +//| def UART(instance: Optional[int] = 0) -> busio.UART: +//| """Returns the `busio.UART` object for the board's designated UART bus(es). It is a singleton. +//| The object created uses the default parameter values for `busio.UART`.""" //| ... //| -#if BOARD_UART -mp_obj_t board_uart(void) { - mp_obj_t singleton = common_hal_board_get_uart(); - if (singleton != NULL) { +#if CIRCUITPY_BOARD_UART +mp_obj_t board_uart(size_t n_args, const mp_obj_t *args) { + const mp_int_t instance = board_get_instance(n_args, args, CIRCUITPY_BOARD_UART); + const mp_obj_t singleton = common_hal_board_get_uart(instance); + if (singleton != NULL && !common_hal_busio_uart_deinited(singleton)) { return singleton; } - - assert_pin_free(DEFAULT_UART_BUS_RX); - assert_pin_free(DEFAULT_UART_BUS_TX); - - return common_hal_board_create_uart(); + return common_hal_board_create_uart(instance); } #else -mp_obj_t board_uart(void) { +mp_obj_t board_uart(size_t n_args, const mp_obj_t *args) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_UART); return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart); +MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_uart_obj, 0, 1, board_uart); const mp_obj_module_t board_module = { .base = { &mp_type_module }, diff --git a/shared-bindings/board/__init__.h b/shared-bindings/board/__init__.h index bc4d7df61f..78428c46e4 100644 --- a/shared-bindings/board/__init__.h +++ b/shared-bindings/board/__init__.h @@ -35,21 +35,30 @@ extern const mp_obj_dict_t board_module_globals; STATIC const MP_DEFINE_STR_OBJ(board_module_id_obj, CIRCUITPY_BOARD_ID); -mp_obj_t common_hal_board_get_i2c(void); -mp_obj_t common_hal_board_create_i2c(void); -MP_DECLARE_CONST_FUN_OBJ_0(board_i2c_obj); +bool common_hal_board_is_i2c(mp_obj_t obj); +mp_obj_t common_hal_board_get_i2c(const mp_int_t insatnce); +mp_obj_t common_hal_board_create_i2c(const mp_int_t instance); +mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args); +MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_i2c_obj); -mp_obj_t common_hal_board_get_spi(void); -mp_obj_t common_hal_board_create_spi(void); -MP_DECLARE_CONST_FUN_OBJ_0(board_spi_obj); +bool common_hal_board_is_spi(mp_obj_t obj); +mp_obj_t common_hal_board_get_spi(const mp_int_t insatnce); +mp_obj_t common_hal_board_create_spi(const mp_int_t instance); +mp_obj_t board_spi(size_t n_args, const mp_obj_t *args); +MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_spi_obj); -mp_obj_t common_hal_board_get_uart(void); -mp_obj_t common_hal_board_create_uart(void); -MP_DECLARE_CONST_FUN_OBJ_0(board_uart_obj); +bool common_hal_board_is_uart(mp_obj_t obj); +mp_obj_t common_hal_board_get_uart(const mp_int_t insatnce); +mp_obj_t common_hal_board_create_uart(const mp_int_t instance); +mp_obj_t board_uart(size_t n_args, const mp_obj_t *args); +MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_uart_obj); -mp_obj_t board_i2c(void); -mp_obj_t board_spi(void); -mp_obj_t board_uart(void); +#define CIRCUITPY_BOARD_BUS_SINGLETON(name, bus, instance) \ + STATIC mp_obj_t board_##name(void) { \ + const mp_obj_t inst = mp_obj_new_int_from_uint(instance); \ + return board_##bus(1, &inst); \ + } \ + MP_DEFINE_CONST_FUN_OBJ_0(board_##name##_obj, board_##name); #define CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS \ { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_board) }, \ diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c index 19d9e7ece0..f062531978 100644 --- a/shared-module/board/__init__.c +++ b/shared-module/board/__init__.c @@ -46,141 +46,174 @@ #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" #endif -#if BOARD_I2C +#if CIRCUITPY_BOARD_I2C // Statically allocate the I2C object so it can live past the end of the heap and into the next VM. // That way it can be used by built-in I2CDisplay displays and be accessible through board.I2C(). -STATIC busio_i2c_obj_t i2c_obj; -STATIC mp_obj_t i2c_singleton = NULL; -mp_obj_t common_hal_board_get_i2c(void) { - return i2c_singleton; +typedef struct { + const mcu_pin_obj_t *scl; + const mcu_pin_obj_t *sda; +} board_i2c_pin_t; + +static const board_i2c_pin_t i2c_pin[CIRCUITPY_BOARD_I2C] = CIRCUITPY_BOARD_I2C_PIN; +static busio_i2c_obj_t i2c_obj[CIRCUITPY_BOARD_I2C]; + +bool common_hal_board_is_i2c(mp_obj_t obj) { + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_I2C; instance++) { + if (obj == &i2c_obj[instance]) { + return true; + } + } + return false; } -mp_obj_t common_hal_board_create_i2c(void) { - // All callers have either already verified this or come so early that it can't be otherwise. - assert(i2c_singleton == NULL || common_hal_busio_i2c_deinited(i2c_singleton)); - busio_i2c_obj_t *self = &i2c_obj; +mp_obj_t common_hal_board_get_i2c(const mp_int_t instance) { + return &i2c_obj[instance]; +} + +mp_obj_t common_hal_board_create_i2c(const mp_int_t instance) { + busio_i2c_obj_t *self = &i2c_obj[instance]; self->base.type = &busio_i2c_type; - common_hal_busio_i2c_construct(self, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 100000, 255); - i2c_singleton = (mp_obj_t)self; - return i2c_singleton; + assert_pin_free(i2c_pin[instance].scl); + assert_pin_free(i2c_pin[instance].sda); + + common_hal_busio_i2c_construct(self, i2c_pin[instance].scl, i2c_pin[instance].sda, 100000, 255); + + return &i2c_obj[instance]; } #endif - -#if BOARD_SPI +#if CIRCUITPY_BOARD_SPI // Statically allocate the SPI object so it can live past the end of the heap and into the next VM. // That way it can be used by built-in FourWire displays and be accessible through board.SPI(). -STATIC busio_spi_obj_t spi_obj; -STATIC mp_obj_t spi_singleton = NULL; -mp_obj_t common_hal_board_get_spi(void) { - return spi_singleton; +typedef struct { + const mcu_pin_obj_t *clock; + const mcu_pin_obj_t *mosi; + const mcu_pin_obj_t *miso; +} board_spi_pin_t; + +static const board_spi_pin_t spi_pin[CIRCUITPY_BOARD_SPI] = CIRCUITPY_BOARD_SPI_PIN; +static busio_spi_obj_t spi_obj[CIRCUITPY_BOARD_SPI]; + +bool common_hal_board_is_spi(mp_obj_t obj) { + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_SPI; instance++) { + if (obj == &spi_obj[instance]) { + return true; + } + } + return false; } -mp_obj_t common_hal_board_create_spi(void) { - // All callers have either already verified this or come so early that it can't be otherwise. - assert(spi_singleton == NULL || common_hal_busio_spi_deinited(spi_singleton)); - busio_spi_obj_t *self = &spi_obj; +mp_obj_t common_hal_board_get_spi(const mp_int_t instance) { + return &spi_obj[instance]; +} + +mp_obj_t common_hal_board_create_spi(const mp_int_t instance) { + busio_spi_obj_t *self = &spi_obj[instance]; self->base.type = &busio_spi_type; - const mcu_pin_obj_t *clock = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_SCK); - const mcu_pin_obj_t *mosi = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MOSI); - const mcu_pin_obj_t *miso = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MISO); - common_hal_busio_spi_construct(self, clock, mosi, miso); - spi_singleton = (mp_obj_t)self; - return spi_singleton; + assert_pin_free(spi_pin[instance].clock); + assert_pin_free(spi_pin[instance].mosi); + assert_pin_free(spi_pin[instance].miso); + + common_hal_busio_spi_construct(self, spi_pin[instance].clock, spi_pin[instance].mosi, spi_pin[instance].miso); + + return &spi_obj[instance]; } #endif -#if BOARD_UART -mp_obj_t common_hal_board_get_uart(void) { - return MP_STATE_VM(shared_uart_bus); +#if CIRCUITPY_BOARD_UART + +typedef struct { + const mcu_pin_obj_t *tx; + const mcu_pin_obj_t *rx; +} board_uart_pin_t; + +static const board_uart_pin_t uart_pin[CIRCUITPY_BOARD_UART] = CIRCUITPY_BOARD_UART_PIN; +static busio_uart_obj_t uart_obj[CIRCUITPY_BOARD_UART]; + +bool common_hal_board_is_uart(mp_obj_t obj) { + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_UART; instance++) { + if (obj == &uart_obj[instance]) { + return true; + } + } + return false; } -mp_obj_t common_hal_board_create_uart(void) { - busio_uart_obj_t *self = m_new_ll_obj(busio_uart_obj_t); +mp_obj_t common_hal_board_get_uart(const mp_int_t instance) { + return &uart_obj[instance]; +} + +mp_obj_t common_hal_board_create_uart(const mp_int_t instance) { + busio_uart_obj_t *self = &uart_obj[instance]; self->base.type = &busio_uart_type; - const mcu_pin_obj_t *rx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RX); - const mcu_pin_obj_t *tx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_TX); - #ifdef DEFAULT_UART_BUS_RTS - const mcu_pin_obj_t *rts = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RTS); - #else - const mcu_pin_obj_t *rts = NULL; - #endif - #ifdef DEFAULT_UART_BUS_CTS - const mcu_pin_obj_t *cts = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_CTS); - #else - const mcu_pin_obj_t *cts = NULL; - #endif - #ifdef DEFAULT_UART_IS_RS485 - const mcu_pin_obj_t *rs485_dir = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RS485DIR); - #ifdef DEFAULT_UART_RS485_INVERT - const bool rs485_invert = true; - #else - const bool rs485_invert = false; - #endif - #else - const mcu_pin_obj_t *rs485_dir = NULL; - const bool rs485_invert = false; - #endif + MP_STATE_VM(board_uart_bus) = &uart_obj; - common_hal_busio_uart_construct(self, tx, rx, rts, cts, rs485_dir, rs485_invert, - 9600, 8, BUSIO_UART_PARITY_NONE, 1, 1.0f, 64, NULL, false); - MP_STATE_VM(shared_uart_bus) = MP_OBJ_FROM_PTR(self); - return MP_STATE_VM(shared_uart_bus); + assert_pin_free(uart_pin[instance].tx); + assert_pin_free(uart_pin[instance].rx); + + common_hal_busio_uart_construct(self, uart_pin[instance].tx, uart_pin[instance].rx, + NULL, NULL, NULL, false, 9600, 8, BUSIO_UART_PARITY_NONE, 1, 1.0f, 64, NULL, false); + + return &uart_obj[instance]; } #endif -void reset_board_busses(void) { - #if BOARD_I2C - bool display_using_i2c = false; - #if CIRCUITPY_DISPLAYIO - for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].bus_base.type == &displayio_i2cdisplay_type && displays[i].i2cdisplay_bus.bus == i2c_singleton) { - display_using_i2c = true; - break; - } - } - #endif - // make sure I2C lock is not held over a soft reset - if (i2c_singleton != NULL) { - common_hal_busio_i2c_unlock(i2c_singleton); - if (!display_using_i2c) { - common_hal_busio_i2c_deinit(i2c_singleton); - i2c_singleton = NULL; - } - } - #endif - #if BOARD_SPI - bool display_using_spi = false; - #if CIRCUITPY_DISPLAYIO - for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - mp_const_obj_t bus_type = displays[i].bus_base.type; - if (bus_type == &displayio_fourwire_type && displays[i].fourwire_bus.bus == spi_singleton) { - display_using_spi = true; - break; - } - #if CIRCUITPY_SHARPDISPLAY - if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type && displays[i].sharpdisplay.bus == spi_singleton) { - display_using_spi = true; - break; +void reset_board_buses(void) { + #if CIRCUITPY_BOARD_I2C + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_I2C; instance++) { + bool display_using_i2c = false; + #if CIRCUITPY_DISPLAYIO + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].bus_base.type == &displayio_i2cdisplay_type && displays[i].i2cdisplay_bus.bus == &i2c_obj[instance]) { + display_using_i2c = true; + break; + } } #endif - } - #endif - // make sure SPI lock is not held over a soft reset - if (spi_singleton != NULL) { - common_hal_busio_spi_unlock(spi_singleton); - if (!display_using_spi) { - common_hal_busio_spi_deinit(spi_singleton); - spi_singleton = NULL; + if (!common_hal_busio_i2c_deinited(&i2c_obj[instance])) { + // make sure I2C lock is not held over a soft reset + common_hal_busio_i2c_unlock(&i2c_obj[instance]); + if (!display_using_i2c) { + common_hal_busio_i2c_deinit(&i2c_obj[instance]); + } } } #endif - #if BOARD_UART - MP_STATE_VM(shared_uart_bus) = NULL; + #if CIRCUITPY_BOARD_SPI + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_SPI; instance++) { + bool display_using_spi = false; + #if CIRCUITPY_DISPLAYIO + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + mp_const_obj_t bus_type = displays[i].bus_base.type; + if (bus_type == &displayio_fourwire_type && displays[i].fourwire_bus.bus == &spi_obj[instance]) { + display_using_spi = true; + break; + } + #if CIRCUITPY_SHARPDISPLAY + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type && displays[i].sharpdisplay.bus == &spi_obj[instance]) { + display_using_spi = true; + break; + } + #endif + } + #endif + if (!common_hal_busio_spi_deinited(&spi_obj[instance])) { + // make sure SPI lock is not held over a soft reset + common_hal_busio_spi_unlock(&spi_obj[instance]); + if (!display_using_spi) { + common_hal_busio_spi_deinit(&spi_obj[instance]); + } + } + } + #endif + #if CIRCUITPY_BOARD_UART + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_UART; instance++) { + common_hal_busio_uart_deinit(&uart_obj[instance]); + } #endif } diff --git a/shared-module/board/__init__.h b/shared-module/board/__init__.h index f7eecd4170..8b3723bdda 100644 --- a/shared-module/board/__init__.h +++ b/shared-module/board/__init__.h @@ -27,6 +27,6 @@ #ifndef MICROPY_INCLUDED_SHARED_MODULE_BOARD__INIT__H #define MICROPY_INCLUDED_SHARED_MODULE_BOARD__INIT__H -void reset_board_busses(void); +void reset_board_buses(void); #endif // MICROPY_INCLUDED_SHARED_MODULE_BOARD__INIT__H diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index ff085d45ef..6fa3aac15c 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -24,7 +24,6 @@ * THE SOFTWARE. */ - #include #include "shared-module/displayio/__init__.h" @@ -169,11 +168,11 @@ void reset_displays(void) { if (((size_t)fourwire->bus) < ((size_t)&displays) || ((size_t)fourwire->bus) > ((size_t)&displays + CIRCUITPY_DISPLAY_LIMIT)) { busio_spi_obj_t *original_spi = fourwire->bus; - #if BOARD_SPI - // We don't need to move original_spi if it is the board.SPI object because it is + #if CIRCUITPY_BOARD_SPI + // We don't need to move original_spi if it is a board.SPI object because it is // statically allocated already. (Doing so would also make it impossible to reference in // a subsequent VM run.) - if (original_spi == common_hal_board_get_spi()) { + if (common_hal_board_is_spi(original_spi)) { continue; } #endif @@ -197,11 +196,11 @@ void reset_displays(void) { if (((size_t)i2c->bus) < ((size_t)&displays) || ((size_t)i2c->bus) > ((size_t)&displays + CIRCUITPY_DISPLAY_LIMIT)) { busio_i2c_obj_t *original_i2c = i2c->bus; - #if BOARD_I2C - // We don't need to move original_i2c if it is the board.I2C object because it is + #if CIRCUITPY_BOARD_I2C + // We don't need to move original_i2c if it is a board.I2C object because it is // statically allocated already. (Doing so would also make it impossible to reference in // a subsequent VM run.) - if (original_i2c == common_hal_board_get_i2c()) { + if (common_hal_board_is_i2c(original_i2c)) { continue; } #endif @@ -230,11 +229,11 @@ void reset_displays(void) { if (((uint32_t)is31->i2c) < ((uint32_t)&displays) || ((uint32_t)is31->i2c) > ((uint32_t)&displays + CIRCUITPY_DISPLAY_LIMIT)) { busio_i2c_obj_t *original_i2c = is31->i2c; - #if BOARD_I2C + #if CIRCUITPY_BOARD_I2C // We don't need to move original_i2c if it is the board.I2C object because it is // statically allocated already. (Doing so would also make it impossible to reference in // a subsequent VM run.) - if (original_i2c == common_hal_board_get_i2c()) { + if (common_hal_board_is_i2c(original_i2c)) { continue; } #endif diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c index ba0e0f2d69..285abb1dbe 100644 --- a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c +++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c @@ -71,8 +71,8 @@ STATIC bool common_hal_sharpdisplay_framebuffer_get_pixels_in_byte_share_row(sha void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *self) { if (self->bus != &self->inline_bus - #if BOARD_SPI - && self->bus != common_hal_board_get_spi() + #if CIRCUITPY_BOARD_SPI + && !common_hal_board_is_spi(self->bus) #endif ) { memcpy(&self->inline_bus, self->bus, sizeof(busio_spi_obj_t)); From 5939c11406f9332a2743e43af8e201716ab6ac93 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Sat, 11 Dec 2021 22:11:22 +0530 Subject: [PATCH 053/258] add secondary i2c singleton on adafruit_qtpy_rp2040 --- .../boards/adafruit_qtpy_rp2040/mpconfigboard.h | 14 +++++++------- .../raspberrypi/boards/adafruit_qtpy_rp2040/pins.c | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h index 5d3795dd5d..f606ab22c4 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h @@ -4,12 +4,12 @@ #define MICROPY_HW_NEOPIXEL (&pin_GPIO12) #define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO11) -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO25) -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO24) +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO25, .sda = &pin_GPIO24}, \ + {.scl = &pin_GPIO23, .sda = &pin_GPIO22}} -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO6) -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4) +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO6, .mosi = &pin_GPIO3, .miso = &pin_GPIO4}} -#define DEFAULT_UART_BUS_RX (&pin_GPIO5) -#define DEFAULT_UART_BUS_TX (&pin_GPIO20) +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO20, .rx = &pin_GPIO5}} diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c index 0d6835f48b..082807f577 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c @@ -1,5 +1,7 @@ #include "shared-bindings/board/__init__.h" +CIRCUITPY_BOARD_BUS_SINGLETON(stemma_i2c, i2c, 1) + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS @@ -47,5 +49,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From c3a90e38f761f3b921f25bb8c74c9ee42ff287ae Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 11 Dec 2021 18:02:55 -0500 Subject: [PATCH 054/258] remove whitespace --- tools/ci_set_matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index d031224914..b25d81ac95 100644 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -85,11 +85,11 @@ def set_boards_to_build(build_all): if port != "unix": boards_to_build.update(port_to_boards[port]) continue - + # Check the ignore list to see if the file isn't used on board builds. if p in IGNORE: continue - + # Boards don't run tests so ignore those as well. if p.startswith("tests"): continue From 17b53c7ebe03c08c23ae3c1a774ebfdba25abc31 Mon Sep 17 00:00:00 2001 From: Kenny Date: Sun, 12 Dec 2021 19:50:00 -0800 Subject: [PATCH 055/258] vectorio: Add width and height properties to rectangle Closes: https://github.com/adafruit/circuitpython/issues/5695 --- locale/circuitpython.pot | 7 +++- shared-bindings/vectorio/Rectangle.c | 47 ++++++++++++++++++++++++++ shared-bindings/vectorio/Rectangle.h | 8 +++++ shared-bindings/vectorio/VectorShape.c | 1 + shared-module/vectorio/Rectangle.c | 34 +++++++++++++++++++ shared-module/vectorio/Rectangle.h | 2 ++ 6 files changed, 98 insertions(+), 1 deletion(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c51d074ad0..59a8dcd1b1 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -2726,6 +2726,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -3957,7 +3961,9 @@ msgstr "" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3972,7 +3978,6 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index 287ae9d408..dc7415e0ba 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -60,6 +60,51 @@ STATIC const vectorio_draw_protocol_t rectangle_draw_protocol = { .draw_protocol_impl = &vectorio_vector_shape_draw_protocol_impl }; +//| width : int +//| """The width of the rectangle in pixels.""" +//| +STATIC mp_obj_t vectorio_rectangle_obj_get_width(mp_obj_t self_in) { + vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in); + return mp_obj_new_int(common_hal_vectorio_rectangle_get_width(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(vectorio_rectangle_get_width_obj, vectorio_rectangle_obj_get_width); + +STATIC mp_obj_t vectorio_rectangle_obj_set_width(mp_obj_t self_in, mp_obj_t width) { + vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in); + common_hal_vectorio_rectangle_set_width(self, mp_obj_get_int(width)); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(vectorio_rectangle_set_width_obj, vectorio_rectangle_obj_set_width); + +const mp_obj_property_t vectorio_rectangle_width_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&vectorio_rectangle_get_width_obj, + (mp_obj_t)&vectorio_rectangle_set_width_obj, + MP_ROM_NONE}, +}; + +//| height : int +//| """The height of the rectangle in pixels.""" +//| +STATIC mp_obj_t vectorio_rectangle_obj_get_height(mp_obj_t self_in) { + vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in); + return mp_obj_new_int(common_hal_vectorio_rectangle_get_height(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(vectorio_rectangle_get_height_obj, vectorio_rectangle_obj_get_height); + +STATIC mp_obj_t vectorio_rectangle_obj_set_height(mp_obj_t self_in, mp_obj_t height) { + vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in); + common_hal_vectorio_rectangle_set_height(self, mp_obj_get_int(height)); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(vectorio_rectangle_set_height_obj, vectorio_rectangle_obj_set_height); + +const mp_obj_property_t vectorio_rectangle_height_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&vectorio_rectangle_get_height_obj, + (mp_obj_t)&vectorio_rectangle_set_height_obj, + MP_ROM_NONE}, +}; // Documentation for properties inherited from VectorShape. @@ -80,6 +125,8 @@ STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = { // Properties { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&vectorio_rectangle_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&vectorio_rectangle_height_obj) }, { MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) }, { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; diff --git a/shared-bindings/vectorio/Rectangle.h b/shared-bindings/vectorio/Rectangle.h index 24b103c26e..d50b811624 100644 --- a/shared-bindings/vectorio/Rectangle.h +++ b/shared-bindings/vectorio/Rectangle.h @@ -3,10 +3,12 @@ #include "shared-module/vectorio/Rectangle.h" #include "shared-module/displayio/area.h" +#include "shared-module/vectorio/__init__.h" extern const mp_obj_type_t vectorio_rectangle_type; void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height); +void common_hal_vectorio_rectangle_set_on_dirty(vectorio_rectangle_t *self, vectorio_event_t on_dirty); uint32_t common_hal_vectorio_rectangle_get_pixel(void *rectangle, int16_t x, int16_t y); @@ -14,4 +16,10 @@ void common_hal_vectorio_rectangle_get_area(void *rectangle, displayio_area_t *o mp_obj_t common_hal_vectorio_rectangle_get_draw_protocol(void *rectangle); +int16_t common_hal_vectorio_rectangle_get_width(void *obj); +void common_hal_vectorio_rectangle_set_width(void *obj, int16_t width); + +int16_t common_hal_vectorio_rectangle_get_height(void *obj); +void common_hal_vectorio_rectangle_set_height(void *obj, int16_t height); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index d5d12ec1cd..3f8c105d0e 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -62,6 +62,7 @@ mp_obj_t vectorio_vector_shape_make_new(const mp_obj_t shape, const mp_obj_t pix if (mp_obj_is_type(shape, &vectorio_polygon_type)) { common_hal_vectorio_polygon_set_on_dirty(self->ishape.shape, on_dirty); } else if (mp_obj_is_type(shape, &vectorio_rectangle_type)) { + common_hal_vectorio_rectangle_set_on_dirty(self->ishape.shape, on_dirty); } else if (mp_obj_is_type(shape, &vectorio_circle_type)) { common_hal_vectorio_circle_set_on_dirty(self->ishape.shape, on_dirty); } else { diff --git a/shared-module/vectorio/Rectangle.c b/shared-module/vectorio/Rectangle.c index bcaa0092f8..9092a2e078 100644 --- a/shared-module/vectorio/Rectangle.c +++ b/shared-module/vectorio/Rectangle.c @@ -1,7 +1,9 @@ +#include "shared-module/vectorio/__init__.h" #include "shared-bindings/vectorio/Rectangle.h" #include "shared-module/displayio/area.h" #include "py/runtime.h" +#include "stdlib.h" void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height) { @@ -9,6 +11,12 @@ void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_ self->height = height; } +void common_hal_vectorio_rectangle_set_on_dirty(vectorio_rectangle_t *self, vectorio_event_t on_dirty) { + if (self->on_dirty.obj != NULL) { + mp_raise_TypeError(translate("can only be registered in one parent")); + } + self->on_dirty = on_dirty; +} uint32_t common_hal_vectorio_rectangle_get_pixel(void *obj, int16_t x, int16_t y) { vectorio_rectangle_t *self = obj; @@ -32,3 +40,29 @@ mp_obj_t common_hal_vectorio_rectangle_get_draw_protocol(void *rectangle) { vectorio_rectangle_t *self = rectangle; return self->draw_protocol_instance; } + +int16_t common_hal_vectorio_rectangle_get_width(void *obj) { + vectorio_rectangle_t *self = obj; + return self->width; +} + +void common_hal_vectorio_rectangle_set_width(void *obj, int16_t width) { + vectorio_rectangle_t *self = obj; + self->width = abs(width); + if (self->on_dirty.obj != NULL) { + self->on_dirty.event(self->on_dirty.obj); + } +} + +int16_t common_hal_vectorio_rectangle_get_height(void *obj) { + vectorio_rectangle_t *self = obj; + return self->height; +} + +void common_hal_vectorio_rectangle_set_height(void *obj, int16_t height) { + vectorio_rectangle_t *self = obj; + self->height = abs(height); + if (self->on_dirty.obj != NULL) { + self->on_dirty.event(self->on_dirty.obj); + } +} diff --git a/shared-module/vectorio/Rectangle.h b/shared-module/vectorio/Rectangle.h index e3cfbb2676..ec6d2107be 100644 --- a/shared-module/vectorio/Rectangle.h +++ b/shared-module/vectorio/Rectangle.h @@ -4,11 +4,13 @@ #include #include "py/obj.h" +#include "shared-module/vectorio/__init__.h" typedef struct { mp_obj_base_t base; uint16_t width; uint16_t height; + vectorio_event_t on_dirty; mp_obj_t draw_protocol_instance; } vectorio_rectangle_t; From 8af8e996f3769d97dd0ce74c1f14f59d2f7fba25 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 12 Dec 2021 05:07:21 +0000 Subject: [PATCH 056/258] Translated using Weblate (French) Currently translated at 100.0% (1028 of 1028 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index bac854ed73..9bfc2edbd5 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-11-26 13:46+0000\n" -"Last-Translator: Maxime Leroy \n" +"PO-Revision-Date: 2021-12-13 05:53+0000\n" +"Last-Translator: Jeff Epler \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -3566,7 +3566,6 @@ msgid "invalid syntax for number" msgstr "syntaxe invalide pour un nombre" #: py/objexcept.c -#, fuzzy msgid "invalid traceback" msgstr "traceback invalide" From c4be8a5c945250b2df954f41632526b020ba6bbd Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 13 Dec 2021 09:44:08 -0600 Subject: [PATCH 057/258] tilegrid size properties --- shared-bindings/displayio/TileGrid.c | 64 ++++++++++++++++++++++++++++ shared-bindings/displayio/TileGrid.h | 3 ++ shared-module/displayio/TileGrid.c | 8 ++++ 3 files changed, 75 insertions(+) diff --git a/shared-bindings/displayio/TileGrid.c b/shared-bindings/displayio/TileGrid.c index f031842e3b..eebb892ef0 100644 --- a/shared-bindings/displayio/TileGrid.c +++ b/shared-bindings/displayio/TileGrid.c @@ -215,6 +215,66 @@ const mp_obj_property_t displayio_tilegrid_y_obj = { MP_ROM_NONE}, }; +//| width: int +//| """Width of the tilegrid in tiles.""" +//| +STATIC mp_obj_t displayio_tilegrid_obj_get_width(mp_obj_t self_in) { + displayio_tilegrid_t *self = native_tilegrid(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_width(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_width_obj, displayio_tilegrid_obj_get_width); + +const mp_obj_property_t displayio_tilegrid_width_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_width_obj, + MP_ROM_NONE}, +}; + +//| height: int +//| """Height of the tilegrid in tiles.""" +//| +STATIC mp_obj_t displayio_tilegrid_obj_get_height(mp_obj_t self_in) { +displayio_tilegrid_t *self = native_tilegrid(self_in); +return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_height(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_height_obj, displayio_tilegrid_obj_get_height); + +const mp_obj_property_t displayio_tilegrid_height_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_height_obj, + MP_ROM_NONE}, +}; + +//| tile_width: int +//| """Width of a single tile in pixels.""" +//| +STATIC mp_obj_t displayio_tilegrid_obj_get_tile_width(mp_obj_t self_in) { +displayio_tilegrid_t *self = native_tilegrid(self_in); +return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_tile_width(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_width_obj, displayio_tilegrid_obj_get_tile_width); + +const mp_obj_property_t displayio_tilegrid_tile_width_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_width_obj, + MP_ROM_NONE}, +}; + +//| tile_height: int +//| """Height of a single tile in pixels.""" +//| +STATIC mp_obj_t displayio_tilegrid_obj_get_tile_height(mp_obj_t self_in) { +displayio_tilegrid_t *self = native_tilegrid(self_in); +return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_tile_height(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_height_obj, displayio_tilegrid_obj_get_tile_height); + +const mp_obj_property_t displayio_tilegrid_tile_height_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_height_obj, + MP_ROM_NONE}, +}; + //| flip_x: bool //| """If true, the left edge rendered will be the right edge of the right-most tile.""" //| @@ -385,6 +445,10 @@ STATIC const mp_rom_map_elem_t displayio_tilegrid_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_hidden), MP_ROM_PTR(&displayio_tilegrid_hidden_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&displayio_tilegrid_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&displayio_tilegrid_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_tilegrid_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_tilegrid_height_obj) }, + { MP_ROM_QSTR(MP_QSTR_tile_width), MP_ROM_PTR(&displayio_tilegrid_tile_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_tile_height), MP_ROM_PTR(&displayio_tilegrid_tile_height_obj) }, { MP_ROM_QSTR(MP_QSTR_flip_x), MP_ROM_PTR(&displayio_tilegrid_flip_x_obj) }, { MP_ROM_QSTR(MP_QSTR_flip_y), MP_ROM_PTR(&displayio_tilegrid_flip_y_obj) }, { MP_ROM_QSTR(MP_QSTR_transpose_xy), MP_ROM_PTR(&displayio_tilegrid_transpose_xy_obj) }, diff --git a/shared-bindings/displayio/TileGrid.h b/shared-bindings/displayio/TileGrid.h index 7c8d8a605e..2cf0be501c 100644 --- a/shared-bindings/displayio/TileGrid.h +++ b/shared-bindings/displayio/TileGrid.h @@ -56,6 +56,9 @@ void common_hal_displayio_tilegrid_set_transpose_xy(displayio_tilegrid_t *self, uint16_t common_hal_displayio_tilegrid_get_width(displayio_tilegrid_t *self); uint16_t common_hal_displayio_tilegrid_get_height(displayio_tilegrid_t *self); +uint16_t common_hal_displayio_tilegrid_get_tile_width(displayio_tilegrid_t *self); +uint16_t common_hal_displayio_tilegrid_get_tile_height(displayio_tilegrid_t *self); + uint8_t common_hal_displayio_tilegrid_get_tile(displayio_tilegrid_t *self, uint16_t x, uint16_t y); void common_hal_displayio_tilegrid_set_tile(displayio_tilegrid_t *self, uint16_t x, uint16_t y, uint8_t tile_index); diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index dbf2ce545b..fd0547c426 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -229,6 +229,14 @@ uint16_t common_hal_displayio_tilegrid_get_height(displayio_tilegrid_t *self) { return self->height_in_tiles; } +uint16_t common_hal_displayio_tilegrid_get_tile_width(displayio_tilegrid_t *self) { + return self->tile_width; +} + +uint16_t common_hal_displayio_tilegrid_get_tile_height(displayio_tilegrid_t *self) { + return self->tile_height; +} + uint8_t common_hal_displayio_tilegrid_get_tile(displayio_tilegrid_t *self, uint16_t x, uint16_t y) { uint8_t *tiles = self->tiles; if (self->inline_tiles) { From 463d94475b3f887ba1ec6646920b368c770cdebd Mon Sep 17 00:00:00 2001 From: Nathan Young <77929198+NathanY3G@users.noreply.github.com> Date: Mon, 13 Dec 2021 17:37:02 +0100 Subject: [PATCH 058/258] Use correct PID for SparkFun Thing Plus - STM32 This value was kindly provided by brhoff720. --- ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk index a2b982e05a..9e363cbb47 100644 --- a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk @@ -1,7 +1,5 @@ USB_VID = 0X1B4F - -# TODO: Replace the Product ID below with the official value once known. -USB_PID = 0x0027 # Same PID as the SparkFun MicroMod STM32 +USB_PID = 0x0028 USB_PRODUCT = "SparkFun Thing Plus - STM32" USB_MANUFACTURER = "SparkFun Electronics" From ffd41cf2b70c4363168195a323b9ed53044f44c4 Mon Sep 17 00:00:00 2001 From: Nathan Young <77929198+NathanY3G@users.noreply.github.com> Date: Mon, 13 Dec 2021 18:01:07 +0100 Subject: [PATCH 059/258] Updated USB product name to remove duplication Output from lsusb now reads: SparkFun Electronics Thing Plus - STM32 --- ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk index 9e363cbb47..62d0136be5 100644 --- a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0X1B4F USB_PID = 0x0028 -USB_PRODUCT = "SparkFun Thing Plus - STM32" +USB_PRODUCT = "Thing Plus - STM32" USB_MANUFACTURER = "SparkFun Electronics" SPI_FLASH_FILESYSTEM = 1 From a3c8760d4118f51fb38808e6c2b18a6161eaac0a Mon Sep 17 00:00:00 2001 From: Tim Hawes Date: Sat, 27 Nov 2021 12:40:55 +0000 Subject: [PATCH 060/258] Fix to error checking in espressif SSLSocket --- ports/espressif/common-hal/ssl/SSLSocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/ssl/SSLSocket.c b/ports/espressif/common-hal/ssl/SSLSocket.c index f9e13029cc..b1d0720be1 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.c +++ b/ports/espressif/common-hal/ssl/SSLSocket.c @@ -66,7 +66,7 @@ void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self, if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { mp_raise_espidf_MemoryError(); - } else if (ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) { + } else if (err == ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) { mp_raise_OSError_msg_varg(translate("Failed SSL handshake")); } else { mp_raise_OSError_msg_varg(translate("Unhandled ESP TLS error %d %d %x %d"), esp_tls_code, flags, err, result); From 9119a32a5d7b3ee3c5e723601ccb8b4ef6696a76 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Mon, 13 Dec 2021 13:31:00 -0600 Subject: [PATCH 061/258] fixed row0 and added encoder pins --- ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c | 6 +++--- ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c | 6 +++--- ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c | 6 +++--- ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c index c904b1e29f..adf97a0f55 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c @@ -33,9 +33,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c index c904b1e29f..adf97a0f55 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c @@ -33,9 +33,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c index c904b1e29f..adf97a0f55 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c @@ -33,9 +33,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c index c904b1e29f..adf97a0f55 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c @@ -33,9 +33,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, From 8ef24afe7a2274c14b6fa9032af52033ea5d478a Mon Sep 17 00:00:00 2001 From: Tim Hawes Date: Sat, 27 Nov 2021 12:43:29 +0000 Subject: [PATCH 062/258] Documentation fix for SSLContext.wrap_socket --- shared-bindings/ssl/SSLContext.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c index 885a156edd..c41dfa0019 100644 --- a/shared-bindings/ssl/SSLContext.c +++ b/shared-bindings/ssl/SSLContext.c @@ -51,10 +51,9 @@ STATIC mp_obj_t ssl_sslcontext_make_new(const mp_obj_type_t *type, size_t n_args return MP_OBJ_FROM_PTR(s); } -//| def wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> ssl.SSLSocket: -//| """Wraps the socket into a socket-compatible class that handles SSL negotiation. -//| The socket must be of type SOCK_STREAM.""" -//| ... +//| def wrap_socket(self, sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> ssl.SSLSocket: +//| """Wraps the socket into a socket-compatible class that handles SSL negotiation. +//| The socket must be of type SOCK_STREAM.""" //| STATIC mp_obj_t ssl_sslcontext_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { From bcb516c49626ead2fd20a4df5465701f5a490d36 Mon Sep 17 00:00:00 2001 From: Tim Hawes Date: Sat, 27 Nov 2021 12:45:25 +0000 Subject: [PATCH 063/258] Handle server_hostname=None in SSLContext.wrap_socket --- shared-bindings/ssl/SSLContext.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c index c41dfa0019..839715f4ec 100644 --- a/shared-bindings/ssl/SSLContext.c +++ b/shared-bindings/ssl/SSLContext.c @@ -68,7 +68,10 @@ STATIC mp_obj_t ssl_sslcontext_wrap_socket(size_t n_args, const mp_obj_t *pos_ar mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - const char *server_hostname = mp_obj_str_get_str(args[ARG_server_hostname].u_obj); + const char *server_hostname = NULL; + if (args[ARG_server_hostname].u_obj != mp_const_none) { + server_hostname = mp_obj_str_get_str(args[ARG_server_hostname].u_obj); + } bool server_side = args[ARG_server_side].u_bool; if (server_side && server_hostname != NULL) { mp_raise_ValueError(translate("Server side context cannot have hostname")); From ef414bf1bd112f4f062cad914199826a67b1e0b5 Mon Sep 17 00:00:00 2001 From: Tim Hawes Date: Mon, 13 Dec 2021 17:11:31 +0000 Subject: [PATCH 064/258] Handle server_hostname argument in espressif SSLContext.wrap_socket --- ports/espressif/common-hal/ssl/SSLContext.c | 6 +++++- ports/espressif/common-hal/ssl/SSLSocket.c | 4 +--- ports/espressif/common-hal/ssl/SSLSocket.h | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/espressif/common-hal/ssl/SSLContext.c b/ports/espressif/common-hal/ssl/SSLContext.c index a94c1df1eb..e4767716a2 100644 --- a/ports/espressif/common-hal/ssl/SSLContext.c +++ b/ports/espressif/common-hal/ssl/SSLContext.c @@ -47,6 +47,11 @@ ssl_sslsocket_obj_t *common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t sock->ssl_context = self; sock->sock = socket; + // Create a copy of the ESP-TLS config object and store the server hostname + // Note that ESP-TLS will use common_name for both SNI and verification + memcpy(&sock->ssl_config, &self->ssl_config, sizeof(self->ssl_config)); + sock->ssl_config.common_name = server_hostname; + esp_tls_t *tls_handle = esp_tls_init(); if (tls_handle == NULL) { mp_raise_espidf_MemoryError(); @@ -55,6 +60,5 @@ ssl_sslsocket_obj_t *common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t // TODO: do something with the original socket? Don't call a close on the internal LWIP. - // Should we store server hostname on the socket in case connect is called with an ip? return sock; } diff --git a/ports/espressif/common-hal/ssl/SSLSocket.c b/ports/espressif/common-hal/ssl/SSLSocket.c index b1d0720be1..281e356d77 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.c +++ b/ports/espressif/common-hal/ssl/SSLSocket.c @@ -55,9 +55,7 @@ void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t *self) { void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self, const char *host, size_t hostlen, uint32_t port) { - esp_tls_cfg_t *tls_config = NULL; - tls_config = &self->ssl_context->ssl_config; - int result = esp_tls_conn_new_sync(host, hostlen, port, tls_config, self->tls); + int result = esp_tls_conn_new_sync(host, hostlen, port, &self->ssl_config, self->tls); self->sock->connected = result >= 0; if (result < 0) { int esp_tls_code; diff --git a/ports/espressif/common-hal/ssl/SSLSocket.h b/ports/espressif/common-hal/ssl/SSLSocket.h index dd1dcda4ac..097f19857b 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.h +++ b/ports/espressif/common-hal/ssl/SSLSocket.h @@ -39,6 +39,7 @@ typedef struct { socketpool_socket_obj_t *sock; esp_tls_t *tls; ssl_sslcontext_obj_t *ssl_context; + esp_tls_cfg_t ssl_config; } ssl_sslsocket_obj_t; #endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLSOCKET_H From c325633f8e4530c03cd7b5486dfd0c207a7bcb93 Mon Sep 17 00:00:00 2001 From: Tim Hawes Date: Sat, 27 Nov 2021 13:42:11 +0000 Subject: [PATCH 065/258] Add methods to ssl.SSLContext for handling self-signed certs --- ports/espressif/common-hal/ssl/SSLContext.c | 33 +++++++++++ shared-bindings/ssl/SSLContext.c | 64 +++++++++++++++++++++ shared-bindings/ssl/SSLContext.h | 8 +++ 3 files changed, 105 insertions(+) diff --git a/ports/espressif/common-hal/ssl/SSLContext.c b/ports/espressif/common-hal/ssl/SSLContext.c index e4767716a2..1924e6df1c 100644 --- a/ports/espressif/common-hal/ssl/SSLContext.c +++ b/ports/espressif/common-hal/ssl/SSLContext.c @@ -29,6 +29,8 @@ #include "bindings/espidf/__init__.h" +#include "components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h" + #include "py/runtime.h" void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t *self) { @@ -62,3 +64,34 @@ ssl_sslsocket_obj_t *common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t return sock; } + +void common_hal_ssl_sslcontext_load_verify_locations(ssl_sslcontext_obj_t *self, + const char *cadata) { + self->ssl_config.crt_bundle_attach = NULL; + self->ssl_config.use_global_ca_store = false; + self->ssl_config.cacert_buf = (const unsigned char *)cadata; + self->ssl_config.cacert_bytes = strlen(cadata) + 1; +} + +void common_hal_ssl_sslcontext_set_default_verify_paths(ssl_sslcontext_obj_t *self) { + self->ssl_config.crt_bundle_attach = esp_crt_bundle_attach; + self->ssl_config.use_global_ca_store = true; + self->ssl_config.cacert_buf = NULL; + self->ssl_config.cacert_bytes = 0; +} + +bool common_hal_ssl_sslcontext_get_check_hostname(ssl_sslcontext_obj_t *self) { + if (self->ssl_config.skip_common_name) { + return 0; + } else { + return 1; + } +} + +void common_hal_ssl_sslcontext_set_check_hostname(ssl_sslcontext_obj_t *self, bool value) { + if (value) { + self->ssl_config.skip_common_name = 0; + } else { + self->ssl_config.skip_common_name = 1; + } +} diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c index 839715f4ec..2b38768f6a 100644 --- a/shared-bindings/ssl/SSLContext.c +++ b/shared-bindings/ssl/SSLContext.c @@ -29,6 +29,7 @@ #include "py/objtuple.h" #include "py/objlist.h" +#include "py/objproperty.h" #include "py/runtime.h" #include "py/mperrno.h" @@ -51,6 +52,66 @@ STATIC mp_obj_t ssl_sslcontext_make_new(const mp_obj_type_t *type, size_t n_args return MP_OBJ_FROM_PTR(s); } +//| def load_verify_locations(self, cadata: Optional[str] = None) -> None: +//| """Load a set of certification authority (CA) certificates used to validate +//| other peers' certificates.""" +//| + +STATIC mp_obj_t ssl_sslcontext_load_verify_locations(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_cadata }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_cadata, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, + }; + ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + const char *cadata = mp_obj_str_get_str(args[ARG_cadata].u_obj); + + common_hal_ssl_sslcontext_load_verify_locations(self, cadata); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ssl_sslcontext_load_verify_locations_obj, 1, ssl_sslcontext_load_verify_locations); + +//| def set_default_verify_paths(self) -> None: +//| """Load a set of default certification authority (CA) certificates.""" +//| + +STATIC mp_obj_t ssl_sslcontext_set_default_verify_paths(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); + + common_hal_ssl_sslcontext_set_default_verify_paths(self); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ssl_sslcontext_set_default_verify_paths_obj, 1, ssl_sslcontext_set_default_verify_paths); + +//| check_hostname: bool +//| """Whether to match the peer certificate's hostname.""" +//| + +STATIC mp_obj_t ssl_sslcontext_get_check_hostname(mp_obj_t self_in) { + ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(self_in); + + return mp_obj_new_bool(common_hal_ssl_sslcontext_get_check_hostname(self)); +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(ssl_sslcontext_get_check_hostname_obj, ssl_sslcontext_get_check_hostname); + +STATIC mp_obj_t ssl_sslcontext_set_check_hostname(mp_obj_t self_in, mp_obj_t value) { + ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(self_in); + + common_hal_ssl_sslcontext_set_check_hostname(self, mp_obj_is_true(value)); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslcontext_set_check_hostname_obj, ssl_sslcontext_set_check_hostname); + +const mp_obj_property_t ssl_sslcontext_check_hostname_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&ssl_sslcontext_get_check_hostname_obj, + (mp_obj_t)&ssl_sslcontext_set_check_hostname_obj, + MP_ROM_NONE}, +}; + //| def wrap_socket(self, sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> ssl.SSLSocket: //| """Wraps the socket into a socket-compatible class that handles SSL negotiation. //| The socket must be of type SOCK_STREAM.""" @@ -85,6 +146,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ssl_sslcontext_wrap_socket_obj, 1, ssl_sslcont STATIC const mp_rom_map_elem_t ssl_sslcontext_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_wrap_socket), MP_ROM_PTR(&ssl_sslcontext_wrap_socket_obj) }, + { MP_ROM_QSTR(MP_QSTR_load_verify_locations), MP_ROM_PTR(&ssl_sslcontext_load_verify_locations_obj) }, + { MP_ROM_QSTR(MP_QSTR_set_default_verify_paths), MP_ROM_PTR(&ssl_sslcontext_set_default_verify_paths_obj) }, + { MP_ROM_QSTR(MP_QSTR_check_hostname), MP_ROM_PTR(&ssl_sslcontext_check_hostname_obj) }, }; STATIC MP_DEFINE_CONST_DICT(ssl_sslcontext_locals_dict, ssl_sslcontext_locals_dict_table); diff --git a/shared-bindings/ssl/SSLContext.h b/shared-bindings/ssl/SSLContext.h index 1e1986a48d..ef04f25d43 100644 --- a/shared-bindings/ssl/SSLContext.h +++ b/shared-bindings/ssl/SSLContext.h @@ -39,4 +39,12 @@ void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t *self); ssl_sslsocket_obj_t *common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t *self, socketpool_socket_obj_t *sock, bool server_side, const char *server_hostname); +void common_hal_ssl_sslcontext_load_verify_locations(ssl_sslcontext_obj_t *self, + const char *cadata); + +void common_hal_ssl_sslcontext_set_default_verify_paths(ssl_sslcontext_obj_t *self); + +bool common_hal_ssl_sslcontext_get_check_hostname(ssl_sslcontext_obj_t *self); +void common_hal_ssl_sslcontext_set_check_hostname(ssl_sslcontext_obj_t *self, bool value); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_SSL_SSLCONTEXT_H From 162e253949b6c809f951d3d18bda9ef242ffe6a1 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Tue, 14 Dec 2021 09:45:39 -0600 Subject: [PATCH 066/258] finalizing pin assignments prior to final hardware test --- .../boards/jpconstantineau_pykey18/pins.c | 42 +++++++++---------- .../boards/jpconstantineau_pykey44/pins.c | 40 +++++++++--------- .../boards/jpconstantineau_pykey60/pins.c | 18 ++++---- .../boards/jpconstantineau_pykey87/pins.c | 18 ++++---- 4 files changed, 59 insertions(+), 59 deletions(-) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c index adf97a0f55..192cff180a 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c @@ -7,33 +7,33 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, - { MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, - { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, - { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, - { MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, + //{ MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, + //{ MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, + //{ MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, + //{ MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, + //{ MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, + //{ MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, + //{ MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, + //{ MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, + //{ MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, + //{ MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, - { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, + //{ MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, + //{ MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + //{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + //{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + //{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, + //{ MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, + //{ MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, @@ -41,12 +41,12 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, + //{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, + //{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, + //{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + //{ MP_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/raspberrypi/boards/jpconstantineau_pykey44/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c index adf97a0f55..3c7e82c8ba 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c @@ -14,39 +14,39 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, - { MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, + //{ MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, + //{ MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, + //{ MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, - { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, + //{ MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, + //{ MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, + //{ MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + //{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + //{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + //{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, + //{ MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, + //{ MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, + //{ MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, + //{ MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, + //{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, + //{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, + //{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, + //{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, + //{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + //{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + //{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c index adf97a0f55..841bd2c694 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c @@ -22,20 +22,20 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, - { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, + //{ MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, + //{ MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + //{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + //{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + //{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, + //{ MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, + //{ MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, + //{ MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, + //{ MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c index adf97a0f55..a73b5cfeef 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c @@ -26,27 +26,27 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + //{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + //{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + //{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, + //{ MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, + //{ MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, + //{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, + //{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, + //{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + //{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 3084e1eba8316a3b5a2d61cb0986bb50a14ab369 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 14 Dec 2021 18:38:28 +0100 Subject: [PATCH 067/258] 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 | 7 ++++++- locale/cs.po | 7 ++++++- locale/de_DE.po | 7 ++++++- locale/el.po | 7 ++++++- locale/en_GB.po | 7 ++++++- locale/es.po | 7 ++++++- locale/fil.po | 7 ++++++- locale/fr.po | 7 ++++++- locale/hi.po | 7 ++++++- locale/it_IT.po | 7 ++++++- locale/ja.po | 7 ++++++- locale/ko.po | 7 ++++++- locale/nl.po | 7 ++++++- locale/pl.po | 7 ++++++- locale/pt_BR.po | 7 ++++++- locale/ru.po | 7 ++++++- locale/sv.po | 7 ++++++- locale/zh_Latn_pinyin.po | 7 ++++++- 18 files changed, 108 insertions(+), 18 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index b514da6672..dcd6897144 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -2763,6 +2763,10 @@ msgstr "kalibrasi adalah read only" msgid "calibration value out of range +/-127" msgstr "nilai kalibrasi keluar dari jangkauan +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "hanya mampu memiliki hingga 4 parameter untuk Thumb assembly" @@ -3995,7 +3999,9 @@ msgstr "" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4010,7 +4016,6 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/cs.po b/locale/cs.po index d587a10fa2..f88a458797 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -2729,6 +2729,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -3960,7 +3964,9 @@ msgstr "" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3975,7 +3981,6 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/de_DE.po b/locale/de_DE.po index 407fe3aa10..254ac419f5 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -2768,6 +2768,10 @@ msgstr "Kalibrierung ist Schreibgeschützt" msgid "calibration value out of range +/-127" msgstr "Kalibrierwert nicht im Bereich von +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "kann nur bis zu 4 Parameter für die Thumb assembly haben" @@ -4023,7 +4027,9 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4038,7 +4044,6 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/el.po b/locale/el.po index fa9c878990..aad86468bf 100644 --- a/locale/el.po +++ b/locale/el.po @@ -2726,6 +2726,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -3957,7 +3961,9 @@ msgstr "" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3972,7 +3978,6 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/en_GB.po b/locale/en_GB.po index 9a4519d444..4510047483 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -2760,6 +2760,10 @@ msgstr "Calibration is read only" msgid "calibration value out of range +/-127" msgstr "Calibration value out of range +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "Can only have up to 4 parameters to thumb assembly" @@ -3994,7 +3998,9 @@ msgstr "pow() with 3 arguments requires integers" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4009,7 +4015,6 @@ msgstr "pow() with 3 arguments requires integers" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/es.po b/locale/es.po index c13ce15161..9e715ddd69 100644 --- a/locale/es.po +++ b/locale/es.po @@ -2795,6 +2795,10 @@ msgstr "calibration es de solo lectura" msgid "calibration value out of range +/-127" msgstr "Valor de calibración fuera del rango +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "solo puede tener hasta 4 parámetros para ensamblar Thumb" @@ -4040,7 +4044,9 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4055,7 +4061,6 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/fil.po b/locale/fil.po index b1e47bf1a1..3865269b77 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -2749,6 +2749,10 @@ msgstr "pagkakalibrate ay basahin lamang" msgid "calibration value out of range +/-127" msgstr "ang halaga ng pagkakalibrate ay wala sa sakop +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "maaari lamang magkaroon ng hanggang 4 na parameter sa Thumb assembly" @@ -3998,7 +4002,9 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4013,7 +4019,6 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/fr.po b/locale/fr.po index 9bfc2edbd5..16c80ca8c5 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -2818,6 +2818,10 @@ msgstr "étalonnage en lecture seule" msgid "calibration value out of range +/-127" msgstr "valeur de étalonnage hors bornes +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "il peut y avoir jusqu'à 4 paramètres pour l'assemblage Thumb" @@ -4071,7 +4075,9 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4086,7 +4092,6 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/hi.po b/locale/hi.po index 12fff21485..c1aa33b367 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -2726,6 +2726,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -3957,7 +3961,9 @@ msgstr "" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3972,7 +3978,6 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/it_IT.po b/locale/it_IT.po index 4ebfa3dedf..129bcfdfa1 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -2770,6 +2770,10 @@ msgstr "la calibrazione è in sola lettura" msgid "calibration value out of range +/-127" msgstr "valore di calibrazione fuori intervallo +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c #, fuzzy msgid "can only have up to 4 parameters to Thumb assembly" @@ -4020,7 +4024,9 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4035,7 +4041,6 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/ja.po b/locale/ja.po index 56b92bbbf3..64109d205e 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -2741,6 +2741,10 @@ msgstr "calibrationは読み込み専用" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -3979,7 +3983,9 @@ msgstr "pow()の第3引数には整数が必要" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3994,7 +4000,6 @@ msgstr "pow()の第3引数には整数が必要" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/ko.po b/locale/ko.po index 953ffcef49..da9638157b 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -2730,6 +2730,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -3961,7 +3965,9 @@ msgstr "" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3976,7 +3982,6 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/nl.po b/locale/nl.po index e8ca7390d6..9931e4e28b 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -2758,6 +2758,10 @@ msgstr "calibration is alleen-lezen" msgid "calibration value out of range +/-127" msgstr "calibration waarde buiten bereik +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "kan slechts 4 parameters aan Thumb assembly geven" @@ -3998,7 +4002,9 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4013,7 +4019,6 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/pl.po b/locale/pl.po index 87e00d4bab..0f0ea8d391 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -2737,6 +2737,10 @@ msgstr "kalibracja tylko do odczytu" msgid "calibration value out of range +/-127" msgstr "wartość kalibracji poza zakresem +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "asembler Thumb może przyjąć do 4 parameterów" @@ -3970,7 +3974,9 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -3985,7 +3991,6 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 396b99e010..f97b5d8944 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -2810,6 +2810,10 @@ msgstr "Calibração é somente leitura" msgid "calibration value out of range +/-127" msgstr "Valor de calibração fora do intervalo +/- 127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "só pode haver até 4 parâmetros para a montagem Thumb" @@ -4061,7 +4065,9 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4076,7 +4082,6 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/ru.po b/locale/ru.po index 37743afe94..2bc941ac7b 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -2781,6 +2781,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -4012,7 +4016,9 @@ msgstr "" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4027,7 +4033,6 @@ msgstr "" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/sv.po b/locale/sv.po index d41f8a0af3..7e42697b32 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -2778,6 +2778,10 @@ msgstr "kalibrering är skrivskyddad" msgid "calibration value out of range +/-127" msgstr "kalibreringsvärde utanför intervallet +/- 127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "kan bara ha upp till 4 parametrar för Thumbs assembly" @@ -4018,7 +4022,9 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4033,7 +4039,6 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 7a09f0f025..51dc9b10a9 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -2787,6 +2787,10 @@ msgstr "jiàozhǔn zhǐ dú dào" msgid "calibration value out of range +/-127" msgstr "jiàozhǔn zhí chāochū fànwéi +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "zhǐyǒu Thumb zǔjiàn zuìduō 4 cānshù" @@ -4025,7 +4029,9 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4040,7 +4046,6 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h #: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h #: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h -#: ports/espressif/boards/microdev_macro_s3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h #: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h #: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h From 54e87d366096a9ccc137e6824ea61e9479b238db Mon Sep 17 00:00:00 2001 From: Tim Hawes Date: Tue, 14 Dec 2021 20:03:44 +0000 Subject: [PATCH 068/258] Apply suggestions from code review Co-authored-by: Scott Shawcroft --- ports/espressif/common-hal/ssl/SSLContext.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ports/espressif/common-hal/ssl/SSLContext.c b/ports/espressif/common-hal/ssl/SSLContext.c index 1924e6df1c..866024bf00 100644 --- a/ports/espressif/common-hal/ssl/SSLContext.c +++ b/ports/espressif/common-hal/ssl/SSLContext.c @@ -81,17 +81,9 @@ void common_hal_ssl_sslcontext_set_default_verify_paths(ssl_sslcontext_obj_t *se } bool common_hal_ssl_sslcontext_get_check_hostname(ssl_sslcontext_obj_t *self) { - if (self->ssl_config.skip_common_name) { - return 0; - } else { - return 1; - } + return !self->ssl_config.skip_common_name; } void common_hal_ssl_sslcontext_set_check_hostname(ssl_sslcontext_obj_t *self, bool value) { - if (value) { - self->ssl_config.skip_common_name = 0; - } else { - self->ssl_config.skip_common_name = 1; - } + self->ssl_config.skip_common_name = !value; } From 96c6271134d5ddf6d53e74550e0182b1b8f15299 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 15 Dec 2021 02:00:20 +0530 Subject: [PATCH 069/258] apply suggestions from reviews - minor typo fix - update documentation for board module --- shared-bindings/board/__init__.c | 15 +++++++++------ shared-bindings/board/__init__.h | 6 +++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index 4edd455b44..b9a0bb489a 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -65,8 +65,9 @@ STATIC mp_int_t board_get_instance(size_t n_args, const mp_obj_t *args, const mp #endif //| def I2C(instance: Optional[int] = 0) -> busio.I2C: -//| """Returns the `busio.I2C` object for the board's designated I2C bus(es). It is a singleton. -//| The object created uses the default parameter values for `busio.I2C`.""" +//| """Returns the `busio.I2C` object for the board's designated I2C bus(es). +//| If there is more than one default I2C bus, the buses are numbered starting at 0. +//| The object created is a singleton, and uses the default parameter values for `busio.I2C`.""" //| ... //| #if CIRCUITPY_BOARD_I2C @@ -87,8 +88,9 @@ mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args) { MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_i2c_obj, 0, 1, board_i2c); //| def SPI(instance: Optional[int] = 0) -> busio.SPI: -//| """Returns the `busio.SPI` object for the board's designated SPI bus(es). It is a singleton. -//| The object created uses the default parameter values for `busio.SPI`.""" +//| """Returns the `busio.SPI` object for the board's designated SPI bus(es). +//| If there is more than one default SPI bus, the buses are numbered starting at 0. +//| The object created is a singleton, and uses the default parameter values for `busio.SPI`.""" //| ... //| #if CIRCUITPY_BOARD_SPI @@ -109,8 +111,9 @@ mp_obj_t board_spi(size_t n_args, const mp_obj_t *args) { MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_spi_obj, 0, 1, board_spi); //| def UART(instance: Optional[int] = 0) -> busio.UART: -//| """Returns the `busio.UART` object for the board's designated UART bus(es). It is a singleton. -//| The object created uses the default parameter values for `busio.UART`.""" +//| """Returns the `busio.UART` object for the board's designated UART bus(es). +//| If there is more than one default UART bus, the buses are numbered starting at 0. +//| The object created is a singleton, and uses the default parameter values for `busio.UART`.""" //| ... //| #if CIRCUITPY_BOARD_UART diff --git a/shared-bindings/board/__init__.h b/shared-bindings/board/__init__.h index 78428c46e4..8755e78663 100644 --- a/shared-bindings/board/__init__.h +++ b/shared-bindings/board/__init__.h @@ -36,19 +36,19 @@ extern const mp_obj_dict_t board_module_globals; STATIC const MP_DEFINE_STR_OBJ(board_module_id_obj, CIRCUITPY_BOARD_ID); bool common_hal_board_is_i2c(mp_obj_t obj); -mp_obj_t common_hal_board_get_i2c(const mp_int_t insatnce); +mp_obj_t common_hal_board_get_i2c(const mp_int_t instance); mp_obj_t common_hal_board_create_i2c(const mp_int_t instance); mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args); MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_i2c_obj); bool common_hal_board_is_spi(mp_obj_t obj); -mp_obj_t common_hal_board_get_spi(const mp_int_t insatnce); +mp_obj_t common_hal_board_get_spi(const mp_int_t instance); mp_obj_t common_hal_board_create_spi(const mp_int_t instance); mp_obj_t board_spi(size_t n_args, const mp_obj_t *args); MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_spi_obj); bool common_hal_board_is_uart(mp_obj_t obj); -mp_obj_t common_hal_board_get_uart(const mp_int_t insatnce); +mp_obj_t common_hal_board_get_uart(const mp_int_t instance); mp_obj_t common_hal_board_create_uart(const mp_int_t instance); mp_obj_t board_uart(size_t n_args, const mp_obj_t *args); MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_uart_obj); From 8b7c90c3736d8a350d05820ce264fbd4edd27ef6 Mon Sep 17 00:00:00 2001 From: dronecz Date: Wed, 15 Dec 2021 00:54:23 +0000 Subject: [PATCH 070/258] Translated using Weblate (Czech) Currently translated at 2.4% (25 of 1029 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/cs/ --- locale/cs.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/cs.po b/locale/cs.po index f88a458797..c68294da5b 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -6,15 +6,15 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2020-12-04 18:33+0000\n" -"Last-Translator: vkuthan \n" +"PO-Revision-Date: 2021-12-15 00:54+0000\n" +"Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" "Language: cs\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==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.4-dev\n" +"X-Generator: Weblate 4.10-dev\n" #: main.c msgid "" @@ -35,7 +35,7 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" "\n" -"Založte prosím problém s obsahem vaší jednotky CIRCUITPY na adrese\n" +"Prosím vytvořte tiket s obsahem vaší jednotky CIRCUITPY na adrese\n" "https://github.com/adafruit/circuitpython/issues\n" #: py/obj.c From 2693e2ce0ab6d3b63825bb8e8270bce975619caf Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 10 Dec 2021 17:08:47 -0800 Subject: [PATCH 071/258] Add neopixel support on PWM capable pins It'll be hard to do PWM from them concurrently Fixes #5697 --- .pre-commit-config.yaml | 2 +- ports/broadcom/Makefile | 4 +- .../common-hal/microcontroller/__init__.c | 1 + .../common-hal/neopixel_write/__init__.c | 158 ++++++++++++++++++ ports/broadcom/mpconfigport.mk | 4 +- ports/broadcom/mphalport.c | 23 +++ ports/broadcom/peripherals | 2 +- 7 files changed, 188 insertions(+), 6 deletions(-) create mode 100644 ports/broadcom/common-hal/neopixel_write/__init__.c diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfee897258..bcf7f8da2b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v4.0.1 hooks: - id: check-yaml - id: end-of-file-fixer diff --git a/ports/broadcom/Makefile b/ports/broadcom/Makefile index 401d601528..1179d8fa16 100644 --- a/ports/broadcom/Makefile +++ b/ports/broadcom/Makefile @@ -82,7 +82,7 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) # because a few modules have files both in common-hal/ and shared-modules/. # Doing a $(sort ...) removes duplicates as part of sorting. SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) -SRC_S = peripherals/broadcom/boot.s +SRC_S = peripherals/broadcom/boot8.s OBJ = $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_SHARED_MODULE_EXPANDED:.c=.o)) @@ -134,7 +134,7 @@ CFLAGS += $(INC) -Wall -Werror -std=gnu11 $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) -LDFLAGS += $(CFLAGS) -T peripherals/broadcom/link.ld -Wl,--gc-sections -Wl,-Map=$@.map # -Wl,--cref +LDFLAGS += $(CFLAGS) -T peripherals/broadcom/link8.ld -Wl,--gc-sections -Wl,-Map=$@.map # -Wl,--cref # Use toolchain libm if we're not using our own. ifndef INTERNAL_LIBM diff --git a/ports/broadcom/common-hal/microcontroller/__init__.c b/ports/broadcom/common-hal/microcontroller/__init__.c index e6f7b9c737..a1491d9668 100644 --- a/ports/broadcom/common-hal/microcontroller/__init__.c +++ b/ports/broadcom/common-hal/microcontroller/__init__.c @@ -29,6 +29,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Processor.h" #include "common-hal/microcontroller/__init__.h" +#include "peripherals/broadcom/defines.h" #include "peripherals/broadcom/interrupts.h" #include "mphalport.h" diff --git a/ports/broadcom/common-hal/neopixel_write/__init__.c b/ports/broadcom/common-hal/neopixel_write/__init__.c new file mode 100644 index 0000000000..420ca369da --- /dev/null +++ b/ports/broadcom/common-hal/neopixel_write/__init__.c @@ -0,0 +1,158 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/neopixel_write/__init__.h" + +#include "py/runtime.h" + +#include "shared-bindings/microcontroller/__init__.h" +#include "shared-bindings/digitalio/DigitalInOut.h" +#include "shared-bindings/time/__init__.h" + +#include "peripherals/broadcom/cpu.h" + +#include "supervisor/port.h" + +uint64_t next_start_raw_ticks = 0; + +// NeoPixels are 800khz bit streams. Zeroes are 1/3 duty cycle (~416ns) and ones +// are 2/3 duty cycle (~833ns). + +void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, + uint8_t *pixels, uint32_t num_bytes) { + // Wait to make sure we don't append onto the last transmission. This should only be a tick or + // two. + while (port_get_raw_ticks(NULL) < next_start_raw_ticks) { + } + + BP_Function_Enum alt_function; + uint8_t index; + uint8_t channel; + bool found = false; + for (size_t i = 0; i < NUM_ALT_FUNC; i++) { + const pin_function_t *f = &digitalinout->pin->functions[i]; + if (f->type == PIN_FUNCTION_PWM) { + index = f->index; + channel = f->function; + alt_function = FSEL_VALUES[i]; + found = true; + break; + } + } + if (!found) { + mp_raise_ValueError(translate("NeoPixel not supported on pin")); + return; + } + + // Turn on the PWM clock. The speed is NeoPixel specific. + if (CM_PWM->CS_b.BUSY == 0) { + uint32_t source_clock; + #if BCM_VERSION == 2711 + source_clock = 54000000; + #else + source_clock = 19200000; + #endif + // Three clocks per 800khz bit to get the 1/3 or 2/3 timing. + uint32_t target_clock = 3 * 800000; + uint32_t int_div = source_clock / target_clock; + + CM_PWM->DIV = CM_PCM_DIV_PASSWD_PASSWD << CM_PCM_DIV_PASSWD_Pos | + (int_div) << CM_PCM_DIV_DIVI_Pos; + + CM_PWM->CS = CM_PCM_CS_PASSWD_PASSWD << CM_PCM_CS_PASSWD_Pos | + CM_PCM_CS_SRC_XOSC << CM_PCM_CS_SRC_Pos; + + // Set enable after setting the source to ensure it is stable. + CM_PWM->CS = CM_PCM_CS_PASSWD_PASSWD << CM_PCM_CS_PASSWD_Pos | + CM_PCM_CS_SRC_XOSC << CM_PCM_CS_SRC_Pos | + CM_PCM_CS_ENAB_Msk; + + // Wait for the clock to start up. + COMPLETE_MEMORY_READS; + while (CM_PWM->CS_b.BUSY == 0) { + } + } + + PWM0_Type *pwm = PWM0; + #if BCM_VERSION == 2711 + if (index == 1) { + pwm = PWM1; + } + #endif + + pwm->RNG1 = 24; + pwm->RNG2 = 24; + COMPLETE_MEMORY_READS; + pwm->CTL = PWM0_CTL_CLRF1_Msk; + COMPLETE_MEMORY_READS; + + // Even though we're only transmitting one channel, we enable both. Without + // the second channel enabled, the output is repeated forever. + pwm->CTL = + PWM0_CTL_USEF2_Msk | + PWM0_CTL_MODE2_Msk | + PWM0_CTL_USEF1_Msk | + PWM0_CTL_MODE1_Msk; + + COMPLETE_MEMORY_READS; + pwm->CTL |= PWM0_CTL_PWEN1_Msk | PWM0_CTL_PWEN2_Msk; + + gpio_set_function(digitalinout->pin->number, alt_function); + + for (size_t i = 0; i < num_bytes; i++) { + uint32_t expanded = 0; + for (size_t j = 0; j < 8; j++) { + expanded = expanded >> 3; + if ((pixels[i] & (1 << j)) != 0) { + expanded |= 0xc0000000; + } else { + expanded |= 0x80000000; + } + } + while (pwm->STA_b.FULL1 == 1) { + RUN_BACKGROUND_TASKS; + } + if (channel == 1) { + // Dummy value for the first channel. + pwm->FIF1 = 0x000000; + } + pwm->FIF1 = expanded; + if (channel == 0) { + // Dummy value for the second channel. + pwm->FIF1 = 0x000000; + } + } + // Wait just a little bit so that transmission can start. + common_hal_mcu_delay_us(2); + while (pwm->STA_b.STA1 == 1) { + RUN_BACKGROUND_TASKS; + } + + gpio_set_function(digitalinout->pin->number, GPIO_FUNCTION_OUTPUT); + + // Update the next start. + next_start_raw_ticks = port_get_raw_ticks(NULL) + 1; +} diff --git a/ports/broadcom/mpconfigport.mk b/ports/broadcom/mpconfigport.mk index b17eb12f63..f29f48d545 100644 --- a/ports/broadcom/mpconfigport.mk +++ b/ports/broadcom/mpconfigport.mk @@ -8,7 +8,7 @@ CIRCUITPY_BUSIO = 1 CIRCUITPY_ONEWIREIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_COUNTIO = 0 -CIRCUITPY_NEOPIXEL_WRITE = 0 +CIRCUITPY_NEOPIXEL_WRITE = 1 CIRCUITPY_PULSEIO = 0 CIRCUITPY_OS = 1 CIRCUITPY_NVM = 0 @@ -31,7 +31,7 @@ CIRCUITPY_BITBANGIO = 1 # Requires DigitalIO CIRCUITPY_GAMEPAD = 0 # Requires neopixel_write or SPI (dotstar) -CIRCUITPY_PIXELBUF = 0 +CIRCUITPY_PIXELBUF = 1 # Requires OS CIRCUITPY_RANDOM = 1 # Requires OS, filesystem diff --git a/ports/broadcom/mphalport.c b/ports/broadcom/mphalport.c index f4bfd8653b..91e7b631bc 100644 --- a/ports/broadcom/mphalport.c +++ b/ports/broadcom/mphalport.c @@ -6,7 +6,15 @@ #include "shared-bindings/microcontroller/__init__.h" #include "mphalport.h" +#include "peripherals/broadcom/defines.h" + void mp_hal_delay_us(mp_uint_t delay) { + uint32_t end = SYSTMR->CLO + delay; + // Wait if end is before current time because it must have wrapped. + while (end < SYSTMR->CLO) { + } + while (SYSTMR->CLO < end) { + } } void mp_hal_disable_all_interrupts(void) { @@ -19,6 +27,7 @@ void mp_hal_enable_all_interrupts(void) { mp_uint_t cpu_get_regs_and_sp(mp_uint_t *regs) { size_t sp = 0; + #if defined(__ARM_ARCH) && (__ARM_ARCH >= 8) __asm__ ("mov %[out], sp" : [out] "=r" (sp)); __asm__ ("mov %[out], x19" : [out] "=r" (regs[0])); __asm__ ("mov %[out], x20" : [out] "=r" (regs[1])); @@ -30,5 +39,19 @@ mp_uint_t cpu_get_regs_and_sp(mp_uint_t *regs) { __asm__ ("mov %[out], x26" : [out] "=r" (regs[7])); __asm__ ("mov %[out], x27" : [out] "=r" (regs[8])); __asm__ ("mov %[out], x28" : [out] "=r" (regs[9])); + #else + __asm__ ("mov %[out], sp" : [out] "=r" (sp)); + __asm__ ("mov %[out], x19" : [out] "=r" (regs[0])); + __asm__ ("mov %[out], x20" : [out] "=r" (regs[1])); + __asm__ ("mov %[out], x21" : [out] "=r" (regs[2])); + __asm__ ("mov %[out], x22" : [out] "=r" (regs[3])); + __asm__ ("mov %[out], x23" : [out] "=r" (regs[4])); + __asm__ ("mov %[out], x24" : [out] "=r" (regs[5])); + __asm__ ("mov %[out], x25" : [out] "=r" (regs[6])); + __asm__ ("mov %[out], x26" : [out] "=r" (regs[7])); + __asm__ ("mov %[out], x27" : [out] "=r" (regs[8])); + __asm__ ("mov %[out], x28" : [out] "=r" (regs[9])); + #endif + return sp; } diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index e136e38717..2c10889a4b 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit e136e387177446c3c9979bbf274a4856bf13797d +Subproject commit 2c10889a4b2d78987bc4e0783db2e7584aa4d572 From 01f8cffdae4c5ecd895b96ab0a77b54313df1efd Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 14 Dec 2021 17:13:11 -0800 Subject: [PATCH 072/258] Support 32 bit color with vectorio Fixes #5639 --- shared-module/vectorio/VectorShape.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 7899e2710c..be14fca5ac 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -411,6 +411,9 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ if (colorspace->depth == 16) { VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %04x 16", output_pixel.pixel); *(((uint16_t *)buffer) + pixel_index) = output_pixel.pixel; + } else if (colorspace->depth == 32) { + VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %04x 32", output_pixel.pixel); + *(((uint32_t *)buffer) + pixel_index) = output_pixel.pixel; } else if (colorspace->depth == 8) { VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %02x 8", output_pixel.pixel); *(((uint8_t *)buffer) + pixel_index) = output_pixel.pixel; From 7b2980ead2f3f5705a8147da589e94bcbc0d47b5 Mon Sep 17 00:00:00 2001 From: Asura Date: Wed, 15 Dec 2021 09:57:26 +0800 Subject: [PATCH 073/258] fix missing pintout. fix missing pintout p20 & p21 for makerdiary_nrf52840_mdk_usb_dongle. --- ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c index da09d86648..4068689377 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c @@ -25,6 +25,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P10), MP_ROM_PTR(&pin_P0_10) }, { MP_ROM_QSTR(MP_QSTR_P18), MP_ROM_PTR(&pin_P0_18) }, // !Reset button. { MP_ROM_QSTR(MP_QSTR_P19), MP_ROM_PTR(&pin_P0_19) }, + { MP_ROM_QSTR(MP_QSTR_P20), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_P21), MP_ROM_PTR(&pin_P0_21) }, { MP_ROM_QSTR(MP_QSTR_P22), MP_ROM_PTR(&pin_P0_22) }, // green led, low is on. { MP_ROM_QSTR(MP_QSTR_P23), MP_ROM_PTR(&pin_P0_23) }, // red led, low is on. { MP_ROM_QSTR(MP_QSTR_P24), MP_ROM_PTR(&pin_P0_24) }, // blue led, low is on. From a788de9f30e0048765db9d9970c334bfb215ce72 Mon Sep 17 00:00:00 2001 From: dronecz Date: Wed, 15 Dec 2021 01:00:51 +0000 Subject: [PATCH 074/258] Translated using Weblate (Czech) Currently translated at 2.9% (30 of 1029 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/cs/ --- locale/cs.po | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/locale/cs.po b/locale/cs.po index c68294da5b..389f2a8763 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-15 00:54+0000\n" +"PO-Revision-Date: 2021-12-15 03:32+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" "Language: cs\n" @@ -21,12 +21,16 @@ msgid "" "\n" "Code done running.\n" msgstr "" +"\n" +"Program byl dokončen.\n" #: main.c msgid "" "\n" "Code stopped by auto-reload.\n" msgstr "" +"\n" +"Program byl zastaven automatickým načtením.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -48,11 +52,11 @@ msgstr " Soubor \"%q\", řádek %d" #: py/builtinhelp.c msgid " is of type %q\n" -msgstr "" +msgstr " je typu %q\n" #: main.c msgid " not found.\n" -msgstr "" +msgstr " nenalezen\n" #: main.c msgid " output:\n" @@ -79,11 +83,11 @@ msgstr "" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" -msgstr "Selhání %q: %d" +msgstr "%q: selhání %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" -msgstr "Používá se %q" +msgstr "%q se právě používá" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -199,7 +203,7 @@ msgstr "Objekt '%q' není iterátor" #: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" -msgstr "Objekt '%q' nelze volat" +msgstr "Objekt '%q' nelze zavolat" #: py/runtime.c msgid "'%q' object is not iterable" @@ -1943,6 +1947,8 @@ msgstr "" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" +"Zmáčkněte jakoukoli klávesu pro spuštění REPLu. Použijte CTRL-D pro opětovné " +"načtení.\n" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" From f3ec6ee76037e6c78bfc214d8b309ad29a74aa8b Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Tue, 14 Dec 2021 21:46:04 -0600 Subject: [PATCH 075/258] tested hardware and cleaned-up commented out pin defs --- .../boards/jpconstantineau_pykey18/pins.c | 29 ------------------- .../boards/jpconstantineau_pykey44/pins.c | 28 ------------------ .../boards/jpconstantineau_pykey60/pins.c | 17 ----------- .../boards/jpconstantineau_pykey87/pins.c | 16 ---------- 4 files changed, 90 deletions(-) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c index 192cff180a..3cd5d5843e 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c @@ -2,51 +2,22 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, - //{ MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, - //{ MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, - //{ MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, - //{ MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, - //{ MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, - //{ MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, - //{ MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, - //{ MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, - //{ MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, - //{ MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, - //{ MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, - //{ MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, - { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - //{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - //{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - - //{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, - //{ MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - - //{ MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, - - //{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, - //{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, - //{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - //{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c index 3c7e82c8ba..b735aad9f7 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c @@ -2,7 +2,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, @@ -14,39 +13,12 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, - //{ MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, - //{ MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, - //{ MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, - //{ MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, - //{ MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, - //{ MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, - { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - //{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - //{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - - //{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, - //{ MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - - //{ MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, - //{ MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, - //{ MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, - - //{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, - //{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, - - //{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, - //{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, - //{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, - - //{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - //{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c index 841bd2c694..033c68034d 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c @@ -2,7 +2,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, @@ -22,31 +21,15 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, - //{ MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, - //{ MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, - { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - //{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - //{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - - //{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, - //{ MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - - //{ MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, - //{ MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, - //{ MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c index a73b5cfeef..cd5612f45b 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c @@ -24,29 +24,13 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, - { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - //{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - //{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - - //{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, - //{ MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, - //{ MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, - - //{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, - //{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, - //{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - //{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 70b3e73349cd13cd7cfbeb5d4494cae7eeee7dd4 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 15 Dec 2021 12:11:21 +0530 Subject: [PATCH 076/258] traceback: fix for crash on non-native exceptions Co-authored-by: Tim Hawes --- py/objexcept.c | 10 +++++----- py/objexcept.h | 1 + shared-bindings/traceback/__init__.c | 11 +++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/py/objexcept.c b/py/objexcept.c index 90a54236d5..fc0787631f 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -104,7 +104,7 @@ mp_obj_t mp_alloc_emergency_exception_buf(mp_obj_t size_in) { #endif #endif // MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF -STATIC mp_obj_exception_t *get_native_exception(mp_obj_t self_in) { +mp_obj_exception_t *mp_obj_exception_get_native(mp_obj_t self_in) { assert(mp_obj_is_exception_instance(self_in)); if (mp_obj_is_native_exception_instance(self_in)) { return MP_OBJ_TO_PTR(self_in); @@ -206,7 +206,7 @@ mp_obj_t mp_obj_exception_make_new(const mp_obj_type_t *type, size_t n_args, siz // Get exception "value" - that is, first argument, or None mp_obj_t mp_obj_exception_get_value(mp_obj_t self_in) { - mp_obj_exception_t *self = get_native_exception(self_in); + mp_obj_exception_t *self = mp_obj_exception_get_native(self_in); if (self->args->len == 0) { return mp_const_none; } else { @@ -543,14 +543,14 @@ bool mp_obj_exception_match(mp_obj_t exc, mp_const_obj_t exc_type) { // traceback handling functions void mp_obj_exception_clear_traceback(mp_obj_t self_in) { - mp_obj_exception_t *self = get_native_exception(self_in); + mp_obj_exception_t *self = mp_obj_exception_get_native(self_in); // just set the traceback to the empty traceback object // we don't want to call any memory management functions here self->traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; } void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, size_t line, qstr block) { - mp_obj_exception_t *self = get_native_exception(self_in); + mp_obj_exception_t *self = mp_obj_exception_get_native(self_in); // Try to allocate memory for the traceback, with fallback to emergency traceback object if (self->traceback == NULL || self->traceback == (mp_obj_traceback_t *)&mp_const_empty_traceback_obj) { @@ -612,7 +612,7 @@ void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, size_t line, qs } void mp_obj_exception_get_traceback(mp_obj_t self_in, size_t *n, size_t **values) { - mp_obj_exception_t *self = get_native_exception(self_in); + mp_obj_exception_t *self = mp_obj_exception_get_native(self_in); if (self->traceback == NULL) { *n = 0; diff --git a/py/objexcept.h b/py/objexcept.h index 261885e54d..f28f50f5dc 100644 --- a/py/objexcept.h +++ b/py/objexcept.h @@ -38,6 +38,7 @@ typedef struct _mp_obj_exception_t { void mp_obj_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind); void mp_obj_exception_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest); +mp_obj_exception_t *mp_obj_exception_get_native(mp_obj_t self_in); #define MP_DEFINE_EXCEPTION(exc_name, base_name) \ const mp_obj_type_t mp_type_##exc_name = { \ diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index 6fdb060439..aa21210494 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -42,7 +42,6 @@ STATIC void traceback_exception_common(mp_print_t *print, mp_obj_t value, mp_obj if (!mp_obj_is_exception_instance(value)) { mp_raise_TypeError(translate("invalid exception")); } - mp_obj_exception_t exc = *(mp_obj_exception_t *)MP_OBJ_TO_PTR(value); mp_int_t limit = 0; bool print_tb = true; @@ -51,13 +50,17 @@ STATIC void traceback_exception_common(mp_print_t *print, mp_obj_t value, mp_obj print_tb = (limit != 0); } + mp_obj_exception_t *exc = mp_obj_exception_get_native(value); + mp_obj_traceback_t *trace_backup = exc->traceback; + if (tb_obj != mp_const_none && print_tb) { - exc.traceback = mp_arg_validate_type(tb_obj, &mp_type_traceback, MP_QSTR_tb); + exc->traceback = mp_arg_validate_type(tb_obj, &mp_type_traceback, MP_QSTR_tb); } else { - exc.traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; + exc->traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; } - shared_module_traceback_print_exception(&exc, print, limit); + shared_module_traceback_print_exception(MP_OBJ_TO_PTR(value), print, limit); + exc->traceback = trace_backup; } //| def format_exception(etype: Type[BaseException], value: BaseException, tb: TracebackType, From 7e46387196d58a36791908b867fd6d252e03b6e9 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 15 Dec 2021 12:34:56 +0530 Subject: [PATCH 077/258] add non-native exception in traceback_test Co-authored-by: Dan Halbert --- tests/circuitpython/traceback_test.py | 11 +++++++++++ tests/circuitpython/traceback_test.py.exp | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/tests/circuitpython/traceback_test.py b/tests/circuitpython/traceback_test.py index cb7bf4b2aa..6ae73db6ae 100644 --- a/tests/circuitpython/traceback_test.py +++ b/tests/circuitpython/traceback_test.py @@ -22,4 +22,15 @@ except Exception as exc: traceback.print_exception(None, exc, exc.__traceback__, limit=0) print("\nLimit=-1 Trace:") traceback.print_exception(None, exc, exc.__traceback__, limit=-1) + + +class NonNativeException(Exception): + pass + + +try: + raise NonNativeException("test") +except Exception as e: + print("\nNonNative Trace:") + traceback.print_exception(None, e, e.__traceback__) print("") diff --git a/tests/circuitpython/traceback_test.py.exp b/tests/circuitpython/traceback_test.py.exp index be887f2421..9d5adff172 100644 --- a/tests/circuitpython/traceback_test.py.exp +++ b/tests/circuitpython/traceback_test.py.exp @@ -21,3 +21,8 @@ Traceback (most recent call last): File "circuitpython/traceback_test.py", line 9, in fun Exception: test +NonNative Trace: +Traceback (most recent call last): + File "circuitpython/traceback_test.py", line 32, in +NonNativeException: test + From 4e41bf1dc7d8c97e1bf2986a7a27753c9765e8c7 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 15 Dec 2021 10:56:27 -0800 Subject: [PATCH 078/258] Checkout ulab for build --- tools/ci_fetch_deps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_fetch_deps.py b/tools/ci_fetch_deps.py index 8e450e7b57..6cd5626fd2 100644 --- a/tools/ci_fetch_deps.py +++ b/tools/ci_fetch_deps.py @@ -22,7 +22,7 @@ port_deps = { "lib/tinyusb/", "data/nvm.toml/", ], - "broadcom": ["lib/tinyusb/"], + "broadcom": ["extmod/ulab/", "lib/tinyusb/"], "cxd56": ["extmod/ulab/", "lib/tinyusb/"], "espressif": ["extmod/ulab/", "lib/tinyusb/", "lib/protomatter/", "lib/quirc/"], "litex": ["extmod/ulab/", "lib/tinyusb/"], From 5d5c966771d55d4248ebd9964c8684d296a1f75f Mon Sep 17 00:00:00 2001 From: Randall Bohn Date: Wed, 15 Dec 2021 13:05:03 -0700 Subject: [PATCH 079/258] install is a pre-commit command not an option --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 0686df3c04..f7598dced1 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -100,7 +100,7 @@ We apply code quality checks using pre-commit. Install pre-commit once per syst Activate it once per git clone with - pre-commit --install + pre-commit install Pre-commit also requires some additional programs to be installed through your package manager: From fd655301b5ea8e37fe5cea2b6fb9438708abda7d Mon Sep 17 00:00:00 2001 From: Randall Bohn Date: Wed, 15 Dec 2021 13:07:12 -0700 Subject: [PATCH 080/258] edit docstring for pixel_shader --- shared-bindings/displayio/OnDiskBitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/displayio/OnDiskBitmap.c b/shared-bindings/displayio/OnDiskBitmap.c index b68fbef992..0564b48fe8 100644 --- a/shared-bindings/displayio/OnDiskBitmap.c +++ b/shared-bindings/displayio/OnDiskBitmap.c @@ -138,8 +138,8 @@ const mp_obj_property_t displayio_ondiskbitmap_height_obj = { //| pixel_shader: Union[ColorConverter, Palette] //| """The image's pixel_shader. The type depends on the underlying -//| bitmap's structure. The pixel shadder can be modified (e.g., to set the -//| transparent pixel or, for paletted images, to update the palette""" +//| bitmap's structure. The pixel shader can be modified (e.g., to set the +//| transparent pixel or, for palette shaded images, to update the palette.)""" //| STATIC mp_obj_t displayio_ondiskbitmap_obj_get_pixel_shader(mp_obj_t self_in) { displayio_ondiskbitmap_t *self = MP_OBJ_TO_PTR(self_in); From 5e4cb4f1e2448901806d59ce2c3ee1d6c7b98091 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 15 Dec 2021 13:46:31 -0800 Subject: [PATCH 081/258] Yes, index is unused. That's ok. --- ports/broadcom/common-hal/neopixel_write/__init__.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/broadcom/common-hal/neopixel_write/__init__.c b/ports/broadcom/common-hal/neopixel_write/__init__.c index 420ca369da..c045317f93 100644 --- a/ports/broadcom/common-hal/neopixel_write/__init__.c +++ b/ports/broadcom/common-hal/neopixel_write/__init__.c @@ -101,6 +101,8 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, if (index == 1) { pwm = PWM1; } + #else + (void)index; #endif pwm->RNG1 = 24; From 7c2e7bfeaa486bf4128950cc726c7c239a4df604 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 15 Dec 2021 14:41:42 -0800 Subject: [PATCH 082/258] Add alternative clock pin name to match silkscreen --- ports/raspberrypi/boards/adafruit_kb2040/pins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/raspberrypi/boards/adafruit_kb2040/pins.c b/ports/raspberrypi/boards/adafruit_kb2040/pins.c index e36346a0dd..34e13fb6c7 100644 --- a/ports/raspberrypi/boards/adafruit_kb2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_kb2040/pins.c @@ -8,6 +8,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO19) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, From 2cdd73f79378611b63fa02f99374639ebfcedbb4 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 15 Dec 2021 22:01:57 +0000 Subject: [PATCH 083/258] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1029 of 1029 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 f97b5d8944..7292e05968 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-11-24 23:51+0000\n" +"PO-Revision-Date: 2021-12-16 22:53+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.10-dev\n" +"X-Generator: Weblate 4.10\n" #: main.c msgid "" @@ -2812,7 +2812,7 @@ msgstr "Valor de calibração fora do intervalo +/- 127" #: shared-module/vectorio/Rectangle.c msgid "can only be registered in one parent" -msgstr "" +msgstr "pode ser registrado apenas numa principal" #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" From e72470f90597b54311bfe38477cf7b46595c9080 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Wed, 15 Dec 2021 16:15:40 +0000 Subject: [PATCH 084/258] Translated using Weblate (Swedish) Currently translated at 100.0% (1029 of 1029 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 7e42697b32..c100cb5469 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-11-25 00:02+0000\n" +"PO-Revision-Date: 2021-12-16 22:53+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.10-dev\n" +"X-Generator: Weblate 4.10\n" #: main.c msgid "" @@ -2780,7 +2780,7 @@ msgstr "kalibreringsvärde utanför intervallet +/- 127" #: shared-module/vectorio/Rectangle.c msgid "can only be registered in one parent" -msgstr "" +msgstr "kan endast registreras med en förälder" #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" From 12e72ef4067bf072228ae6154d4693aab89a8fae Mon Sep 17 00:00:00 2001 From: lady ada Date: Fri, 17 Dec 2021 00:24:19 -0500 Subject: [PATCH 085/258] fix final qtpys2 and s2tft feather pinouts --- .../espressif/boards/adafruit_feather_esp32s2_tft/board.c | 8 +++++++- .../espressif/boards/adafruit_feather_esp32s2_tft/pins.c | 4 +++- .../boards/adafruit_qtpy_esp32s2/mpconfigboard.mk | 5 ----- ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c | 8 ++++---- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index c6d9b581b3..dcc9ba81ff 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -74,6 +74,12 @@ void board_init(void) { common_hal_never_reset_pin(&pin_GPIO19); common_hal_never_reset_pin(&pin_GPIO20); + // I2C/TFT power pin + common_hal_never_reset_pin(&pin_GPIO21); + + // Turn on TFT and I2C + gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(21, true); busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; @@ -93,7 +99,7 @@ void board_init(void) { bus, spi, &pin_GPIO39, // DC - &pin_GPIO21, // CS + &pin_GPIO7, // CS &pin_GPIO40, // RST 40000000, // baudrate 0, // polarity diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c index 8d888ebfe7..1f56d8cf76 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c @@ -44,6 +44,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_I2C_TFT_POWER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, @@ -59,7 +61,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO42) }, - { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO39) }, { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO45) }, diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk index 38cdd83779..d415e140cb 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk @@ -18,8 +18,3 @@ CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_MODULE=wroom - -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c index ac5d2275d0..302126a4ad 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c @@ -37,11 +37,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO38) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO39) }, From c08809031966c36c9c90ef95d61cbcf17ee7ef48 Mon Sep 17 00:00:00 2001 From: lady ada Date: Fri, 17 Dec 2021 01:17:35 -0500 Subject: [PATCH 086/258] nuudge --- ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index dcc9ba81ff..7f1695d206 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -118,7 +118,7 @@ void board_init(void) { 240, // width (after rotation) 135, // height (after rotation) 40, // column start - 52, // row start + 53, // row start 0, // rotation 16, // color depth false, // grayscale From 21298237e2118632d8d38066a8c86ed7f31dbc53 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 17 Dec 2021 08:28:49 -0600 Subject: [PATCH 087/258] Update ulab This fixes a doc-building bug and also a bug with any()/all(). --- extmod/ulab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/ulab b/extmod/ulab index c03990cc56..a99e0b9878 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit c03990cc56283417e752246c2738199f65d1b7ef +Subproject commit a99e0b98787266369eaa33bdae271de761eca05b From 1c1559f5afc0f345bc0e6c7a046f78c008c248cc Mon Sep 17 00:00:00 2001 From: lady ada Date: Fri, 17 Dec 2021 09:41:44 -0500 Subject: [PATCH 088/258] fix colororder --- ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index 7f1695d206..346be34886 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -45,7 +45,7 @@ uint8_t display_init_sequence[] = { // normal display mode on 0x13, 0, // display and color format settings - 0x36, 1, 0x60, + 0x36, 1, 0x68, 0xB6, 2, 0x0A, 0x82, 0x3A, 1 | DELAY, 0x55, 10, // ST7789V frame rate setting From 8e540a17387afc4e0569b722e63a7bd9f791f3df Mon Sep 17 00:00:00 2001 From: lady ada Date: Fri, 17 Dec 2021 00:24:19 -0500 Subject: [PATCH 089/258] fix final qtpys2 and s2tft feather pinouts --- .../espressif/boards/adafruit_feather_esp32s2_tft/board.c | 8 +++++++- .../espressif/boards/adafruit_feather_esp32s2_tft/pins.c | 4 +++- .../boards/adafruit_qtpy_esp32s2/mpconfigboard.mk | 5 ----- ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c | 8 ++++---- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index c6d9b581b3..dcc9ba81ff 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -74,6 +74,12 @@ void board_init(void) { common_hal_never_reset_pin(&pin_GPIO19); common_hal_never_reset_pin(&pin_GPIO20); + // I2C/TFT power pin + common_hal_never_reset_pin(&pin_GPIO21); + + // Turn on TFT and I2C + gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(21, true); busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; @@ -93,7 +99,7 @@ void board_init(void) { bus, spi, &pin_GPIO39, // DC - &pin_GPIO21, // CS + &pin_GPIO7, // CS &pin_GPIO40, // RST 40000000, // baudrate 0, // polarity diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c index 8d888ebfe7..1f56d8cf76 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c @@ -44,6 +44,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_I2C_TFT_POWER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, @@ -59,7 +61,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO42) }, - { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO39) }, { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO45) }, diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk index 38cdd83779..d415e140cb 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk @@ -18,8 +18,3 @@ CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_MODULE=wroom - -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c index ac5d2275d0..302126a4ad 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c @@ -37,11 +37,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO38) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO39) }, From 26c2acae1243ceb689cff20007830e51628a431f Mon Sep 17 00:00:00 2001 From: lady ada Date: Fri, 17 Dec 2021 01:17:35 -0500 Subject: [PATCH 090/258] nuudge --- ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index dcc9ba81ff..7f1695d206 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -118,7 +118,7 @@ void board_init(void) { 240, // width (after rotation) 135, // height (after rotation) 40, // column start - 52, // row start + 53, // row start 0, // rotation 16, // color depth false, // grayscale From da4f5bdaefae2b1eeaa721244853b4661013277c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 17 Dec 2021 09:32:53 -0600 Subject: [PATCH 091/258] fix ci matrix when ulab is modified When the submodule is modified, the modified 'filename' is simply the submodule path `extmod/ulab`, not the specific file(s) in the submodule that are modified. --- tools/ci_set_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index b25d81ac95..e8a7c95656 100644 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -120,7 +120,7 @@ def set_docs_to_build(build_all): doc_match = build_all if not build_all: doc_pattern = re.compile( - r"^(?:docs|(?:(?:extmod\/ulab|ports\/\w+\/bindings|shared-bindings)\S+\.c|conf\.py|tools\/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$" + r"^(?:docs|extmod/ulab|(?:(?:ports\/\w+\/bindings|shared-bindings)\S+\.c|conf\.py|tools\/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$" ) for p in changed_files: if doc_pattern.search(p): From bd282bb1be33f2ec16811db38e9d7bc71894995b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 17 Dec 2021 09:34:47 -0600 Subject: [PATCH 092/258] do not backslash-escape forward slashes --- tools/ci_set_matrix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index e8a7c95656..efb4427e7e 100644 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -68,8 +68,8 @@ def set_boards_to_build(build_all): if not build_all: boards_to_build = set() - board_pattern = re.compile(r"^ports\/[^/]+\/boards\/([^/]+)\/") - port_pattern = re.compile(r"^ports\/([^/]+)\/") + board_pattern = re.compile(r"^ports/[^/]+/boards/([^/]+)/") + port_pattern = re.compile(r"^ports/([^/]+)/") for p in changed_files: # See if it is board specific board_matches = board_pattern.search(p) @@ -120,7 +120,7 @@ def set_docs_to_build(build_all): doc_match = build_all if not build_all: doc_pattern = re.compile( - r"^(?:docs|extmod/ulab|(?:(?:ports\/\w+\/bindings|shared-bindings)\S+\.c|conf\.py|tools\/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$" + r"^(?:docs|extmod/ulab|(?:(?:ports/\w+/bindings|shared-bindings)\S+\.c|conf\.py|tools/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$" ) for p in changed_files: if doc_pattern.search(p): From 654414e57e9729f5c9c7b97b2e71b43ed5f38b85 Mon Sep 17 00:00:00 2001 From: lady ada Date: Fri, 17 Dec 2021 09:41:44 -0500 Subject: [PATCH 093/258] fix colororder --- ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index 7f1695d206..346be34886 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -45,7 +45,7 @@ uint8_t display_init_sequence[] = { // normal display mode on 0x13, 0, // display and color format settings - 0x36, 1, 0x60, + 0x36, 1, 0x68, 0xB6, 2, 0x0A, 0x82, 0x3A, 1 | DELAY, 0x55, 10, // ST7789V frame rate setting From 60c20182629141646cb0d11810780d14d6c1fbec Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 17 Dec 2021 12:04:39 -0600 Subject: [PATCH 094/258] Update protomatter & re-enable rgbmatrix on esp32s2 .. not enabled on s3 & c3 as I did not test there. --- lib/protomatter | 2 +- ports/espressif/mpconfigport.mk | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/protomatter b/lib/protomatter index 7fe6406aff..d0a07e14ad 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit 7fe6406affb1376193102cf76ded06e61316d7e6 +Subproject commit d0a07e14adcd71a7c22bcceb16c55aadb5e0d104 diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 21459e01f5..e78e7b2705 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -26,7 +26,6 @@ CIRCUITPY_FRAMEBUFFERIO ?= 1 CIRCUITPY_FREQUENCYIO ?= 1 CIRCUITPY_IMAGECAPTURE ?= 1 CIRCUITPY_I2CPERIPHERAL ?= 1 -CIRCUITPY_RGBMATRIX ?= 0 CIRCUITPY_ROTARYIO ?= 1 CIRCUITPY_NVM ?= 1 CIRCUITPY_PS2IO ?= 1 @@ -49,9 +48,13 @@ CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_TOUCHIO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE = 0 +CIRCUITPY_RGBMATRIX ?= 0 else ifeq ($(IDF_TARGET),esp32s3) CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_PARALLELDISPLAY = 0 +CIRCUITPY_RGBMATRIX ?= 0 +else +CIRCUITPY_RGBMATRIX ?= 1 endif # From ESP32-S2/S3 Technical Reference Manual: From c615daff30cc8e555c8df39562373afd8b604825 Mon Sep 17 00:00:00 2001 From: George Waters Date: Fri, 17 Dec 2021 16:23:58 -0500 Subject: [PATCH 095/258] Explicitly cast float to mp_int_t Not sure why this is necessary, but it prevents an off-by-one error in some (rare?) circumstances. --- shared-module/adafruit_pixelbuf/PixelBuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/adafruit_pixelbuf/PixelBuf.c b/shared-module/adafruit_pixelbuf/PixelBuf.c index bfeab4ae04..99980c705e 100644 --- a/shared-module/adafruit_pixelbuf/PixelBuf.c +++ b/shared-module/adafruit_pixelbuf/PixelBuf.c @@ -163,7 +163,7 @@ STATIC void _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t *self, mp_obj_t color, } if (mp_obj_is_int(color) || mp_obj_is_float(color)) { - mp_int_t value = mp_obj_is_int(color) ? mp_obj_get_int_truncated(color) : mp_obj_get_float(color); + mp_int_t value = mp_obj_is_int(color) ? mp_obj_get_int_truncated(color) : (mp_int_t)mp_obj_get_float(color); *r = value >> 16 & 0xff; *g = (value >> 8) & 0xff; *b = value & 0xff; From 0ce5265624b5823bc7b6fb03dcbdd95eedd59fa4 Mon Sep 17 00:00:00 2001 From: George Waters Date: Fri, 17 Dec 2021 16:23:58 -0500 Subject: [PATCH 096/258] Explicitly cast float to mp_int_t Not sure why this is necessary, but it prevents an off-by-one error in some (rare?) circumstances. --- shared-module/adafruit_pixelbuf/PixelBuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/adafruit_pixelbuf/PixelBuf.c b/shared-module/adafruit_pixelbuf/PixelBuf.c index bfeab4ae04..99980c705e 100644 --- a/shared-module/adafruit_pixelbuf/PixelBuf.c +++ b/shared-module/adafruit_pixelbuf/PixelBuf.c @@ -163,7 +163,7 @@ STATIC void _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t *self, mp_obj_t color, } if (mp_obj_is_int(color) || mp_obj_is_float(color)) { - mp_int_t value = mp_obj_is_int(color) ? mp_obj_get_int_truncated(color) : mp_obj_get_float(color); + mp_int_t value = mp_obj_is_int(color) ? mp_obj_get_int_truncated(color) : (mp_int_t)mp_obj_get_float(color); *r = value >> 16 & 0xff; *g = (value >> 8) & 0xff; *b = value & 0xff; From 577358ae99b45ae06ae7c07ba341165b2f58568e Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 20 Dec 2021 07:38:16 -0600 Subject: [PATCH 097/258] code format --- tests/extmod/utimeq1.py | 1 + tools/pydfu.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/extmod/utimeq1.py b/tests/extmod/utimeq1.py index ddbc969afb..234d7a31dd 100644 --- a/tests/extmod/utimeq1.py +++ b/tests/extmod/utimeq1.py @@ -17,6 +17,7 @@ if DEBUG: def dprint(*v): print(*v) + else: def dprint(*v): diff --git a/tools/pydfu.py b/tools/pydfu.py index ce34b08a58..26e40f5613 100755 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -83,6 +83,7 @@ if "length" in inspect.getfullargspec(usb.util.get_string).args: def get_string(dev, index): return usb.util.get_string(dev, 255, index) + else: # PyUSB 1.0.0.b2 dropped the length argument def get_string(dev, index): From 4125a10d69398ad935cc2ebb8b6978fdebb6caa5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 20 Dec 2021 09:57:02 -0600 Subject: [PATCH 098/258] pin specific versions of cascadetoml & tomlkit, temporarily --- requirements-dev.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a57794ce1a..6a4f5617a8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,8 @@ huffman # For nvm.toml -cascadetoml +cascadetoml==0.3.1 +tomlkit==0.7.2 jinja2 typer From 8b715193178ff36b3ac74002f9cab30dc537268b Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 20 Dec 2021 10:48:08 -0600 Subject: [PATCH 099/258] code format --- shared-bindings/displayio/TileGrid.c | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/shared-bindings/displayio/TileGrid.c b/shared-bindings/displayio/TileGrid.c index eebb892ef0..4cecd0f0f1 100644 --- a/shared-bindings/displayio/TileGrid.c +++ b/shared-bindings/displayio/TileGrid.c @@ -225,54 +225,54 @@ STATIC mp_obj_t displayio_tilegrid_obj_get_width(mp_obj_t self_in) { MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_width_obj, displayio_tilegrid_obj_get_width); const mp_obj_property_t displayio_tilegrid_width_obj = { - .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&displayio_tilegrid_get_width_obj, - MP_ROM_NONE}, + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_width_obj, + MP_ROM_NONE}, }; //| height: int //| """Height of the tilegrid in tiles.""" //| STATIC mp_obj_t displayio_tilegrid_obj_get_height(mp_obj_t self_in) { -displayio_tilegrid_t *self = native_tilegrid(self_in); -return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_height(self)); + displayio_tilegrid_t *self = native_tilegrid(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_height(self)); } MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_height_obj, displayio_tilegrid_obj_get_height); const mp_obj_property_t displayio_tilegrid_height_obj = { - .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&displayio_tilegrid_get_height_obj, - MP_ROM_NONE}, + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_height_obj, + MP_ROM_NONE}, }; //| tile_width: int //| """Width of a single tile in pixels.""" //| STATIC mp_obj_t displayio_tilegrid_obj_get_tile_width(mp_obj_t self_in) { -displayio_tilegrid_t *self = native_tilegrid(self_in); -return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_tile_width(self)); + displayio_tilegrid_t *self = native_tilegrid(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_tile_width(self)); } MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_width_obj, displayio_tilegrid_obj_get_tile_width); const mp_obj_property_t displayio_tilegrid_tile_width_obj = { - .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_width_obj, - MP_ROM_NONE}, + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_width_obj, + MP_ROM_NONE}, }; //| tile_height: int //| """Height of a single tile in pixels.""" //| STATIC mp_obj_t displayio_tilegrid_obj_get_tile_height(mp_obj_t self_in) { -displayio_tilegrid_t *self = native_tilegrid(self_in); -return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_tile_height(self)); + displayio_tilegrid_t *self = native_tilegrid(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_tile_height(self)); } MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_height_obj, displayio_tilegrid_obj_get_tile_height); const mp_obj_property_t displayio_tilegrid_tile_height_obj = { - .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_height_obj, - MP_ROM_NONE}, + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_height_obj, + MP_ROM_NONE}, }; //| flip_x: bool From d08ba86fc43c13ad60cefc0710c33afbc603ebb2 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 20 Dec 2021 12:09:14 -0600 Subject: [PATCH 100/258] Revert "code format" This reverts commit 577358ae99b45ae06ae7c07ba341165b2f58568e. --- tests/extmod/utimeq1.py | 1 - tools/pydfu.py | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/extmod/utimeq1.py b/tests/extmod/utimeq1.py index 234d7a31dd..ddbc969afb 100644 --- a/tests/extmod/utimeq1.py +++ b/tests/extmod/utimeq1.py @@ -17,7 +17,6 @@ if DEBUG: def dprint(*v): print(*v) - else: def dprint(*v): diff --git a/tools/pydfu.py b/tools/pydfu.py index 26e40f5613..ce34b08a58 100755 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -83,7 +83,6 @@ if "length" in inspect.getfullargspec(usb.util.get_string).args: def get_string(dev, index): return usb.util.get_string(dev, 255, index) - else: # PyUSB 1.0.0.b2 dropped the length argument def get_string(dev, index): From 5e523c498dba90cd570ac1381794925f8bc68e90 Mon Sep 17 00:00:00 2001 From: dronecz Date: Sun, 19 Dec 2021 21:19:36 +0000 Subject: [PATCH 101/258] Translated using Weblate (Czech) Currently translated at 4.5% (47 of 1029 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/cs/ --- locale/cs.po | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/locale/cs.po b/locale/cs.po index 389f2a8763..49916c32e7 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-15 03:32+0000\n" +"PO-Revision-Date: 2021-12-20 21:53+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" "Language: cs\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.10-dev\n" +"X-Generator: Weblate 4.10\n" #: main.c msgid "" @@ -71,15 +71,15 @@ msgstr "%%c vyžaduje int nebo char" #, c-format msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" -msgstr "" +msgstr "%d adresní pin, %d rgb pin a %d dlaždice indikuje výšku %d, ne %d" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" -msgstr "" +msgstr "%q a %q obsahují duplicitní piny" #: shared-bindings/microcontroller/Pin.c msgid "%q contains duplicate pins" -msgstr "" +msgstr "%q obsahuje duplicitní piny" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" @@ -104,23 +104,23 @@ msgstr "Indexy %q musí být celá čísla, nikoli %s" #: py/argcheck.c msgid "%q length must be %d-%d" -msgstr "" +msgstr "%q délka musí být %d-%d" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" -msgstr "" +msgstr "%q délka musí být >= 1" #: py/argcheck.c msgid "%q must be %d-%d" -msgstr "" +msgstr "%q musí být %d-%d" #: py/argcheck.c shared-bindings/gifio/GifWriter.c msgid "%q must be <= %d" -msgstr "" +msgstr "%q musí být <= %d" #: py/argcheck.c msgid "%q must be >= %d" -msgstr "" +msgstr "%q musí být >= %d" #: py/argcheck.c shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" @@ -136,7 +136,7 @@ msgstr "%q musí být > = 1" #: py/argcheck.c msgid "%q must be a string" -msgstr "" +msgstr "%q musí být string" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" @@ -145,19 +145,19 @@ msgstr "%q musí být n-tice délky 2" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c #: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" -msgstr "" +msgstr "%q musí být mezi %d a %d" #: py/argcheck.c msgid "%q must be of type %q" -msgstr "" +msgstr "%q musí být typu %q" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" -msgstr "" +msgstr "%q musí být mocnina 2" #: shared-bindings/wifi/Monitor.c msgid "%q out of bounds" -msgstr "" +msgstr "%q je mimo hranice" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: shared-bindings/canio/Match.c @@ -166,7 +166,7 @@ msgstr "%q je mimo rozsah" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" -msgstr "Pin %q není platný" +msgstr "pin %q není platný" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" @@ -344,7 +344,7 @@ msgstr "" #: py/obj.c msgid ", in %q\n" -msgstr "" +msgstr ", v %q\n" #: py/objcomplex.c msgid "0.0 to a complex power" @@ -529,13 +529,15 @@ msgstr "" #: main.c msgid "Auto-reload is off.\n" -msgstr "" +msgstr "Automatické načtení je vypnuté.\n" #: main.c msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" +"Automatické načtení je zapnuté. Stačí uložit soubory na USB nebo vstoupit " +"do REPLu pro jeho zakázání.\n" #: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" @@ -1952,7 +1954,7 @@ msgstr "" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" -msgstr "" +msgstr "Předstírám hluboký spánek do alarmu, CTRL-C nebo zápisu souboru.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does IN without loading ISR" From d61d8b1020ab333d8c44baadafb1919f59c93a0a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 20 Dec 2021 18:28:09 -0600 Subject: [PATCH 102/258] set up python 3.x and use setup-python@v2 --- .github/workflows/build.yml | 42 ++++++++++++------------- .github/workflows/create_website_pr.yml | 6 ++-- .github/workflows/pre-commit.yml | 5 ++- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d55e947ab..38d86bae0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,10 +30,10 @@ jobs: with: submodules: false fetch-depth: 1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - name: Get CP deps run: python tools/ci_fetch_deps.py test ${{ github.sha }} - name: CircuitPython version @@ -136,10 +136,10 @@ jobs: with: submodules: false fetch-depth: 1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - name: Get CP deps run: python tools/ci_fetch_deps.py mpy-cross-mac ${{ github.sha }} - name: CircuitPython version @@ -202,10 +202,10 @@ jobs: run: | git describe --dirty --tags echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags) - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - name: Install dependencies run: | sudo apt-get update @@ -260,10 +260,10 @@ jobs: board: ${{ fromJSON(needs.test.outputs.boards-arm) }} if: ${{ needs.test.outputs.boards-arm != '[]' }} steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - uses: actions/checkout@v2.2.0 with: submodules: false @@ -312,10 +312,10 @@ jobs: board: ${{ fromJSON(needs.test.outputs.boards-riscv) }} if: ${{ needs.test.outputs.boards-riscv != '[]' }} steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - uses: actions/checkout@v2.2.0 with: submodules: false @@ -364,10 +364,10 @@ jobs: board: ${{ fromJSON(needs.test.outputs.boards-espressif) }} if: ${{ needs.test.outputs.boards-espressif != '[]' }} steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - uses: actions/checkout@v2.2.0 with: submodules: false @@ -451,10 +451,10 @@ jobs: board: ${{ fromJSON(needs.test.outputs.boards-aarch) }} if: ${{ needs.test.outputs.boards-aarch != '[]' }} steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - uses: actions/checkout@v2.2.0 with: submodules: false diff --git a/.github/workflows/create_website_pr.yml b/.github/workflows/create_website_pr.yml index 007cfbd402..dc987f0989 100644 --- a/.github/workflows/create_website_pr.yml +++ b/.github/workflows/create_website_pr.yml @@ -20,10 +20,10 @@ jobs: with: submodules: false fetch-depth: 1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - name: Get CP deps run: python tools/ci_fetch_deps.py website ${{ github.sha }} - name: Install deps diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 2a8811115e..02db3b2c61 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,7 +13,10 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2.2.0 - - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: "3.x" - name: Install deps run: | sudo apt-add-repository -y -u ppa:pybricks/ppa From 745003751c93298e6691c4ae64850e6b4ba5b072 Mon Sep 17 00:00:00 2001 From: 0hotpotman0 Date: Tue, 21 Dec 2021 19:08:11 +0800 Subject: [PATCH 103/258] Add new board Seeed_XIAO_nRF52840 --- .../boards/Seeed_XIAO_nRF52840_Sense/board.c | 41 ++++++++++++++ .../Seeed_XIAO_nRF52840_Sense/mpconfigboard.h | 54 ++++++++++++++++++ .../mpconfigboard.mk | 9 +++ .../boards/Seeed_XIAO_nRF52840_Sense/pins.c | 55 +++++++++++++++++++ 4 files changed, 159 insertions(+) create mode 100644 ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c create mode 100644 ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.h create mode 100644 ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk create mode 100644 ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c new file mode 100644 index 0000000000..077c448532 --- /dev/null +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c @@ -0,0 +1,41 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} \ No newline at end of file diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.h b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.h new file mode 100644 index 0000000000..8b3dd9ebb8 --- /dev/null +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.h @@ -0,0 +1,54 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2018 Dan Halbert 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 "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "Seeed XIAO nRF52840 Sense" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define MICROPY_HW_LED_STATUS (&pin_P0_26) + +#if QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 24) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 23) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 21) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 25) +#endif + +#define BOARD_HAS_CRYSTAL 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_05) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_04) + +#define DEFAULT_SPI_BUS_SCK (&pin_P1_13) +#define DEFAULT_SPI_BUS_MOSI (&pin_P1_15) +#define DEFAULT_SPI_BUS_MISO (&pin_P1_14) + +#define DEFAULT_UART_BUS_RX (&pin_P1_12) +#define DEFAULT_UART_BUS_TX (&pin_P1_11) diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk new file mode 100644 index 0000000000..697b30fa4e --- /dev/null +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x2886 +USB_PID = 0x0045 +USB_PRODUCT = "XIAO nRF52840 Sense" +USB_MANUFACTURER = "Seeed" + +MCU_CHIP = nrf52840 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "P25Q16H" diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c new file mode 100644 index 0000000000..beb85eda40 --- /dev/null +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c @@ -0,0 +1,55 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_05) }, + + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P1_15) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P1_14) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_12) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_04) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_30) }, + + { MP_ROM_QSTR(MP_QSTR_6D_PWR), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_6D_SCL), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_6D_SDA), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_6D_INT1), MP_ROM_PTR(&pin_P0_11) }, + + { MP_ROM_QSTR(MP_QSTR_MIC_PWR), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_16) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From f527ef0eb8e6e1eb744c9c552d3dba4c76a81102 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 21 Dec 2021 08:43:35 -0600 Subject: [PATCH 104/258] pin cascadetoml for windows build too --- .github/workflows/ports_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ports_windows.yml b/.github/workflows/ports_windows.yml index 6339746066..addf26f017 100644 --- a/.github/workflows/ports_windows.yml +++ b/.github/workflows/ports_windows.yml @@ -60,7 +60,7 @@ jobs: pip install wheel # requirements_dev.txt doesn't install on windows. (with msys2 python) # instead, pick a subset for what we want to do - pip install cascadetoml jinja2 typer intelhex + pip install jinja2 typer intelhex cascadetoml==0.3.1 tomlkit==0.7.2 # check that installed packages work....? which python; python --version; python -c "import cascadetoml" which python3; python3 --version; python3 -c "import cascadetoml" From 0db83f42a442ff961fabba40e21cde53b3529779 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 21 Dec 2021 11:17:10 -0800 Subject: [PATCH 105/258] Revert "pin specific versions of cascadetoml & tomlkit, temporarily" --- requirements-dev.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6a4f5617a8..a57794ce1a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,8 +2,7 @@ huffman # For nvm.toml -cascadetoml==0.3.1 -tomlkit==0.7.2 +cascadetoml jinja2 typer From 03a80e429b8eb1568052406520957291b878dbbe Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 21 Dec 2021 16:21:10 -0800 Subject: [PATCH 106/258] Add new line for pre-commit --- ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c index 077c448532..b4070e72dc 100644 --- a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c @@ -38,4 +38,4 @@ void reset_board(void) { } void board_deinit(void) { -} \ No newline at end of file +} From 3bb9a4439d73ba51384a633b4c3a5ed6c7fc7187 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 21 Dec 2021 21:48:36 -0500 Subject: [PATCH 107/258] Fix recording of wake_alarm --- locale/circuitpython.pot | 11 +++---- main.c | 33 ++++++++++++++------- ports/espressif/common-hal/alarm/__init__.c | 11 +------ shared-bindings/alarm/__init__.c | 10 +++++-- 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 835ef9538b..4cf6992ba4 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -574,7 +574,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -1462,7 +1462,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -2090,7 +2090,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2351,7 +2351,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -3950,6 +3950,7 @@ msgstr "" #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h @@ -4462,7 +4463,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" diff --git a/main.c b/main.c index b1b482f985..8b5b19faf0 100644 --- a/main.c +++ b/main.c @@ -122,7 +122,7 @@ static void reset_devices(void) { #endif } -STATIC void start_mp(supervisor_allocation *heap) { +STATIC void start_mp(supervisor_allocation *heap, bool first_run) { autoreload_stop(); supervisor_workflow_reset(); @@ -170,7 +170,8 @@ STATIC void start_mp(supervisor_allocation *heap) { #if CIRCUITPY_ALARM // Record which alarm woke us up, if any. An object may be created so the heap must be functional. - shared_alarm_save_wake_alarm(common_hal_alarm_create_wake_alarm()); + // There is no alarm if this is not the first time code.py or the REPL has been run. + shared_alarm_save_wake_alarm(first_run ? common_hal_alarm_create_wake_alarm() : mp_const_none); // Reset alarm module only after we retrieved the wakeup alarm. alarm_reset(); #endif @@ -308,7 +309,7 @@ STATIC void print_code_py_status_message(safe_mode_t safe_mode) { } } -STATIC bool run_code_py(safe_mode_t safe_mode) { +STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_reset) { bool serial_connected_at_start = serial_connected(); bool printed_safe_mode_message = false; #if CIRCUITPY_AUTORELOAD_DELAY_MS > 0 @@ -347,7 +348,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { supervisor_allocation *heap = allocate_remaining_memory(); // Prepare the VM state. Includes an alarm check/reset for sleep. - start_mp(heap); + start_mp(heap, first_run); #if CIRCUITPY_USB usb_setup_with_vm(); @@ -630,6 +631,8 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { #if CIRCUITPY_ALARM if (fake_sleeping) { board_init(); + // Pretend that the next run is the first run, as if we were reset. + *simulate_reset = true; } #endif @@ -651,7 +654,9 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { // Do USB setup even if boot.py is not run. supervisor_allocation *heap = allocate_remaining_memory(); - start_mp(heap); + + // true means this is the first set of VM's after a hard reset. + start_mp(heap, true); #if CIRCUITPY_USB // Set up default USB values after boot.py VM starts but before running boot.py. @@ -728,12 +733,12 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { #endif } -STATIC int run_repl(void) { +STATIC int run_repl(bool first_run) { int exit_code = PYEXEC_FORCED_EXIT; stack_resize(); filesystem_flush(); supervisor_allocation *heap = allocate_remaining_memory(); - start_mp(heap); + start_mp(heap, first_run); #if CIRCUITPY_USB usb_setup_with_vm(); @@ -846,28 +851,34 @@ int __attribute__((used)) main(void) { supervisor_start_bluetooth(); #endif - // Boot script is finished, so now go into REPL/main mode. + // Boot script is finished, so now go into REPL or run code.py. int exit_code = PYEXEC_FORCED_EXIT; bool skip_repl = true; bool first_run = true; + bool simulate_reset; for (;;) { + simulate_reset = false; if (!skip_repl) { - exit_code = run_repl(); + exit_code = run_repl(first_run); supervisor_set_run_reason(RUN_REASON_REPL_RELOAD); } if (exit_code == PYEXEC_FORCED_EXIT) { if (!first_run) { serial_write_compressed(translate("soft reboot\n")); } - first_run = false; if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) { - skip_repl = run_code_py(safe_mode); + skip_repl = run_code_py(safe_mode, first_run, &simulate_reset); } else { skip_repl = false; } } else if (exit_code != 0) { break; } + + // Either the REPL or code.py has run and finished. + // If code.py did a fake deep sleep, pretend that we are running code.py for + // the first time after a hard reset. This will preserve any alarm information. + first_run = simulate_reset; } mp_deinit(); return 0; diff --git a/ports/espressif/common-hal/alarm/__init__.c b/ports/espressif/common-hal/alarm/__init__.c index 8d12cb1b09..b24a91a03e 100644 --- a/ports/espressif/common-hal/alarm/__init__.c +++ b/ports/espressif/common-hal/alarm/__init__.c @@ -62,11 +62,6 @@ void alarm_reset(void) { esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_ALL); } -// This will be reset to false by full resets when bss is cleared. Otherwise, the -// reload is due to CircuitPython and the ESP wakeup cause will be stale. This -// can happen if USB is connected after a deep sleep. -STATIC bool soft_wakeup = false; - STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) { // First check if the modules remember what last woke up if (alarm_pin_pinalarm_woke_this_cycle()) { @@ -80,11 +75,7 @@ STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) { } // If waking from true deep sleep, modules will have lost their state, // so check the deep wakeup cause manually - if (!soft_wakeup) { - soft_wakeup = true; - return esp_sleep_get_wakeup_cause(); - } - return ESP_SLEEP_WAKEUP_UNDEFINED; + return esp_sleep_get_wakeup_cause(); } bool common_hal_alarm_woken_from_sleep(void) { diff --git a/shared-bindings/alarm/__init__.c b/shared-bindings/alarm/__init__.c index 4160f6a334..9f9e01885a 100644 --- a/shared-bindings/alarm/__init__.c +++ b/shared-bindings/alarm/__init__.c @@ -64,8 +64,10 @@ //| This object is the sole instance of `alarm.SleepMemory`.""" //| -//| wake_alarm: Alarm -//| """The most recently triggered alarm. If CircuitPython was sleeping, the alarm the woke it from sleep.""" +//| wake_alarm: Optional[Alarm] +//| """The most recently triggered alarm. If CircuitPython was sleeping, the alarm that woke it from sleep. +//| If no alarm occured since the last hard reset or soft restart, value is ``None``. +//| """ //| // wake_alarm is implemented as a dictionary entry, so there's no code here. @@ -103,7 +105,9 @@ STATIC mp_obj_t alarm_light_sleep_until_alarms(size_t n_args, const mp_obj_t *ar validate_objs_are_alarms(n_args, args); - return common_hal_alarm_light_sleep_until_alarms(n_args, args); + mp_obj_t alarm = common_hal_alarm_light_sleep_until_alarms(n_args, args); + shared_alarm_save_wake_alarm(alarm); + return alarm; } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(alarm_light_sleep_until_alarms_obj, 1, MP_OBJ_FUN_ARGS_MAX, alarm_light_sleep_until_alarms); From 174a2cbf2570a0bb48324cfd9e355237d2eca12d Mon Sep 17 00:00:00 2001 From: Danny Staple Date: Wed, 22 Dec 2021 17:03:58 +0000 Subject: [PATCH 108/258] Fix RST formatting for readthedocs And also a typo/grammar thing. --- ports/raspberrypi/bindings/rp2pio/StateMachine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index 0815112c3d..86bafb26ca 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -400,7 +400,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_write_obj, 2, rp2pio_statemachine //| def readinto(self, buffer: WriteableBuffer, *, start: int = 0, end: Optional[int] = None) -> None: //| """Read into ``buffer``. If the number of bytes to read is 0, nothing happens. The buffer -//| include any data added to the fifo even if it was added before this was called. +//| includes any data added to the fifo even if it was added before this was called. //| //| :param ~_typing.WriteableBuffer buffer: Read data into this buffer //| :param int start: Start of the slice of ``buffer`` to read into: ``buffer[start:end]`` From 166793f8438030036f1d8c02588c2addf293b997 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 21 Dec 2021 14:28:49 -0600 Subject: [PATCH 109/258] circuitpython_stubs: Use `circuitpython_typing` for cp-specific typing Installing stubs for a module named `_typing` seems like a dubious decision. --- ports/raspberrypi/bindings/rp2pio/StateMachine.c | 8 ++++---- shared-bindings/_bleio/Adapter.c | 6 +++--- shared-bindings/_bleio/Address.c | 2 +- shared-bindings/_bleio/Characteristic.c | 2 +- shared-bindings/_bleio/Descriptor.c | 2 +- shared-bindings/_bleio/UUID.c | 2 +- shared-bindings/_eve/__init__.c | 2 +- shared-bindings/_stage/Layer.c | 6 +++--- shared-bindings/_stage/Text.c | 6 +++--- shared-bindings/_stage/__init__.c | 2 +- shared-bindings/adafruit_pixelbuf/PixelBuf.c | 4 ++-- shared-bindings/aesio/aes.c | 4 ++-- shared-bindings/audiobusio/I2SOut.c | 2 +- shared-bindings/audiocore/RawSample.c | 2 +- shared-bindings/audiocore/WaveFile.c | 2 +- shared-bindings/audioio/AudioOut.c | 2 +- shared-bindings/audiomixer/Mixer.c | 2 +- shared-bindings/audiomixer/MixerVoice.c | 2 +- shared-bindings/audiomp3/MP3Decoder.c | 2 +- shared-bindings/audiopwmio/PWMAudioOut.c | 2 +- shared-bindings/bitbangio/I2C.c | 4 ++-- shared-bindings/busio/I2C.c | 4 ++-- .../{_typing => circuitpython_typing}/__init__.pyi | 0 shared-bindings/displayio/Display.c | 4 ++-- shared-bindings/displayio/EPaperDisplay.c | 4 ++-- shared-bindings/framebufferio/FramebufferDisplay.c | 8 ++++---- shared-bindings/i2cperipheral/I2CPeripheral.c | 2 +- shared-bindings/msgpack/__init__.c | 8 ++++---- shared-bindings/neopixel_write/__init__.c | 2 +- shared-bindings/sdcardio/SDCard.c | 4 ++-- shared-bindings/sdioio/SDCard.c | 4 ++-- shared-bindings/synthio/MidiTrack.c | 2 +- tools/extract_pyi.py | 2 +- 33 files changed, 55 insertions(+), 55 deletions(-) rename shared-bindings/{_typing => circuitpython_typing}/__init__.pyi (100%) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index 0815112c3d..3b2724711f 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -354,7 +354,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_stop_obj, rp2pio_statemachine_stop //| def write(self, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None: //| """Write the data contained in ``buffer`` to the state machine. If the buffer is empty, nothing happens. //| -//| :param ~_typing.ReadableBuffer buffer: Write out the data in this buffer +//| :param ~circuitpython_typing.ReadableBuffer buffer: Write out the data in this buffer //| :param int start: Start of the slice of ``buffer`` to write out: ``buffer[start:end]`` //| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``""" //| ... @@ -402,7 +402,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_write_obj, 2, rp2pio_statemachine //| """Read into ``buffer``. If the number of bytes to read is 0, nothing happens. The buffer //| include any data added to the fifo even if it was added before this was called. //| -//| :param ~_typing.WriteableBuffer buffer: Read data into this buffer +//| :param ~circuitpython_typing.WriteableBuffer buffer: Read data into this buffer //| :param int start: Start of the slice of ``buffer`` to read into: ``buffer[start:end]`` //| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``""" //| ... @@ -450,8 +450,8 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_readinto_obj, 2, rp2pio_statemach //| may be different. The function will return once both are filled. //| If buffer slice lengths are both 0, nothing happens. //| -//| :param ~_typing.ReadableBuffer buffer_out: Write out the data in this buffer -//| :param ~_typing.WriteableBuffer buffer_in: Read data into this buffer +//| :param ~circuitpython_typing.ReadableBuffer buffer_out: Write out the data in this buffer +//| :param ~circuitpython_typing.WriteableBuffer buffer_in: Read data into this buffer //| :param int out_start: Start of the slice of buffer_out to write out: ``buffer_out[out_start:out_end]`` //| :param int out_end: End of the slice; this index is not included. Defaults to ``len(buffer_out)`` //| :param int in_start: Start of the slice of ``buffer_in`` to read into: ``buffer_in[in_start:in_end]`` diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index d985b0aecd..baff277b69 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -196,8 +196,8 @@ const mp_obj_property_t bleio_adapter_name_obj = { //| .. note:: If you set ``anonymous=True``, then a timeout must be specified. If no timeout is //| specified, then the maximum allowed timeout will be selected automatically. //| -//| :param ~_typing.ReadableBuffer data: advertising data packet bytes -//| :param ~_typing.ReadableBuffer scan_response: scan response data packet bytes. ``None`` if no scan response is needed. +//| :param ~circuitpython_typing.ReadableBuffer data: advertising data packet bytes +//| :param ~circuitpython_typing.ReadableBuffer scan_response: scan response data packet bytes. ``None`` if no scan response is needed. //| :param bool connectable: If `True` then other devices are allowed to connect to this peripheral. //| :param bool anonymous: If `True` then this device's MAC address is randomized before advertising. //| :param int timeout: If set, we will only advertise for this many seconds. Zero means no timeout. @@ -282,7 +282,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_stop_advertising_obj, bleio_adapt //| """Starts a BLE scan and returns an iterator of results. Advertisements and scan responses are //| filtered and returned separately. //| -//| :param ~_typing.ReadableBuffer prefixes: Sequence of byte string prefixes to filter advertising packets +//| :param ~circuitpython_typing.ReadableBuffer prefixes: Sequence of byte string prefixes to filter advertising packets //| with. A packet without an advertising structure that matches one of the prefixes is //| ignored. Format is one byte for length (n) and n bytes of prefix and can be repeated. //| :param int buffer_size: the maximum number of advertising bytes to buffer. diff --git a/shared-bindings/_bleio/Address.c b/shared-bindings/_bleio/Address.c index 93345d95b0..97322bbb79 100644 --- a/shared-bindings/_bleio/Address.c +++ b/shared-bindings/_bleio/Address.c @@ -42,7 +42,7 @@ //| """Create a new Address object encapsulating the address value. //| The value itself can be one of: //| -//| :param ~_typing.ReadableBuffer address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes. +//| :param ~circuitpython_typing.ReadableBuffer address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes. //| :param int address_type: one of the integer values: `PUBLIC`, `RANDOM_STATIC`, //| `RANDOM_PRIVATE_RESOLVABLE`, or `RANDOM_PRIVATE_NON_RESOLVABLE`.""" //| ... diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c index 3744c610c7..f4c77405d1 100644 --- a/shared-bindings/_bleio/Characteristic.c +++ b/shared-bindings/_bleio/Characteristic.c @@ -67,7 +67,7 @@ //| is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum //| number of data bytes that fit in a single BLE 4.x ATT packet. //| :param bool fixed_length: True if the characteristic value is of fixed length. -//| :param ~_typing.ReadableBuffer initial_value: The initial value for this characteristic. If not given, will be +//| :param ~circuitpython_typing.ReadableBuffer initial_value: The initial value for this characteristic. If not given, will be //| filled with zeros. //| :param str user_description: User friendly description of the characteristic //| diff --git a/shared-bindings/_bleio/Descriptor.c b/shared-bindings/_bleio/Descriptor.c index 5a29575ba0..d4dd9372f3 100644 --- a/shared-bindings/_bleio/Descriptor.c +++ b/shared-bindings/_bleio/Descriptor.c @@ -61,7 +61,7 @@ //| is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum //| number of data bytes that fit in a single BLE 4.x ATT packet. //| :param bool fixed_length: True if the descriptor value is of fixed length. -//| :param ~_typing.ReadableBuffer initial_value: The initial value for this descriptor. +//| :param ~circuitpython_typing.ReadableBuffer initial_value: The initial value for this descriptor. //| //| :return: the new Descriptor.""" //| ... diff --git a/shared-bindings/_bleio/UUID.c b/shared-bindings/_bleio/UUID.c index 028d21d9d5..4e3154eb03 100644 --- a/shared-bindings/_bleio/UUID.c +++ b/shared-bindings/_bleio/UUID.c @@ -48,7 +48,7 @@ //| temporary 16-bit UUID that can be used in place of the full 128-bit UUID. //| //| :param value: The uuid value to encapsulate -//| :type value: int, ~_typing.ReadableBuffer or str""" +//| :type value: int, ~circuitpython_typing.ReadableBuffer or str""" //| ... //| STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { diff --git a/shared-bindings/_eve/__init__.c b/shared-bindings/_eve/__init__.c index 69300e47e4..13e51cb882 100644 --- a/shared-bindings/_eve/__init__.c +++ b/shared-bindings/_eve/__init__.c @@ -79,7 +79,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(flush_obj, _flush); //| def cc(self, b: ReadableBuffer) -> None: //| """Append bytes to the command FIFO. //| -//| :param ~_typing.ReadableBuffer b: The bytes to add""" +//| :param ~circuitpython_typing.ReadableBuffer b: The bytes to add""" //| ... //| STATIC mp_obj_t _cc(mp_obj_t self, mp_obj_t b) { diff --git a/shared-bindings/_stage/Layer.c b/shared-bindings/_stage/Layer.c index a040ee9ab0..c3c0aa1801 100644 --- a/shared-bindings/_stage/Layer.c +++ b/shared-bindings/_stage/Layer.c @@ -40,9 +40,9 @@ //| //| :param int width: The width of the grid in tiles, or 1 for sprites. //| :param int height: The height of the grid in tiles, or 1 for sprites. -//| :param ~_typing.ReadableBuffer graphic: The graphic data of the tiles. -//| :param ~_typing.ReadableBuffer palette: The color palette to be used. -//| :param ~_typing.ReadableBuffer grid: The contents of the grid map. +//| :param ~circuitpython_typing.ReadableBuffer graphic: The graphic data of the tiles. +//| :param ~circuitpython_typing.ReadableBuffer palette: The color palette to be used. +//| :param ~circuitpython_typing.ReadableBuffer grid: The contents of the grid map. //| //| This class is intended for internal use in the ``stage`` library and //| it shouldn't be used on its own.""" diff --git a/shared-bindings/_stage/Text.c b/shared-bindings/_stage/Text.c index b57f4f0b6a..d6b22171d6 100644 --- a/shared-bindings/_stage/Text.c +++ b/shared-bindings/_stage/Text.c @@ -40,9 +40,9 @@ //| //| :param int width: The width of the grid in tiles, or 1 for sprites. //| :param int height: The height of the grid in tiles, or 1 for sprites. -//| :param ~_typing.ReadableBuffer font: The font data of the characters. -//| :param ~_typing.ReadableBuffer palette: The color palette to be used. -//| :param ~_typing.ReadableBuffer chars: The contents of the character grid. +//| :param ~circuitpython_typing.ReadableBuffer font: The font data of the characters. +//| :param ~circuitpython_typing.ReadableBuffer palette: The color palette to be used. +//| :param ~circuitpython_typing.ReadableBuffer chars: The contents of the character grid. //| //| This class is intended for internal use in the ``stage`` library and //| it shouldn't be used on its own.""" diff --git a/shared-bindings/_stage/__init__.c b/shared-bindings/_stage/__init__.c index 4dfcc796e7..ebaa06898e 100644 --- a/shared-bindings/_stage/__init__.c +++ b/shared-bindings/_stage/__init__.c @@ -48,7 +48,7 @@ //| :param int y1: Bottom edge of the fragment. //| :param layers: A list of the :py:class:`~_stage.Layer` objects. //| :type layers: list[Layer] -//| :param ~_typing.WriteableBuffer buffer: A buffer to use for rendering. +//| :param ~circuitpython_typing.WriteableBuffer buffer: A buffer to use for rendering. //| :param ~displayio.Display display: The display to use. //| :param int scale: How many times should the image be scaled up. //| :param int background: What color to display when nothing is there. diff --git a/shared-bindings/adafruit_pixelbuf/PixelBuf.c b/shared-bindings/adafruit_pixelbuf/PixelBuf.c index db9f1c01a8..7be059fa6b 100644 --- a/shared-bindings/adafruit_pixelbuf/PixelBuf.c +++ b/shared-bindings/adafruit_pixelbuf/PixelBuf.c @@ -64,8 +64,8 @@ static void parse_byteorder(mp_obj_t byteorder_obj, pixelbuf_byteorder_details_t //| :param str byteorder: Byte order string (such as "RGB", "RGBW" or "PBGR") //| :param float brightness: Brightness (0 to 1.0, default 1.0) //| :param bool auto_write: Whether to automatically write pixels (Default False) -//| :param ~_typing.ReadableBuffer header: Sequence of bytes to always send before pixel values. -//| :param ~_typing.ReadableBuffer trailer: Sequence of bytes to always send after pixel values.""" +//| :param ~circuitpython_typing.ReadableBuffer header: Sequence of bytes to always send before pixel values. +//| :param ~circuitpython_typing.ReadableBuffer trailer: Sequence of bytes to always send after pixel values.""" //| ... //| STATIC mp_obj_t pixelbuf_pixelbuf_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { diff --git a/shared-bindings/aesio/aes.c b/shared-bindings/aesio/aes.c index 232f4bede8..4acadc5ab6 100644 --- a/shared-bindings/aesio/aes.c +++ b/shared-bindings/aesio/aes.c @@ -19,10 +19,10 @@ //| def __init__(self, key: ReadableBuffer, mode: int = 0, iv: Optional[ReadableBuffer] = None, segment_size: int = 8) -> None: //| """Create a new AES state with the given key. //| -//| :param ~_typing.ReadableBuffer key: A 16-, 24-, or 32-byte key +//| :param ~circuitpython_typing.ReadableBuffer key: A 16-, 24-, or 32-byte key //| :param int mode: AES mode to use. One of: `MODE_ECB`, `MODE_CBC`, or //| `MODE_CTR` -//| :param ~_typing.ReadableBuffer iv: Initialization vector to use for CBC or CTR mode +//| :param ~circuitpython_typing.ReadableBuffer iv: Initialization vector to use for CBC or CTR mode //| //| Additional arguments are supported for legacy reasons. //| diff --git a/shared-bindings/audiobusio/I2SOut.c b/shared-bindings/audiobusio/I2SOut.c index c343df242c..c9910427f3 100644 --- a/shared-bindings/audiobusio/I2SOut.c +++ b/shared-bindings/audiobusio/I2SOut.c @@ -155,7 +155,7 @@ STATIC mp_obj_t audiobusio_i2sout_obj___exit__(size_t n_args, const mp_obj_t *ar STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiobusio_i2sout___exit___obj, 4, 4, audiobusio_i2sout_obj___exit__); -//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/audiocore/RawSample.c b/shared-bindings/audiocore/RawSample.c index c3af2f30f0..05c5b14b5e 100644 --- a/shared-bindings/audiocore/RawSample.c +++ b/shared-bindings/audiocore/RawSample.c @@ -43,7 +43,7 @@ //| first sample will be for channel 1, the second sample will be for channel two, the third for //| channel 1 and so on. //| -//| :param ~_typing.ReadableBuffer buffer: A buffer with samples +//| :param ~circuitpython_typing.ReadableBuffer buffer: A buffer with samples //| :param int channel_count: The number of channels in the buffer //| :param int sample_rate: The desired playback sample rate //| diff --git a/shared-bindings/audiocore/WaveFile.c b/shared-bindings/audiocore/WaveFile.c index 74ea9fda9f..1a8b5cae11 100644 --- a/shared-bindings/audiocore/WaveFile.c +++ b/shared-bindings/audiocore/WaveFile.c @@ -44,7 +44,7 @@ //| """Load a .wav file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`. //| //| :param typing.BinaryIO file: Already opened wave file -//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, +//| :param ~circuitpython_typing.WriteableBuffer buffer: Optional pre-allocated buffer, //| that will be split in half and used for double-buffering of the data. //| The buffer must be 8 to 1024 bytes long. //| If not provided, two 256 byte buffers are initially allocated internally. diff --git a/shared-bindings/audioio/AudioOut.c b/shared-bindings/audioio/AudioOut.c index 80072e9128..2fd4c0c452 100644 --- a/shared-bindings/audioio/AudioOut.c +++ b/shared-bindings/audioio/AudioOut.c @@ -146,7 +146,7 @@ STATIC mp_obj_t audioio_audioout_obj___exit__(size_t n_args, const mp_obj_t *arg STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audioio_audioout___exit___obj, 4, 4, audioio_audioout_obj___exit__); -//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/audiomixer/Mixer.c b/shared-bindings/audiomixer/Mixer.c index 619e2c095c..3248e649c9 100644 --- a/shared-bindings/audiomixer/Mixer.c +++ b/shared-bindings/audiomixer/Mixer.c @@ -211,7 +211,7 @@ const mp_obj_property_t audiomixer_mixer_voice_obj = { MP_ROM_NONE}, }; -//| def play(self, sample: _typing.AudioSample, *, voice: int = 0, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, voice: int = 0, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/audiomixer/MixerVoice.c b/shared-bindings/audiomixer/MixerVoice.c index d3bac8c3de..82b6972864 100644 --- a/shared-bindings/audiomixer/MixerVoice.c +++ b/shared-bindings/audiomixer/MixerVoice.c @@ -57,7 +57,7 @@ STATIC mp_obj_t audiomixer_mixervoice_make_new(const mp_obj_type_t *type, size_t return MP_OBJ_FROM_PTR(self); } -//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when ``loop=False``, and continuously when ``loop=True``. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/audiomp3/MP3Decoder.c b/shared-bindings/audiomp3/MP3Decoder.c index 589751821d..227cb6dec1 100644 --- a/shared-bindings/audiomp3/MP3Decoder.c +++ b/shared-bindings/audiomp3/MP3Decoder.c @@ -42,7 +42,7 @@ //| """Load a .mp3 file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`. //| //| :param typing.BinaryIO file: Already opened mp3 file -//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two buffers are allocated internally. The specific buffer size required depends on the mp3 file. +//| :param ~circuitpython_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two buffers are allocated internally. The specific buffer size required depends on the mp3 file. //| //| //| Playing a mp3 file from flash:: diff --git a/shared-bindings/audiopwmio/PWMAudioOut.c b/shared-bindings/audiopwmio/PWMAudioOut.c index cded4a634f..85332d0fac 100644 --- a/shared-bindings/audiopwmio/PWMAudioOut.c +++ b/shared-bindings/audiopwmio/PWMAudioOut.c @@ -148,7 +148,7 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_obj___exit__(size_t n_args, const mp_obj_ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiopwmio_pwmaudioout___exit___obj, 4, 4, audiopwmio_pwmaudioout_obj___exit__); -//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/bitbangio/I2C.c b/shared-bindings/bitbangio/I2C.c index b47ace149f..c65b184ca0 100644 --- a/shared-bindings/bitbangio/I2C.c +++ b/shared-bindings/bitbangio/I2C.c @@ -292,8 +292,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_writeto_obj, 1, bitbangio_i2c_wr //| The number of bytes read will be the length of ``out_buffer[in_start:in_end]``. //| :param int address: 7-bit device address -//| :param ~_typing.ReadableBuffer out_buffer: buffer containing the bytes to write -//| :param ~_typing.WriteableBuffer in_buffer: buffer to write into +//| :param ~circuitpython_typing.ReadableBuffer out_buffer: buffer containing the bytes to write +//| :param ~circuitpython_typing.WriteableBuffer in_buffer: buffer to write into //| :param int out_start: beginning of ``out_buffer`` slice //| :param int out_end: end of ``out_buffer`` slice; if not specified, use ``len(out_buffer)`` //| :param int in_start: beginning of ``in_buffer`` slice diff --git a/shared-bindings/busio/I2C.c b/shared-bindings/busio/I2C.c index 4aea62a8a5..19b205e4ca 100644 --- a/shared-bindings/busio/I2C.c +++ b/shared-bindings/busio/I2C.c @@ -299,8 +299,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_writeto_obj, 1, busio_i2c_writeto); //| The number of bytes read will be the length of ``out_buffer[in_start:in_end]``. //| :param int address: 7-bit device address -//| :param ~_typing.ReadableBuffer out_buffer: buffer containing the bytes to write -//| :param ~_typing.WriteableBuffer in_buffer: buffer to write into +//| :param ~circuitpython_typing.ReadableBuffer out_buffer: buffer containing the bytes to write +//| :param ~circuitpython_typing.WriteableBuffer in_buffer: buffer to write into //| :param int out_start: beginning of ``out_buffer`` slice //| :param int out_end: end of ``out_buffer`` slice; if not specified, use ``len(out_buffer)`` //| :param int in_start: beginning of ``in_buffer`` slice diff --git a/shared-bindings/_typing/__init__.pyi b/shared-bindings/circuitpython_typing/__init__.pyi similarity index 100% rename from shared-bindings/_typing/__init__.pyi rename to shared-bindings/circuitpython_typing/__init__.pyi diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index ca98f9339c..1b750eb934 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -84,7 +84,7 @@ //| //| :param display_bus: The bus that the display is connected to //| :type _DisplayBus: FourWire, ParallelBus or I2CDisplay -//| :param ~_typing.ReadableBuffer init_sequence: Byte-packed initialization sequence. +//| :param ~circuitpython_typing.ReadableBuffer init_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels //| :param int height: Height in pixels //| :param int colstart: The index if the first visible column @@ -449,7 +449,7 @@ const mp_obj_property_t displayio_display_bus_obj = { //| """Extract the pixels from a single row //| //| :param int y: The top edge of the area -//| :param ~_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" +//| :param ~circuitpython_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" //| ... //| STATIC mp_obj_t displayio_display_obj_fill_row(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index 06245c90ae..64f7031f4d 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -76,8 +76,8 @@ //| //| :param display_bus: The bus that the display is connected to //| :type _DisplayBus: displayio.FourWire or paralleldisplay.ParallelBus -//| :param ~_typing.ReadableBuffer start_sequence: Byte-packed initialization sequence. -//| :param ~_typing.ReadableBuffer stop_sequence: Byte-packed initialization sequence. +//| :param ~circuitpython_typing.ReadableBuffer start_sequence: Byte-packed initialization sequence. +//| :param ~circuitpython_typing.ReadableBuffer stop_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels //| :param int height: Height in pixels //| :param int ram_width: RAM width in pixels diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index 683e512b3e..acc50d7561 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -47,10 +47,10 @@ //| objects in CircuitPython, Display objects live until `displayio.release_displays()` //| is called. This is done so that CircuitPython can use the display itself.""" //| -//| def __init__(self, framebuffer: _typing.FrameBuffer, *, rotation: int = 0, auto_refresh: bool = True) -> None: +//| def __init__(self, framebuffer: circuitpython_typing.FrameBuffer, *, rotation: int = 0, auto_refresh: bool = True) -> None: //| """Create a Display object with the given framebuffer (a buffer, array, ulab.array, etc) //| -//| :param ~_typing.FrameBuffer framebuffer: The framebuffer that the display is connected to +//| :param ~circuitpython_typing.FrameBuffer framebuffer: The framebuffer that the display is connected to //| :param bool auto_refresh: Automatically refresh the screen //| :param int rotation: The rotation of the display in degrees clockwise. Must be in 90 degree increments (0, 90, 180, 270)""" //| ... @@ -298,7 +298,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_rotation_obj = { MP_ROM_NONE}, }; -//| framebuffer: _typing.FrameBuffer +//| framebuffer: circuitpython_typing.FrameBuffer //| """The framebuffer being used by the display""" //| //| @@ -320,7 +320,7 @@ const mp_obj_property_t framebufferio_framebufferframebuffer_obj = { //| """Extract the pixels from a single row //| //| :param int y: The top edge of the area -//| :param ~_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" +//| :param ~circuitpython_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" //| ... //| STATIC mp_obj_t framebufferio_framebufferdisplay_obj_fill_row(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/shared-bindings/i2cperipheral/I2CPeripheral.c b/shared-bindings/i2cperipheral/I2CPeripheral.c index f697646146..b63e8a891b 100644 --- a/shared-bindings/i2cperipheral/I2CPeripheral.c +++ b/shared-bindings/i2cperipheral/I2CPeripheral.c @@ -353,7 +353,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(i2cperipheral_i2c_peripheral_request_read_obj, 1, i2c //| def write(self, buffer: ReadableBuffer) -> int: //| """Write the data contained in buffer. //| -//| :param ~_typing.ReadableBuffer buffer: Write out the data in this buffer +//| :param ~circuitpython_typing.ReadableBuffer buffer: Write out the data in this buffer //| :return: Number of bytes written""" //| ... //| diff --git a/shared-bindings/msgpack/__init__.c b/shared-bindings/msgpack/__init__.c index d71ab9a6b9..149f0343a0 100644 --- a/shared-bindings/msgpack/__init__.c +++ b/shared-bindings/msgpack/__init__.c @@ -87,8 +87,8 @@ //| """Ouput object to buffer in msgpack format. //| //| :param object obj: Object to convert to msgpack format. -//| :param ~_typing.WriteableBuffer buffer: buffer to write into -//| :param Optional[~_typing.Callable[[object], None]] default: +//| :param ~circuitpython_typing.WriteableBuffer buffer: buffer to write into +//| :param Optional[~circuitpython_typing.Callable[[object], None]] default: //| function called for python objects that do not have //| a representation in msgpack format. //| """ @@ -118,8 +118,8 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mod_msgpack_pack_obj, 0, mod_msgpack_pack); //| def unpack(buffer: ReadableBuffer, *, ext_hook: Union[Callable[[int, bytes], object], None] = None, use_list: bool=True) -> object: //| """Unpack and return one object from buffer. //| -//| :param ~_typing.ReadableBuffer buffer: buffer to read from -//| :param Optional[~_typing.Callable[[int, bytes], object]] ext_hook: function called for objects in +//| :param ~circuitpython_typing.ReadableBuffer buffer: buffer to read from +//| :param Optional[~circuitpython_typing.Callable[[int, bytes], object]] ext_hook: function called for objects in //| msgpack ext format. //| :param Optional[bool] use_list: return array as list or tuple (use_list=False). //| diff --git a/shared-bindings/neopixel_write/__init__.c b/shared-bindings/neopixel_write/__init__.c index ae30518bd1..6895813db5 100644 --- a/shared-bindings/neopixel_write/__init__.c +++ b/shared-bindings/neopixel_write/__init__.c @@ -54,7 +54,7 @@ //| """Write buf out on the given DigitalInOut. //| //| :param ~digitalio.DigitalInOut digitalinout: the DigitalInOut to output with -//| :param ~_typing.ReadableBuffer buf: The bytes to clock out. No assumption is made about color order""" +//| :param ~circuitpython_typing.ReadableBuffer buf: The bytes to clock out. No assumption is made about color order""" //| ... STATIC mp_obj_t neopixel_write_neopixel_write_(mp_obj_t digitalinout_obj, mp_obj_t buf) { if (!mp_obj_is_type(digitalinout_obj, &digitalio_digitalinout_type)) { diff --git a/shared-bindings/sdcardio/SDCard.c b/shared-bindings/sdcardio/SDCard.c index fe487ae7fb..5afca798f6 100644 --- a/shared-bindings/sdcardio/SDCard.c +++ b/shared-bindings/sdcardio/SDCard.c @@ -130,7 +130,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdcardio_sdcard_deinit_obj, sdcardio_sdcard_deinit); //| """Read one or more blocks from the card //| //| :param int start_block: The block to start reading from -//| :param ~_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. +//| :param ~circuitpython_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. //| //| :return: None""" //| @@ -171,7 +171,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdcardio_sdcard_sync_obj, sdcardio_sdcard_sync); //| """Write one or more blocks to the card //| //| :param int start_block: The block to start writing from -//| :param ~_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. +//| :param ~circuitpython_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. //| //| :return: None""" //| diff --git a/shared-bindings/sdioio/SDCard.c b/shared-bindings/sdioio/SDCard.c index 6fd38ce24c..c4b23ea594 100644 --- a/shared-bindings/sdioio/SDCard.c +++ b/shared-bindings/sdioio/SDCard.c @@ -165,7 +165,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_count_obj, sdioio_sdcard_count); //| """Read one or more blocks from the card //| //| :param int start_block: The block to start reading from -//| :param ~_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. +//| :param ~circuitpython_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. //| //| :return: None""" STATIC mp_obj_t sdioio_sdcard_readblocks(mp_obj_t self_in, mp_obj_t start_block_in, mp_obj_t buf_in) { @@ -187,7 +187,7 @@ MP_DEFINE_CONST_FUN_OBJ_3(sdioio_sdcard_readblocks_obj, sdioio_sdcard_readblocks //| """Write one or more blocks to the card //| //| :param int start_block: The block to start writing from -//| :param ~_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. +//| :param ~circuitpython_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. //| //| :return: None""" //| diff --git a/shared-bindings/synthio/MidiTrack.c b/shared-bindings/synthio/MidiTrack.c index 6ffefd4713..1fb3fdbec1 100644 --- a/shared-bindings/synthio/MidiTrack.c +++ b/shared-bindings/synthio/MidiTrack.c @@ -42,7 +42,7 @@ //| are supported; channel numbers and key velocities are ignored. Up to two notes may be on at the //| same time. //| -//| :param ~_typing.ReadableBuffer buffer: Stream of MIDI events, as stored in a MIDI file track chunk +//| :param ~circuitpython_typing.ReadableBuffer buffer: Stream of MIDI events, as stored in a MIDI file track chunk //| :param int tempo: Tempo of the streamed events, in MIDI ticks per second //| :param int sample_rate: The desired playback sample rate; higher sample rate requires more memory //| diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py index 1bd51ca7a8..d35e09a2e0 100644 --- a/tools/extract_pyi.py +++ b/tools/extract_pyi.py @@ -244,7 +244,7 @@ def convert_folder(top_level, stub_directory): if imports["typing"]: import_lines.append("from typing import " + ", ".join(imports["typing"])) if imports["cpy_typing"]: - import_lines.append("from _typing import " + ", ".join(imports["cpy_typing"])) + import_lines.append("from circuitpython_typing import " + ", ".join(imports["cpy_typing"])) import_lines.extend(f"import {m}" for m in imports["modules"]) import_body = "\n".join(import_lines) m = re.match(r'(\s*""".*?""")', stub_contents, flags=re.DOTALL) From fb79d1c1d1766d30aa196a7597c5d13607f9a9ab Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 22 Dec 2021 11:15:02 -0600 Subject: [PATCH 110/258] bitmaptools: add missing types These diagnostics occurred, but weren't treated as errors: ``` [WARN] Missing return type: alphablend on line 38 [WARN] Missing argument type: dest_bitmap on line 38 [WARN] Missing argument type: source_bitmap_1 on line 38 [WARN] Missing argument type: source_bitmap_2 on line 38 ``` --- shared-bindings/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index ec26eab98e..df6292afec 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -255,7 +255,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_rotozoom_obj, 0, bitmaptools_obj_rotozoom // requires at least 2 arguments (destination bitmap and source bitmap) //| -//| def alphablend(dest_bitmap, source_bitmap_1, source_bitmap_2, colorspace: displayio.Colorspace, factor1: float=.5, factor2: float=None): +//| def alphablend(dest_bitmap: displayio.Bitmap , source_bitmap_1: displayio.Bitmap, source_bitmap_2: displayio.Bitmap, colorspace: displayio.Colorspace, factor1: float=.5, factor2: float=None) -> None: //| """Alpha blend the two source bitmaps into the destination. //| //| It is permitted for the destination bitmap to be one of the two From 828b7d88d82cc7b7bacf61b06c12f3a7303b2cda Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 22 Dec 2021 11:25:00 -0600 Subject: [PATCH 111/258] update sphinx note that per the https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python specify "3" for the latest python version (not 3.x as on github actions) --- .readthedocs.yml | 4 ++-- docs/requirements.txt | 8 -------- requirements-doc.txt | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml index 770888b79e..9743a70494 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,7 +11,7 @@ version: 2 build: os: ubuntu-20.04 tools: - python: "3.9" + python: "3" submodules: include: @@ -22,4 +22,4 @@ formats: python: install: - - requirements: docs/requirements.txt + - requirements: requirements-doc.txt diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index aa3be74265..0000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -sphinx<4 -myst-parser==0.14.0 -sphinxcontrib-svg2pdfconverter==0.1.0 -astroid -sphinx-autoapi -isort -black -readthedocs-sphinx-search diff --git a/requirements-doc.txt b/requirements-doc.txt index cefd7dc51d..efdf19784e 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -8,7 +8,7 @@ astroid setuptools # For sphinx -Sphinx<4 +sphinx>=4.0.0 sphinx-autoapi sphinx-rtd-theme sphinxcontrib-svg2pdfconverter From 936644c157abd5293a95c822d0623e0b4b802c62 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 22 Dec 2021 10:07:30 -0800 Subject: [PATCH 112/258] Revert "Fix cascadetoml more" --- .github/workflows/ports_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ports_windows.yml b/.github/workflows/ports_windows.yml index addf26f017..6339746066 100644 --- a/.github/workflows/ports_windows.yml +++ b/.github/workflows/ports_windows.yml @@ -60,7 +60,7 @@ jobs: pip install wheel # requirements_dev.txt doesn't install on windows. (with msys2 python) # instead, pick a subset for what we want to do - pip install jinja2 typer intelhex cascadetoml==0.3.1 tomlkit==0.7.2 + pip install cascadetoml jinja2 typer intelhex # check that installed packages work....? which python; python --version; python -c "import cascadetoml" which python3; python3 --version; python3 -c "import cascadetoml" From 3e13d4f5b5557547d61de322e6b040afbd989655 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 22 Dec 2021 12:00:19 -0800 Subject: [PATCH 113/258] Add sideset_enable support to PIO This allows for UART TX via PIO --- ports/raspberrypi/bindings/rp2pio/StateMachine.c | 8 +++++++- ports/raspberrypi/bindings/rp2pio/StateMachine.h | 1 + ports/raspberrypi/common-hal/audiobusio/I2SOut.c | 3 ++- ports/raspberrypi/common-hal/audiobusio/PDMIn.c | 3 ++- .../imagecapture/ParallelImageCapture.c | 1 + .../common-hal/neopixel_write/__init__.c | 3 ++- ports/raspberrypi/common-hal/nvm/ByteArray.c | 6 ++++++ .../common-hal/paralleldisplay/ParallelBus.c | 1 + ports/raspberrypi/common-hal/pulseio/PulseIn.c | 3 ++- .../common-hal/rotaryio/IncrementalEncoder.c | 1 + .../raspberrypi/common-hal/rp2pio/StateMachine.c | 15 +++++++++++---- .../raspberrypi/common-hal/rp2pio/StateMachine.h | 3 ++- 12 files changed, 38 insertions(+), 10 deletions(-) diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index 0815112c3d..c9e3e96154 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -78,6 +78,7 @@ //| sideset_pin_count: int = 1, //| initial_sideset_pin_state: int = 0, //| initial_sideset_pin_direction: int = 0x1f, +//| sideset_enable: bool = False, //| exclusive_pin_use: bool = True, //| auto_pull: bool = False, //| pull_threshold: int = 32, @@ -107,9 +108,10 @@ //| :param int initial_set_pin_state: the initial output value for set pins starting at first_set_pin //| :param int initial_set_pin_direction: the initial output direction for set pins starting at first_set_pin //| :param ~microcontroller.Pin first_sideset_pin: the first pin to use with a side set -//| :param int sideset_pin_count: the count of consecutive pins to use with a side set starting at first_sideset_pin +//| :param int sideset_pin_count: the count of consecutive pins to use with a side set starting at first_sideset_pin. Does not include sideset enable //| :param int initial_sideset_pin_state: the initial output value for sideset pins starting at first_sideset_pin //| :param int initial_sideset_pin_direction: the initial output direction for sideset pins starting at first_sideset_pin +//| :param bool sideset_enable: True when the top sideset bit is to enable. This should be used with the ".side_set # opt" directive //| :param ~microcontroller.Pin jmp_pin: the pin which determines the branch taken by JMP PIN instructions //| :param bool exclusive_pin_use: When True, do not share any pins with other state machines. Pins are never shared with other peripherals //| :param bool auto_pull: When True, automatically load data from the tx FIFO into the @@ -147,6 +149,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n ARG_pull_in_pin_up, ARG_pull_in_pin_down, ARG_first_set_pin, ARG_set_pin_count, ARG_initial_set_pin_state, ARG_initial_set_pin_direction, ARG_first_sideset_pin, ARG_sideset_pin_count, ARG_initial_sideset_pin_state, ARG_initial_sideset_pin_direction, + ARG_sideset_enable, ARG_jmp_pin, ARG_exclusive_pin_use, ARG_auto_pull, ARG_pull_threshold, ARG_out_shift_right, @@ -178,6 +181,8 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n { MP_QSTR_initial_sideset_pin_state, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, { MP_QSTR_initial_sideset_pin_direction, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0x1f} }, + { MP_QSTR_sideset_enable, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} }, + { MP_QSTR_jmp_pin, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, { MP_QSTR_exclusive_pin_use, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} }, @@ -257,6 +262,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n first_in_pin, args[ARG_in_pin_count].u_int, args[ARG_pull_in_pin_up].u_int, args[ARG_pull_in_pin_down].u_int, first_set_pin, args[ARG_set_pin_count].u_int, args[ARG_initial_set_pin_state].u_int, args[ARG_initial_set_pin_direction].u_int, first_sideset_pin, args[ARG_sideset_pin_count].u_int, args[ARG_initial_sideset_pin_state].u_int, args[ARG_initial_sideset_pin_direction].u_int, + args[ARG_sideset_enable].u_bool, jmp_pin, 0, args[ARG_exclusive_pin_use].u_bool, diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.h b/ports/raspberrypi/bindings/rp2pio/StateMachine.h index effa9c9ce3..3f3b8cf7d8 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.h +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.h @@ -44,6 +44,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, const mcu_pin_obj_t *first_in_pin, uint8_t in_pin_count, uint32_t pull_pin_up, uint32_t pull_pin_down, const mcu_pin_obj_t *first_set_pin, uint8_t set_pin_count, uint32_t initial_set_pin_state, uint32_t initial_set_pin_direction, const mcu_pin_obj_t *first_sideset_pin, uint8_t sideset_pin_count, uint32_t initial_sideset_pin_state, uint32_t initial_sideset_pin_direction, + bool sideset_enable, const mcu_pin_obj_t *jmp_pin, uint32_t wait_gpio_mask, bool exclusive_pin_use, diff --git a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c index da50e17f42..4296014e50 100644 --- a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c +++ b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -133,7 +133,8 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, false, 32, false, // shift out left to start with MSB false, // Wait for txstall false, 32, false, // in settings - false); // Not user-interruptible. + false, // Not user-interruptible. + false); // No sideset enable self->playing = false; audio_dma_init(&self->dma); diff --git a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c index f2775c2543..859e82eb11 100644 --- a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c +++ b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c @@ -77,7 +77,8 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self, false, 32, false, // out settings false, // Wait for txstall false, 32, true, // in settings - false); // Not user-interruptible + false, // Not user-interruptible. + false); // No sideset enable uint32_t actual_frequency = common_hal_rp2pio_statemachine_get_frequency(&self->state_machine); if (actual_frequency < MIN_MIC_CLOCK) { diff --git a/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c b/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c index 9eabc9f967..45a3766897 100644 --- a/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c +++ b/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c @@ -111,6 +111,7 @@ void common_hal_imagecapture_parallelimagecapture_construct(imagecapture_paralle #else NULL, 0, 0, 0, // sideset pins #endif + false, // No sideset enable NULL, // jump pin (1 << vertical_sync->number) | (1 << horizontal_reference->number) | (1 << data_clock->number), // wait gpio pins true, // exclusive pin use diff --git a/ports/raspberrypi/common-hal/neopixel_write/__init__.c b/ports/raspberrypi/common-hal/neopixel_write/__init__.c index b3d704453c..da7bf7c19f 100644 --- a/ports/raspberrypi/common-hal/neopixel_write/__init__.c +++ b/ports/raspberrypi/common-hal/neopixel_write/__init__.c @@ -77,7 +77,8 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, true, // Wait for txstall. If we don't, then we'll deinit too quickly. false, 32, true, // RX setting we don't use false, // claim pins - false); // Not user-interruptible. + false, // Not user-interruptible. + false); // No sideset enable if (!ok) { // Do nothing. Maybe bitbang? return; diff --git a/ports/raspberrypi/common-hal/nvm/ByteArray.c b/ports/raspberrypi/common-hal/nvm/ByteArray.c index a6c8a5ad6a..86eb82683b 100644 --- a/ports/raspberrypi/common-hal/nvm/ByteArray.c +++ b/ports/raspberrypi/common-hal/nvm/ByteArray.c @@ -65,7 +65,13 @@ static void erase_and_write_sector(uint32_t address, uint32_t len, uint8_t *byte // Write a whole sector to flash, buffering it first and then erasing and rewriting it // since we can only erase a whole sector at a time. uint8_t buffer[FLASH_SECTOR_SIZE]; + // TODO: Update this to a better workaround for GCC 11 when one is provided. + // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c20 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Warray-bounds" + #pragma GCC diagnostic ignored "-Wstringop-overread" memcpy(buffer, (uint8_t *)CIRCUITPY_INTERNAL_NVM_START_ADDR, FLASH_SECTOR_SIZE); + #pragma GCC diagnostic pop memcpy(buffer + address, bytes, len); // disable interrupts to prevent core hang on rp2040 common_hal_mcu_disable_interrupts(); diff --git a/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c index 9971474042..2e0ae4def2 100644 --- a/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c +++ b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c @@ -99,6 +99,7 @@ void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbu NULL, 0, 0, 0, // first in pin, # in pins NULL, 0, 0, 0, // first set pin write, 1, 0, 1, // first sideset pin + false, // No sideset enable NULL, // jump pin 0, // wait gpio pins true, // exclusive pin usage diff --git a/ports/raspberrypi/common-hal/pulseio/PulseIn.c b/ports/raspberrypi/common-hal/pulseio/PulseIn.c index 9d3f614987..e507cd16e8 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseIn.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseIn.c @@ -73,7 +73,8 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, false, true, 32, true, // RX auto-push every 32 bits false, // claim pins - false); // Not user-interruptible. + false, // Not user-interruptible. + false); // No sideset enable if (!ok) { mp_raise_RuntimeError(translate("All state machines in use")); diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index 1105d357c5..1f15b010f7 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -85,6 +85,7 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode 3, 0, // in pulls NULL, 0, 0, 0x1f, // set pins NULL, 0, 0, 0x1f, // sideset pins + false, // No sideset enable NULL, // jump pin 0, // wait gpio pins true, // exclusive pin use diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index 4479006d4e..ac5a41652a 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -164,7 +164,8 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, bool wait_for_txstall, bool auto_push, uint8_t push_threshold, bool in_shift_right, bool claim_pins, - bool user_interruptible + bool user_interruptible, + bool sideset_enable ) { // Create a program id that isn't the pointer so we can store it without storing the original object. uint32_t program_id = ~((uint32_t)program); @@ -278,7 +279,11 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, sm_config_set_set_pins(&c, first_set_pin->number, set_pin_count); } if (first_sideset_pin != NULL) { - sm_config_set_sideset(&c, sideset_pin_count, false /* optional */, false /* pin direction */); + size_t total_sideset_bits = sideset_pin_count; + if (sideset_enable) { + total_sideset_bits += 1; + } + sm_config_set_sideset(&c, total_sideset_bits, sideset_enable, false /* pin direction */); sm_config_set_sideset_pins(&c, first_sideset_pin->number); } if (jmp_pin != NULL) { @@ -336,6 +341,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, uint32_t pull_pin_up, uint32_t pull_pin_down, const mcu_pin_obj_t *first_set_pin, uint8_t set_pin_count, uint32_t initial_set_pin_state, uint32_t initial_set_pin_direction, const mcu_pin_obj_t *first_sideset_pin, uint8_t sideset_pin_count, uint32_t initial_sideset_pin_state, uint32_t initial_sideset_pin_direction, + bool sideset_enable, const mcu_pin_obj_t *jmp_pin, uint32_t wait_gpio_mask, bool exclusive_pin_use, @@ -503,7 +509,8 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, wait_for_txstall, auto_push, push_threshold, in_shift_right, true /* claim pins */, - user_interruptible); + user_interruptible, + sideset_enable); if (!ok) { mp_raise_RuntimeError(translate("All state machines in use")); } @@ -513,7 +520,7 @@ void common_hal_rp2pio_statemachine_restart(rp2pio_statemachine_obj_t *self) { common_hal_rp2pio_statemachine_stop(self); // Reset program counter to the original offset. A JMP is 0x0000 plus // the desired offset, so we can just use self->offset. - pio_sm_exec(self->pio, self->state_machine,self->offset); + pio_sm_exec(self->pio, self->state_machine, self->offset); pio_sm_restart(self->pio, self->state_machine); uint8_t pio_index = pio_get_index(self->pio); uint32_t pins_we_use = _current_sm_pins[pio_index][self->state_machine]; diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h index f877bdb152..125e0fa68b 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h @@ -75,7 +75,8 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, bool wait_for_txstall, bool auto_push, uint8_t push_threshold, bool in_shift_right, bool claim_pins, - bool interruptible); + bool interruptible, + bool sideset_enable); uint8_t rp2pio_statemachine_program_offset(rp2pio_statemachine_obj_t *self); void rp2pio_statemachine_set_wrap(rp2pio_statemachine_obj_t *self, uint wrap_target, uint wrap); From 05b814e8b4d354b45235538656b4d483150e295c Mon Sep 17 00:00:00 2001 From: dronecz Date: Wed, 22 Dec 2021 00:53:51 +0000 Subject: [PATCH 114/258] Translated using Weblate (Czech) Currently translated at 5.8% (60 of 1029 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/cs/ --- locale/cs.po | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/locale/cs.po b/locale/cs.po index 49916c32e7..cf1c85debd 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-20 21:53+0000\n" +"PO-Revision-Date: 2021-12-23 01:53+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" "Language: cs\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.10\n" +"X-Generator: Weblate 4.10.1\n" #: main.c msgid "" @@ -174,7 +174,7 @@ msgstr "%q by měl být int" #: shared-bindings/usb_hid/Device.c msgid "%q with a report ID of 0 must be of length 1" -msgstr "" +msgstr "%q s ID 0 musím být délky 1" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -182,12 +182,12 @@ msgstr "%q() vyžaduje %d pozičních argumentů, ale %d jich bylo zadáno" #: shared-bindings/usb_hid/Device.c msgid "%q, %q, and %q must all be the same length" -msgstr "" +msgstr "%q, %q, a %q musí mít všechny shodnou délku" #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" -msgstr "" +msgstr "%s chyba 0x%x" #: py/argcheck.c msgid "'%q' argument required" @@ -212,17 +212,17 @@ msgstr "Objekt '%q' není iterovatelný" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" -msgstr "" +msgstr "'%s' očekává popisek" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a register" -msgstr "" +msgstr "'%s' očekává register" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects a special register" -msgstr "" +msgstr "'%s' očekává speciální register" #: py/emitinlinethumb.c #, c-format @@ -242,7 +242,7 @@ msgstr "'%s' očekává integer (celé číslo)" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects at most r%d" -msgstr "" +msgstr "'%s' očekává nejvíce r%d" #: py/emitinlinethumb.c #, c-format @@ -252,31 +252,31 @@ msgstr "'%s' očekává {r0, r1, ...}" #: py/emitinlinextensa.c #, c-format msgid "'%s' integer %d isn't within range %d..%d" -msgstr "" +msgstr "'%s' integer %d není v rozsahu %d..%d" #: py/emitinlinethumb.c #, c-format msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" -msgstr "" +msgstr "'%s' integer 0x%x nepatří do masky 0x%x" #: py/obj.c #, c-format msgid "'%s' object doesn't support item assignment" -msgstr "" +msgstr "'%s' objekt nepodporuje přiřazení položky" #: py/obj.c #, c-format msgid "'%s' object doesn't support item deletion" -msgstr "" +msgstr "'%s' objekt nepodporuje smazání položky" #: py/runtime.c msgid "'%s' object has no attribute '%q'" -msgstr "" +msgstr "'%s' objekt nemá žádný atribut '%q'" #: py/obj.c #, c-format msgid "'%s' object isn't subscriptable" -msgstr "" +msgstr "'%s' objekt není vložitelný" #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" From 827ad327a59c483d29e7de99376eaabceccbc143 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 22 Dec 2021 18:21:18 -0800 Subject: [PATCH 115/258] Only ignore warnings if in gcc >= 11 --- ports/raspberrypi/common-hal/nvm/ByteArray.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/nvm/ByteArray.c b/ports/raspberrypi/common-hal/nvm/ByteArray.c index 86eb82683b..cc52c88f38 100644 --- a/ports/raspberrypi/common-hal/nvm/ByteArray.c +++ b/ports/raspberrypi/common-hal/nvm/ByteArray.c @@ -65,11 +65,13 @@ static void erase_and_write_sector(uint32_t address, uint32_t len, uint8_t *byte // Write a whole sector to flash, buffering it first and then erasing and rewriting it // since we can only erase a whole sector at a time. uint8_t buffer[FLASH_SECTOR_SIZE]; + #pragma GCC diagnostic push + #if __GNUC__ >= 11 // TODO: Update this to a better workaround for GCC 11 when one is provided. // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c20 - #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" #pragma GCC diagnostic ignored "-Wstringop-overread" + #endif memcpy(buffer, (uint8_t *)CIRCUITPY_INTERNAL_NVM_START_ADDR, FLASH_SECTOR_SIZE); #pragma GCC diagnostic pop memcpy(buffer + address, bytes, len); From 53869d71fd98bcb591ba9eedab5a295f93664bc4 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 23 Dec 2021 14:53:00 +0700 Subject: [PATCH 116/258] use family id for s2 and s3 depending on IDF_TARGET --- ports/espressif/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index c997dc6a0a..a1498a5d7c 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -411,9 +411,12 @@ $(BUILD)/circuitpython-firmware.bin: $(BUILD)/firmware.elf | tools/build_memory_ $(BUILD)/firmware.bin: $(BUILD)/circuitpython-firmware.bin | esp-idf-stamp $(Q)$(PYTHON) ../../tools/join_bins.py $@ $(BOOTLOADER_OFFSET) $(BUILD)/esp-idf/bootloader/bootloader.bin $(PARTITION_TABLE_OFFSET) $(BUILD)/esp-idf/partition_table/partition-table.bin $(FIRMWARE_OFFSET) $(BUILD)/circuitpython-firmware.bin +UF2_FAMILY_ID_esp32s2 = 0xbfdd4eee +UF2_FAMILY_ID_esp32s3 = 0xc47e5767 + $(BUILD)/firmware.uf2: $(BUILD)/circuitpython-firmware.bin $(STEPECHO) "Create $@" - $(Q)$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f 0xbfdd4eee -b 0x0000 -c -o $@ $^ + $(Q)$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID_$(IDF_TARGET)) -b 0x0000 -c -o $@ $^ flash: $(BUILD)/firmware.bin esptool.py --chip $(IDF_TARGET) -p $(PORT) $(ESPTOOL_FLAGS) write_flash $(FLASH_FLAGS) 0x0000 $^ From 7ecd7bcac1f74520701a51b97b946853cdf6ced0 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 23 Dec 2021 11:50:40 -0500 Subject: [PATCH 117/258] Update frozen libraries --- frozen/Adafruit_CircuitPython_BLE | 2 +- frozen/Adafruit_CircuitPython_Display_Shapes | 2 +- frozen/Adafruit_CircuitPython_LSM6DS | 2 +- frozen/Adafruit_CircuitPython_Motor | 2 +- frozen/Adafruit_CircuitPython_seesaw | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_BLE b/frozen/Adafruit_CircuitPython_BLE index 434e367cc7..a695cde1b1 160000 --- a/frozen/Adafruit_CircuitPython_BLE +++ b/frozen/Adafruit_CircuitPython_BLE @@ -1 +1 @@ -Subproject commit 434e367cc7da4c2836affdbf92b8932ca59a25b0 +Subproject commit a695cde1b1cc957bcd10875b12ae82d1deeb0157 diff --git a/frozen/Adafruit_CircuitPython_Display_Shapes b/frozen/Adafruit_CircuitPython_Display_Shapes index bafa35c18a..993bd12e17 160000 --- a/frozen/Adafruit_CircuitPython_Display_Shapes +++ b/frozen/Adafruit_CircuitPython_Display_Shapes @@ -1 +1 @@ -Subproject commit bafa35c18a610660bdce68784195c4a7fbdf1189 +Subproject commit 993bd12e1747ec117e8d104a5e9f4659c8a347a3 diff --git a/frozen/Adafruit_CircuitPython_LSM6DS b/frozen/Adafruit_CircuitPython_LSM6DS index 9873446ebd..f94ef67425 160000 --- a/frozen/Adafruit_CircuitPython_LSM6DS +++ b/frozen/Adafruit_CircuitPython_LSM6DS @@ -1 +1 @@ -Subproject commit 9873446ebde5779c03c2bd4e3e544a801fb27bd5 +Subproject commit f94ef67425516f23c889d217ffe5a3a710c1d278 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index 88e5ae5142..9995c45a5e 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit 88e5ae51427aa690de129c157223e93bf936ac41 +Subproject commit 9995c45a5ed1d455a4a8b7bfb9eb134de7f2b9db diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw index 0450119e16..f06ac21e96 160000 --- a/frozen/Adafruit_CircuitPython_seesaw +++ b/frozen/Adafruit_CircuitPython_seesaw @@ -1 +1 @@ -Subproject commit 0450119e163df782930a887022e197d6d25ca666 +Subproject commit f06ac21e96321724258e00f7596d874eff53f0b8 From 325c2161e9f639fb9b56349872a159c07f3a8789 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 23 Dec 2021 12:24:16 -0500 Subject: [PATCH 118/258] shrink CPX crickit build --- .../boards/circuitplayground_express_crickit/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index fb65d7cd0a..4d749d2134 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -15,6 +15,7 @@ LONGINT_IMPL = NONE CIRCUITPY_BUSDEVICE = 1 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_KEYPAD = 0 +CIRCUITPY_ONEWIREIO = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground From 4683619bb0a5524ff9ed98b6e7ed4ff92416645a Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Thu, 23 Dec 2021 14:29:25 -0500 Subject: [PATCH 119/258] Add long integer flags to enable Code stolen from raspberrypi port --- ports/broadcom/mpconfigport.mk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ports/broadcom/mpconfigport.mk b/ports/broadcom/mpconfigport.mk index f29f48d545..c7b8a2fcc3 100644 --- a/ports/broadcom/mpconfigport.mk +++ b/ports/broadcom/mpconfigport.mk @@ -1,3 +1,22 @@ +# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk +# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. +# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. + +ifeq ($(LONGINT_IMPL),NONE) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none +endif + +ifeq ($(LONGINT_IMPL),MPZ) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz +endif + +ifeq ($(LONGINT_IMPL),LONGLONG) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong +endif + +# All broadcom ports have longints. +LONGINT_IMPL = MPZ + # Typically the first module to create CIRCUITPY_MICROCONTROLLER = 1 # Typically the second module to create From e86810fce2a3c88ca7ffcc631c3ddac53e1fa349 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 23 Dec 2021 16:32:00 -0600 Subject: [PATCH 120/258] updating UF2_FAMILY_ID for nrf52833 --- ports/nrf/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 04a648a4e2..6db2b547c5 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -239,6 +239,9 @@ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_MOD) $(SRC_COMMON_HAL_EXPANDED) $(S # Sources that only hold QSTRs after pre-processing. SRC_QSTR_PREPROCESSOR += +UF2_FAMILY_ID_nrf52840 = 0xADA52840 +UF2_FAMILY_ID_nrf52833 = 0x621E937A + all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 $(BUILD)/firmware.combined.hex @@ -264,7 +267,7 @@ $(BUILD)/firmware.combined.hex: $(BUILD)/firmware.hex $(SOFTDEV_HEX) $(BUILD)/firmware.uf2: $(BUILD)/firmware.hex $(ECHO) "Create $@" - $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f 0xADA52840 -c -o "$(BUILD)/firmware.uf2" $^ + $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID_$(MCU_CHIP)) -c -o "$(BUILD)/firmware.uf2" $^ From 0cbbfadad9bb33f915a556f671943cabd18abea3 Mon Sep 17 00:00:00 2001 From: 0hotpotman0 Date: Fri, 24 Dec 2021 18:51:26 +0800 Subject: [PATCH 121/258] Correct the pin name and add the monitor battry function --- .../Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk | 2 +- ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk index 697b30fa4e..d8bd45218a 100644 --- a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x2886 USB_PID = 0x0045 -USB_PRODUCT = "XIAO nRF52840 Sense" +USB_PRODUCT = "Seeed XIAO nRF52840 Sense" USB_MANUFACTURER = "Seeed" MCU_CHIP = nrf52840 diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c index beb85eda40..2c86116baf 100644 --- a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c @@ -33,20 +33,24 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_04) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_LED_USR), MP_ROM_PTR(&pin_P0_26) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P0_26) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_30) }, - { MP_ROM_QSTR(MP_QSTR_6D_PWR), MP_ROM_PTR(&pin_P1_08) }, - { MP_ROM_QSTR(MP_QSTR_6D_SCL), MP_ROM_PTR(&pin_P0_27) }, - { MP_ROM_QSTR(MP_QSTR_6D_SDA), MP_ROM_PTR(&pin_P0_07) }, - { MP_ROM_QSTR(MP_QSTR_6D_INT1), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_IMU_PWR), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_IMU_SCL), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_IMU_SDA), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_IMU_INT1), MP_ROM_PTR(&pin_P0_11) }, { MP_ROM_QSTR(MP_QSTR_MIC_PWR), MP_ROM_PTR(&pin_P1_10) }, { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P1_00) }, { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_16) }, + {MP_ROM_QSTR(MP_QSTR_READ_BATT_ENABLE),MP_ROM_PTR(&pin_P0_14)}, + {MP_ROM_QSTR(MP_QSTR_VBATT),MP_ROM_PTR(&pin_P0_31)}, + {MP_ROM_QSTR(MP_QSTR_CHARGE_STATUS),MP_ROM_PTR(&pin_P0_17)}, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From 5594024bb61c6922750335177c3ef4158c11f037 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 24 Dec 2021 08:21:24 -0500 Subject: [PATCH 122/258] update frozen libraries for 7.1.x --- frozen/Adafruit_CircuitPython_BLE | 2 +- frozen/Adafruit_CircuitPython_Display_Shapes | 2 +- frozen/Adafruit_CircuitPython_Display_Text | 2 +- frozen/Adafruit_CircuitPython_LSM6DS | 2 +- frozen/Adafruit_CircuitPython_Motor | 2 +- frozen/Adafruit_CircuitPython_seesaw | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_BLE b/frozen/Adafruit_CircuitPython_BLE index 434e367cc7..a695cde1b1 160000 --- a/frozen/Adafruit_CircuitPython_BLE +++ b/frozen/Adafruit_CircuitPython_BLE @@ -1 +1 @@ -Subproject commit 434e367cc7da4c2836affdbf92b8932ca59a25b0 +Subproject commit a695cde1b1cc957bcd10875b12ae82d1deeb0157 diff --git a/frozen/Adafruit_CircuitPython_Display_Shapes b/frozen/Adafruit_CircuitPython_Display_Shapes index bafa35c18a..993bd12e17 160000 --- a/frozen/Adafruit_CircuitPython_Display_Shapes +++ b/frozen/Adafruit_CircuitPython_Display_Shapes @@ -1 +1 @@ -Subproject commit bafa35c18a610660bdce68784195c4a7fbdf1189 +Subproject commit 993bd12e1747ec117e8d104a5e9f4659c8a347a3 diff --git a/frozen/Adafruit_CircuitPython_Display_Text b/frozen/Adafruit_CircuitPython_Display_Text index ca141954c0..0ec87891f9 160000 --- a/frozen/Adafruit_CircuitPython_Display_Text +++ b/frozen/Adafruit_CircuitPython_Display_Text @@ -1 +1 @@ -Subproject commit ca141954c0b39cc0343c63bedb64c02f307159b9 +Subproject commit 0ec87891f9a28ee3c5ae3b020b60d361684f466d diff --git a/frozen/Adafruit_CircuitPython_LSM6DS b/frozen/Adafruit_CircuitPython_LSM6DS index 9873446ebd..f94ef67425 160000 --- a/frozen/Adafruit_CircuitPython_LSM6DS +++ b/frozen/Adafruit_CircuitPython_LSM6DS @@ -1 +1 @@ -Subproject commit 9873446ebde5779c03c2bd4e3e544a801fb27bd5 +Subproject commit f94ef67425516f23c889d217ffe5a3a710c1d278 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index 88e5ae5142..9995c45a5e 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit 88e5ae51427aa690de129c157223e93bf936ac41 +Subproject commit 9995c45a5ed1d455a4a8b7bfb9eb134de7f2b9db diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw index 0450119e16..f06ac21e96 160000 --- a/frozen/Adafruit_CircuitPython_seesaw +++ b/frozen/Adafruit_CircuitPython_seesaw @@ -1 +1 @@ -Subproject commit 0450119e163df782930a887022e197d6d25ca666 +Subproject commit f06ac21e96321724258e00f7596d874eff53f0b8 From b9f7fd663b192f144ab29d921514749c1195851b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 23 Dec 2021 12:24:16 -0500 Subject: [PATCH 123/258] shrink CPX crickit build --- .../boards/circuitplayground_express_crickit/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index fb65d7cd0a..4d749d2134 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -15,6 +15,7 @@ LONGINT_IMPL = NONE CIRCUITPY_BUSDEVICE = 1 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_KEYPAD = 0 +CIRCUITPY_ONEWIREIO = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground From cf349af35e02a85ebece48064530729821b2fb40 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 24 Dec 2021 11:45:07 -0500 Subject: [PATCH 124/258] turn on I2C power after reset --- ports/espressif/boards/adafruit_feather_esp32s2/board.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index 5abd1ce1b3..b0a7862ceb 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -27,11 +27,17 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" +#include "components/driver/include/driver/gpio.h" void board_init(void) { // USB common_hal_never_reset_pin(&pin_GPIO19); common_hal_never_reset_pin(&pin_GPIO20); + + // Turn on I2C + common_hal_never_reset_pin(&pin_GPIO7); + gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(7, false); } bool board_requests_safe_mode(void) { From 889b25d792382c53d233d1af225ff9012b61d4ce Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 24 Dec 2021 11:49:58 -0500 Subject: [PATCH 125/258] put I2C_POWER_INVERTED alias before D7, for prettypins --- ports/espressif/boards/adafruit_feather_esp32s2/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2/pins.c index fff95265b5..06f294ff0f 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/pins.c @@ -14,8 +14,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_I2C_POWER_INVERTED), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, From cf70a9ca6112369527526dfe06bdb6b0f8604407 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 24 Dec 2021 16:27:17 -0500 Subject: [PATCH 126/258] Turn on I2C power for each VM, instead of just after hard reset --- ports/espressif/boards/adafruit_feather_esp32s2/board.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index b0a7862ceb..93aff5067d 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -33,11 +33,6 @@ void board_init(void) { // USB common_hal_never_reset_pin(&pin_GPIO19); common_hal_never_reset_pin(&pin_GPIO20); - - // Turn on I2C - common_hal_never_reset_pin(&pin_GPIO7); - gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); - gpio_set_level(7, false); } bool board_requests_safe_mode(void) { @@ -45,7 +40,9 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - + // Turn on I2C power by default. + gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(7, false); } void board_deinit(void) { From 9a043528a8151ff8c410f633d5648837a9b76915 Mon Sep 17 00:00:00 2001 From: River Wang Date: Thu, 23 Dec 2021 20:54:51 +0000 Subject: [PATCH 127/258] Translated using Weblate (Chinese (Pinyin)) Currently translated at 98.3% (1012 of 1029 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 51dc9b10a9..5a9f95e5ee 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-11-16 01:34+0000\n" +"PO-Revision-Date: 2021-12-24 21:51+0000\n" "Last-Translator: River Wang \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.9.1-dev\n" +"X-Generator: Weblate 4.10.1\n" #: main.c msgid "" @@ -641,20 +641,20 @@ msgstr "Huǎnchōngqū chángdù bìxū wéi 512 de bèishù" #: ports/stm/common-hal/sdioio/SDCard.c msgid "Buffer must be a multiple of 512 bytes" -msgstr "Huǎn chōng qū bì xū shì 512 zì jié de bèi shù" +msgstr "Huǎnchōngqū bìxū shì 512 zìjié de bèishù" #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" -msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù 1" +msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù wéi 1" #: shared-bindings/_bleio/PacketBuffer.c -#, c-format +#, c-format, fuzzy msgid "Buffer too short by %d bytes" msgstr "Huǎn chōng qū tài duǎn , àn %d zì jié" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" -msgstr "huǎn chōng qì bì xū dà xiǎo xiāng tóng" +msgstr "huǎnchōng qū bìxū dàxiǎo xiāngtóng" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c #: ports/espressif/common-hal/paralleldisplay/ParallelBus.c @@ -662,39 +662,42 @@ msgstr "huǎn chōng qì bì xū dà xiǎo xiāng tóng" #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" -msgstr "Zǒngxiàn yǐn jiǎo %d yǐ zài shǐyòng zhōng" +msgstr "Zǒngxiàn yǐnjiǎo %d yǐjīng zài shǐyòng zhōng" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." -msgstr "Zì jié huǎnchōng qū bìxū shì 16 zì jié." +msgstr "Zìjié huǎnchōng qū bìxū shì 16 zìjié." #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Bytes must be between 0 and 255." -msgstr "Zì jié bìxū jiè yú 0 dào 255 zhī jiān." +msgstr "Zìjié bìxū jiè yú 0 dào 255 zhījiān." #: shared-bindings/aesio/aes.c msgid "CBC blocks must be multiples of 16 bytes" -msgstr "CBC kuài bì xū shì 16 zì jié de bèi shù" +msgstr "CBC kuài bìxū shì 16 zìjié de bèishù" #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" -msgstr "CRC huò jiào yàn hé wú xiào" +msgstr "CRC huò jiàoyàn hé wúxiào" #: py/objtype.c msgid "Call super().__init__() before accessing native object." -msgstr "Zài fǎngwèn běn jī wùjiàn zhīqián diàoyòng super().__init__()." +msgstr "Zài fǎngwèn yuánshēn dùixiàng zhīqián diàoyòng super().__init__()." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Can only alarm on RTC IO from deep sleep." -msgstr "zhǐ néng zài RTC Io shàng cóng shēn dù shuì mián zhōng bào jǐng." +msgstr "zhǐ néng zài RTC IO shàng cóng shēndù shuìmián zhōng bào jǐng." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" "Zhǐ néng zài yīgè dī diàn píng yǐn jiǎo shàng fāchū jǐngbào, ér qítā yǐn " "jiǎo cóng shēndù shuìmián zhōng fāchū gāo diàn píng jǐngbào." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Can only alarm on two low pins from deep sleep." msgstr "zhǐ néng cóng shēn dù shuì mián zhōng bào jǐng liǎng gè dī yǐn jiǎo." @@ -705,7 +708,7 @@ msgstr "Wúfǎ jiāng CCCD shèzhì wéi běndì tèzhēng" #: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c #: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c msgid "Cannot change USB devices now" -msgstr "xiàn zài wú fǎ gēng gǎi USB shè bèi" +msgstr "xiànzài wúfǎ gēnggǎi USB shèbèi" #: shared-bindings/_bleio/Adapter.c msgid "Cannot create a new Adapter; use _bleio.adapter;" @@ -715,14 +718,14 @@ msgstr "Wúfǎ chuàngjiàn xīn de shìpèiqì; shǐyòng_bleio.Adapter;" #: shared-bindings/memorymonitor/AllocationSize.c #: shared-bindings/pulseio/PulseIn.c msgid "Cannot delete values" -msgstr "Wúfǎ shānchú zhí" +msgstr "Wúfǎ jiāng zhí shānchú" #: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c #: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c #: ports/nrf/common-hal/digitalio/DigitalInOut.c #: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c msgid "Cannot get pull while in output mode" -msgstr "Zài shūchū móshì xià wúfǎ huòqǔ lādòng" +msgstr "Zài shūchū móshì xià wúfǎ huòqǔ shànglā huò xiàlā zhuàngtài" #: ports/nrf/common-hal/microcontroller/Processor.c msgid "Cannot get temperature" From 9810f0f82400f9c957aa1c1b9c257537869e07db Mon Sep 17 00:00:00 2001 From: 0hotpotman0 Date: Mon, 27 Dec 2021 09:24:33 +0800 Subject: [PATCH 128/258] Correct the pin LED --- ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c index 2c86116baf..ec8721b438 100644 --- a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c @@ -33,10 +33,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_04) }, - { MP_ROM_QSTR(MP_QSTR_LED_USR), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_30) }, { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P0_26) }, { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_06) }, - { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_26) }, { MP_ROM_QSTR(MP_QSTR_IMU_PWR), MP_ROM_PTR(&pin_P1_08) }, { MP_ROM_QSTR(MP_QSTR_IMU_SCL), MP_ROM_PTR(&pin_P0_27) }, From a9592644f2725401daf4a756d80fd46155720a0c Mon Sep 17 00:00:00 2001 From: hexthat Date: Sun, 26 Dec 2021 02:49:10 +0000 Subject: [PATCH 129/258] Translated using Weblate (Chinese (Pinyin)) Currently translated at 99.0% (1019 of 1029 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 5a9f95e5ee..694f92dad3 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-24 21:51+0000\n" -"Last-Translator: River Wang \n" +"PO-Revision-Date: 2021-12-27 02:51+0000\n" +"Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" "MIME-Version: 1.0\n" @@ -1257,7 +1257,7 @@ msgstr "Jiāmì bùzú" #: ports/espressif/common-hal/wifi/Radio.c msgid "Interface must be started" -msgstr "" +msgstr "jiē kǒu bì xū qǐ dòng" #: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" @@ -1320,7 +1320,7 @@ msgstr "Tí gōng liǎo wúxiào de DAC yǐn jiǎo" #: shared-bindings/wifi/Radio.c msgid "Invalid MAC address" -msgstr "" +msgstr "wú xiào de MAC dì zhǐ" #: shared-bindings/synthio/__init__.c msgid "Invalid MIDI file" @@ -1397,7 +1397,7 @@ msgstr "Wúxiào de nèicún fǎngwèn." #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" -msgstr "" +msgstr "wú xiào de duō bō MAC dì zhǐ" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "Invalid number of bits" @@ -1497,7 +1497,7 @@ msgstr "mì yào bì xū wéi 16, 24 huò 32 zì jié cháng" #: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" -msgstr "" +msgstr "LED yìng shè bì xū yǔ xiǎn shì píng chǐ cùn pǐ pèi" #: py/compile.c msgid "LHS of keyword arg must be an id" @@ -2137,7 +2137,7 @@ msgstr "Cǎiyàng lǜ tài gāo. Tā bìxū xiǎoyú %d" #: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" -msgstr "" +msgstr "bǐ lì chǐ cùn bì xū chú yǐ 3" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Scan already in progess. Stop with stop_scan." @@ -2792,7 +2792,7 @@ msgstr "jiàozhǔn zhí chāochū fànwéi +/-127" #: shared-module/vectorio/Rectangle.c msgid "can only be registered in one parent" -msgstr "" +msgstr "zhǐ néng zài yí gè jiā zhǎng zhōng zhù cè" #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" @@ -4249,7 +4249,7 @@ msgstr "yuán wèi tú (source_bitmap) de zhí de shù mù (value_count) bì xū #: shared-bindings/wifi/Radio.c msgid "ssid can't be more than 32 bytes" -msgstr "" +msgstr "ssid bù néng chāo guò 32 gè zì jié" #: py/objstr.c msgid "start/end indices" From 0f5b20c650aa70e2b055397cbbee008e5f800b91 Mon Sep 17 00:00:00 2001 From: 0hotpotman0 Date: Mon, 27 Dec 2021 13:45:39 +0800 Subject: [PATCH 130/258] Correct pin name --- ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c index ec8721b438..5d2e9226ca 100644 --- a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c @@ -33,10 +33,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_05) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_04) }, - { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_30) }, - { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P0_26) }, - { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_06) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_LED_BLUE), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_P0_30) }, { MP_ROM_QSTR(MP_QSTR_IMU_PWR), MP_ROM_PTR(&pin_P1_08) }, { MP_ROM_QSTR(MP_QSTR_IMU_SCL), MP_ROM_PTR(&pin_P0_27) }, From 1d13c4ccd1df70e5f71c75075f729874303fe889 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 27 Dec 2021 10:21:47 -0600 Subject: [PATCH 131/258] Centralize LONGINT_IMPL handling This closes #5782 --- ports/atmel-samd/mpconfigport.mk | 16 ---------------- ports/cxd56/mpconfigport.mk | 5 ----- ports/espressif/mpconfigport.mk | 5 ----- ports/litex/mpconfigport.mk | 5 ----- ports/mimxrt10xx/mpconfigport.mk | 12 ------------ ports/nrf/mpconfigport.mk | 5 ----- ports/raspberrypi/mpconfigport.mk | 16 ---------------- ports/stm/mpconfigport.mk | 1 - py/circuitpy_defns.mk | 17 ----------------- py/circuitpy_mpconfig.mk | 28 ++++++++++++++++++++++++++++ 10 files changed, 28 insertions(+), 82 deletions(-) diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 223a60d796..9d238834fe 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -2,22 +2,6 @@ # parameters that vary based on chip and/or board. LD_TEMPLATE_FILE = boards/common.template.ld -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. - -ifeq ($(LONGINT_IMPL),NONE) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none -endif - -ifeq ($(LONGINT_IMPL),MPZ) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong -endif - INTERNAL_LIBM = 1 # Number of USB endpoint pairs. diff --git a/ports/cxd56/mpconfigport.mk b/ports/cxd56/mpconfigport.mk index 865c170aaa..8787c55bcc 100644 --- a/ports/cxd56/mpconfigport.mk +++ b/ports/cxd56/mpconfigport.mk @@ -3,11 +3,6 @@ USB_HIGHSPEED = 1 # Number of USB endpoint pairs. USB_NUM_ENDPOINT_PAIRS = 6 -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz - # Longints can be implemented as mpz, as longlong, or not LONGINT_IMPL = MPZ diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index e78e7b2705..312b05dc40 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -1,8 +1,3 @@ -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz - # Internal math library is substantially smaller than toolchain one INTERNAL_LIBM = 1 diff --git a/ports/litex/mpconfigport.mk b/ports/litex/mpconfigport.mk index ce6ed08841..57f5113b69 100644 --- a/ports/litex/mpconfigport.mk +++ b/ports/litex/mpconfigport.mk @@ -1,8 +1,3 @@ -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz - # Internal math library is substantially smaller than toolchain one INTERNAL_LIBM = 1 diff --git a/ports/mimxrt10xx/mpconfigport.mk b/ports/mimxrt10xx/mpconfigport.mk index ed9446d0e7..e7e7abe141 100644 --- a/ports/mimxrt10xx/mpconfigport.mk +++ b/ports/mimxrt10xx/mpconfigport.mk @@ -1,17 +1,5 @@ LD_FILE = $(FLASH).ld $(CHIP_FAMILY).ld imxrt10xx.ld -ifeq ($(LONGINT_IMPL),NONE) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none -endif - -ifeq ($(LONGINT_IMPL),MPZ) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong -endif - INTERNAL_LIBM = 1 USB_HIGHSPEED = 1 diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index 55ade5562f..6f432c55ae 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -2,11 +2,6 @@ # parameters that vary based on chip and/or board. LD_TEMPLATE_FILE = boards/common.template.ld -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz - INTERNAL_LIBM = 1 # Number of USB endpoint pairs. diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index bc8a26de7b..1dfb345f5d 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -1,19 +1,3 @@ -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. - -ifeq ($(LONGINT_IMPL),NONE) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none -endif - -ifeq ($(LONGINT_IMPL),MPZ) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong -endif - # All raspberrypi ports have longints. LONGINT_IMPL = MPZ diff --git a/ports/stm/mpconfigport.mk b/ports/stm/mpconfigport.mk index 6729a747b5..ba383d41d2 100644 --- a/ports/stm/mpconfigport.mk +++ b/ports/stm/mpconfigport.mk @@ -1,4 +1,3 @@ -MPY_TOOL_LONGINT_IMPL ?= -mlongint-impl=mpz LONGINT_IMPL ?= MPZ INTERNAL_LIBM ?= 1 diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index e883481675..ea2aa01f03 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -85,23 +85,6 @@ CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool CFLAGS += -DMICROPY_MODULE_FROZEN_MPY endif - -### -# Propagate longint choice from .mk to C. There's no easy string comparison -# in cpp conditionals, so we #define separate names for each. -ifeq ($(LONGINT_IMPL),NONE) -CFLAGS += -DLONGINT_IMPL_NONE -endif - -ifeq ($(LONGINT_IMPL),MPZ) -CFLAGS += -DLONGINT_IMPL_MPZ -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -CFLAGS += -DLONGINT_IMPL_LONGLONG -endif - - ### # Select which builtin modules to compile and include. diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 7f0721264b..042fedb672 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -462,3 +462,31 @@ CFLAGS += -DCIRCUITPY_WATCHDOG=$(CIRCUITPY_WATCHDOG) CIRCUITPY_WIFI ?= 0 CFLAGS += -DCIRCUITPY_WIFI=$(CIRCUITPY_WIFI) + +# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk +# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. +# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. +# +# Also propagate longint choice from .mk to C. There's no easy string comparison +# in cpp conditionals, so we #define separate names for each. + +ifeq ($(LONGINT_IMPL),NONE) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none +CFLAGS += -DLONGINT_IMPL_NONE +else ifeq ($(LONGINT_IMPL),MPZ) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz +CFLAGS += -DLONGINT_IMPL_MPZ +else ifeq ($(LONGINT_IMPL),LONGLONG) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong +CFLAGS += -DLONGINT_IMPL_LONGLONG +else +$(error LONGINT_IMPL set to surprising value: "$(LONGINT_IMPL)") +endif + +### +ifeq ($(LONGINT_IMPL),NONE) +else ifeq ($(LONGINT_IMPL),MPZ) +else ifeq ($(LONGINT_IMPL),LONGLONG) +else +$(error LONGINT_IMPL set to surprising value: "$(LONGINT_IMPL)") +endif From 316c25303d4b066dd4f9aba7334d394918780b8f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 21 Dec 2021 15:33:59 -0600 Subject: [PATCH 132/258] Provide a protocol for `Font`s --- shared-bindings/fontio/BuiltinFont.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/shared-bindings/fontio/BuiltinFont.c b/shared-bindings/fontio/BuiltinFont.c index 171a50dab3..fcbde4e80d 100644 --- a/shared-bindings/fontio/BuiltinFont.c +++ b/shared-bindings/fontio/BuiltinFont.c @@ -36,6 +36,25 @@ #include "shared-bindings/util.h" #include "supervisor/shared/translate.h" +//| from typing_extensions import Protocol # for compat with python < 3.8 +//| +//| class FontProtocol(Protocol): +//| """A protocol shared by `BuiltinFont` and classes in ``adafruit_bitmap_font``""" +//| def get_bounding_box(self) -> Union[Tuple[int, int], Tuple[int, int, int, int]]: +//| """Retrieve the maximum bounding box of any glyph in the font. +//| +//| The four element version is ``(width, height, x_offset, y_offset)``. +//| The two element version is ``(width, height)``, in which +//| ``x_offset`` and ``y_offset`` are assumed to be zero.""" +//| pass +//| +//| def get_glyph(self, codepoint: int) -> Optional[Glyph]: +//| """Retrieve the Glyph for a given code point +//| +//| If the code point is not present in the font, `None` is returned.""" +//| pass +//| + //| class BuiltinFont: //| """A font built into CircuitPython""" //| From 75857ce141e90f543f382c70003ebc290b498efe Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 27 Dec 2021 10:36:56 -0600 Subject: [PATCH 133/258] Install setuptool_scm for `make check-stubs` This fixes the lengthy build-time message > setuptools_scm-6.3.2-py3.9.egg/setuptools_scm/integration.py:16: RuntimeWarning: > ERROR: setuptools==44.1.1 is used in combination with setuptools_scm>=6.x > > Your build configuration is incomplete and previously worked by accident! > > > This happens as setuptools is unable to replace itself when a activated build dependency requires a more recent setuptools version (it does not respect "setuptools>X" in setup_requires). > > > setuptools>=31 is required for setup.cfg metadata support > setuptools>=42 is required for pyproject.toml configuration support > > Suggested workarounds if applicable: > - preinstalling build dependencies like setuptools_scm before running setup.py > - installing setuptools_scm using the system package manager to ensure consistency > - migrating from the deprecated setup_requires mechanism to pep517/518 and using a pyproject.toml to declare build dependencies which are reliably pre-installed before running the build tools --- requirements-doc.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-doc.txt b/requirements-doc.txt index cefd7dc51d..5bd9e61d8b 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -6,6 +6,7 @@ twine wheel astroid setuptools +setuptools_scm # For sphinx Sphinx<4 From 8de5f900860dc5f2fe3e22e7797f374379d93f75 Mon Sep 17 00:00:00 2001 From: Kenny <3454741+WarriorOfWire@users.noreply.github.com> Date: Mon, 27 Dec 2021 11:31:18 -1000 Subject: [PATCH 134/258] vectorio contains(x, y) new utility function for all vectorio shape specializations for testing whether a screen-space x,y point falls within a shape's x,y. This respects the current orientation of the screen in the manner of displayio and vectorio - so your x,y requests are in the same coordinate domain as your x,y locations and your width/height etc. properties that ou set on other shapes. I.e., if you're using this for touch points then you will need to make sure the touch events are in the same x,y domain as your display. ``` contains(2, 4) -> true ------------------ | | | | | -- | | | \ | | |. \ | | | \ | | |____\ | | | ------------------ contains(5, 4) -> false ------------------ | | | | | -- | | | \ | | | \. | | | \ | | |____\ | | | ------------------ ``` This helps provide low overhead introspection of shape coverage on screen. It's envisioned that this will be used for things like touch-and-drag widget controls, touch "areas" and may help with random ornament placement on toy Christmas trees. --- shared-bindings/vectorio/Circle.c | 2 + shared-bindings/vectorio/Polygon.c | 2 + shared-bindings/vectorio/Rectangle.c | 2 + shared-bindings/vectorio/VectorShape.c | 15 ++++ shared-bindings/vectorio/VectorShape.h | 3 + shared-module/vectorio/VectorShape.c | 103 ++++++++++++++----------- 6 files changed, 82 insertions(+), 45 deletions(-) diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index 43845937c4..9711c53e0d 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -97,6 +97,8 @@ const mp_obj_property_t vectorio_circle_radius_obj = { //| STATIC const mp_rom_map_elem_t vectorio_circle_locals_dict_table[] = { + // Functions + { MP_ROM_QSTR(MP_QSTR_contains), MP_ROM_PTR(&vectorio_vector_shape_contains_obj) }, // Properties { MP_ROM_QSTR(MP_QSTR_radius), MP_ROM_PTR(&vectorio_circle_radius_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index d1078b2d2d..dfe50ffd01 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -103,6 +103,8 @@ const mp_obj_property_t vectorio_polygon_points_obj = { //| STATIC const mp_rom_map_elem_t vectorio_polygon_locals_dict_table[] = { + // Functions + { MP_ROM_QSTR(MP_QSTR_contains), MP_ROM_PTR(&vectorio_vector_shape_contains_obj) }, // Properties { MP_ROM_QSTR(MP_QSTR_points), MP_ROM_PTR(&vectorio_polygon_points_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index dc7415e0ba..67367eb538 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -122,6 +122,8 @@ const mp_obj_property_t vectorio_rectangle_height_obj = { //| STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = { + // Functions + { MP_ROM_QSTR(MP_QSTR_contains), MP_ROM_PTR(&vectorio_vector_shape_contains_obj) }, // Properties { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index 3f8c105d0e..3293466cc4 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -80,6 +80,21 @@ vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl = { .draw_get_refresh_areas = (draw_get_refresh_areas_fun)vectorio_vector_shape_get_refresh_areas, }; +// Stub checker does not approve of these shared properties. +// x: int +// y: int +// """true if x,y lies inside the shape.""" +// +STATIC mp_obj_t vectorio_vector_shape_obj_contains(mp_obj_t wrapper_shape, mp_obj_t x_obj, mp_obj_t y_obj) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + + mp_int_t x = mp_obj_get_int(x_obj); + mp_int_t y = mp_obj_get_int(y_obj); + return mp_obj_new_bool(common_hal_vectorio_vector_shape_contains(self, x, y)); +} +MP_DEFINE_CONST_FUN_OBJ_3(vectorio_vector_shape_contains_obj, vectorio_vector_shape_obj_contains); // Stub checker does not approve of these shared properties. // x: int diff --git a/shared-bindings/vectorio/VectorShape.h b/shared-bindings/vectorio/VectorShape.h index 12c7e628ad..959a38dff0 100644 --- a/shared-bindings/vectorio/VectorShape.h +++ b/shared-bindings/vectorio/VectorShape.h @@ -18,6 +18,8 @@ void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, vectorio_ishape_t ishape, mp_obj_t pixel_shader, int32_t x, int32_t y); +bool common_hal_vectorio_vector_shape_contains(vectorio_vector_shape_t *self, mp_int_t x, mp_int_t y); + void common_hal_vectorio_vector_shape_set_dirty(void *self); mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self); @@ -40,5 +42,6 @@ extern const mp_obj_property_t vectorio_vector_shape_x_obj; extern const mp_obj_property_t vectorio_vector_shape_y_obj; extern const mp_obj_property_t vectorio_vector_shape_location_obj; extern const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj; +extern const mp_obj_fun_builtin_fixed_t vectorio_vector_shape_contains_obj; #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index be14fca5ac..52d3354946 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -72,6 +72,12 @@ static uint32_t min(uint32_t a, uint32_t b) { return a < b ? a : b; } +static void short_bound_check(mp_int_t i, qstr name) { + if (i < SHRT_MIN || i > SHRT_MAX) { + mp_raise_ValueError_varg(translate("%q must be between %d and %d"), name, SHRT_MIN, SHRT_MAX); + } +} + inline __attribute__((always_inline)) static void area_transpose(displayio_area_t *to_transpose) { int16_t swap = to_transpose->y1; @@ -124,21 +130,50 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2); } +// Get the target pixel based on the shape's coordinate space +static void screen_to_shape_coordinates(vectorio_vector_shape_t *self, uint16_t x, uint16_t y, int16_t *out_shape_x, int16_t *out_shape_y) { + if (self->absolute_transform->transpose_xy) { + *out_shape_x = y - self->absolute_transform->y - self->absolute_transform->dy * self->x; + *out_shape_y = x - self->absolute_transform->x - self->absolute_transform->dx * self->y; -STATIC -void check_bounds_and_set_x(vectorio_vector_shape_t *self, mp_int_t x) { - if (x < SHRT_MIN || x > SHRT_MAX) { - mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_x, SHRT_MIN, SHRT_MAX); + VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", *out_shape_x, *out_shape_y); + if (self->absolute_transform->dx < 1) { + *out_shape_y *= -1; + } + if (self->absolute_transform->dy < 1) { + *out_shape_x *= -1; + } + VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", *out_shape_x, *out_shape_y); + } else { + *out_shape_x = x - self->absolute_transform->x - self->absolute_transform->dx * self->x; + *out_shape_y = y - self->absolute_transform->y - self->absolute_transform->dy * self->y; + + VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", *out_shape_x, *out_shape_y); + if (self->absolute_transform->dx < 1) { + *out_shape_x *= -1; + } + if (self->absolute_transform->dy < 1) { + *out_shape_y *= -1; + } + VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", *out_shape_x, *out_shape_y); + + // It's mirrored via dx. Maybe we need to add support for also separately mirroring? + // if (self->absolute_transform->mirror_x) { + // pixel_to_get_x = (shape_area.x2 - shape_area.x1) - (pixel_to_get_x - shape_area.x1) + shape_area.x1 - 1; + // } + // if (self->absolute_transform->mirror_y) { + // pixel_to_get_y = (shape_area.y2 - shape_area.y1) - (pixel_to_get_y - shape_area.y1) + +shape_area.y1 - 1; + // } } +} + +static void check_bounds_and_set_x(vectorio_vector_shape_t *self, mp_int_t x) { + short_bound_check(x, MP_QSTR_x); self->x = x; } - -STATIC -void check_bounds_and_set_y(vectorio_vector_shape_t *self, mp_int_t y) { - if (y < SHRT_MIN || y > SHRT_MAX) { - mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_y, SHRT_MIN, SHRT_MAX); - } +static void check_bounds_and_set_y(vectorio_vector_shape_t *self, mp_int_t y) { + short_bound_check(y, MP_QSTR_y); self->y = y; } @@ -195,6 +230,17 @@ void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, _get_screen_area(self, &self->current_area); } +bool common_hal_vectorio_vector_shape_contains(vectorio_vector_shape_t *self, mp_int_t x, mp_int_t y) { + VECTORIO_SHAPE_DEBUG("%p contains(%d, %d)", self); + short_bound_check(x, MP_QSTR_x); + short_bound_check(y, MP_QSTR_y); + int16_t shape_x; + int16_t shape_y; + screen_to_shape_coordinates(self, x, y, &shape_x, &shape_y); + bool shape_contains_coordinates = 0 != self->ishape.get_pixel(self->ishape.shape, shape_x, shape_y); + return shape_contains_coordinates; +} + mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self) { VECTORIO_SHAPE_DEBUG("%p get_x\n", self); @@ -277,7 +323,6 @@ void common_hal_vectorio_vector_shape_set_pixel_shader(vectorio_vector_shape_t * common_hal_vectorio_vector_shape_set_dirty(self); } - bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displayio_colorspace_t *colorspace, const displayio_area_t *area, uint32_t *mask, uint32_t *buffer) { // Shape areas are relative to 0,0. This will allow rotation about a known axis. // The consequence is that the area reported by the shape itself is _relative_ to 0,0. @@ -335,42 +380,10 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ } output_pixel.pixel = 0; - // Get the target pixel based on the shape's coordinate space + // Cast input screen coordinates to shape coordinates to pick the pixel to draw int16_t pixel_to_get_x; int16_t pixel_to_get_y; - if (self->absolute_transform->transpose_xy) { - pixel_to_get_x = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->x; - pixel_to_get_y = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->y; - - VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - if (self->absolute_transform->dx < 1) { - pixel_to_get_y *= -1; - } - if (self->absolute_transform->dy < 1) { - pixel_to_get_x *= -1; - } - VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - } else { - pixel_to_get_x = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->x; - pixel_to_get_y = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->y; - - VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - if (self->absolute_transform->dx < 1) { - pixel_to_get_x *= -1; - } - if (self->absolute_transform->dy < 1) { - pixel_to_get_y *= -1; - } - VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - - // It's mirrored via dx. Maybe we need to add support for also separately mirroring? - // if (self->absolute_transform->mirror_x) { - // pixel_to_get_x = (shape_area.x2 - shape_area.x1) - (pixel_to_get_x - shape_area.x1) + shape_area.x1 - 1; - // } - // if (self->absolute_transform->mirror_y) { - // pixel_to_get_y = (shape_area.y2 - shape_area.y1) - (pixel_to_get_y - shape_area.y1) + +shape_area.y1 - 1; - // } - } + screen_to_shape_coordinates(self, input_pixel.x, input_pixel.y, &pixel_to_get_x, &pixel_to_get_y); VECTORIO_SHAPE_PIXEL_DEBUG(" get_pixel %p (%3d, %3d) -> ( %3d, %3d )", self->ishape.shape, input_pixel.x, input_pixel.y, pixel_to_get_x, pixel_to_get_y); #ifdef VECTORIO_PERF From 34e8bfd09e556f114c79310bc0c097f11c035d60 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 27 Dec 2021 16:39:04 -0600 Subject: [PATCH 135/258] explicitly use mpz long ints on this board --- ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk index dfdde0dbb0..af0129f10f 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -8,6 +8,7 @@ CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JVxM" +LONGINT_IMPL = MPZ # No I2S on SAMD51G. CIRCUITPY_AUDIOBUSIO = 0 From 9cf2baf68e03268fd706ae99d188dcc54090b290 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 27 Dec 2021 16:39:33 -0600 Subject: [PATCH 136/258] remove unneeded LONGINT_IMPL logic --- ports/broadcom/mpconfigport.mk | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ports/broadcom/mpconfigport.mk b/ports/broadcom/mpconfigport.mk index c7b8a2fcc3..5f3c7cdac0 100644 --- a/ports/broadcom/mpconfigport.mk +++ b/ports/broadcom/mpconfigport.mk @@ -1,19 +1,3 @@ -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. - -ifeq ($(LONGINT_IMPL),NONE) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none -endif - -ifeq ($(LONGINT_IMPL),MPZ) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong -endif - # All broadcom ports have longints. LONGINT_IMPL = MPZ From 1986d2ee71737c36794577cb4dc3cdf7fb1422a7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 27 Dec 2021 16:42:41 -0600 Subject: [PATCH 137/258] clear out interrupt flags when disabling timer too --- ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c b/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c index 8ab4edb598..d580b4cc6a 100644 --- a/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c +++ b/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c @@ -59,6 +59,8 @@ void common_hal_rgbmatrix_timer_enable(void *ptr) { void common_hal_rgbmatrix_timer_disable(void *ptr) { int8_t slice = ((intptr_t)ptr) & 0xff; pwm_set_enabled(slice, false); + irq_set_enabled(PWM_IRQ_WRAP, false); + pwm_clear_irq(slice); } void common_hal_rgbmatrix_timer_free(void *ptr) { From 41d494df0b35bb845a981c07a27ccdbed720d7f6 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 27 Dec 2021 18:58:24 -0500 Subject: [PATCH 138/258] go into safe mode if not CIRCUITPY available --- locale/circuitpython.pot | 4 ++++ main.c | 6 +++++- shared-module/storage/__init__.c | 2 +- supervisor/filesystem.h | 2 +- supervisor/shared/filesystem.c | 18 ++++++++++-------- supervisor/shared/safe_mode.c | 2 ++ supervisor/shared/safe_mode.h | 1 + supervisor/stub/filesystem.c | 3 ++- 8 files changed, 26 insertions(+), 12 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 59a8dcd1b1..7ca30dc063 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -659,6 +659,10 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/main.c b/main.c index a962405498..3f9d0f2cae 100644 --- a/main.c +++ b/main.c @@ -811,7 +811,11 @@ int __attribute__((used)) main(void) { // Create a new filesystem only if we're not in a safe mode. // A power brownout here could make it appear as if there's // no SPI flash filesystem, and we might erase the existing one. - filesystem_init(safe_mode == NO_SAFE_MODE, false); + + // Check whether CIRCUITPY is available. Don't check if it already hasn't been found. + if (safe_mode != NO_CIRCUITPY && !filesystem_init(safe_mode == NO_SAFE_MODE, false)) { + reset_into_safe_mode(NO_CIRCUITPY); + } // displays init after filesystem, since they could share the flash SPI board_init(); diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c index 620e536ba4..e36d3ec21e 100644 --- a/shared-module/storage/__init__.c +++ b/shared-module/storage/__init__.c @@ -271,7 +271,7 @@ void common_hal_storage_erase_filesystem(void) { usb_disconnect(); #endif mp_hal_delay_ms(1000); - filesystem_init(false, true); // Force a re-format. + (void)filesystem_init(false, true); // Force a re-format. Ignore failure. common_hal_mcu_reset(); // We won't actually get here, since we're resetting. } diff --git a/supervisor/filesystem.h b/supervisor/filesystem.h index c7c951a5e6..6f4faf0b82 100644 --- a/supervisor/filesystem.h +++ b/supervisor/filesystem.h @@ -35,7 +35,7 @@ extern volatile bool filesystem_flush_requested; void filesystem_background(void); void filesystem_tick(void); -void filesystem_init(bool create_allowed, bool force_create); +bool filesystem_init(bool create_allowed, bool force_create); void filesystem_flush(void); bool filesystem_present(void); void filesystem_set_internal_writable_by_usb(bool usb_writable); diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index 2ab64e5dbd..820dbe9783 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -86,7 +86,7 @@ static void make_sample_code_file(FATFS *fatfs) { // we don't make this function static because it needs a lot of stack and we // want it to be executed without using stack within main() function -void filesystem_init(bool create_allowed, bool force_create) { +bool filesystem_init(bool create_allowed, bool force_create) { // init the vfs object fs_user_mount_t *vfs_fat = &_internal_vfs; vfs_fat->blockdev.flags = 0; @@ -102,11 +102,11 @@ void filesystem_init(bool create_allowed, bool force_create) { formats |= FM_EXFAT | FM_FAT32; #endif res = f_mkfs(&vfs_fat->fatfs, formats, 0, working_buf, sizeof(working_buf)); + if (res != FR_OK) { + return false; + } // Flush the new file system to make sure it's repaired immediately. supervisor_flash_flush(); - if (res != FR_OK) { - return; - } // set label #ifdef CIRCUITPY_DRIVE_LABEL @@ -115,13 +115,13 @@ void filesystem_init(bool create_allowed, bool force_create) { res = f_setlabel(&vfs_fat->fatfs, "CIRCUITPY"); #endif if (res != FR_OK) { - return; + return false; } // inhibit file indexing on MacOS res = f_mkdir(&vfs_fat->fatfs, "/.fseventsd"); if (res != FR_OK) { - return; + return false; } make_empty_file(&vfs_fat->fatfs, "/.metadata_never_index"); make_empty_file(&vfs_fat->fatfs, "/.Trashes"); @@ -132,13 +132,13 @@ void filesystem_init(bool create_allowed, bool force_create) { // create empty lib directory res = f_mkdir(&vfs_fat->fatfs, "/lib"); if (res != FR_OK) { - return; + return false; } // and ensure everything is flushed supervisor_flash_flush(); } else if (res != FR_OK) { - return; + return false; } mp_vfs_mount_t *vfs = &_mp_vfs; vfs->str = "/"; @@ -150,6 +150,8 @@ void filesystem_init(bool create_allowed, bool force_create) { // The current directory is used as the boot up directory. // It is set to the internal flash filesystem by default. MP_STATE_PORT(vfs_cur) = vfs; + + return true; } void filesystem_flush(void) { diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 59b5ab838d..62006baf98 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -175,6 +175,8 @@ void print_safe_mode_message(safe_mode_t reason) { case WATCHDOG_RESET: message = translate("Watchdog timer expired."); break; + case NO_CIRCUITPY: + message = translate("CIRCUITPY drive could not be found or created."); default: break; } diff --git a/supervisor/shared/safe_mode.h b/supervisor/shared/safe_mode.h index 600abd7672..0c8d018bfe 100644 --- a/supervisor/shared/safe_mode.h +++ b/supervisor/shared/safe_mode.h @@ -48,6 +48,7 @@ typedef enum { USB_TOO_MANY_INTERFACE_NAMES, USB_BOOT_DEVICE_NOT_INTERFACE_ZERO, NO_HEAP, + NO_CIRCUITPY, } safe_mode_t; safe_mode_t wait_for_safe_mode_reset(void); diff --git a/supervisor/stub/filesystem.c b/supervisor/stub/filesystem.c index 2b518f4142..3d2bf5e3be 100644 --- a/supervisor/stub/filesystem.c +++ b/supervisor/stub/filesystem.c @@ -26,9 +26,10 @@ #include "supervisor/filesystem.h" -void filesystem_init(bool create_allowed, bool force_create) { +bool filesystem_init(bool create_allowed, bool force_create) { (void)create_allowed; (void)force_create; + return true; } void filesystem_flush(void) { From 3c9f7f6ae91379edc46df57160d1b2df0a229e24 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 27 Dec 2021 19:36:11 -0500 Subject: [PATCH 139/258] address review comments --- main.c | 2 +- supervisor/shared/safe_mode.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 3f9d0f2cae..e0d99e3143 100644 --- a/main.c +++ b/main.c @@ -813,7 +813,7 @@ int __attribute__((used)) main(void) { // no SPI flash filesystem, and we might erase the existing one. // Check whether CIRCUITPY is available. Don't check if it already hasn't been found. - if (safe_mode != NO_CIRCUITPY && !filesystem_init(safe_mode == NO_SAFE_MODE, false)) { + if ((safe_mode != NO_CIRCUITPY) && !filesystem_init(safe_mode == NO_SAFE_MODE, false)) { reset_into_safe_mode(NO_CIRCUITPY); } diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 62006baf98..4cb9d7ad61 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -177,6 +177,7 @@ void print_safe_mode_message(safe_mode_t reason) { break; case NO_CIRCUITPY: message = translate("CIRCUITPY drive could not be found or created."); + break; default: break; } From fe71ee08122e53ed3c3f7e12f1c1388805aa3e0b Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Tue, 28 Dec 2021 19:31:40 +1100 Subject: [PATCH 140/258] Fix busdevice stub path --- py/circuitpy_defns.mk | 4 ++-- shared-bindings/adafruit_bus_device/__init__.c | 4 ++-- .../adafruit_bus_device/{ => i2c_device}/I2CDevice.c | 4 ++-- .../adafruit_bus_device/{ => i2c_device}/I2CDevice.h | 2 +- .../adafruit_bus_device/{ => spi_device}/SPIDevice.c | 4 ++-- .../adafruit_bus_device/{ => spi_device}/SPIDevice.h | 2 +- .../adafruit_bus_device/{ => i2c_device}/I2CDevice.c | 2 +- .../adafruit_bus_device/{ => i2c_device}/I2CDevice.h | 0 .../adafruit_bus_device/{ => spi_device}/SPIDevice.c | 2 +- .../adafruit_bus_device/{ => spi_device}/SPIDevice.h | 0 10 files changed, 12 insertions(+), 12 deletions(-) rename shared-bindings/adafruit_bus_device/{ => i2c_device}/I2CDevice.c (98%) rename shared-bindings/adafruit_bus_device/{ => i2c_device}/I2CDevice.h (97%) rename shared-bindings/adafruit_bus_device/{ => spi_device}/SPIDevice.c (97%) rename shared-bindings/adafruit_bus_device/{ => spi_device}/SPIDevice.h (97%) rename shared-module/adafruit_bus_device/{ => i2c_device}/I2CDevice.c (98%) rename shared-module/adafruit_bus_device/{ => i2c_device}/I2CDevice.h (100%) rename shared-module/adafruit_bus_device/{ => spi_device}/SPIDevice.c (98%) rename shared-module/adafruit_bus_device/{ => spi_device}/SPIDevice.h (100%) diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index e883481675..d357544965 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -524,8 +524,8 @@ SRC_SHARED_MODULE_ALL = \ bitops/__init__.c \ board/__init__.c \ adafruit_bus_device/__init__.c \ - adafruit_bus_device/I2CDevice.c \ - adafruit_bus_device/SPIDevice.c \ + adafruit_bus_device/i2c_device/I2CDevice.c \ + adafruit_bus_device/spi_device/SPIDevice.c \ canio/Match.c \ canio/Message.c \ canio/RemoteTransmissionRequest.c \ diff --git a/shared-bindings/adafruit_bus_device/__init__.c b/shared-bindings/adafruit_bus_device/__init__.c index f25a882557..742cfc3480 100644 --- a/shared-bindings/adafruit_bus_device/__init__.c +++ b/shared-bindings/adafruit_bus_device/__init__.c @@ -32,8 +32,8 @@ #include "py/objproperty.h" #include "shared-bindings/adafruit_bus_device/__init__.h" -#include "shared-bindings/adafruit_bus_device/I2CDevice.h" -#include "shared-bindings/adafruit_bus_device/SPIDevice.h" +#include "shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h" +#include "shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h" STATIC const mp_rom_map_elem_t adafruit_bus_device_i2c_device_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_i2c_device) }, diff --git a/shared-bindings/adafruit_bus_device/I2CDevice.c b/shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.c similarity index 98% rename from shared-bindings/adafruit_bus_device/I2CDevice.c rename to shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.c index 98f2640483..327e8e72b4 100644 --- a/shared-bindings/adafruit_bus_device/I2CDevice.c +++ b/shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.c @@ -28,9 +28,9 @@ // busio.I2C class. #include "shared-bindings/microcontroller/Pin.h" -#include "shared-bindings/adafruit_bus_device/I2CDevice.h" +#include "shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h" #include "shared-bindings/util.h" -#include "shared-module/adafruit_bus_device/I2CDevice.h" +#include "shared-module/adafruit_bus_device/i2c_device/I2CDevice.h" #include "shared/runtime/buffer_helper.h" #include "shared/runtime/context_manager_helpers.h" diff --git a/shared-bindings/adafruit_bus_device/I2CDevice.h b/shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h similarity index 97% rename from shared-bindings/adafruit_bus_device/I2CDevice.h rename to shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h index 36a95b6a24..71c169a868 100644 --- a/shared-bindings/adafruit_bus_device/I2CDevice.h +++ b/shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h @@ -36,7 +36,7 @@ #include "py/obj.h" -#include "shared-module/adafruit_bus_device/I2CDevice.h" +#include "shared-module/adafruit_bus_device/i2c_device/I2CDevice.h" // #include "shared-bindings/busio/I2C.h" // Type object used in Python. Should be shared between ports. diff --git a/shared-bindings/adafruit_bus_device/SPIDevice.c b/shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c similarity index 97% rename from shared-bindings/adafruit_bus_device/SPIDevice.c rename to shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c index aee8882940..2c5708b831 100644 --- a/shared-bindings/adafruit_bus_device/SPIDevice.c +++ b/shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c @@ -25,9 +25,9 @@ */ #include "shared-bindings/microcontroller/Pin.h" -#include "shared-bindings/adafruit_bus_device/SPIDevice.h" +#include "shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h" #include "shared-bindings/util.h" -#include "shared-module/adafruit_bus_device/SPIDevice.h" +#include "shared-module/adafruit_bus_device/spi_device/SPIDevice.h" #include "common-hal/digitalio/DigitalInOut.h" #include "shared-bindings/digitalio/DigitalInOut.h" diff --git a/shared-bindings/adafruit_bus_device/SPIDevice.h b/shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h similarity index 97% rename from shared-bindings/adafruit_bus_device/SPIDevice.h rename to shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h index 43b9377f97..b92a5ebfae 100644 --- a/shared-bindings/adafruit_bus_device/SPIDevice.h +++ b/shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h @@ -36,7 +36,7 @@ #include "py/obj.h" -#include "shared-module/adafruit_bus_device/SPIDevice.h" +#include "shared-module/adafruit_bus_device/spi_device/SPIDevice.h" // Type object used in Python. Should be shared between ports. extern const mp_obj_type_t adafruit_bus_device_spidevice_type; diff --git a/shared-module/adafruit_bus_device/I2CDevice.c b/shared-module/adafruit_bus_device/i2c_device/I2CDevice.c similarity index 98% rename from shared-module/adafruit_bus_device/I2CDevice.c rename to shared-module/adafruit_bus_device/i2c_device/I2CDevice.c index 942b132c3e..0b430d1ea2 100644 --- a/shared-module/adafruit_bus_device/I2CDevice.c +++ b/shared-module/adafruit_bus_device/i2c_device/I2CDevice.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/adafruit_bus_device/I2CDevice.h" +#include "shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h" #include "shared-bindings/busio/I2C.h" #include "py/mperrno.h" #include "py/nlr.h" diff --git a/shared-module/adafruit_bus_device/I2CDevice.h b/shared-module/adafruit_bus_device/i2c_device/I2CDevice.h similarity index 100% rename from shared-module/adafruit_bus_device/I2CDevice.h rename to shared-module/adafruit_bus_device/i2c_device/I2CDevice.h diff --git a/shared-module/adafruit_bus_device/SPIDevice.c b/shared-module/adafruit_bus_device/spi_device/SPIDevice.c similarity index 98% rename from shared-module/adafruit_bus_device/SPIDevice.c rename to shared-module/adafruit_bus_device/spi_device/SPIDevice.c index 20e4e76297..2f4ab4dddf 100644 --- a/shared-module/adafruit_bus_device/SPIDevice.c +++ b/shared-module/adafruit_bus_device/spi_device/SPIDevice.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/adafruit_bus_device/SPIDevice.h" +#include "shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h" #include "shared-bindings/busio/SPI.h" #include "shared-bindings/digitalio/DigitalInOut.h" #include "py/mperrno.h" diff --git a/shared-module/adafruit_bus_device/SPIDevice.h b/shared-module/adafruit_bus_device/spi_device/SPIDevice.h similarity index 100% rename from shared-module/adafruit_bus_device/SPIDevice.h rename to shared-module/adafruit_bus_device/spi_device/SPIDevice.h From 52786f4e38e14227bdf7d13fa84a2a8683b1ce53 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 28 Dec 2021 16:40:54 +0100 Subject: [PATCH 141/258] 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/zh_Latn_pinyin.po | 6 +++++- 18 files changed, 73 insertions(+), 1 deletion(-) diff --git a/locale/ID.po b/locale/ID.po index dcd6897144..2fd34f3f5b 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -669,6 +669,10 @@ msgstr "Bytes harus di antara 0 dan 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Blok CBC harus merupakan kelipatan 16 byte" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index cf1c85debd..828b296f6d 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -668,6 +668,10 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 254ac419f5..d7ef2cbe98 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -670,6 +670,10 @@ msgstr "Ein Bytes kann nur Werte zwischen 0 und 255 annehmen." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC-Blöcke müssen ein Vielfaches von 16 Bytes sein" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC oder Checksumme ungültig" diff --git a/locale/el.po b/locale/el.po index aad86468bf..a3e63936f4 100644 --- a/locale/el.po +++ b/locale/el.po @@ -659,6 +659,10 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 4510047483..bf42d63ead 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -670,6 +670,10 @@ msgstr "Bytes must be between 0 and 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC blocks must be multiples of 16 bytes" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC or checksum was invalid" diff --git a/locale/es.po b/locale/es.po index 9e715ddd69..d20293e1f8 100644 --- a/locale/es.po +++ b/locale/es.po @@ -675,6 +675,10 @@ msgstr "Bytes debe estar entre 0 y 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Los bloques CBC deben ser múltiplos de 16 bytes" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC o suma de comprobación inválida" diff --git a/locale/fil.po b/locale/fil.po index 3865269b77..449941e31c 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -667,6 +667,10 @@ msgstr "Sa gitna ng 0 o 255 dapat ang bytes." msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 16c80ca8c5..62d0da35fd 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -676,6 +676,10 @@ msgstr "Les octets 'bytes' doivent être entre 0 et 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Les blocs CBC doivent être des multiples de 16 octets" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC ou somme de contrôle invalide" diff --git a/locale/hi.po b/locale/hi.po index c1aa33b367..1c08e72569 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -659,6 +659,10 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 129bcfdfa1..e3782b11a8 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -674,6 +674,10 @@ msgstr "I byte devono essere compresi tra 0 e 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "I blocchi CBC devono essere multipli di 16 bytes" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC o controllo totale è risultato non valido" diff --git a/locale/ja.po b/locale/ja.po index 64109d205e..53a106cf1e 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -666,6 +666,10 @@ msgstr "バイト値は0から255の間でなければなりません" msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBCブロックは16バイトの整数倍でなければなりません" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index da9638157b..35821acbc5 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -662,6 +662,10 @@ msgstr "바이트는 0에서 255 사이 여야합니다." msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 9931e4e28b..b659a74933 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -664,6 +664,10 @@ msgstr "Bytes moeten tussen 0 en 255 liggen." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC blocks moeten meervouden van 16 bytes zijn" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index 0f0ea8d391..541861c046 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -666,6 +666,10 @@ msgstr "Bytes musi być między 0 a 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Bloki CBC muszą być wielokrotnościami 16 bajtów" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 7292e05968..e264838034 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -679,6 +679,10 @@ msgstr "Os bytes devem estar entre 0 e 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Os blocos CBC devem ter múltiplos de 16 bytes" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC ou checksum inválido" diff --git a/locale/ru.po b/locale/ru.po index 2bc941ac7b..32ccdf5c30 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -677,6 +677,10 @@ msgstr "Bytes должен быть в диапазоне от 0 до 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Блоки CBC должны быть кратны 16 байтам" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC или контрольная сумма неправильная" diff --git a/locale/sv.po b/locale/sv.po index c100cb5469..96967061f1 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -669,6 +669,10 @@ msgstr "Bytes måste vara mellan 0 och 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC-block måste vara multiplar om 16 byte" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC eller checksumma var ogiltig" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 694f92dad3..ad712abf28 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -648,7 +648,7 @@ msgid "Buffer must be at least length 1" msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù wéi 1" #: shared-bindings/_bleio/PacketBuffer.c -#, c-format, fuzzy +#, fuzzy, c-format msgid "Buffer too short by %d bytes" msgstr "Huǎn chōng qū tài duǎn , àn %d zì jié" @@ -676,6 +676,10 @@ msgstr "Zìjié bìxū jiè yú 0 dào 255 zhījiān." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC kuài bìxū shì 16 zìjié de bèishù" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC huò jiàoyàn hé wúxiào" From ed3ddea2da9d3adf359d3acf50f0e0aa0af41a41 Mon Sep 17 00:00:00 2001 From: jerryneedell Date: Tue, 28 Dec 2021 11:26:47 -0500 Subject: [PATCH 142/258] set pulldown for broadcom jtag pins --- ports/broadcom/common-hal/microcontroller/Pin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/broadcom/common-hal/microcontroller/Pin.c b/ports/broadcom/common-hal/microcontroller/Pin.c index 1cf86f2b34..f3355a7be2 100644 --- a/ports/broadcom/common-hal/microcontroller/Pin.c +++ b/ports/broadcom/common-hal/microcontroller/Pin.c @@ -48,14 +48,15 @@ void reset_pin_number(uint8_t pin_number) { pin_in_use[pin_number] = false; never_reset_pin[pin_number] = false; // Reset JTAG pins back to JTAG. + BP_PULL_Enum pull = BP_PULL_NONE; if (22 <= pin_number && pin_number <= 27) { gpio_set_function(pin_number, GPIO_FUNCTION_ALT4); + pull = BP_PULL_DOWN; return; } else { gpio_set_function(pin_number, GPIO_FUNCTION_INPUT); } // Set the pull to match the datasheet. - BP_PULL_Enum pull = BP_PULL_NONE; if (pin_number < 9 || (33 < pin_number && pin_number < 37) || pin_number > 45) { From ad63150e6d8d57df01b3e0c41b0b56568beb27b4 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Wed, 29 Dec 2021 11:45:58 +1100 Subject: [PATCH 143/258] Don't freeze utils directories --- tools/preprocess_frozen_modules.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/preprocess_frozen_modules.py b/tools/preprocess_frozen_modules.py index 294df317bc..30263d2e02 100755 --- a/tools/preprocess_frozen_modules.py +++ b/tools/preprocess_frozen_modules.py @@ -49,7 +49,12 @@ def copy_and_process(in_dir, out_dir): # Skip library examples directory and subfolders. relative_path_parts = Path(root).relative_to(in_dir).parts - if relative_path_parts and relative_path_parts[0] in ["examples", "docs", "tests"]: + if relative_path_parts and relative_path_parts[0] in [ + "examples", + "docs", + "tests", + "utils", + ]: del subdirs[:] continue From e6b7dcaea474943c6789a8d0d95e0b80ff555aab Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 29 Dec 2021 06:38:53 +0000 Subject: [PATCH 144/258] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1030 of 1030 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 e264838034..efbc053d58 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-16 22:53+0000\n" +"PO-Revision-Date: 2021-12-30 11:53+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.10\n" +"X-Generator: Weblate 4.10.1\n" #: main.c msgid "" @@ -681,7 +681,7 @@ msgstr "Os blocos CBC devem ter múltiplos de 16 bytes" #: supervisor/shared/safe_mode.c msgid "CIRCUITPY drive could not be found or created." -msgstr "" +msgstr "A unidade CIRCUITPY não pôde ser encontrada nem criada." #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" From 878f011077b5d4d6916fddc8fc2feac8e2103154 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Wed, 29 Dec 2021 11:31:05 +0000 Subject: [PATCH 145/258] Translated using Weblate (Swedish) Currently translated at 100.0% (1030 of 1030 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 96967061f1..8601320db3 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-16 22:53+0000\n" +"PO-Revision-Date: 2021-12-30 11:53+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.10\n" +"X-Generator: Weblate 4.10.1\n" #: main.c msgid "" @@ -671,7 +671,7 @@ msgstr "CBC-block måste vara multiplar om 16 byte" #: supervisor/shared/safe_mode.c msgid "CIRCUITPY drive could not be found or created." -msgstr "" +msgstr "CIRCUITPY-enheten kunde inte hittas eller skapas." #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" From 4daa7b5180af713be1af924922207f248a0fe140 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 30 Dec 2021 10:00:01 +0530 Subject: [PATCH 146/258] update espressif port - enable rgbmatrix for all esp soc - bump idf to latest commit on v4.4 branch --- ports/espressif/common-hal/analogio/AnalogOut.c | 6 ++++++ ports/espressif/esp-idf | 2 +- ports/espressif/mpconfigport.mk | 5 +---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ports/espressif/common-hal/analogio/AnalogOut.c b/ports/espressif/common-hal/analogio/AnalogOut.c index 2c79124759..2b5f9d0b35 100644 --- a/ports/espressif/common-hal/analogio/AnalogOut.c +++ b/ports/espressif/common-hal/analogio/AnalogOut.c @@ -35,7 +35,9 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/shared/translate.h" +#ifdef CONFIG_IDF_TARGET_ESP32S2 #include "components/driver/include/driver/dac_common.h" +#endif #include "common-hal/microcontroller/Pin.h" @@ -56,7 +58,11 @@ void common_hal_analogio_analogout_construct(analogio_analogout_obj_t *self, } bool common_hal_analogio_analogout_deinited(analogio_analogout_obj_t *self) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 return self->channel == DAC_CHANNEL_MAX; + #else + return false; + #endif } void common_hal_analogio_analogout_deinit(analogio_analogout_obj_t *self) { diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index ddc44956bf..214d62b9ad 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit ddc44956bf718540d5451e17e1becf6c7dffe5b8 +Subproject commit 214d62b9ad859318520e38870c828278c2caee2a diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 312b05dc40..0f297b9989 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -21,6 +21,7 @@ CIRCUITPY_FRAMEBUFFERIO ?= 1 CIRCUITPY_FREQUENCYIO ?= 1 CIRCUITPY_IMAGECAPTURE ?= 1 CIRCUITPY_I2CPERIPHERAL ?= 1 +CIRCUITPY_RGBMATRIX ?= 1 CIRCUITPY_ROTARYIO ?= 1 CIRCUITPY_NVM ?= 1 CIRCUITPY_PS2IO ?= 1 @@ -43,13 +44,9 @@ CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_TOUCHIO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE = 0 -CIRCUITPY_RGBMATRIX ?= 0 else ifeq ($(IDF_TARGET),esp32s3) CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_PARALLELDISPLAY = 0 -CIRCUITPY_RGBMATRIX ?= 0 -else -CIRCUITPY_RGBMATRIX ?= 1 endif # From ESP32-S2/S3 Technical Reference Manual: From 9dea49516e8e88d397bc8ffa164d17b99547beb7 Mon Sep 17 00:00:00 2001 From: jerryneedell Date: Thu, 30 Dec 2021 14:09:43 -0500 Subject: [PATCH 147/258] update logic for JTAG pull downs --- ports/broadcom/common-hal/microcontroller/Pin.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/broadcom/common-hal/microcontroller/Pin.c b/ports/broadcom/common-hal/microcontroller/Pin.c index f3355a7be2..271bb0017a 100644 --- a/ports/broadcom/common-hal/microcontroller/Pin.c +++ b/ports/broadcom/common-hal/microcontroller/Pin.c @@ -51,8 +51,6 @@ void reset_pin_number(uint8_t pin_number) { BP_PULL_Enum pull = BP_PULL_NONE; if (22 <= pin_number && pin_number <= 27) { gpio_set_function(pin_number, GPIO_FUNCTION_ALT4); - pull = BP_PULL_DOWN; - return; } else { gpio_set_function(pin_number, GPIO_FUNCTION_INPUT); } @@ -66,7 +64,7 @@ void reset_pin_number(uint8_t pin_number) { pin_number != 44 && pin_number != 45) { // Most pins are pulled low so we only exclude the four pins that aren't - // pulled at all. + // pulled at all. This will aso set the JTAG pins 22-27 pull = BP_PULL_DOWN; } gpio_set_pull(pin_number, pull); From 14815f6de75b59bccfc6216bf4349d2daf56d600 Mon Sep 17 00:00:00 2001 From: jerryneedell Date: Thu, 30 Dec 2021 14:12:37 -0500 Subject: [PATCH 148/258] fix typo in comment --- ports/broadcom/common-hal/microcontroller/Pin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/broadcom/common-hal/microcontroller/Pin.c b/ports/broadcom/common-hal/microcontroller/Pin.c index 271bb0017a..82963f5633 100644 --- a/ports/broadcom/common-hal/microcontroller/Pin.c +++ b/ports/broadcom/common-hal/microcontroller/Pin.c @@ -64,7 +64,7 @@ void reset_pin_number(uint8_t pin_number) { pin_number != 44 && pin_number != 45) { // Most pins are pulled low so we only exclude the four pins that aren't - // pulled at all. This will aso set the JTAG pins 22-27 + // pulled at all. This will also set the JTAG pins 22-27 pull = BP_PULL_DOWN; } gpio_set_pull(pin_number, pull); From 756b9f6dfacc539a20b930e2f78f825db731ba2d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 30 Dec 2021 18:29:59 -0800 Subject: [PATCH 149/258] Initial Pi Zero support Both SD card and USB don't work. REPL works over UART. Progress on #5631 --- lib/sdmmc/sdmmc_io.c | 6 ++ main.c | 4 +- ports/broadcom/Makefile | 42 +++++++------ .../boards/raspberrypi_zero_w/board.c | 56 +++++++++++++++++ .../boards/raspberrypi_zero_w/mpconfigboard.h | 6 ++ .../raspberrypi_zero_w/mpconfigboard.mk | 6 ++ .../broadcom/boards/raspberrypi_zero_w/pins.c | 62 +++++++++++++++++++ .../common-hal/neopixel_write/__init__.c | 4 +- .../common-hal/videocore/Framebuffer.c | 8 ++- ports/broadcom/mpconfigport.h | 4 ++ ports/broadcom/mphalport.c | 20 +++--- ports/broadcom/peripherals | 2 +- ports/broadcom/supervisor/port.c | 41 ++++++++---- 13 files changed, 213 insertions(+), 48 deletions(-) create mode 100644 ports/broadcom/boards/raspberrypi_zero_w/board.c create mode 100644 ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h create mode 100644 ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk create mode 100644 ports/broadcom/boards/raspberrypi_zero_w/pins.c diff --git a/lib/sdmmc/sdmmc_io.c b/lib/sdmmc/sdmmc_io.c index 369be8c233..17ab291515 100644 --- a/lib/sdmmc/sdmmc_io.c +++ b/lib/sdmmc/sdmmc_io.c @@ -420,7 +420,10 @@ static sdmmc_err_t cis_tuple_func_manfid(const void* p, uint8_t* data, FILE* fp) int size = *(data++); fprintf(fp, "TUPLE: %s, size: %d\n", tuple->name, size); CIS_CHECK_SIZE(size, 4); + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-align" fprintf(fp, " MANF: %04X, CARD: %04X\n", *(uint16_t*)(data), *(uint16_t*)(data+2)); + #pragma GCC diagnostic pop return SDMMC_OK; } @@ -480,7 +483,10 @@ static sdmmc_err_t cis_tuple_func_cftable_entry(const void* p, uint8_t* data, FI CIS_CHECK_SIZE(size, 2); size-=2; CIS_CHECK_UNSUPPORTED(mem_space==1); //other cases not handled yet + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-align" int len = *(uint16_t*)data; + #pragma GCC diagnostic pop fprintf(fp, " LEN: %04X\n", len); data+=2; } diff --git a/main.c b/main.c index e0d99e3143..391107aeb6 100644 --- a/main.c +++ b/main.c @@ -813,8 +813,8 @@ int __attribute__((used)) main(void) { // no SPI flash filesystem, and we might erase the existing one. // Check whether CIRCUITPY is available. Don't check if it already hasn't been found. - if ((safe_mode != NO_CIRCUITPY) && !filesystem_init(safe_mode == NO_SAFE_MODE, false)) { - reset_into_safe_mode(NO_CIRCUITPY); + if (!filesystem_init(safe_mode == NO_SAFE_MODE, false)) { + safe_mode = NO_CIRCUITPY; } // displays init after filesystem, since they could share the flash SPI diff --git a/ports/broadcom/Makefile b/ports/broadcom/Makefile index 1179d8fa16..921d26958a 100644 --- a/ports/broadcom/Makefile +++ b/ports/broadcom/Makefile @@ -31,7 +31,20 @@ include $(TOP)/supervisor/supervisor.mk # Include make rules and variables common across CircuitPython builds. include $(TOP)/py/circuitpy_defns.mk -HAL_DIR=hal/$(MCU_SERIES) +ifeq ($(CHIP_VARIANT), "bcm2711") +CFLAGS += -mcpu=cortex-a72 -DBCM_VERSION=2711 +CROSS_COMPILE = aarch64-none-elf- +SUFFIX = 8 +else ifeq ($(CHIP_VARIANT), "bcm2837") +CFLAGS += -mcpu=cortex-a53 -DBCM_VERSION=2837 +CROSS_COMPILE = aarch64-none-elf- +SUFFIX = 8 +else ifeq ($(CHIP_VARIANT), "bcm2835") +CFLAGS += -mcpu=arm1176jzf-s -DBCM_VERSION=2835 +CROSS_COMPILE = arm-none-eabi- +SUFFIX = +# TODO add 32-bit support for Cortex-A7 in 2836 +endif INC += -I. \ -I../.. \ @@ -69,6 +82,7 @@ SRC_C += bindings/videocore/__init__.c \ peripherals/broadcom/mmu.c \ peripherals/broadcom/vcmailbox.c +SRC_S = peripherals/broadcom/boot$(SUFFIX).s SRC_COMMON_HAL_EXPANDED = $(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \ $(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \ @@ -82,7 +96,6 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) # because a few modules have files both in common-hal/ and shared-modules/. # Doing a $(sort ...) removes duplicates as part of sorting. SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) -SRC_S = peripherals/broadcom/boot8.s OBJ = $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_SHARED_MODULE_EXPANDED:.c=.o)) @@ -96,15 +109,6 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) # BCM CLFAGS CFLAGS += -ffreestanding -nostartfiles -DMICROPY_HW_MCU_NAME="\"$(CHIP_VARIANT)\"" -ifeq ($(CHIP_VARIANT), "bcm2711") -CFLAGS += -mcpu=cortex-a72 -DBCM_VERSION=2711 -CROSS_COMPILE = aarch64-none-elf- -else -CFLAGS += -mcpu=cortex-a53 -DBCM_VERSION=2837 -CROSS_COMPILE = aarch64-none-elf- -# TODO add 32-bit support for Cortex-A7 and ARM1176 -endif - OPTIMIZATION_FLAGS ?= -O3 CFLAGS += $(OPTIMIZATION_FLAGS) @@ -134,32 +138,32 @@ CFLAGS += $(INC) -Wall -Werror -std=gnu11 $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) -LDFLAGS += $(CFLAGS) -T peripherals/broadcom/link8.ld -Wl,--gc-sections -Wl,-Map=$@.map # -Wl,--cref +LDFLAGS += $(CFLAGS) -T peripherals/broadcom/link$(SUFFIX).ld -Wl,--gc-sections -Wl,-Map=$@.map # -Wl,--cref # Use toolchain libm if we're not using our own. ifndef INTERNAL_LIBM LIBS += -lm endif -all: $(BUILD)/firmware.kernel8.img $(BUILD)/firmware.disk.img.zip +all: $(BUILD)/firmware.kernel$(SUFFIX).img $(BUILD)/firmware.disk.img.zip %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ -$(BUILD)/kernel8.elf: $(OBJ) +$(BUILD)/kernel$(SUFFIX).elf: $(OBJ) $(STEPECHO) "LINK $@" $(Q)echo $(OBJ) > $(BUILD)/firmware.objs $(Q)$(CC) -o $@ $(LDFLAGS) @$(BUILD)/firmware.objs -Wl,--start-group $(LIBS) -Wl,--end-group -$(BUILD)/kernel8.img: $(BUILD)/kernel8.elf +$(BUILD)/kernel$(SUFFIX).img: $(BUILD)/kernel$(SUFFIX).elf $(STEPECHO) "Create $@" - $(OBJCOPY) -O binary $(BUILD)/kernel8.elf $@ + $(OBJCOPY) -O binary $(BUILD)/kernel$(SUFFIX).elf $@ -$(BUILD)/firmware.kernel8.img: $(BUILD)/kernel8.img +$(BUILD)/firmware.kernel$(SUFFIX).img: $(BUILD)/kernel$(SUFFIX).img $(STEPECHO) "Create $@" $(CP) $^ $@ -$(BUILD)/firmware.disk.img.zip: $(BUILD)/kernel8.img +$(BUILD)/firmware.disk.img.zip: $(BUILD)/kernel$(SUFFIX).img $(STEPECHO) "Create $@" $(Q)dd if=/dev/zero of=$(BUILD)/circuitpython-disk.img bs=1 count=0 seek=256M $(Q)parted -s $(BUILD)/circuitpython-disk.img mktable msdos @@ -167,7 +171,7 @@ $(BUILD)/firmware.disk.img.zip: $(BUILD)/kernel8.img $(Q)mkfs.fat -F 32 -n BOOT --offset=2048 $(BUILD)/circuitpython-disk.img $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M config.txt firmware/bootcode.bin firmware/fixup* firmware/start* firmware/*.dtb :: - $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M $(BUILD)/kernel8.img :: + $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M $(BUILD)/kernel$(SUFFIX).img :: $(Q)zip $@ $(BUILD)/circuitpython-disk.img $(Q)rm $(BUILD)/circuitpython-disk.img diff --git a/ports/broadcom/boards/raspberrypi_zero_w/board.c b/ports/broadcom/boards/raspberrypi_zero_w/board.c new file mode 100644 index 0000000000..80bea7f8b6 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero_w/board.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" + +#include "bindings/videocore/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + videocore_framebuffer_obj_t *fb = &allocate_display_bus()->videocore; + fb->base.type = &videocore_framebuffer_type; + common_hal_videocore_framebuffer_construct(fb, 640, 480); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h new file mode 100644 index 0000000000..1141520e06 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h @@ -0,0 +1,6 @@ +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Zero" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO47) diff --git a/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk new file mode 100644 index 0000000000..9e0eb3ba57 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk @@ -0,0 +1,6 @@ +USB_VID = 0x2E8A +USB_PID = 0xf015 +USB_PRODUCT = "Raspberry Pi Zero" +USB_MANUFACTURER = "Raspberry Pi" + +CHIP_VARIANT = "bcm2835" diff --git a/ports/broadcom/boards/raspberrypi_zero_w/pins.c b/ports/broadcom/boards/raspberrypi_zero_w/pins.c new file mode 100644 index 0000000000..bb6632b923 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero_w/pins.c @@ -0,0 +1,62 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + // These match the names used in Blinka + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { 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_CE1), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_CE0), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SCLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TXD), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_RXD), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_MISO_1), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_MOSI_1), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCLK_1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCK_1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/broadcom/common-hal/neopixel_write/__init__.c b/ports/broadcom/common-hal/neopixel_write/__init__.c index c045317f93..5a82797909 100644 --- a/ports/broadcom/common-hal/neopixel_write/__init__.c +++ b/ports/broadcom/common-hal/neopixel_write/__init__.c @@ -48,9 +48,9 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, while (port_get_raw_ticks(NULL) < next_start_raw_ticks) { } - BP_Function_Enum alt_function; + BP_Function_Enum alt_function = GPIO_FUNCTION_OUTPUT; uint8_t index; - uint8_t channel; + uint8_t channel = 0; bool found = false; for (size_t i = 0; i < NUM_ALT_FUNC; i++) { const pin_function_t *f = &digitalinout->pin->functions[i]; diff --git a/ports/broadcom/common-hal/videocore/Framebuffer.c b/ports/broadcom/common-hal/videocore/Framebuffer.c index f5f9654949..18b703b8b6 100644 --- a/ports/broadcom/common-hal/videocore/Framebuffer.c +++ b/ports/broadcom/common-hal/videocore/Framebuffer.c @@ -16,7 +16,13 @@ void common_hal_videocore_framebuffer_construct(videocore_framebuffer_obj_t *sel // TODO: Make the FB twice as tall if double buffering. uint32_t physical_height = height; uint32_t pitch = 0; - self->framebuffer = vcmailbox_get_framebuffer(&virtual_width, &virtual_height, &physical_width, &physical_height, &pitch); + uint32_t bits_per_pixel = 0; + self->framebuffer = vcmailbox_get_framebuffer(&virtual_width, + &virtual_height, + &physical_width, + &physical_height, + &pitch, + &bits_per_pixel); if (self->framebuffer == NULL) { if (gc_alloc_possible()) { mp_raise_ValueError(translate("no fb")); diff --git a/ports/broadcom/mpconfigport.h b/ports/broadcom/mpconfigport.h index dafe432c3c..abd0580999 100644 --- a/ports/broadcom/mpconfigport.h +++ b/ports/broadcom/mpconfigport.h @@ -36,7 +36,11 @@ #define MICROPY_PY_SYS_PLATFORM "BROADCOM" #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1) #define MICROPY_PY_FUNCTION_ATTRS (1) +#if BCM_VERSION == 2837 || BCM_VERSION == 2711 #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_A) +#elif BCM_VERSION == 2835 +#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C) +#endif #define CIRCUITPY_DEFAULT_STACK_SIZE (0x10000) #define CIRCUITPY_DISPLAY_AREA_BUFFER_SIZE (1920) #define CIRCUITPY_PROCESSOR_COUNT (4) diff --git a/ports/broadcom/mphalport.c b/ports/broadcom/mphalport.c index 91e7b631bc..fa7dcaac8e 100644 --- a/ports/broadcom/mphalport.c +++ b/ports/broadcom/mphalport.c @@ -41,16 +41,16 @@ mp_uint_t cpu_get_regs_and_sp(mp_uint_t *regs) { __asm__ ("mov %[out], x28" : [out] "=r" (regs[9])); #else __asm__ ("mov %[out], sp" : [out] "=r" (sp)); - __asm__ ("mov %[out], x19" : [out] "=r" (regs[0])); - __asm__ ("mov %[out], x20" : [out] "=r" (regs[1])); - __asm__ ("mov %[out], x21" : [out] "=r" (regs[2])); - __asm__ ("mov %[out], x22" : [out] "=r" (regs[3])); - __asm__ ("mov %[out], x23" : [out] "=r" (regs[4])); - __asm__ ("mov %[out], x24" : [out] "=r" (regs[5])); - __asm__ ("mov %[out], x25" : [out] "=r" (regs[6])); - __asm__ ("mov %[out], x26" : [out] "=r" (regs[7])); - __asm__ ("mov %[out], x27" : [out] "=r" (regs[8])); - __asm__ ("mov %[out], x28" : [out] "=r" (regs[9])); + __asm__ ("mov %[out], r4" : [out] "=r" (regs[0])); + __asm__ ("mov %[out], r5" : [out] "=r" (regs[1])); + __asm__ ("mov %[out], r6" : [out] "=r" (regs[2])); + __asm__ ("mov %[out], r7" : [out] "=r" (regs[3])); + __asm__ ("mov %[out], r8" : [out] "=r" (regs[4])); + __asm__ ("mov %[out], r9" : [out] "=r" (regs[5])); + __asm__ ("mov %[out], r10" : [out] "=r" (regs[6])); + __asm__ ("mov %[out], r11" : [out] "=r" (regs[7])); + __asm__ ("mov %[out], r12" : [out] "=r" (regs[8])); + __asm__ ("mov %[out], r13" : [out] "=r" (regs[9])); #endif return sp; diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index 2c10889a4b..4e1632ab1f 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit 2c10889a4b2d78987bc4e0783db2e7584aa4d572 +Subproject commit 4e1632ab1f15996a9bbe2aa74f92bf138dff691f diff --git a/ports/broadcom/supervisor/port.c b/ports/broadcom/supervisor/port.c index 95ad465a84..e036a76cef 100644 --- a/ports/broadcom/supervisor/port.c +++ b/ports/broadcom/supervisor/port.c @@ -116,42 +116,57 @@ void reset_to_bootloader(void) { } void reset_cpu(void) { - + // Don't actually reset because we can't store the safe mode info. + // PM->WDOG = 1 << PM_WDOG_TIME_Pos | PM_WDOG_PASSWD_PASSWD << PM_WDOG_PASSWD_Pos; + // PM->RSTC = PM_RSTC_WRCFG_FULL_RESET << PM_RSTC_WRCFG_Pos | PM_RSTC_PASSWD_PASSWD << PM_RSTC_PASSWD_Pos; while (true) { } } bool port_has_fixed_stack(void) { + #ifdef __aarch64__ return true; -} - -uint32_t *port_stack_get_limit(void) { - return (uint32_t *)0x4; -} - -uint32_t *port_stack_get_top(void) { - return (uint32_t *)0x80000; + #else + return false; + #endif } // From the linker script extern uint32_t __bss_end; +extern uint32_t _ld_ram_end; +uint32_t *port_stack_get_limit(void) { + #ifdef __aarch64__ + return (uint32_t *)0x4; + #else + return &__bss_end; + #endif +} + +uint32_t *port_stack_get_top(void) { + #ifdef __aarch64__ + return (uint32_t *)0x80000; + #else + return &_ld_ram_end; + #endif +} + uint32_t *port_heap_get_bottom(void) { return &__bss_end; } uint32_t *port_heap_get_top(void) { // 32M heap - return (uint32_t *)(((uint64_t)&__bss_end) + 32 * 1024 * 1024); + return (uint32_t *)(((size_t)&__bss_end) + 32 * 1024 * 1024); } void port_set_saved_word(uint32_t value) { // NOTE: This doesn't survive pressing the reset button (aka toggling RUN). - // watchdog_hw->scratch[0] = value; + __bss_end = value; + data_clean_and_invalidate(&__bss_end, sizeof(uint32_t)); } uint32_t port_get_saved_word(void) { - // return watchdog_hw->scratch[0]; - return 0; + return __bss_end; } uint64_t port_get_raw_ticks(uint8_t *subticks) { From 9d2a32d07e6e07b9bddf685cbbebeb9a521ce05b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 30 Dec 2021 21:49:52 -0500 Subject: [PATCH 150/258] countio: add selectable rise and fall detection, pulls --- locale/circuitpython.pot | 16 +++-- ports/atmel-samd/common-hal/countio/Counter.c | 64 +++++++++++------- ports/atmel-samd/common-hal/countio/Counter.h | 4 +- ports/espressif/common-hal/countio/Counter.c | 22 +++--- ports/nrf/common-hal/countio/Counter.c | 61 +++++++++++------ ports/nrf/common-hal/countio/Counter.h | 2 +- .../raspberrypi/common-hal/countio/Counter.c | 34 +++++----- .../raspberrypi/common-hal/countio/Counter.h | 2 +- py/circuitpy_defns.mk | 5 +- shared-bindings/countio/Counter.c | 54 ++++++++------- shared-bindings/countio/Counter.h | 5 +- shared-bindings/countio/Edge.c | 67 +++++++++++++++++++ shared-bindings/countio/Edge.h | 44 ++++++++++++ shared-bindings/countio/__init__.c | 9 +-- shared-bindings/digitalio/DigitalInOut.c | 25 ++----- shared-bindings/digitalio/Pull.c | 13 ++++ shared-bindings/digitalio/Pull.h | 2 + tests/pyboard.py | 2 +- 18 files changed, 300 insertions(+), 131 deletions(-) create mode 100644 shared-bindings/countio/Edge.c create mode 100644 shared-bindings/countio/Edge.h diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 7ca30dc063..4a90a1437d 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -144,6 +144,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1596,7 +1600,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1896,7 +1900,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1978,6 +1982,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2447,10 +2455,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" diff --git a/ports/atmel-samd/common-hal/countio/Counter.c b/ports/atmel-samd/common-hal/countio/Counter.c index e4df55eba6..c68b9e18ef 100644 --- a/ports/atmel-samd/common-hal/countio/Counter.c +++ b/ports/atmel-samd/common-hal/countio/Counter.c @@ -10,14 +10,14 @@ #include "supervisor/shared/translate.h" void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin_a) { - if (!pin_a->has_extint) { + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { + if (!pin->has_extint) { mp_raise_RuntimeError(translate("Pin must support hardware interrupts")); } if (eic_get_enable()) { - if (!eic_channel_free(pin_a->extint_channel)) { + if (!eic_channel_free(pin->extint_channel)) { mp_raise_RuntimeError(translate("A hardware interrupt channel is already in use")); } } else { @@ -25,28 +25,50 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, } // These default settings apply when the EIC isn't yet enabled. - self->eic_channel_a = pin_a->extint_channel; + self->eic_channel = pin->extint_channel; - self->pin_a = pin_a->number; + self->pin = pin->number; - gpio_set_pin_function(self->pin_a, GPIO_PIN_FUNCTION_A); - gpio_set_pin_pull_mode(self->pin_a, GPIO_PULL_UP); + gpio_set_pin_function(self->pin, GPIO_PIN_FUNCTION_A); - set_eic_channel_data(self->eic_channel_a, (void *)self); + enum gpio_pull_mode asf_pull = GPIO_PULL_OFF; + switch (pull) { + case PULL_UP: + asf_pull = GPIO_PULL_UP; + break; + case PULL_DOWN: + asf_pull = GPIO_PULL_DOWN; + break; + case PULL_NONE: + default: + break; + } + gpio_set_pin_pull_mode(self->pin, asf_pull); + + set_eic_channel_data(self->eic_channel, (void *)self); self->count = 0; + claim_pin(pin); + set_eic_handler(self->eic_channel, EIC_HANDLER_COUNTER); - claim_pin(pin_a); - - - set_eic_handler(self->eic_channel_a, EIC_HANDLER_COUNTER); - turn_on_eic_channel(self->eic_channel_a, EIC_CONFIG_SENSE0_FALL_Val); - + uint32_t sense_setting = EIC_CONFIG_SENSE0_BOTH_Val; + switch (edge) { + case EDGE_RISE: + sense_setting = EIC_CONFIG_SENSE0_RISE_Val; + break; + case EDGE_FALL: + sense_setting = EIC_CONFIG_SENSE0_FALL_Val; + break; + case EDGE_RISE_AND_FALL: + default: + break; + } + turn_on_eic_channel(self->eic_channel, sense_setting); } bool common_hal_countio_counter_deinited(countio_counter_obj_t *self) { - return self->pin_a == NO_PIN; + return self->pin == NO_PIN; } void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { @@ -54,12 +76,12 @@ void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { return; } - set_eic_handler(self->eic_channel_a, EIC_HANDLER_NO_INTERRUPT); - turn_off_eic_channel(self->eic_channel_a); + set_eic_handler(self->eic_channel, EIC_HANDLER_NO_INTERRUPT); + turn_off_eic_channel(self->eic_channel); - reset_pin_number(self->pin_a); - self->pin_a = NO_PIN; + reset_pin_number(self->pin); + self->pin = NO_PIN; } @@ -72,10 +94,6 @@ void common_hal_countio_counter_set_count(countio_counter_obj_t *self, self->count = new_count; } -void common_hal_countio_counter_reset(countio_counter_obj_t *self) { - self->count = 0; -} - void counter_interrupt_handler(uint8_t channel) { countio_counter_obj_t *self = get_eic_channel_data(channel); diff --git a/ports/atmel-samd/common-hal/countio/Counter.h b/ports/atmel-samd/common-hal/countio/Counter.h index 8af22253f9..a57df9a777 100644 --- a/ports/atmel-samd/common-hal/countio/Counter.h +++ b/ports/atmel-samd/common-hal/countio/Counter.h @@ -8,8 +8,8 @@ typedef struct { mp_obj_base_t base; - uint8_t pin_a; - uint8_t eic_channel_a : 4; + uint8_t pin; + uint8_t eic_channel : 4; mp_int_t count; } countio_counter_obj_t; diff --git a/ports/espressif/common-hal/countio/Counter.c b/ports/espressif/common-hal/countio/Counter.c index 418a8ae4d4..d18196051f 100644 --- a/ports/espressif/common-hal/countio/Counter.c +++ b/ports/espressif/common-hal/countio/Counter.c @@ -32,7 +32,7 @@ #include "supervisor/shared/translate.h" void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin) { + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { claim_pin(pin); // Prepare configuration for the PCNT unit @@ -41,9 +41,10 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, .pulse_gpio_num = pin->number, .ctrl_gpio_num = PCNT_PIN_NOT_USED, .channel = PCNT_CHANNEL_0, - // What to do on the positive / negative edge of pulse input? - .pos_mode = PCNT_COUNT_INC, // Count up on the positive edge - .neg_mode = PCNT_COUNT_DIS, // Keep the counter value on the negative edge + // What to do on the rising / falling edge of pulse input? + // If EDGE_RISE_AND_FALL, both modeswill do PCNT_COUNT_INC. + .pos_mode = (edge == EDGE_FALL) ? PCNT_COUNT_DIS : PCNT_COUNT_INC, // Count up unless only fall + .neg_mode = (edge == EDGE_RISE) ? PCNT_COUNT_DIS : PCNT_COUNT_INC, // Count up unless only rise }; // Initialize PCNT unit @@ -53,6 +54,15 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, } self->pin = pin->number; + + gpio_pullup_dis(pin->number); + gpio_pulldown_dis(pin->number); + if (pull == PULL_UP) { + gpio_pullup_en(pin->number); + } else if (pull == PULL_DOWN) { + gpio_pulldown_en(pin->number); + } + self->unit = (pcnt_unit_t)unit; } @@ -79,7 +89,3 @@ void common_hal_countio_counter_set_count(countio_counter_obj_t *self, self->count = new_count; pcnt_counter_clear(self->unit); } - -void common_hal_countio_counter_reset(countio_counter_obj_t *self) { - common_hal_countio_counter_set_count(self, 0); -} diff --git a/ports/nrf/common-hal/countio/Counter.c b/ports/nrf/common-hal/countio/Counter.c index b2296a7dcc..32dc6af74b 100644 --- a/ports/nrf/common-hal/countio/Counter.c +++ b/ports/nrf/common-hal/countio/Counter.c @@ -18,45 +18,70 @@ static void _intr_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { } void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin_a) { + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { - self->pin_a = pin_a->number; - _countio_objs[self->pin_a] = self; + self->pin = pin->number; + _countio_objs[self->pin] = self; self->count = 0; + nrf_gpiote_polarity_t polarity = NRF_GPIOTE_POLARITY_TOGGLE; + switch (edge) { + case EDGE_RISE: + polarity = NRF_GPIOTE_POLARITY_LOTOHI; + break; + case EDGE_FALL: + polarity = NRF_GPIOTE_POLARITY_HITOLO; + break; + case EDGE_RISE_AND_FALL: + default: + break; + } + + nrf_gpio_pin_pull_t hal_pull = NRF_GPIO_PIN_NOPULL; + switch (pull) { + case PULL_UP: + hal_pull = NRF_GPIO_PIN_PULLUP; + break; + case PULL_DOWN: + hal_pull = NRF_GPIO_PIN_PULLDOWN; + break; + case PULL_NONE: + default: + break; + } + nrfx_gpiote_in_config_t cfg = { - .sense = NRF_GPIOTE_POLARITY_HITOLO, - .pull = NRF_GPIO_PIN_PULLUP, + .sense = polarity, + .pull = hal_pull, .is_watcher = false, .hi_accuracy = true, - .skip_gpio_setup = false + .skip_gpio_setup = false, }; - - nrfx_err_t err = nrfx_gpiote_in_init(self->pin_a, &cfg, _intr_handler); + nrfx_err_t err = nrfx_gpiote_in_init(self->pin, &cfg, _intr_handler); if (err != NRFX_SUCCESS) { mp_raise_RuntimeError(translate("All channels in use")); } - nrfx_gpiote_in_event_enable(self->pin_a, true); + nrfx_gpiote_in_event_enable(self->pin, true); - claim_pin(pin_a); + claim_pin(pin); } bool common_hal_countio_counter_deinited(countio_counter_obj_t *self) { - return self->pin_a == NO_PIN; + return self->pin == NO_PIN; } void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { if (common_hal_countio_counter_deinited(self)) { return; } - _countio_objs[self->pin_a] = NULL; + _countio_objs[self->pin] = NULL; - nrfx_gpiote_in_event_disable(self->pin_a); - nrfx_gpiote_in_uninit(self->pin_a); - reset_pin_number(self->pin_a); - self->pin_a = NO_PIN; + nrfx_gpiote_in_event_disable(self->pin); + nrfx_gpiote_in_uninit(self->pin); + reset_pin_number(self->pin); + self->pin = NO_PIN; } mp_int_t common_hal_countio_counter_get_count(countio_counter_obj_t *self) { @@ -67,7 +92,3 @@ void common_hal_countio_counter_set_count(countio_counter_obj_t *self, mp_int_t new_count) { self->count = new_count; } - -void common_hal_countio_counter_reset(countio_counter_obj_t *self) { - self->count = 0; -} diff --git a/ports/nrf/common-hal/countio/Counter.h b/ports/nrf/common-hal/countio/Counter.h index cf40a63a02..a90bea70d6 100644 --- a/ports/nrf/common-hal/countio/Counter.h +++ b/ports/nrf/common-hal/countio/Counter.h @@ -8,7 +8,7 @@ typedef struct { mp_obj_base_t base; - uint8_t pin_a; + uint8_t pin; mp_int_t count; } countio_counter_obj_t; diff --git a/ports/raspberrypi/common-hal/countio/Counter.c b/ports/raspberrypi/common-hal/countio/Counter.c index fe7dd545f8..0ae773bdf3 100644 --- a/ports/raspberrypi/common-hal/countio/Counter.c +++ b/ports/raspberrypi/common-hal/countio/Counter.c @@ -4,6 +4,8 @@ #include "py/mpstate.h" #include "supervisor/shared/translate.h" +#include "shared-bindings/countio/Edge.h" +#include "shared-bindings/digitalio/Pull.h" #include "common-hal/pwmio/PWMOut.h" #include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" @@ -12,20 +14,24 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin_a) { + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { - if (pwm_gpio_to_channel(pin_a->number) != PWM_CHAN_B) { + if (pwm_gpio_to_channel(pin->number) != PWM_CHAN_B) { mp_raise_RuntimeError(translate("Pin must be on PWM Channel B")); } - self->pin_a = pin_a->number; - self->slice_num = pwm_gpio_to_slice_num(self->pin_a); + if (edge == EDGE_RISE_AND_FALL) { + mp_raise_NotImplementedError(translate("RISE_AND_FALL not available on this chip")); + } + + self->pin = pin->number; + self->slice_num = pwm_gpio_to_slice_num(self->pin); if (MP_STATE_PORT(counting)[self->slice_num] != NULL) { mp_raise_RuntimeError(translate("PWM slice already in use")); } - uint8_t ab_channel = pwm_gpio_to_channel(self->pin_a); + uint8_t ab_channel = pwm_gpio_to_channel(self->pin); if (!pwmio_claim_slice_ab_channels(self->slice_num)) { mp_raise_RuntimeError(translate("PWM slice channel A already in use")); } @@ -36,11 +42,12 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, irq_set_enabled(PWM_IRQ_WRAP, true); pwm_config cfg = pwm_get_default_config(); - pwm_config_set_clkdiv_mode(&cfg, PWM_DIV_B_RISING); + pwm_config_set_clkdiv_mode(&cfg, edge == EDGE_RISE ? PWM_DIV_B_RISING : PWM_DIV_B_FALLING); pwm_init(self->slice_num, &cfg, false); - gpio_set_function(self->pin_a, GPIO_FUNC_PWM); + gpio_set_function(self->pin, GPIO_FUNC_PWM); + gpio_set_pulls(self->pin, pull == PULL_UP, pull == PULL_DOWN); - claim_pin(pin_a); + claim_pin(pin); MP_STATE_PORT(counting)[self->slice_num] = self; @@ -58,7 +65,7 @@ void reset_countio(void) { } bool common_hal_countio_counter_deinited(countio_counter_obj_t *self) { - return self->pin_a == 0; + return self->pin == 0; } void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { @@ -71,10 +78,10 @@ void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { pwmio_release_slice_ab_channels(self->slice_num); - reset_pin_number(self->pin_a); + reset_pin_number(self->pin); MP_STATE_PORT(counting)[self->slice_num] = NULL; - self->pin_a = 0; + self->pin = 0; self->slice_num = 0; } @@ -90,11 +97,6 @@ void common_hal_countio_counter_set_count(countio_counter_obj_t *self, self->count = new_count; } -void common_hal_countio_counter_reset(countio_counter_obj_t *self) { - pwm_set_counter(self->slice_num, 0); - self->count = 0; -} - void counter_interrupt_handler(void) { uint32_t mask = pwm_get_irq_status_mask(); diff --git a/ports/raspberrypi/common-hal/countio/Counter.h b/ports/raspberrypi/common-hal/countio/Counter.h index 7469dd2d00..3355036eed 100644 --- a/ports/raspberrypi/common-hal/countio/Counter.h +++ b/ports/raspberrypi/common-hal/countio/Counter.h @@ -8,7 +8,7 @@ typedef struct { mp_obj_base_t base; - uint8_t pin_a; + uint8_t pin; uint8_t slice_num; mp_int_t count; } countio_counter_obj_t; diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index b7aae4d114..48a37be499 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -453,8 +453,7 @@ $(filter $(SRC_PATTERNS), \ _eve/__init__.c \ camera/ImageFormat.c \ canio/Match.c \ - qrio/PixelPolicy.c \ - qrio/QRInfo.c \ + countio/Edge.c \ digitalio/Direction.c \ digitalio/DriveMode.c \ digitalio/Pull.c \ @@ -468,6 +467,8 @@ $(filter $(SRC_PATTERNS), \ msgpack/ExtType.c \ paralleldisplay/__init__.c \ paralleldisplay/ParallelBus.c \ + qrio/PixelPolicy.c \ + qrio/QRInfo.c \ supervisor/RunReason.c \ wifi/AuthMode.c \ wifi/Packet.c \ diff --git a/shared-bindings/countio/Counter.c b/shared-bindings/countio/Counter.c index 873da912a6..8582f4497e 100644 --- a/shared-bindings/countio/Counter.c +++ b/shared-bindings/countio/Counter.c @@ -7,47 +7,56 @@ #include "py/runtime0.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/countio/Counter.h" +#include "shared-bindings/countio/Edge.h" #include "shared-bindings/util.h" //| class Counter: -//| """Counter will keep track of the number of falling edge transistions (pulses) on a -//| given pin""" +//| """Count the number of rising- and/or falling-edge transitions on a given pin. +//| """ //| -//| def __init__(self, pin_a: microcontroller.Pin) -> None: -//| """Create a Counter object associated with the given pin. It tracks the number of -//| falling pulses relative when the object is constructed. +//| def __init__(self, pin: microcontroller.Pin, *, edge: Edge = Edge.FALL, pull: Optional[digitalio.Pull]) -> None: +//| """Create a Counter object associated with the given pin that counts +//| rising- and/or falling-edge transitions. At least one of ``rise`` and ``fall`` must be True. +//| The default is to count only falling edges, and is for historical backward compatibility. //| -//| :param ~microcontroller.Pin pin_a: Pin to read pulses from. +//| :param ~microcontroller.Pin pin: pin to monitor +//| :param Edge: which edge transitions to count +//| :param digitalio.Pull: enable a pull-up or pull-down if not None //| //| -//| For example:: +//| For example:: //| -//| import board -//| import countio +//| import board +//| import countio //| -//| pin_counter = countio.Counter(board.D1) -//| #reset the count after 100 counts -//| while True: -//| if pin_counter.count == 100: -//| pin_counter.reset() -//| print(pin_counter.count)""" +//| # Count rising edges only. +//| pin_counter = countio.Counter(board.D1, edge=Edge.RISE) +//| # Reset the count after 100 counts. +//| while True: +//| if pin_counter.count >= 100: +//| pin_counter.reset() +//| print(pin_counter.count) +//| """ +//| ... //| STATIC mp_obj_t countio_counter_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { - enum { ARG_pin_a }; + enum { ARG_pin, ARG_edge, ARG_pull }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_pin_a, MP_ARG_REQUIRED | MP_ARG_OBJ } - + { MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_edge, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_FROM_PTR(&edge_FALL_obj) } }, + { MP_QSTR_pull, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - const mcu_pin_obj_t *pin_a = validate_obj_is_free_pin(args[ARG_pin_a].u_obj); - + const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj); + const countio_edge_t edge = validate_edge(args[ARG_edge].u_obj, MP_QSTR_edge); + const digitalio_pull_t pull = validate_pull(args[ARG_pull].u_obj, MP_QSTR_pull); countio_counter_obj_t *self = m_new_obj(countio_counter_obj_t); self->base.type = &countio_counter_type; - common_hal_countio_counter_construct(self, pin_a); + common_hal_countio_counter_construct(self, pin, edge, pull); return MP_OBJ_FROM_PTR(self); } @@ -118,8 +127,7 @@ const mp_obj_property_t countio_counter_count_obj = { STATIC mp_obj_t countio_counter_reset(mp_obj_t self_in) { countio_counter_obj_t *self = MP_OBJ_TO_PTR(self_in); check_for_deinit(self); - // set the position to zero for reset - common_hal_countio_counter_reset(self); + common_hal_countio_counter_set_count(self, 0); return mp_const_none; } diff --git a/shared-bindings/countio/Counter.h b/shared-bindings/countio/Counter.h index a9eced41a3..d660cc8f49 100644 --- a/shared-bindings/countio/Counter.h +++ b/shared-bindings/countio/Counter.h @@ -3,16 +3,17 @@ #include "common-hal/microcontroller/Pin.h" #include "common-hal/countio/Counter.h" +#include "shared-bindings/countio/Edge.h" +#include "shared-bindings/digitalio/Pull.h" extern const mp_obj_type_t countio_counter_type; extern void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin_a); + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull); extern void common_hal_countio_counter_deinit(countio_counter_obj_t *self); extern bool common_hal_countio_counter_deinited(countio_counter_obj_t *self); extern mp_int_t common_hal_countio_counter_get_count(countio_counter_obj_t *self); extern void common_hal_countio_counter_set_count(countio_counter_obj_t *self, mp_int_t new_count); -extern void common_hal_countio_counter_reset(countio_counter_obj_t *self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_COUNTER_H diff --git a/shared-bindings/countio/Edge.c b/shared-bindings/countio/Edge.c new file mode 100644 index 0000000000..980b3a3705 --- /dev/null +++ b/shared-bindings/countio/Edge.c @@ -0,0 +1,67 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Dan Halbert for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/obj.h" +#include "py/enum.h" +#include "py/runtime.h" + +#include "shared-bindings/countio/Edge.h" + +MAKE_ENUM_VALUE(countio_edge_type, edge, RISE, EDGE_RISE); +MAKE_ENUM_VALUE(countio_edge_type, edge, FALL, EDGE_FALL); +MAKE_ENUM_VALUE(countio_edge_type, edge, RISE_AND_FALL, EDGE_RISE_AND_FALL); + +//| class Edge: +//| """Enumerates which signal transitions can be counted.""" +//| +//| def __init__(self) -> None: +//| """Enum-like class to define which signal transitions to count.""" +//| ... +//| +//| RISE: Edge +//| """Count the rising edges.""" +//| +//| FALL: Edge +//| """Count the falling edges.""" +//| +//| RISE_AND_FALL: Edge +//| """Count the rising and falling edges.""" +//| +MAKE_ENUM_MAP(countio_edge) { + MAKE_ENUM_MAP_ENTRY(edge, RISE), + MAKE_ENUM_MAP_ENTRY(edge, FALL), + MAKE_ENUM_MAP_ENTRY(edge, RISE_AND_FALL), +}; + +STATIC MP_DEFINE_CONST_DICT(countio_edge_locals_dict, countio_edge_locals_table); + +MAKE_PRINTER(countio, countio_edge); + +MAKE_ENUM_TYPE(countio, Edge, countio_edge); + +countio_edge_t validate_edge(mp_obj_t obj, qstr arg_name) { + return cp_enum_value(&countio_edge_type, mp_arg_validate_type(obj, &countio_edge_type, arg_name)); +} diff --git a/shared-bindings/countio/Edge.h b/shared-bindings/countio/Edge.h new file mode 100644 index 0000000000..ca4cddbef3 --- /dev/null +++ b/shared-bindings/countio/Edge.h @@ -0,0 +1,44 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 an Halbertfor Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_EDGE_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_EDGE_H + +#include "py/enum.h" +#include "py/obj.h" + +typedef enum _countio_edge_t { + EDGE_RISE, + EDGE_FALL, + EDGE_RISE_AND_FALL, +} countio_edge_t; + +extern const mp_obj_type_t countio_edge_type; +extern const cp_enum_obj_t edge_FALL_obj; + +countio_edge_t validate_edge(mp_obj_t obj, qstr arg_name); + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_EDGE_H diff --git a/shared-bindings/countio/__init__.c b/shared-bindings/countio/__init__.c index faa23da9b0..d72ed9fd25 100644 --- a/shared-bindings/countio/__init__.c +++ b/shared-bindings/countio/__init__.c @@ -7,16 +7,12 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/countio/__init__.h" #include "shared-bindings/countio/Counter.h" +#include "shared-bindings/countio/Edge.h" //| """Support for edge counting //| //| The `countio` module contains logic to read and count edge transistions //| - -//| .. warning:: This module is not available in some SAMD21 (aka M0) builds. See the -//| :ref:`module-support-matrix` for more info. -//| - //| All classes change hardware state and should be deinitialized when they //| are no longer needed if the program continues after use. To do so, either //| call :py:meth:`!deinit` or use a context manager. See @@ -25,7 +21,8 @@ STATIC const mp_rom_map_elem_t countio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_countio) }, - { MP_ROM_QSTR(MP_QSTR_Counter), MP_ROM_PTR(&countio_counter_type) }, + { MP_ROM_QSTR(MP_QSTR_Counter), MP_ROM_PTR(&countio_counter_type) }, + { MP_ROM_QSTR(MP_QSTR_Edge), MP_ROM_PTR(&countio_edge_type) }, }; STATIC MP_DEFINE_CONST_DICT(countio_module_globals, countio_module_globals_table); diff --git a/shared-bindings/digitalio/DigitalInOut.c b/shared-bindings/digitalio/DigitalInOut.c index cabf500d53..af7defd911 100644 --- a/shared-bindings/digitalio/DigitalInOut.c +++ b/shared-bindings/digitalio/DigitalInOut.c @@ -166,15 +166,7 @@ STATIC mp_obj_t digitalio_digitalinout_switch_to_input(size_t n_args, const mp_o mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - - digitalio_pull_t pull = PULL_NONE; - if (args[ARG_pull].u_rom_obj == MP_ROM_PTR(&digitalio_pull_up_obj)) { - pull = PULL_UP; - } else if (args[ARG_pull].u_rom_obj == MP_ROM_PTR(&digitalio_pull_down_obj)) { - pull = PULL_DOWN; - } - // do the transfer - common_hal_digitalio_digitalinout_switch_to_input(self, pull); + common_hal_digitalio_digitalinout_switch_to_input(self, validate_pull(args[ARG_pull].u_rom_obj, MP_QSTR_pull)); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_KW(digitalio_digitalinout_switch_to_input_obj, 1, digitalio_digitalinout_switch_to_input); @@ -320,9 +312,9 @@ STATIC mp_obj_t digitalio_digitalinout_obj_get_pull(mp_obj_t self_in) { } digitalio_pull_t pull = common_hal_digitalio_digitalinout_get_pull(self); if (pull == PULL_UP) { - return (mp_obj_t)&digitalio_pull_up_obj; + return MP_OBJ_FROM_PTR(&digitalio_pull_up_obj); } else if (pull == PULL_DOWN) { - return (mp_obj_t)&digitalio_pull_down_obj; + return MP_OBJ_FROM_PTR(&digitalio_pull_down_obj); } return mp_const_none; } @@ -335,15 +327,8 @@ STATIC mp_obj_t digitalio_digitalinout_obj_set_pull(mp_obj_t self_in, mp_obj_t p mp_raise_AttributeError(translate("Pull not used when direction is output.")); return mp_const_none; } - digitalio_pull_t pull = PULL_NONE; - if (pull_obj == MP_ROM_PTR(&digitalio_pull_up_obj)) { - pull = PULL_UP; - } else if (pull_obj == MP_ROM_PTR(&digitalio_pull_down_obj)) { - pull = PULL_DOWN; - } else if (pull_obj != mp_const_none) { - mp_raise_ValueError(translate("Unsupported pull value.")); - } - common_hal_digitalio_digitalinout_set_pull(self, pull); + + common_hal_digitalio_digitalinout_set_pull(self, validate_pull(pull_obj, MP_QSTR_pull)); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_pull_obj, digitalio_digitalinout_obj_set_pull); diff --git a/shared-bindings/digitalio/Pull.c b/shared-bindings/digitalio/Pull.c index 8ded64fb47..4db68dda10 100644 --- a/shared-bindings/digitalio/Pull.c +++ b/shared-bindings/digitalio/Pull.c @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#include "py/runtime.h" #include "shared-bindings/digitalio/Pull.h" //| class Pull: @@ -72,3 +73,15 @@ const mp_obj_type_t digitalio_pull_type = { .print = digitalio_pull_print, .locals_dict = (mp_obj_dict_t *)&digitalio_pull_locals_dict, }; + +digitalio_pull_t validate_pull(mp_rom_obj_t obj, qstr arg_name) { + if (obj == MP_ROM_PTR(&digitalio_pull_up_obj)) { + return PULL_UP; + } else if (obj == MP_ROM_PTR(&digitalio_pull_down_obj)) { + return PULL_DOWN; + } + if (obj == MP_ROM_NONE) { + return PULL_NONE; + } + mp_raise_TypeError_varg(translate("%q must be of type %q or None"), arg_name, MP_QSTR_Pull); +} diff --git a/shared-bindings/digitalio/Pull.h b/shared-bindings/digitalio/Pull.h index b97e8fb255..f4f6c42690 100644 --- a/shared-bindings/digitalio/Pull.h +++ b/shared-bindings/digitalio/Pull.h @@ -43,4 +43,6 @@ typedef struct { extern const digitalio_pull_obj_t digitalio_pull_up_obj; extern const digitalio_pull_obj_t digitalio_pull_down_obj; +digitalio_pull_t validate_pull(mp_rom_obj_t obj, qstr arg_name); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DIGITALIO_PULL_H diff --git a/tests/pyboard.py b/tests/pyboard.py index 582a1f894f..616773a313 120000 --- a/tests/pyboard.py +++ b/tests/pyboard.py @@ -1 +1 @@ -../tools/cpboard.py +../tools/cpboard.py \ No newline at end of file From 4f3c50aa172919315ca01b9107794c8f983272fa Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Sat, 1 Jan 2022 05:46:11 +0100 Subject: [PATCH 151/258] 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 | 19 +++++++++++++------ locale/cs.po | 16 ++++++++++------ locale/de_DE.po | 19 +++++++++++++------ locale/el.po | 16 ++++++++++------ locale/en_GB.po | 19 +++++++++++++------ locale/es.po | 19 +++++++++++++------ locale/fil.po | 19 +++++++++++++------ locale/fr.po | 19 +++++++++++++------ locale/hi.po | 16 ++++++++++------ locale/it_IT.po | 19 +++++++++++++------ locale/ja.po | 19 +++++++++++++------ locale/ko.po | 16 ++++++++++------ locale/nl.po | 19 +++++++++++++------ locale/pl.po | 19 +++++++++++++------ locale/pt_BR.po | 19 +++++++++++++------ locale/ru.po | 16 ++++++++++------ locale/sv.po | 19 +++++++++++++------ locale/zh_Latn_pinyin.po | 19 +++++++++++++------ 18 files changed, 219 insertions(+), 108 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 2fd34f3f5b..9e529e3204 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -152,6 +152,10 @@ msgstr "%q harus antara %d dan %d" msgid "%q must be of type %q" msgstr "%q harus bertipe %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q harus pangkat 2" @@ -1617,7 +1621,7 @@ msgstr "tidak ada channel DMA ditemukan" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1924,7 +1928,7 @@ msgstr "Pin tidak mempunya kemampuan untuk ADC (Analog Digital Converter)" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -2011,6 +2015,10 @@ msgstr "Pull tidak digunakan saat arah output." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "Kesalahan DeInit RNG" @@ -2484,10 +2492,6 @@ msgstr "Format tidak didukung" msgid "Unsupported operation" msgstr "Operasi yang tidak didukung" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Nilai tarikan yang tidak didukung." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -4581,6 +4585,9 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "Unsupported pull value." +#~ msgstr "Nilai tarikan yang tidak didukung." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/cs.po b/locale/cs.po index 828b296f6d..f0744403ab 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -151,6 +151,10 @@ msgstr "%q musí být mezi %d a %d" msgid "%q must be of type %q" msgstr "%q musí být typu %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q musí být mocnina 2" @@ -1605,7 +1609,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1905,7 +1909,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1989,6 +1993,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2458,10 +2466,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index d7ef2cbe98..b670e96ea6 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -152,6 +152,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1617,7 +1621,7 @@ msgstr "Kein DMA Kanal gefunden" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1923,7 +1927,7 @@ msgstr "Pin hat keine ADC Funktionalität" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Pin kann nur als Eingang verwendet werden" @@ -2010,6 +2014,10 @@ msgstr "Pull wird nicht verwendet, wenn die Richtung output ist." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG DeInit-Fehler" @@ -2486,10 +2494,6 @@ msgstr "Nicht unterstütztes Format" msgid "Unsupported operation" msgstr "Nicht unterstützte Operation" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Nicht unterstützter Pull-Wert." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Update fehlgeschlagen" @@ -4614,6 +4618,9 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "Nicht unterstützter Pull-Wert." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/el.po b/locale/el.po index a3e63936f4..0f32b9174c 100644 --- a/locale/el.po +++ b/locale/el.po @@ -144,6 +144,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1596,7 +1600,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1896,7 +1900,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1978,6 +1982,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2447,10 +2455,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index bf42d63ead..c7113ab877 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -153,6 +153,10 @@ msgstr "%q must be between %d and %d" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q must be power of 2" @@ -1611,7 +1615,7 @@ msgstr "No DMA channel found" msgid "No DMA pacing timer found" msgstr "No DMA pacing timer found" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "No I2C device at address: %x" @@ -1917,7 +1921,7 @@ msgstr "Pin does not have ADC capabilities" msgid "Pin interrupt already in use" msgstr "Pin interrupt already in use" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Pin is input only" @@ -2002,6 +2006,10 @@ msgstr "Pull not used when direction is output." msgid "RAISE mode is not implemented" msgstr "RAISE mode is not implemented" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG deinit Error" @@ -2480,10 +2488,6 @@ msgstr "Unsupported format" msgid "Unsupported operation" msgstr "Unsupported operation" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Unsupported pull value." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Update failed" @@ -4582,6 +4586,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 "Unsupported pull value." +#~ msgstr "Unsupported pull value." + #~ msgid "%q must <= %d" #~ msgstr "%q must <= %d" diff --git a/locale/es.po b/locale/es.po index d20293e1f8..0d9c53db5d 100644 --- a/locale/es.po +++ b/locale/es.po @@ -155,6 +155,10 @@ msgstr "%q debe estar entre %d y %d" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1633,7 +1637,7 @@ msgstr "No se encontró el canal DMA" msgid "No DMA pacing timer found" msgstr "timer por establecedor de paso DMA no encontrado" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "No hay dispositivo I2C en la dirección: %x" @@ -1941,7 +1945,7 @@ msgstr "Pin no tiene capacidad ADC" msgid "Pin interrupt already in use" msgstr "Interrupción de Pin ya está en uso" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "El pin es solo de entrada" @@ -2029,6 +2033,10 @@ msgstr "Pull no se usa cuando la dirección es output." msgid "RAISE mode is not implemented" msgstr "El modo RAISE no esta implementado" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "Error de desinicialización de RNG" @@ -2511,10 +2519,6 @@ msgstr "Formato no soportado" msgid "Unsupported operation" msgstr "Operación no soportada" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "valor pull no soportado." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "La actualización fallo" @@ -4629,6 +4633,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 "Unsupported pull value." +#~ msgstr "valor pull no soportado." + #~ msgid "%q must <= %d" #~ msgstr "%q debe ser <= %d" diff --git a/locale/fil.po b/locale/fil.po index 449941e31c..ee707c460a 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -146,6 +146,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1611,7 +1615,7 @@ msgstr "Walang DMA channel na mahanap" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1915,7 +1919,7 @@ msgstr "Ang pin ay walang kakayahan sa ADC" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1997,6 +2001,10 @@ msgstr "Pull hindi ginagamit kapag ang direksyon ay output." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2469,10 +2477,6 @@ msgstr "Hindi supportadong format" msgid "Unsupported operation" msgstr "Hindi sinusuportahang operasyon" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Hindi suportado ang pull value." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -4590,6 +4594,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "Hindi suportado ang pull value." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/fr.po b/locale/fr.po index 62d0da35fd..b8b968a4fe 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -155,6 +155,10 @@ msgstr "%q doit être entre %d et %d" msgid "%q must be of type %q" msgstr "%q doit être du type %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q doit être une puissance de 2" @@ -1644,7 +1648,7 @@ msgstr "Aucun canal DMA trouvé" msgid "No DMA pacing timer found" msgstr "Aucun minuteur de rythme DMA trouvé" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Pas de dispositif I2C à l'adresse : %x" @@ -1954,7 +1958,7 @@ msgstr "La broche 'pin' ne supporte pas les capacitées ADC" msgid "Pin interrupt already in use" msgstr "L'interruption de cette broche est déjà utilisée" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "La broche est entrée uniquement" @@ -2042,6 +2046,10 @@ msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." msgid "RAISE mode is not implemented" msgstr "Mode RAISE n'est pas implémenté" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "Erreur de désinitialisation du RNG" @@ -2528,10 +2536,6 @@ msgstr "Format non supporté" msgid "Unsupported operation" msgstr "Opération non supportée" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Valeur de tirage 'pull' non supportée." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Mise-à-jour échouée" @@ -4660,6 +4664,9 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Unsupported pull value." +#~ msgstr "Valeur de tirage 'pull' non supportée." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/hi.po b/locale/hi.po index 1c08e72569..be5f5347ff 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -144,6 +144,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1596,7 +1600,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1896,7 +1900,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1978,6 +1982,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2447,10 +2455,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index e3782b11a8..4196da915c 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -154,6 +154,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1622,7 +1626,7 @@ msgstr "Nessun canale DMA trovato" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1931,7 +1935,7 @@ msgstr "Il pin non ha capacità di ADC" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -2014,6 +2018,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2488,10 +2496,6 @@ msgstr "Formato non supportato" msgid "Unsupported operation" msgstr "Operazione non supportata" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Valore di pull non supportato." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -4612,6 +4616,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "Valore di pull non supportato." + #~ msgid "integer required" #~ msgstr "intero richiesto" diff --git a/locale/ja.po b/locale/ja.po index 53a106cf1e..8912a4c0ed 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -149,6 +149,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1607,7 +1611,7 @@ msgstr "DMAチャネルが見つかりません" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1910,7 +1914,7 @@ msgstr "ピンにADCの能力がありません" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "ピンは入力専用" @@ -1992,6 +1996,10 @@ msgstr "方向がoutputのときpullは使われません" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG解体エラー" @@ -2462,10 +2470,6 @@ msgstr "非対応の形式" msgid "Unsupported operation" msgstr "非対応の操作" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "非対応のpull値" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -4566,6 +4570,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "非対応のpull値" + #~ msgid "integer required" #~ msgstr "整数が必要" diff --git a/locale/ko.po b/locale/ko.po index 35821acbc5..4b7d06bcf7 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -145,6 +145,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1599,7 +1603,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1899,7 +1903,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1981,6 +1985,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2451,10 +2459,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index b659a74933..a83b35c007 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -147,6 +147,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1608,7 +1612,7 @@ msgstr "Geen DMA kanaal gevonden" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Geen I2C-apparaat op adres: %x" @@ -1917,7 +1921,7 @@ msgstr "Pin heeft geen ADC mogelijkheden" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Pin kan alleen voor invoer gebruikt worden" @@ -2004,6 +2008,10 @@ msgstr "Pull niet gebruikt wanneer de richting output is." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG DeInit Fout" @@ -2475,10 +2483,6 @@ msgstr "Niet-ondersteunde format" msgid "Unsupported operation" msgstr "Niet-ondersteunde operatie" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Niet-ondersteunde pull-waarde." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Update Mislukt" @@ -4586,6 +4590,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 "Unsupported pull value." +#~ msgstr "Niet-ondersteunde pull-waarde." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/pl.po b/locale/pl.po index 541861c046..f440f4cac6 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -149,6 +149,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -1607,7 +1611,7 @@ msgstr "Nie znaleziono kanału DMA" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1907,7 +1911,7 @@ msgstr "Nóżka nie obsługuje ADC" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1989,6 +1993,10 @@ msgstr "Podciągnięcie nieużywane w trybie wyjścia." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2458,10 +2466,6 @@ msgstr "Zły format" msgid "Unsupported operation" msgstr "Zła operacja" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Zła wartość podciągnięcia." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -4557,6 +4561,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "Zła wartość podciągnięcia." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index efbc053d58..4e841b1942 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -153,6 +153,10 @@ msgstr "%q deve estar entre %d e %d" msgid "%q must be of type %q" msgstr "%q deve ser do tipo %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q deve ser a potência de 2" @@ -1633,7 +1637,7 @@ msgstr "Nenhum canal DMA foi encontrado" msgid "No DMA pacing timer found" msgstr "Nenhum temporizador DMA foi encontrado" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Nenhum dispositivo I2C no endereço: %x" @@ -1944,7 +1948,7 @@ msgstr "O pino não tem recursos de ADC" msgid "Pin interrupt already in use" msgstr "A interrupção do pino já está em uso" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Apenas o pino de entrada" @@ -2034,6 +2038,10 @@ msgstr "O Pull não foi usado quando a direção for gerada." msgid "RAISE mode is not implemented" msgstr "O modo RAISE não foi implementado" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "Erro DeInit RNG" @@ -2520,10 +2528,6 @@ msgstr "Formato não suportado" msgid "Unsupported operation" msgstr "Operação não suportada" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "O valor pull não é compatível." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "A atualização falou" @@ -4649,6 +4653,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 "Unsupported pull value." +#~ msgstr "O valor pull não é compatível." + #~ msgid "Station must be started" #~ msgstr "A estação deve ser iniciada" diff --git a/locale/ru.po b/locale/ru.po index 32ccdf5c30..cbd2d6634c 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -156,6 +156,10 @@ msgstr "%q должен быть между %d и %d" msgid "%q must be of type %q" msgstr "%q должен быть типа %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q должен быть во 2-й степени" @@ -1641,7 +1645,7 @@ msgstr "Канал DMA не найден" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Нет устройства I2C по адресу: %x" @@ -1949,7 +1953,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -2033,6 +2037,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2502,10 +2510,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index 8601320db3..c4dae80b3d 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -152,6 +152,10 @@ msgstr "%q måste vara mellan %d och %d" msgid "%q must be of type %q" msgstr "%q måste vara av typen %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q måste vara en potens av 2" @@ -1616,7 +1620,7 @@ msgstr "Ingen DMA-kanal hittades" msgid "No DMA pacing timer found" msgstr "Ingen DMA pacing timer hittades" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Ingen I2C-enhet på adress: %x" @@ -1923,7 +1927,7 @@ msgstr "Pinnen har inte ADC-funktionalitet" msgid "Pin interrupt already in use" msgstr "Pinnavbrott används redan" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Pinnen är enbart ingång" @@ -2010,6 +2014,10 @@ msgstr "Pull används inte när riktningen är output." msgid "RAISE mode is not implemented" msgstr "RAISE-läge är inte implementerat" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG DeInit-fel" @@ -2491,10 +2499,6 @@ msgstr "Formatet stöds inte" msgid "Unsupported operation" msgstr "Åtgärd som inte stöds" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Ogiltigt Pull-värde." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Uppdateringen misslyckades" @@ -4606,6 +4610,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 "Unsupported pull value." +#~ msgstr "Ogiltigt Pull-värde." + #~ msgid "Station must be started" #~ msgstr "Stationen måste startas" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index ad712abf28..9d0968f874 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -154,6 +154,10 @@ msgstr "%q bì xū zài %d hé %d zhī jiān" msgid "%q must be of type %q" msgstr "%q bì xū shì %q lèi xíng" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q bì xū shì 2 de zhěng shù cì fāng" @@ -1630,7 +1634,7 @@ msgstr "Wèi zhǎodào DMA píndào" msgid "No DMA pacing timer found" msgstr "wèi zhǎo dào DMA qǐ bó qì" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "dì zhǐ wú I2C shè bèi: %x" @@ -1936,7 +1940,7 @@ msgstr "Pin méiyǒu ADC nénglì" msgid "Pin interrupt already in use" msgstr "yǐn jiǎo zhōng duàn yǐ zài shǐ yòng zhōng" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Yǐn jiǎo jǐn shūrù" @@ -2023,6 +2027,10 @@ msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng." msgid "RAISE mode is not implemented" msgstr "wèi shí xiàn tí shēng mó shì" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG qǔxiāo chūshǐhuà cuòwù" @@ -2503,10 +2511,6 @@ msgstr "Bù zhīchí de géshì" msgid "Unsupported operation" msgstr "Bù zhīchí de cāozuò" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Bù zhīchí de lādòng zhí." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "gēng xīn shī bài" @@ -4619,6 +4623,9 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Unsupported pull value." +#~ msgstr "Bù zhīchí de lādòng zhí." + #~ msgid "%q must <= %d" #~ msgstr "%q bì xū <= %d" From 98b0029a292cf51826275cbacbaae1800698d7ed Mon Sep 17 00:00:00 2001 From: Ben Combee Date: Sat, 1 Jan 2022 23:28:43 -0600 Subject: [PATCH 152/258] audiomp3: add decoded_samples property In my testing, there is no way to accurately know how far into a MP3 file you're currently playing. You can use monotonic time, but that can have drift versus the audio playback system, which may not be running at exactly the expected sample rate. To allow syncing animation with timestamps in a MP3 file, this presents a new property, decoded_samples, that records the number of audio samples sent out of the decoder. While this may not be a completely accurate time, due to mixer delays, it's much better position that the monotonic clock difference. Implementation is keeping track of this value in the mp3file structure and adding to it whenever data is sent out of the decoder. The property implementation was a copy/paste from current properties in the audiomp3 files. --- shared-bindings/audiomp3/MP3Decoder.c | 17 +++++++++++++++++ shared-bindings/audiomp3/MP3Decoder.h | 1 + shared-module/audiomp3/MP3Decoder.c | 8 ++++++++ shared-module/audiomp3/MP3Decoder.h | 4 ++++ 4 files changed, 30 insertions(+) diff --git a/shared-bindings/audiomp3/MP3Decoder.c b/shared-bindings/audiomp3/MP3Decoder.c index 227cb6dec1..4761feacd8 100644 --- a/shared-bindings/audiomp3/MP3Decoder.c +++ b/shared-bindings/audiomp3/MP3Decoder.c @@ -232,6 +232,22 @@ const mp_obj_property_t audiomp3_mp3file_rms_level_obj = { MP_ROM_NONE}, }; +//| samples_decoded: int +//| """The number of audio samples decoded from the current file. (read only)""" +//| +STATIC mp_obj_t audiomp3_mp3file_obj_get_samples_decoded(mp_obj_t self_in) { + audiomp3_mp3file_obj_t *self = MP_OBJ_TO_PTR(self_in); + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_audiomp3_mp3file_get_samples_decoded(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_samples_decoded_obj, audiomp3_mp3file_obj_get_samples_decoded); + +const mp_obj_property_t audiomp3_mp3file_samples_decoded_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&audiomp3_mp3file_get_samples_decoded_obj, + MP_ROM_NONE, + MP_ROM_NONE}, +}; STATIC const mp_rom_map_elem_t audiomp3_mp3file_locals_dict_table[] = { // Methods @@ -245,6 +261,7 @@ STATIC const mp_rom_map_elem_t audiomp3_mp3file_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_bits_per_sample), MP_ROM_PTR(&audiomp3_mp3file_bits_per_sample_obj) }, { MP_ROM_QSTR(MP_QSTR_channel_count), MP_ROM_PTR(&audiomp3_mp3file_channel_count_obj) }, { MP_ROM_QSTR(MP_QSTR_rms_level), MP_ROM_PTR(&audiomp3_mp3file_rms_level_obj) }, + { MP_ROM_QSTR(MP_QSTR_samples_decoded), MP_ROM_PTR(&audiomp3_mp3file_samples_decoded_obj) }, }; STATIC MP_DEFINE_CONST_DICT(audiomp3_mp3file_locals_dict, audiomp3_mp3file_locals_dict_table); diff --git a/shared-bindings/audiomp3/MP3Decoder.h b/shared-bindings/audiomp3/MP3Decoder.h index 2428cedf16..e1f4fcff4a 100644 --- a/shared-bindings/audiomp3/MP3Decoder.h +++ b/shared-bindings/audiomp3/MP3Decoder.h @@ -46,5 +46,6 @@ void common_hal_audiomp3_mp3file_set_sample_rate(audiomp3_mp3file_obj_t *self, u uint8_t common_hal_audiomp3_mp3file_get_bits_per_sample(audiomp3_mp3file_obj_t *self); uint8_t common_hal_audiomp3_mp3file_get_channel_count(audiomp3_mp3file_obj_t *self); float common_hal_audiomp3_mp3file_get_rms_level(audiomp3_mp3file_obj_t *self); +uint32_t common_hal_audiomp3_mp3file_get_samples_decoded(audiomp3_mp3file_obj_t *self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOIO_MP3FILE_H diff --git a/shared-module/audiomp3/MP3Decoder.c b/shared-module/audiomp3/MP3Decoder.c index 5e1bce5924..4687e01e43 100644 --- a/shared-module/audiomp3/MP3Decoder.c +++ b/shared-module/audiomp3/MP3Decoder.c @@ -258,6 +258,7 @@ void common_hal_audiomp3_mp3file_set_file(audiomp3_mp3file_obj_t *self, pyb_file self->channel_count = fi.nChans; self->frame_buffer_size = fi.outputSamps * sizeof(int16_t); self->len = 2 * self->frame_buffer_size; + self->samples_decoded = 0; } void common_hal_audiomp3_mp3file_deinit(audiomp3_mp3file_obj_t *self) { @@ -267,6 +268,7 @@ void common_hal_audiomp3_mp3file_deinit(audiomp3_mp3file_obj_t *self) { self->buffers[0] = NULL; self->buffers[1] = NULL; self->file = NULL; + self->samples_decoded = 0; } bool common_hal_audiomp3_mp3file_deinited(audiomp3_mp3file_obj_t *self) { @@ -327,6 +329,7 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t * if (channel == self->other_channel) { *bufptr = (uint8_t *)(self->buffers[self->other_buffer_index] + channel); self->other_channel = -1; + self->samples_decoded += *buffer_length / sizeof(int16_t); return GET_BUFFER_MORE_DATA; } @@ -359,6 +362,7 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t * self); } + self->samples_decoded += *buffer_length / sizeof(int16_t); return GET_BUFFER_MORE_DATA; } @@ -384,3 +388,7 @@ float common_hal_audiomp3_mp3file_get_rms_level(audiomp3_mp3file_obj_t *self) { } return sqrtf(sumsq) / (self->frame_buffer_size / sizeof(int16_t)); } + +uint32_t common_hal_audiomp3_mp3file_get_samples_decoded(audiomp3_mp3file_obj_t *self) { + return self->samples_decoded; +} diff --git a/shared-module/audiomp3/MP3Decoder.h b/shared-module/audiomp3/MP3Decoder.h index 0f2256a417..17616d4a28 100644 --- a/shared-module/audiomp3/MP3Decoder.h +++ b/shared-module/audiomp3/MP3Decoder.h @@ -54,6 +54,8 @@ typedef struct { int8_t other_channel; int8_t other_buffer_index; + + uint32_t samples_decoded; } audiomp3_mp3file_obj_t; // These are not available from Python because it may be called in an interrupt. @@ -71,4 +73,6 @@ void audiomp3_mp3file_get_buffer_structure(audiomp3_mp3file_obj_t *self, bool si float audiomp3_mp3file_get_rms_level(audiomp3_mp3file_obj_t *self); +uint32_t common_hal_audiomp3_mp3file_get_samples_decoded(audiomp3_mp3file_obj_t *self); + #endif // MICROPY_INCLUDED_SHARED_MODULE_AUDIOIO_MP3FILE_H From 131b94540e372b25ec20cab0f8197dabac21d3bd Mon Sep 17 00:00:00 2001 From: Ben Combee Date: Sun, 2 Jan 2022 15:19:25 -0600 Subject: [PATCH 153/258] audiomp3: reset decoded_samples when file resets In testing, I saw that the decoded_samples value kept increasing when I stopped and restarted playback, as I'd missed setting it back to zero during the reset operation. --- shared-module/audiomp3/MP3Decoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shared-module/audiomp3/MP3Decoder.c b/shared-module/audiomp3/MP3Decoder.c index 4687e01e43..2d45313814 100644 --- a/shared-module/audiomp3/MP3Decoder.c +++ b/shared-module/audiomp3/MP3Decoder.c @@ -304,6 +304,7 @@ void audiomp3_mp3file_reset_buffer(audiomp3_mp3file_obj_t *self, f_lseek(&self->file->fp, 0); self->inbuf_offset = self->inbuf_length; self->eof = 0; + self->samples_decoded = 0; self->other_channel = -1; mp3file_update_inbuf_half(self); mp3file_skip_id3v2(self); From d3de8aa79b669601f094b5bbb87e40b583134b04 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Sun, 2 Jan 2022 05:17:54 +0000 Subject: [PATCH 154/258] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1031 of 1031 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 4e841b1942..69e237d5aa 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-30 11:53+0000\n" +"PO-Revision-Date: 2022-01-03 05:53+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -155,7 +155,7 @@ msgstr "%q deve ser do tipo %q" #: shared-bindings/digitalio/Pull.c msgid "%q must be of type %q or None" -msgstr "" +msgstr "%q deve ser do tipo %q ou nenhum" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" @@ -2040,7 +2040,7 @@ msgstr "O modo RAISE não foi implementado" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" -msgstr "" +msgstr "RISE_AND_FALL não está disponível neste chip" #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" From fd80d0d8cb9ca591f10e5ad408f858a4f6ac8737 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Sat, 1 Jan 2022 15:40:13 +0000 Subject: [PATCH 155/258] Translated using Weblate (Swedish) Currently translated at 100.0% (1031 of 1031 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 c4dae80b3d..a93e7ad753 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-30 11:53+0000\n" +"PO-Revision-Date: 2022-01-03 05:53+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -154,7 +154,7 @@ msgstr "%q måste vara av typen %q" #: shared-bindings/digitalio/Pull.c msgid "%q must be of type %q or None" -msgstr "" +msgstr "%q måste vara av typen %q eller None" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" @@ -2016,7 +2016,7 @@ msgstr "RAISE-läge är inte implementerat" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" -msgstr "" +msgstr "RISE_AND_FALL är inte tillgängligt på detta chip" #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" From 10b59da56aa4bccd81d6b3aee8df5e452809dde0 Mon Sep 17 00:00:00 2001 From: hexthat Date: Mon, 3 Jan 2022 16:25:04 +0000 Subject: [PATCH 156/258] Translated using Weblate (Chinese (Pinyin)) Currently translated at 99.0% (1021 of 1031 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 9d0968f874..ba7896bdaf 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-12-27 02:51+0000\n" +"PO-Revision-Date: 2022-01-04 04:27+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -156,7 +156,7 @@ msgstr "%q bì xū shì %q lèi xíng" #: shared-bindings/digitalio/Pull.c msgid "%q must be of type %q or None" -msgstr "" +msgstr "%q lèi xíng bì xū wéi %q huò wú" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" @@ -682,7 +682,7 @@ msgstr "CBC kuài bìxū shì 16 zìjié de bèishù" #: supervisor/shared/safe_mode.c msgid "CIRCUITPY drive could not be found or created." -msgstr "" +msgstr "zhǎo bú dào huò chuàng jiàn CIRCUITPY qū dòng qì." #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" @@ -2029,7 +2029,7 @@ msgstr "wèi shí xiàn tí shēng mó shì" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" -msgstr "" +msgstr "RISE_AND_FALL zài cǐ xīn piàn shàng bù kě yòng" #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" From 98be08736f04793e4d6b1b1652fd890d9146e982 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 4 Jan 2022 20:06:33 +0100 Subject: [PATCH 157/258] Added translation using Weblate (Turkish) --- locale/tr.po | 4547 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 4547 insertions(+) create mode 100644 locale/tr.po diff --git a/locale/tr.po b/locale/tr.po new file mode 100644 index 0000000000..954c417359 --- /dev/null +++ b/locale/tr.po @@ -0,0 +1,4547 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: main.c +msgid "" +"\n" +"Code done running.\n" +msgstr "" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: py/obj.c +msgid " File \"%q\"" +msgstr "" + +#: py/obj.c +msgid " File \"%q\", line %d" +msgstr "" + +#: py/builtinhelp.c +msgid " is of type %q\n" +msgstr "" + +#: main.c +msgid " not found.\n" +msgstr "" + +#: main.c +msgid " output:\n" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "%%c requires int or char" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "" +"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +msgid "%q failure: %d" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q in use" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c +msgid "%q index out of range" +msgstr "" + +#: py/obj.c +msgid "%q indices must be integers, not %s" +msgstr "" + +#: py/argcheck.c +msgid "%q length must be %d-%d" +msgstr "" + +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "" + +#: py/argcheck.c +msgid "%q must be %d-%d" +msgstr "" + +#: py/argcheck.c shared-bindings/gifio/GifWriter.c +msgid "%q must be <= %d" +msgstr "" + +#: py/argcheck.c +msgid "%q must be >= %d" +msgstr "" + +#: py/argcheck.c shared-bindings/memorymonitor/AllocationAlarm.c +msgid "%q must be >= 0" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/Shape.c +#: shared-bindings/memorymonitor/AllocationAlarm.c +#: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c +msgid "%q must be >= 1" +msgstr "" + +#: py/argcheck.c +msgid "%q must be a string" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "%q must be a tuple of length 2" +msgstr "" + +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c +msgid "%q must be between %d and %d" +msgstr "" + +#: py/argcheck.c +msgid "%q must be of type %q" +msgstr "" + +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +msgid "%q must be power of 2" +msgstr "" + +#: shared-bindings/wifi/Monitor.c +msgid "%q out of bounds" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: shared-bindings/canio/Match.c +msgid "%q out of range" +msgstr "" + +#: ports/atmel-samd/common-hal/microcontroller/Pin.c +msgid "%q pin invalid" +msgstr "" + +#: shared-bindings/fontio/BuiltinFont.c +msgid "%q should be an int" +msgstr "" + +#: shared-bindings/usb_hid/Device.c +msgid "%q with a report ID of 0 must be of length 1" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "%q() takes %d positional arguments but %d were given" +msgstr "" + +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + +#: py/argcheck.c +msgid "'%q' argument required" +msgstr "" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c +msgid "'%q' object is not callable" +msgstr "" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a label" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects a special register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an FPU register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an address of the form [a, b]" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects an integer" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects at most r%d" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects {r0, r1, ...}" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "'%s' integer %d isn't within range %d..%d" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" +msgstr "" + +#: py/obj.c +#, c-format +msgid "'%s' object doesn't support item assignment" +msgstr "" + +#: py/obj.c +#, c-format +msgid "'%s' object doesn't support item deletion" +msgstr "" + +#: py/runtime.c +msgid "'%s' object has no attribute '%q'" +msgstr "" + +#: py/obj.c +#, c-format +msgid "'%s' object isn't subscriptable" +msgstr "" + +#: py/objstr.c +msgid "'=' alignment not allowed in string format specifier" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "'S' and 'O' are not supported format types" +msgstr "" + +#: py/compile.c +msgid "'align' requires 1 argument" +msgstr "" + +#: py/compile.c +msgid "'await' outside function" +msgstr "" + +#: py/compile.c +msgid "'await', 'async for' or 'async with' outside async function" +msgstr "" + +#: py/compile.c +msgid "'break' outside loop" +msgstr "" + +#: py/compile.c +msgid "'continue' outside loop" +msgstr "" + +#: py/objgenerator.c +msgid "'coroutine' object is not an iterator" +msgstr "" + +#: py/compile.c +msgid "'data' requires at least 2 arguments" +msgstr "" + +#: py/compile.c +msgid "'data' requires integer arguments" +msgstr "" + +#: py/compile.c +msgid "'label' requires 1 argument" +msgstr "" + +#: py/compile.c +msgid "'return' outside function" +msgstr "" + +#: py/compile.c +msgid "'yield from' inside async function" +msgstr "" + +#: py/compile.c +msgid "'yield' outside function" +msgstr "" + +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "" + +#: py/compile.c +msgid "*x must be assignment target" +msgstr "" + +#: py/obj.c +msgid ", in %q\n" +msgstr "" + +#: py/objcomplex.c +msgid "0.0 to a complex power" +msgstr "" + +#: py/modbuiltins.c +msgid "3-arg pow() not supported" +msgstr "" + +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +#: ports/atmel-samd/common-hal/countio/Counter.c +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "A hardware interrupt channel is already in use" +msgstr "" + +#: ports/espressif/common-hal/analogio/AnalogIn.c +msgid "ADC2 is being used by WiFi" +msgstr "" + +#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c +#, c-format +msgid "Address must be %d bytes long" +msgstr "" + +#: shared-bindings/_bleio/Address.c +msgid "Address type out of range" +msgstr "" + +#: ports/espressif/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/nrf/common-hal/busio/I2C.c +msgid "All I2C peripherals are in use" +msgstr "" + +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c +msgid "All PCNT units in use" +msgstr "" + +#: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c +msgid "All RX FIFOs in use" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +msgid "All SPI peripherals are in use" +msgstr "" + +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c +msgid "All UART peripherals are in use" +msgstr "" + +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "All event channels in use" +msgstr "" + +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "All state machines in use" +msgstr "" + +#: ports/atmel-samd/audio_dma.c +msgid "All sync event channels in use" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "All timers for this pin are in use" +msgstr "" + +#: ports/atmel-samd/common-hal/_pew/PewPew.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c +msgid "All timers in use" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Already advertising." +msgstr "" + +#: ports/atmel-samd/common-hal/canio/Listener.c +msgid "Already have all-matches listener" +msgstr "" + +#: shared-module/memorymonitor/AllocationAlarm.c +#: shared-module/memorymonitor/AllocationSize.c +msgid "Already running" +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "Already scanning for wifi networks" +msgstr "" + +#: ports/cxd56/common-hal/analogio/AnalogIn.c +msgid "AnalogIn not supported on given pin" +msgstr "" + +#: ports/cxd56/common-hal/analogio/AnalogOut.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/analogio/AnalogOut.c +msgid "AnalogOut functionality not supported" +msgstr "" + +#: shared-bindings/analogio/AnalogOut.c +msgid "AnalogOut is only 16 bits. Value must be less than 65536." +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +msgid "AnalogOut not supported on given pin" +msgstr "" + +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +msgid "Another send is already active" +msgstr "" + +#: shared-bindings/pulseio/PulseOut.c +msgid "Array must contain halfwords (type 'H')" +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Array values should be single bytes." +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "At most %d %q may be specified (not %d)" +msgstr "" + +#: shared-module/memorymonitor/AllocationAlarm.c +#, c-format +msgid "Attempt to allocate %d blocks" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Attempted heap allocation when VM not running." +msgstr "" + +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "AuthMode.OPEN is not used with password" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Authentication failure" +msgstr "" + +#: main.c +msgid "Auto-reload is off.\n" +msgstr "" + +#: main.c +msgid "" +"Auto-reload is on. Simply save files over USB to run them or enter REPL to " +"disable.\n" +msgstr "" + +#: ports/espressif/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + +#: shared-module/displayio/Display.c +#: shared-module/framebufferio/FramebufferDisplay.c +msgid "Below minimum frame rate" +msgstr "" + +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +msgid "Bit clock and word select must be sequential pins" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Bit clock and word select must share a clock unit" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Bit depth must be from 1 to 6 inclusive, not %d" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Bit depth must be multiple of 8." +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "Bitmap size and bits per value must match" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Boot device must be first device (interface #0)." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Both RX and TX required for flow control" +msgstr "" + +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "Both pins must support hardware interrupts" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/is31fl3741/IS31FL3741.c +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "Brightness must be 0-1.0" +msgstr "" + +#: shared-bindings/supervisor/__init__.c +msgid "Brightness must be between 0 and 255" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Brightness not adjustable" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +#, c-format +msgid "Buffer + offset too small %d %d %d" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Buffer elements must be 4 bytes long or less" +msgstr "" + +#: shared-module/usb_hid/Device.c +#, c-format +msgid "Buffer incorrect size. Should be %d bytes." +msgstr "" + +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is not a bytearray." +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is too small" +msgstr "" + +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +#, c-format +msgid "Buffer length %d too big. It must be less than %d" +msgstr "" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c +msgid "Buffer length must be a multiple of 512" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c +msgid "Buffer must be at least length 1" +msgstr "" + +#: shared-bindings/_bleio/PacketBuffer.c +#, c-format +msgid "Buffer too short by %d bytes" +msgstr "" + +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +msgid "Buffers must be same size" +msgstr "" + +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c +#, c-format +msgid "Bus pin %d is already in use" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "Byte buffer must be 16 bytes." +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Bytes must be between 0 and 255." +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "CBC blocks must be multiples of 16 bytes" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + +#: py/objtype.c +msgid "Call super().__init__() before accessing native object." +msgstr "" + +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "Can't set CCCD on local Characteristic" +msgstr "" + +#: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c +#: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c +msgid "Cannot change USB devices now" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot create a new Adapter; use _bleio.adapter;" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Cannot delete values" +msgstr "" + +#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c +#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c +#: ports/nrf/common-hal/digitalio/DigitalInOut.c +#: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c +msgid "Cannot get pull while in output mode" +msgstr "" + +#: ports/nrf/common-hal/microcontroller/Processor.c +msgid "Cannot get temperature" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Cannot output both channels on the same pin" +msgstr "" + +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot read without MISO pin." +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Cannot record to a file" +msgstr "" + +#: shared-module/storage/__init__.c +msgid "Cannot remount '/' when visible via USB." +msgstr "" + +#: ports/atmel-samd/common-hal/microcontroller/__init__.c +#: ports/cxd56/common-hal/microcontroller/__init__.c +#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c +msgid "Cannot reset into bootloader because no bootloader is present." +msgstr "" + +#: ports/espressif/common-hal/socketpool/Socket.c +msgid "Cannot set socket options" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Cannot set value when direction is input." +msgstr "" + +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Cannot specify RTS or CTS in RS485 mode" +msgstr "" + +#: py/objslice.c +msgid "Cannot subclass slice" +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot transfer without MOSI and MISO pins." +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Cannot vary frequency on a timer that is already in use" +msgstr "" + +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c +#: ports/nrf/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot write without MOSI pin." +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CircuitPython was unable to allocate the heap." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Clock pin init failed." +msgstr "" + +#: shared-module/bitbangio/I2C.c +msgid "Clock stretch too long" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Clock unit in use" +msgstr "" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c +msgid "Command must be an int between 0 and 255" +msgstr "" + +#: shared-bindings/_bleio/Connection.c +msgid "" +"Connection has been disconnected and can no longer be used. Create a new " +"connection." +msgstr "" + +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Could not initialize Camera" +msgstr "" + +#: ports/cxd56/common-hal/gnss/GNSS.c +msgid "Could not initialize GNSS" +msgstr "" + +#: ports/cxd56/common-hal/sdioio/SDCard.c +msgid "Could not initialize SDCard" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c +msgid "Could not initialize UART" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not re-init channel" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not re-init timer" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not restart PWM" +msgstr "" + +#: ports/espressif/common-hal/neopixel_write/__init__.c +msgid "Could not retrieve clock" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Could not start PWM" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "Could not start interrupt, RX busy" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate decoder" +msgstr "" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate first buffer" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate input buffer" +msgstr "" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate second buffer" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Crash into the HardFault_Handler." +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Channel Init Error" +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Device Init Error" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "DAC already in use" +msgstr "" + +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +msgid "Data 0 pin must be byte aligned" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Data chunk must follow fmt chunk" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Data not supported with directed advertising" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Data too large for advertisement packet" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Destination capacity is smaller than destination_length." +msgstr "" + +#: ports/nrf/common-hal/audiobusio/I2SOut.c +msgid "Device in use" +msgstr "" + +#: ports/cxd56/common-hal/digitalio/DigitalInOut.c +msgid "DigitalInOut not supported on given pin" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display must have a 16 bit colorspace." +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display rotation must be in 90 degree increments" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Drive mode not used when direction is input." +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "ECB only operates on 16 bytes at a time" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c +msgid "ESP-IDF memory allocation failed" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +msgid "EXTINT channel already in use" +msgstr "" + +#: shared-module/synthio/MidiTrack.c +#, c-format +msgid "Error in MIDI stream at position %d" +msgstr "" + +#: extmod/modure.c +msgid "Error in regex" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "Error: Failure to bind" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c py/enum.c +#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c +#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c +#: shared-bindings/neopixel_write/__init__.c +msgid "Expected a %q" +msgstr "" + +#: shared-bindings/alarm/__init__.c +msgid "Expected an alarm" +msgstr "" + +#: shared-module/adafruit_pixelbuf/PixelBuf.c +#, c-format +msgid "Expected tuple of length %d, got %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Extended advertisements with scan response not supported." +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "FFT is defined for ndarrays only" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "FFT is implemented for linear arrays only" +msgstr "" + +#: ports/espressif/common-hal/ssl/SSLSocket.c +msgid "Failed SSL handshake" +msgstr "" + +#: shared-bindings/ps2io/Ps2.c +msgid "Failed sending command." +msgstr "" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to acquire mutex, err 0x%04x" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c +msgid "Failed to allocate RX buffer" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c +#, c-format +msgid "Failed to allocate RX buffer of %d bytes" +msgstr "" + +#: ports/espressif/common-hal/wifi/__init__.c +msgid "Failed to allocate Wifi memory" +msgstr "" + +#: ports/espressif/common-hal/wifi/ScannedNetworks.c +msgid "Failed to allocate wifi scan memory" +msgstr "" + +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: internal error" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: timeout" +msgstr "" + +#: ports/espressif/common-hal/wifi/__init__.c +msgid "Failed to init wifi" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Failed to parse MP3 file" +msgstr "" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to release mutex, err 0x%04x" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + +#: py/moduerrno.c +msgid "File exists" +msgstr "" + +#: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c +msgid "Filters too complex" +msgstr "" + +#: ports/espressif/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "For L8 colorspace, input bitmap must have 8 bits per pixel" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "For RGB colorspaces, input bitmap must have 16 bits per pixel" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Format not supported" +msgstr "" + +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Frequency must match existing PWMOut using this timer" +msgstr "" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c +msgid "Function requires lock" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Generic Failure" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Group already used" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Hardware busy, try alternative pins" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Hardware in use, try alternative pins" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + +#: extmod/vfs_posix_file.c py/objstringio.c +msgid "I/O operation on closed file" +msgstr "" + +#: ports/stm/common-hal/busio/I2C.c +msgid "I2C Init Error" +msgstr "" + +#: ports/raspberrypi/common-hal/busio/I2C.c +msgid "I2C peripheral in use" +msgstr "" + +#: shared-bindings/audiobusio/I2SOut.c +msgid "I2SOut not available" +msgstr "" + +#: shared-bindings/aesio/aes.c +#, c-format +msgid "IV must be %d bytes long" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "In-buffer elements must be <= 4 bytes long" +msgstr "" + +#: py/persistentcode.c +msgid "" +"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" +"mpy-update for more info." +msgstr "" + +#: shared-bindings/_pew/PewPew.c +msgid "Incorrect buffer size" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Init program size invalid" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Initial set pin direction conflicts with initial out pin direction" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Initial set pin state conflicts with initial out pin state" +msgstr "" + +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "Initialization failed due to lack of memory" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +msgid "Input taking too long" +msgstr "" + +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c +msgid "Input/output error" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d shifts in more bits than pin count" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d shifts out more bits than pin count" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d uses extra pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d waits on input outside of count" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient authentication" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient encryption" +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "Interface must be started" +msgstr "" + +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "Internal define error" +msgstr "" + +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c +msgid "Internal error" +msgstr "" + +#: shared-module/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Internal error #%d" +msgstr "" + +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c +msgid "Invalid %q" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Invalid %q pin" +msgstr "" + +#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Invalid ADC Unit value" +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "Invalid AuthMode" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Invalid BLE parameter" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Invalid BMP file" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Invalid BSSID" +msgstr "" + +#: ports/espressif/common-hal/analogio/AnalogOut.c +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "Invalid DAC pin supplied" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Invalid MAC address" +msgstr "" + +#: shared-bindings/synthio/__init__.c +msgid "Invalid MIDI file" +msgstr "" + +#: ports/atmel-samd/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c +msgid "Invalid PWM frequency" +msgstr "" + +#: ports/espressif/common-hal/analogio/AnalogIn.c +msgid "Invalid Pin" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/espressif/esp_error.c py/moduerrno.c +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid argument" +msgstr "" + +#: shared-module/displayio/Bitmap.c +msgid "Invalid bits per value" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "Invalid buffer size" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +msgid "Invalid byteorder string" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +msgid "Invalid capture period. Valid range: 1 - 500" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid channel count" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "Invalid data_count %d" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "Invalid data_pins[%d]" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Invalid direction." +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid file" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid format chunk size" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Invalid memory access." +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "Invalid multicast MAC address" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "Invalid number of bits" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid phase" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c +#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid pin" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for left channel" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for right channel" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/SPI.c +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c +#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c +#: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/SPI.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c +msgid "Invalid pins" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid polarity" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c +msgid "Invalid properties" +msgstr "" + +#: shared-bindings/microcontroller/__init__.c +msgid "Invalid run mode." +msgstr "" + +#: shared-module/_bleio/Attribute.c +msgid "Invalid security_mode" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/espressif/common-hal/ssl/SSLContext.c +msgid "Invalid socket for TLS" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Invalid state" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice count" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid wave file" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Invalid word/bit length" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Key must be 16, 24, or 32 bytes long" +msgstr "" + +#: shared-module/is31fl3741/IS31FL3741.c +msgid "LED mappings must match display size" +msgstr "" + +#: py/compile.c +msgid "LHS of keyword arg must be an id" +msgstr "" + +#: shared-module/displayio/Group.c +msgid "Layer already in a group." +msgstr "" + +#: shared-module/displayio/Group.c +msgid "Layer must be a Group or TileGrid subclass." +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "MAC address was invalid" +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "MISO pin init failed." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "MOSI pin init failed." +msgstr "" + +#: shared-module/displayio/Shape.c +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + +#: shared-bindings/canio/Message.c +msgid "Messages limited to 8 bytes" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Microphone startup delay must be in range 0.0 to 1.0" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "Missing MISO or MOSI Pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d reads pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d waits based on pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_out_pin. Instruction %d writes pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_set_pin. Instruction %d sets pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + +#: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c +msgid "Must be a %q subclass." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c +msgid "Must provide MISO or MOSI pin" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Must use a multiple of 6 rgb pins, not %d" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + +#: ports/espressif/common-hal/nvm/ByteArray.c +msgid "NVS Error" +msgstr "" + +#: py/qstr.c +msgid "Name too long" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "No CCCD for this Characteristic" +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "No DAC on chip" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "No DMA channel found" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "No DMA pacing timer found" +msgstr "" + +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c +#, c-format +msgid "No I2C device at address: %x" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "No MISO Pin" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "No MOSI Pin" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "No RX pin" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "No TX pin" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +msgid "No available clocks" +msgstr "" + +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +msgid "No capture in progress" +msgstr "" + +#: shared-bindings/_bleio/PacketBuffer.c +msgid "No connection: length cannot be determined" +msgstr "" + +#: shared-bindings/board/__init__.c +msgid "No default %q bus" +msgstr "" + +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +msgid "No free GCLKs" +msgstr "" + +#: shared-bindings/os/__init__.c +msgid "No hardware random available" +msgstr "" + +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +msgid "No hardware support on clk pin" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +msgid "No hardware support on pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No in in program" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No in or out in program" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "No key was specified" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "No long integer support" +msgstr "" + +#: shared-module/usb_hid/__init__.c +#, c-format +msgid "No more than %d HID devices allowed" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "No network with that ssid" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No out in program" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/I2C.c +msgid "No pull up found on SDA or SCL; check your wiring" +msgstr "" + +#: shared-module/touchio/TouchIn.c +msgid "No pulldown on pin; 1Mohm recommended" +msgstr "" + +#: py/moduerrno.c +msgid "No space left on device" +msgstr "" + +#: py/moduerrno.c +msgid "No such file/directory" +msgstr "" + +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "No timer available" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Nordic system firmware failure assertion." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic system firmware out of memory" +msgstr "" + +#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c +msgid "Not a valid IP string" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "Not connected" +msgstr "" + +#: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c +#: shared-bindings/audiopwmio/PWMAudioOut.c +msgid "Not playing" +msgstr "" + +#: shared-bindings/_bleio/__init__.c +msgid "Not settable" +msgstr "" + +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c +#, c-format +msgid "Number of data_pins must be 8 or 16, not %d" +msgstr "" + +#: shared-bindings/util.c +msgid "" +"Object has been deinitialized and can no longer be used. Create a new object." +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c +msgid "Odd parity is not supported" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c +msgid "Only 8 or 16 bit mono with " +msgstr "" + +#: ports/espressif/common-hal/wifi/__init__.c +msgid "Only IPv4 addresses supported" +msgstr "" + +#: ports/espressif/common-hal/socketpool/SocketPool.c +msgid "Only IPv4 sockets supported" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only Windows format, uncompressed BMP supported: given header size is %d" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Only connectable advertisements can be directed" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + +#: shared-bindings/ipaddress/__init__.c +msgid "Only int or string supported for ip" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " +"%d bpp given" +msgstr "" + +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c +msgid "Only one address is allowed" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c +#: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c +msgid "Only one alarm.time alarm can be set." +msgstr "" + +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Out of memory" +msgstr "" + +#: ports/espressif/common-hal/socketpool/SocketPool.c +msgid "Out of sockets" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Out-buffer elements must be <= 4 bytes long" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "Output buffer must be at least %d bytes" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Oversample must be multiple of 8." +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "" +"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "" +"PWM frequency not writable when variable_frequency is False on construction." +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "PWM slice already in use" +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "PWM slice channel A already in use" +msgstr "" + +#: ports/espressif/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + +#: py/moduerrno.c +msgid "Permission denied" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Pin count must be at least 1" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Pin count too large" +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogIn.c +#: ports/cxd56/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c +#: ports/nrf/common-hal/analogio/AnalogIn.c +#: ports/raspberrypi/common-hal/analogio/AnalogIn.c +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Pin does not have ADC capabilities" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pin is input only" +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "Pin must be on PWM Channel B" +msgstr "" + +#: ports/atmel-samd/common-hal/countio/Counter.c +msgid "Pin must support hardware interrupts" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "" +"Pinout uses %d bytes per element, which consumes more than the ideal %d " +"bytes. If this cannot be avoided, pass allow_inefficient=True to the " +"constructor" +msgstr "" + +#: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c +msgid "Pins must be sequential" +msgstr "" + +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential GPIO pins" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Pins must share PWM slice" +msgstr "" + +#: py/builtinhelp.c +msgid "Plus any modules on the filesystem\n" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "Polygon needs at least 3 points" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Prefix buffer must be on the heap" +msgstr "" + +#: main.c +msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" +msgstr "" + +#: main.c +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Program does IN without loading ISR" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Program does OUT without loading OSR" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program must contain at least one 16-bit instruction." +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program size invalid" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program too large" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pull not used when direction is output." +msgstr "" + +#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "RAISE mode is not implemented" +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG DeInit Error" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG Init Error" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c +msgid "RS485 Not yet supported on this device" +msgstr "" + +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "RS485 inversion specified when not in RS485 mode" +msgstr "" + +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c +#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c +#: ports/raspberrypi/common-hal/rtc/RTC.c +msgid "RTC calibration is not supported on this board" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c shared-bindings/time/__init__.c +msgid "RTC is not supported on this board" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "RTS/CTS/RS485 Not yet supported on this device" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "Random number generation error" +msgstr "" + +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Read-only" +msgstr "" + +#: extmod/vfs_fat.c py/moduerrno.c +msgid "Read-only filesystem" +msgstr "" + +#: shared-module/displayio/Bitmap.c +msgid "Read-only object" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Received response was invalid" +msgstr "" + +#: shared-bindings/displayio/EPaperDisplay.c +msgid "Refresh too soon" +msgstr "" + +#: shared-bindings/canio/RemoteTransmissionRequest.c +msgid "RemoteTransmissionRequests limited to 8 bytes" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Requested AES mode is unsupported" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Requested resource not found" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Right channel unsupported" +msgstr "" + +#: main.c +msgid "Running in safe mode! Not running saved code.\n" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "SD card CSD format not supported" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Init Error" +msgstr "" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Re-initialization error" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c +msgid "SPI configuration failed" +msgstr "" + +#: ports/raspberrypi/common-hal/busio/SPI.c +msgid "SPI peripheral in use" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Sample rate must be positive" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#, c-format +msgid "Sample rate too high. It must be less than %d" +msgstr "" + +#: shared-bindings/is31fl3741/IS31FL3741.c +msgid "Scale dimensions must divide by 3" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Scan already in progess. Stop with stop_scan." +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Serializer in use" +msgstr "" + +#: shared-bindings/ssl/SSLContext.c +msgid "Server side context cannot have hostname" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Set pin count must be between 1 and 5" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Side set pin count must be between 1 and 5" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Size not supported" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/SleepMemory.c +#: ports/raspberrypi/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Slice and value different lengths." +msgstr "" + +#: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/TileGrid.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Slices not supported" +msgstr "" + +#: ports/espressif/common-hal/socketpool/SocketPool.c +msgid "SocketPool can only be used with wifi.radio" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Source and destination buffers must be the same length" +msgstr "" + +#: shared-bindings/paralleldisplay/ParallelBus.c +msgid "Specify exactly one of data0 or data_pins" +msgstr "" + +#: extmod/modure.c +msgid "Splitting with sub-captures" +msgstr "" + +#: shared-bindings/supervisor/__init__.c +msgid "Stack size must be at least 256" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Stereo left must be on PWM channel A" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Stereo right must be on PWM channel B" +msgstr "" + +#: shared-bindings/multiterminal/__init__.c +msgid "Stream missing readinto() or write() method." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Supply at least one UART pin" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "Supply one of monotonic_time or epoch_time" +msgstr "" + +#: shared-bindings/gnss/GNSS.c +msgid "System entry must be gnss.SatelliteSystem" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Temperature read timed out" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The CircuitPython heap was corrupted because the stack was too small.\n" +"Increase the stack size if you know how. If not:" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The `microcontroller` module was used to boot into safe mode. Press reset to " +"exit safe mode." +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The microcontroller's power dipped. Make sure your power supply provides\n" +"enough power for the whole circuit and press reset (after ejecting " +"CIRCUITPY)." +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's bits_per_sample does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's channel count does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's sample rate does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's signedness does not match the mixer's" +msgstr "" + +#: shared-module/imagecapture/ParallelImageCapture.c +msgid "This microcontroller does not support continuous capture." +msgstr "" + +#: shared-module/paralleldisplay/ParallelBus.c +msgid "" +"This microcontroller only supports data0=, not data_pins=, because it " +"requires contiguous pins." +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile height must exactly divide bitmap height" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c +msgid "Tile index out of bounds" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile value out of bounds" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile width must exactly divide bitmap width" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "Time is in the past." +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +#, c-format +msgid "Timeout is too long: Maximum timeout length is %d seconds" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "To exit, please reset the board without " +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +msgid "Too many channels in sample." +msgstr "" + +#: shared-module/displayio/__init__.c +msgid "Too many display busses" +msgstr "" + +#: shared-module/displayio/__init__.c +msgid "Too many displays" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Total data to write is larger than %q" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/touch/TouchAlarm.c +#: ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.c +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + +#: py/obj.c +msgid "Traceback (most recent call last):\n" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "Tuple or struct_time argument required" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Buffer allocation error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART De-init error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Init Error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Re-init error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART write error" +msgstr "" + +#: shared-module/usb_hid/Device.c +msgid "USB busy" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "USB devices need more endpoints than are available." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "USB devices specify too many interface names." +msgstr "" + +#: shared-module/usb_hid/Device.c +msgid "USB error" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID integer value must be 0-0xffff" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID value is not str, int or byte buffer" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Unable to allocate buffers for signed conversion" +msgstr "" + +#: ports/espressif/common-hal/busio/I2C.c +msgid "Unable to create lock" +msgstr "" + +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c +#, c-format +msgid "Unable to find I2C Display at %x" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Unable to find free GCLK" +msgstr "" + +#: py/parse.c +msgid "Unable to init parser" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Unable to read color palette data" +msgstr "" + +#: shared-bindings/nvm/ByteArray.c +msgid "Unable to write to nvm." +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c +msgid "Unable to write to sleep_memory." +msgstr "" + +#: ports/nrf/common-hal/_bleio/UUID.c +msgid "Unexpected nrfx uuid type" +msgstr "" + +#: ports/espressif/common-hal/ssl/SSLSocket.c +#, c-format +msgid "Unhandled ESP TLS error %d %d %x %d" +msgstr "" + +#: shared-bindings/wifi/Radio.c +#, c-format +msgid "Unknown failure %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown gatt error: 0x%04x" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown security error: 0x%04x" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown system firmware error: %04x" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +#, c-format +msgid "Unmatched number of items on RHS (expected %d, got %d)." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "" +"Unspecified issue. Can be that the pairing prompt on the other device was " +"declined or ignored." +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c +msgid "Unsupported baudrate" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "Unsupported colorspace" +msgstr "" + +#: shared-module/displayio/display_core.c +msgid "Unsupported display bus type" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Unsupported format" +msgstr "" + +#: py/moduerrno.c +msgid "Unsupported operation" +msgstr "" + +#: ports/espressif/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length != required fixed length" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length > max_length" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Version was invalid" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Voltage read timed out" +msgstr "" + +#: main.c +msgid "WARNING: Your code filename has two extensions\n" +msgstr "" + +#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +#: ports/nrf/common-hal/watchdog/WatchDogTimer.c +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer is not currently running" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.timeout must be greater than 0" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Watchdog timer expired." +msgstr "" + +#: py/builtinhelp.c +#, c-format +msgid "" +"Welcome to Adafruit CircuitPython %s!\n" +"\n" +"Visit circuitpython.org for more information.\n" +"\n" +"To list built-in modules type `help(\"modules\")`.\n" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "WiFi password must be between 8 and 63 characters" +msgstr "" + +#: main.c +msgid "Woken up by alarm.\n" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Writes not supported on Characteristic" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You requested starting safe mode by " +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None" +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None, not '%q'" +msgstr "" + +#: py/objobject.c +msgid "__new__ arg must be a user-type" +msgstr "" + +#: extmod/modubinascii.c extmod/moduhashlib.c py/objarray.c +msgid "a bytes-like object is required" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "address out of bounds" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "addresses is empty" +msgstr "" + +#: py/compile.c +msgid "annotation must be an identifier" +msgstr "" + +#: py/modbuiltins.c +msgid "arg is an empty sequence" +msgstr "" + +#: py/objobject.c +msgid "arg must be user-type" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "argsort is not implemented for flattened arrays" +msgstr "" + +#: py/runtime.c shared-bindings/supervisor/__init__.c +msgid "argument has wrong type" +msgstr "" + +#: py/compile.c +msgid "argument name reused" +msgstr "" + +#: py/argcheck.c shared-bindings/_stage/__init__.c +#: shared-bindings/digitalio/DigitalInOut.c +msgid "argument num/types mismatch" +msgstr "" + +#: py/runtime.c +msgid "argument should be a '%q' not a '%q'" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c +msgid "arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "array and index length must be equal" +msgstr "" + +#: py/objarray.c shared-bindings/alarm/SleepMemory.c +#: shared-bindings/nvm/ByteArray.c +msgid "array/bytes required on right side" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "attempt to get (arg)min/(arg)max of empty sequence" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "attempt to get argmin/argmax of an empty sequence" +msgstr "" + +#: py/objstr.c +msgid "attributes not supported yet" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "axis is out of bounds" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c +msgid "axis must be None, or an integer" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "axis too long" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + +#: py/builtinevex.c +msgid "bad compile mode" +msgstr "" + +#: py/objstr.c +msgid "bad conversion specifier" +msgstr "" + +#: py/objstr.c +msgid "bad format string" +msgstr "" + +#: py/binary.c py/objarray.c +msgid "bad typecode" +msgstr "" + +#: py/emitnative.c +msgid "binary op %q not implemented" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "bitmap sizes must match" +msgstr "" + +#: extmod/modurandom.c +msgid "bits must be 32 or less" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "bits must be in range 5 to 9" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "bits_per_sample must be 8 or 16" +msgstr "" + +#: py/emitinlinethumb.c +msgid "branch not in range" +msgstr "" + +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +msgid "buffer is smaller than requested size" +msgstr "" + +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +msgid "buffer size must be a multiple of element size" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "buffer size must match format" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "buffer slices must be of equal length" +msgstr "" + +#: py/modstruct.c shared-bindings/struct/__init__.c +#: shared-module/struct/__init__.c +msgid "buffer too small" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "buffer too small for requested bytes" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +msgid "byteorder is not a string" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c +msgid "bytes > 8 bits not supported" +msgstr "" + +#: py/objarray.c +msgid "bytes length not a multiple of item size" +msgstr "" + +#: py/objstr.c +msgid "bytes value out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration is out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c +msgid "calibration is read only" +msgstr "" + +#: ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration value out of range +/-127" +msgstr "" + +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + +#: py/emitinlinethumb.c +msgid "can only have up to 4 parameters to Thumb assembly" +msgstr "" + +#: py/emitinlinextensa.c +msgid "can only have up to 4 parameters to Xtensa assembly" +msgstr "" + +#: py/objtype.c +msgid "can't add special method to already-subclassed class" +msgstr "" + +#: py/compile.c +msgid "can't assign to expression" +msgstr "" + +#: extmod/moduasyncio.c +msgid "can't cancel self" +msgstr "" + +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/adafruit_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" + +#: py/runtime.c +msgid "can't convert %q to int" +msgstr "" + +#: py/obj.c +#, c-format +msgid "can't convert %s to complex" +msgstr "" + +#: py/objstr.c +msgid "can't convert '%q' object to %q implicitly" +msgstr "" + +#: py/obj.c +msgid "can't convert to %q" +msgstr "" + +#: py/obj.c +msgid "can't convert to complex" +msgstr "" + +#: py/runtime.c +msgid "can't convert to int" +msgstr "" + +#: py/objstr.c +msgid "can't convert to str implicitly" +msgstr "" + +#: py/compile.c +msgid "can't declare nonlocal in outer code" +msgstr "" + +#: py/compile.c +msgid "can't delete expression" +msgstr "" + +#: py/emitnative.c +msgid "can't do binary op between '%q' and '%q'" +msgstr "" + +#: py/objcomplex.c +msgid "can't do truncated division of a complex number" +msgstr "" + +#: py/compile.c +msgid "can't have multiple **x" +msgstr "" + +#: py/compile.c +msgid "can't have multiple *x" +msgstr "" + +#: py/emitnative.c +msgid "can't implicitly convert '%q' to 'bool'" +msgstr "" + +#: py/emitnative.c +msgid "can't load from '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't load with '%q' index" +msgstr "" + +#: py/objgenerator.c +msgid "can't send non-None value to a just-started generator" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "can't set 512 block size" +msgstr "" + +#: py/objnamedtuple.c +msgid "can't set attribute" +msgstr "" + +#: py/emitnative.c +msgid "can't store '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store to '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store with '%q' index" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from automatic field numbering to manual field specification" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from manual field specification to automatic field numbering" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot assign new shape" +msgstr "" + +#: extmod/ulab/code/ndarray_operators.c +msgid "cannot cast output with casting rule" +msgstr "" + +#: py/objtype.c +msgid "cannot create '%q' instances" +msgstr "" + +#: py/objtype.c +msgid "cannot create instance" +msgstr "" + +#: py/runtime.c +msgid "cannot import name %q" +msgstr "" + +#: py/builtinimport.c +msgid "cannot perform relative import" +msgstr "" + +#: extmod/moductypes.c +msgid "cannot unambiguously get sizeof scalar" +msgstr "" + +#: py/emitnative.c +msgid "casting" +msgstr "" + +#: shared-bindings/_stage/Text.c +msgid "chars buffer too small" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(0x110000)" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(256)" +msgstr "" + +#: shared-module/vectorio/Circle.c +msgid "circle can only be registered in one parent" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "clip point must be (x,y) tuple" +msgstr "" + +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a buffer, tuple, list, or int" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a bytearray or array of type 'b' or 'B'" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color must be between 0x000000 and 0xffffff" +msgstr "" + +#: shared-bindings/displayio/ColorConverter.c +msgid "color should be an int" +msgstr "" + +#: py/emitnative.c +msgid "comparison of int and uint" +msgstr "" + +#: py/objcomplex.c +msgid "complex division by zero" +msgstr "" + +#: py/objfloat.c py/parsenum.c +msgid "complex values not supported" +msgstr "" + +#: extmod/moduzlib.c +msgid "compression header" +msgstr "" + +#: py/parse.c +msgid "constant must be an integer" +msgstr "" + +#: py/emitnative.c +msgid "conversion to object" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "couldn't determine SD card version" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "cross is defined for 1D arrays of length 3" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "data must be iterable" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "data must be of equal length" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "data pin #%d in use" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + +#: py/parsenum.c +msgid "decimal numbers not supported" +msgstr "" + +#: py/compile.c +msgid "default 'except' must be last" +msgstr "" + +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "" +"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination buffer must be an array of type 'H' for bit_depth = 16" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination_length must be an int >= 0" +msgstr "" + +#: py/objdict.c +msgid "dict update sequence has wrong length" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "differentiation order out of range" +msgstr "" + +#: extmod/ulab/code/numpy/transform.c +msgid "dimensions do not match" +msgstr "" + +#: py/emitnative.c +msgid "div/mod not implemented for uint" +msgstr "" + +#: py/objfloat.c py/objint_mpz.c +msgid "divide by zero" +msgstr "" + +#: py/modmath.c py/objint_longlong.c py/runtime.c +#: shared-bindings/math/__init__.c +msgid "division by zero" +msgstr "" + +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c +msgid "divisor must be 4" +msgstr "" + +#: py/objdeque.c +msgid "empty" +msgstr "" + +#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +msgid "empty heap" +msgstr "" + +#: py/objstr.c +msgid "empty separator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "empty sequence" +msgstr "" + +#: py/objstr.c +msgid "end of format while looking for conversion specifier" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "end_x should be an int" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "epoch_time not supported on this board" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c +#, c-format +msgid "error = 0x%08lX" +msgstr "" + +#: py/runtime.c +msgid "exceptions must derive from BaseException" +msgstr "" + +#: shared-bindings/canio/CAN.c +msgid "expected '%q' but got '%q'" +msgstr "" + +#: shared-bindings/canio/CAN.c +msgid "expected '%q' or '%q' but got '%q'" +msgstr "" + +#: py/objstr.c +msgid "expected ':' after format specifier" +msgstr "" + +#: py/obj.c +msgid "expected tuple/list" +msgstr "" + +#: py/modthread.c +msgid "expecting a dict for keyword args" +msgstr "" + +#: py/compile.c +msgid "expecting an assembler instruction" +msgstr "" + +#: py/compile.c +msgid "expecting just a value for set" +msgstr "" + +#: py/compile.c +msgid "expecting key:value for dict" +msgstr "" + +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + +#: py/argcheck.c +msgid "extra keyword arguments given" +msgstr "" + +#: py/argcheck.c +msgid "extra positional arguments given" +msgstr "" + +#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c +#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c +#: shared-module/gifio/GifWriter.c +msgid "file must be a file opened in byte mode" +msgstr "" + +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + +#: shared-bindings/storage/__init__.c +msgid "filesystem must provide mount method" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "first argument must be a callable" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "first argument must be a function" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "first argument must be a tuple of ndarrays" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "first argument must be an ndarray" +msgstr "" + +#: py/objtype.c +msgid "first argument to super() must be type" +msgstr "" + +#: extmod/ulab/code/scipy/linalg/linalg.c +msgid "first two arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + +#: py/objint.c +msgid "float too big" +msgstr "" + +#: py/nativeglue.c +msgid "float unsupported" +msgstr "" + +#: shared-bindings/_stage/Text.c +msgid "font must be 2048 bytes long" +msgstr "" + +#: py/objstr.c +msgid "format requires a dict" +msgstr "" + +#: py/objdeque.c +msgid "full" +msgstr "" + +#: py/argcheck.c +msgid "function doesn't take keyword arguments" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function expected at most %d arguments, got %d" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "function got multiple values for argument '%q'" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "function has the same sign at the ends of interval" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "function is defined for ndarrays only" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function missing %d required positional arguments" +msgstr "" + +#: py/bc.c +msgid "function missing keyword-only argument" +msgstr "" + +#: py/bc.c +msgid "function missing required keyword argument '%q'" +msgstr "" + +#: py/bc.c +#, c-format +msgid "function missing required positional argument #%d" +msgstr "" + +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c +#, c-format +msgid "function takes %d positional arguments but %d were given" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "function takes exactly 9 arguments" +msgstr "" + +#: py/objgenerator.c +msgid "generator already executing" +msgstr "" + +#: py/objgenerator.c +msgid "generator ignored GeneratorExit" +msgstr "" + +#: py/objgenerator.c py/runtime.c +msgid "generator raised StopIteration" +msgstr "" + +#: shared-bindings/_stage/Layer.c +msgid "graphic must be 2048 bytes long" +msgstr "" + +#: extmod/moduhashlib.c +msgid "hash is final" +msgstr "" + +#: extmod/moduheapq.c +msgid "heap must be a list" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as global" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as nonlocal" +msgstr "" + +#: py/compile.c +msgid "import * not at module level" +msgstr "" + +#: py/persistentcode.c +msgid "incompatible native .mpy architecture" +msgstr "" + +#: py/objstr.c +msgid "incomplete format" +msgstr "" + +#: py/objstr.c +msgid "incomplete format key" +msgstr "" + +#: extmod/modubinascii.c +msgid "incorrect padding" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c +msgid "index out of range" +msgstr "" + +#: py/obj.c +msgid "indices must be integers" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "initial values must be iterable" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c +msgid "initial_value length is wrong" +msgstr "" + +#: py/compile.c +msgid "inline assembler must be a function" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "input and output shapes are not compatible" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "input argument must be an integer, a tuple, or a list" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "input arrays are not compatible" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/scipy/linalg/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c +msgid "input must be a dense ndarray" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "input must be a tensor of rank 2" +msgstr "" + +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +msgid "input must be an ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "input must be one-dimensional" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "input vectors must be of equal length" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "inputs are not iterable" +msgstr "" + +#: py/parsenum.c +msgid "int() arg 2 must be >= 2 and <= 36" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "interp is defined for 1D iterables of equal length" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +#, c-format +msgid "interval must be in range %s-%s" +msgstr "" + +#: py/compile.c +msgid "invalid architecture" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + +#: extmod/modframebuf.c +msgid "invalid format" +msgstr "" + +#: py/objstr.c +msgid "invalid format specifier" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + +#: py/compile.c +msgid "invalid micropython decorator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "invalid step" +msgstr "" + +#: py/compile.c py/parse.c +msgid "invalid syntax" +msgstr "" + +#: py/parsenum.c +msgid "invalid syntax for integer" +msgstr "" + +#: py/parsenum.c +#, c-format +msgid "invalid syntax for integer with base %d" +msgstr "" + +#: py/parsenum.c +msgid "invalid syntax for number" +msgstr "" + +#: py/objexcept.c +msgid "invalid traceback" +msgstr "" + +#: py/objtype.c +msgid "issubclass() arg 1 must be a class" +msgstr "" + +#: py/objtype.c +msgid "issubclass() arg 2 must be a class or a tuple of classes" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "iterations did not converge" +msgstr "" + +#: py/objstr.c +msgid "join expects a list of str/bytes objects consistent with self object" +msgstr "" + +#: py/argcheck.c +msgid "keyword argument(s) not yet implemented - use normal args instead" +msgstr "" + +#: py/bc.c +msgid "keywords must be strings" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +msgid "label '%q' not defined" +msgstr "" + +#: py/compile.c +msgid "label redefined" +msgstr "" + +#: py/stream.c +msgid "length argument not allowed for this type" +msgstr "" + +#: shared-bindings/audiomixer/MixerVoice.c +msgid "level must be between 0 and 1" +msgstr "" + +#: py/objarray.c +msgid "lhs and rhs should be compatible" +msgstr "" + +#: py/emitnative.c +msgid "local '%q' has type '%q' but source is '%q'" +msgstr "" + +#: py/emitnative.c +msgid "local '%q' used before type known" +msgstr "" + +#: py/vm.c +msgid "local variable referenced before assignment" +msgstr "" + +#: py/objint.c +msgid "long int not supported in this build" +msgstr "" + +#: ports/espressif/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + +#: py/parse.c +msgid "malformed f-string" +msgstr "" + +#: shared-bindings/_stage/Layer.c +msgid "map buffer too small" +msgstr "" + +#: py/modmath.c shared-bindings/math/__init__.c +msgid "math domain error" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix is not positive definite" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +#, c-format +msgid "max_length must be 0-%d when fixed_length is %s" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c +msgid "max_length must be >= 0" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "maximum number of dimensions is 4" +msgstr "" + +#: py/runtime.c +msgid "maximum recursion depth exceeded" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "maxiter should be > 0" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "memory allocation failed, allocating %u bytes" +msgstr "" + +#: py/runtime.c +msgid "memory allocation failed, heap is locked" +msgstr "" + +#: py/objarray.c +msgid "memoryview: length is not a multiple of itemsize" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "mode must be complete, or reduced" +msgstr "" + +#: py/builtinimport.c +msgid "module not found" +msgstr "" + +#: ports/espressif/common-hal/wifi/Monitor.c +msgid "monitor init failed" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + +#: py/compile.c +msgid "multiple *x in assignment" +msgstr "" + +#: py/objtype.c +msgid "multiple bases have instance lay-out conflict" +msgstr "" + +#: py/objtype.c +msgid "multiple inheritance not supported" +msgstr "" + +#: py/emitnative.c +msgid "must raise an object" +msgstr "" + +#: py/modbuiltins.c +msgid "must use keyword argument for key function" +msgstr "" + +#: py/runtime.c +msgid "name '%q' is not defined" +msgstr "" + +#: py/runtime.c +msgid "name not defined" +msgstr "" + +#: py/asmthumb.c +msgid "native method too big" +msgstr "" + +#: py/emitnative.c +msgid "native yield" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "need more than %d values to unpack" +msgstr "" + +#: py/modmath.c +msgid "negative factorial" +msgstr "" + +#: py/objint_longlong.c py/objint_mpz.c py/runtime.c +msgid "negative power with no float support" +msgstr "" + +#: py/objint_mpz.c py/runtime.c +msgid "negative shift count" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "no SD card" +msgstr "" + +#: py/vm.c +msgid "no active exception to reraise" +msgstr "" + +#: py/compile.c +msgid "no binding for nonlocal found" +msgstr "" + +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + +#: extmod/modurandom.c +msgid "no default seed" +msgstr "" + +#: py/builtinimport.c +msgid "no module named '%q'" +msgstr "" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c +msgid "no reset pin available" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "no response from SD card" +msgstr "" + +#: py/objobject.c py/runtime.c +msgid "no such attribute" +msgstr "" + +#: shared-bindings/usb_hid/__init__.c +msgid "non-Device in %q" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Connection.c +msgid "non-UUID found in service_uuids_whitelist" +msgstr "" + +#: py/compile.c +msgid "non-default argument follows default argument" +msgstr "" + +#: extmod/modubinascii.c +msgid "non-hex digit found" +msgstr "" + +#: py/compile.c +msgid "non-keyword arg after */**" +msgstr "" + +#: py/compile.c +msgid "non-keyword arg after keyword arg" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "not a 128-bit UUID" +msgstr "" + +#: py/objstr.c +msgid "not all arguments converted during string formatting" +msgstr "" + +#: py/objstr.c +msgid "not enough arguments for format string" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "number of points must be at least 2" +msgstr "" + +#: py/builtinhelp.c +msgid "object " +msgstr "" + +#: py/obj.c +#, c-format +msgid "object '%s' isn't a tuple or list" +msgstr "" + +#: py/obj.c +msgid "object doesn't support item assignment" +msgstr "" + +#: py/obj.c +msgid "object doesn't support item deletion" +msgstr "" + +#: py/obj.c +msgid "object has no len" +msgstr "" + +#: py/obj.c +msgid "object isn't subscriptable" +msgstr "" + +#: py/runtime.c +msgid "object not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "object not callable" +msgstr "" + +#: py/sequence.c shared-bindings/displayio/Group.c +msgid "object not in sequence" +msgstr "" + +#: py/runtime.c +msgid "object not iterable" +msgstr "" + +#: py/obj.c +#, c-format +msgid "object of type '%s' has no len()" +msgstr "" + +#: py/obj.c +msgid "object with buffer protocol required" +msgstr "" + +#: extmod/modubinascii.c +msgid "odd-length string" +msgstr "" + +#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +msgid "offset is too large" +msgstr "" + +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "offset must be non-negative and no greater than buffer length" +msgstr "" + +#: py/objstr.c py/objstrunicode.c +msgid "offset out of bounds" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only bit_depth=16 is supported" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only sample_rate=16000 is supported" +msgstr "" + +#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "only slices with step=1 (aka None) are supported" +msgstr "" + +#: py/vm.c +msgid "opcode" +msgstr "" + +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare.c +#: extmod/ulab/code/numpy/vector.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "operation is defined for 2D arrays only" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "operation is defined for ndarrays only" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is implemented for 1D Boolean arrays only" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + +#: py/modbuiltins.c +msgid "ord expects a character" +msgstr "" + +#: py/modbuiltins.c +#, c-format +msgid "ord() expected a character, but string of length %d found" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "out of range of source" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "out of range of target" +msgstr "" + +#: py/objint_mpz.c +msgid "overflow converting long int to machine word" +msgstr "" + +#: py/modstruct.c +#, c-format +msgid "pack expected %d items for packing (got %d)" +msgstr "" + +#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c +msgid "palette must be 32 bytes long" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "palette_index should be an int" +msgstr "" + +#: py/emitinlinextensa.c +msgid "parameters must be registers in sequence a2 to a5" +msgstr "" + +#: py/emitinlinethumb.c +msgid "parameters must be registers in sequence r0 to r3" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "pixel coordinates out of bounds" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "pixel value requires too many bits" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "polygon can only be registered in one parent" +msgstr "" + +#: ports/espressif/common-hal/pulseio/PulseIn.c +msgid "pop from an empty PulseIn" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "port must be >= 0" +msgstr "" + +#: py/objint_mpz.c +msgid "pow() 3rd argument cannot be 0" +msgstr "" + +#: py/objint_mpz.c +msgid "pow() with 3 arguments requires integers" +msgstr "" + +#: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h +msgid "pressing boot button at start up.\n" +msgstr "" + +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "pressing both buttons at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "pressing the left button at start up\n" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "pull_threshold must be between 1 and 32" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "push_threshold must be between 1 and 32" +msgstr "" + +#: extmod/modutimeq.c +msgid "queue overflow" +msgstr "" + +#: py/parse.c +msgid "raw f-strings are not supported" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + +#: py/builtinimport.c +msgid "relative import" +msgstr "" + +#: py/obj.c +#, c-format +msgid "requested length %d but object has length %d" +msgstr "" + +#: extmod/ulab/code/ndarray_operators.c +msgid "results cannot be cast to specified type" +msgstr "" + +#: py/compile.c +msgid "return annotation must be an identifier" +msgstr "" + +#: py/emitnative.c +msgid "return expected '%q' but got '%q'" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] duplicates another pin assignment" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] is not on the same port as clock" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "roll argument must be an ndarray" +msgstr "" + +#: py/objstr.c +msgid "rsplit(None,n)" +msgstr "" + +#: shared-bindings/audiocore/RawSample.c +msgid "" +"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " +"'B'" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c +msgid "sampling rate out of range" +msgstr "" + +#: py/modmicropython.c +msgid "schedule queue full" +msgstr "" + +#: py/builtinimport.c +msgid "script compilation not supported" +msgstr "" + +#: py/nativeglue.c +msgid "set unsupported" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "shape must be a tuple" +msgstr "" + +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + +#: py/objstr.c +msgid "sign not allowed in string format specifier" +msgstr "" + +#: py/objstr.c +msgid "sign not allowed with integer format specifier 'c'" +msgstr "" + +#: py/objstr.c +msgid "single '}' encountered in format string" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "size is defined for ndarrays only" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "sleep length must be non-negative" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + +#: py/objslice.c +msgid "slice step cannot be zero" +msgstr "" + +#: py/nativeglue.c +msgid "slice unsupported" +msgstr "" + +#: py/objint.c py/sequence.c +msgid "small int overflow" +msgstr "" + +#: main.c +msgid "soft reboot\n" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sos array must be of shape (n_section, 6)" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sos[:, 3] should be all ones" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sosfilt requires iterable arguments" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "source palette too large" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "source_bitmap must have value_count of 2 or 65536" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "source_bitmap must have value_count of 65536" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "source_bitmap must have value_count of 8" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "ssid can't be more than 32 bytes" +msgstr "" + +#: py/objstr.c +msgid "start/end indices" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "step must be non-zero" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "stop must be 1 or 2" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "stop not reachable from start" +msgstr "" + +#: py/stream.c shared-bindings/getpass/__init__.c +msgid "stream operation not supported" +msgstr "" + +#: py/objstrunicode.c +msgid "string indices must be integers, not %q" +msgstr "" + +#: py/stream.c +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: can't index" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: index out of range" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: no fields" +msgstr "" + +#: py/objarray.c py/objstr.c +msgid "substring not found" +msgstr "" + +#: py/compile.c +msgid "super() can't find self" +msgstr "" + +#: extmod/modujson.c +msgid "syntax error in JSON" +msgstr "" + +#: extmod/moductypes.c +msgid "syntax error in uctypes descriptor" +msgstr "" + +#: shared-bindings/touchio/TouchIn.c +msgid "threshold must be in the range 0-65536" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "tile must be greater than zero" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "time.struct_time() takes a 9-sequence" +msgstr "" + +#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +#: ports/nrf/common-hal/watchdog/WatchDogTimer.c +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "timeout duration exceeded the maximum supported value" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "timeout must be 0.0-100.0 seconds" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "timeout must be >= 0.0" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v1 card" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v2 card" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "timestamp out of range for platform time_t" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "tobytes can be invoked for dense arrays only" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "too many arguments provided with the given format" +msgstr "" + +#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + +#: py/asmthumb.c +msgid "too many locals for native method" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "too many values to unpack (expected %d)" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "trapz is defined for 1D arrays of equal length" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "trapz is defined for 1D iterables" +msgstr "" + +#: py/obj.c +msgid "tuple/list has wrong length" +msgstr "" + +#: ports/espressif/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/espressif/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c +msgid "tx and rx cannot both be None" +msgstr "" + +#: py/objtype.c +msgid "type '%q' is not an acceptable base type" +msgstr "" + +#: py/objtype.c +msgid "type is not an acceptable base type" +msgstr "" + +#: py/runtime.c +msgid "type object '%q' has no attribute '%q'" +msgstr "" + +#: py/objgenerator.c +msgid "type object 'generator' has no attribute '__await__'" +msgstr "" + +#: py/objtype.c +msgid "type takes 1 or 3 arguments" +msgstr "" + +#: py/objint_longlong.c +msgid "ulonglong too large" +msgstr "" + +#: py/emitnative.c +msgid "unary op %q not implemented" +msgstr "" + +#: py/parse.c +msgid "unexpected indent" +msgstr "" + +#: py/bc.c +msgid "unexpected keyword argument" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "unexpected keyword argument '%q'" +msgstr "" + +#: py/lexer.c +msgid "unicode name escapes" +msgstr "" + +#: py/parse.c +msgid "unindent doesn't match any outer indent level" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "unknown conversion specifier %c" +msgstr "" + +#: py/objstr.c +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" + +#: py/compile.c +msgid "unknown type" +msgstr "" + +#: py/compile.c +msgid "unknown type '%q'" +msgstr "" + +#: py/objstr.c +msgid "unmatched '{' in format" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "unreadable attribute" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c +msgid "unsupported %q type" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "unsupported Thumb instruction '%s' with %d arguments" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "unsupported Xtensa instruction '%s' with %d arguments" +msgstr "" + +#: shared-module/gifio/GifWriter.c +msgid "unsupported colorspace for GifWriter" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "unsupported colorspace for dither" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "unsupported format character '%c' (0x%x) at index %d" +msgstr "" + +#: py/runtime.c +msgid "unsupported type for %q: '%q'" +msgstr "" + +#: py/runtime.c +msgid "unsupported type for operator" +msgstr "" + +#: py/runtime.c +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" + +#: py/objint.c +#, c-format +msgid "value must fit in %d byte(s)" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "value_count must be > 0" +msgstr "" + +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "watchdog not initialized" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "watchdog timeout must be greater than 0" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "width must be from 2 to 8 (inclusive), not %d" +msgstr "" + +#: shared-bindings/is31fl3741/IS31FL3741.c +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "width must be greater than zero" +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "wifi is not enabled" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "window must be <= interval" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "wrong axis index" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "wrong axis specified" +msgstr "" + +#: extmod/ulab/code/numpy/compare.c extmod/ulab/code/numpy/vector.c +msgid "wrong input type" +msgstr "" + +#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +msgid "wrong number of arguments" +msgstr "" + +#: py/runtime.c +msgid "wrong number of values to unpack" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "wrong output type" +msgstr "" + +#: shared-module/displayio/Shape.c +msgid "x value out of bounds" +msgstr "" + +#: ports/espressif/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "y should be an int" +msgstr "" + +#: shared-module/displayio/Shape.c +msgid "y value out of bounds" +msgstr "" + +#: py/objrange.c +msgid "zero step" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be an ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be of float type" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be of shape (n_section, 2)" +msgstr "" From 9d384463698ffdfe4f5c6d2db812ee24b91a8a2a Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Tue, 4 Jan 2022 21:07:56 +0100 Subject: [PATCH 158/258] Fixed build issue when INTERNAL_FLASH_FILESYSTEM, DISABLE_FILESYSTEM set --- supervisor/stub/internal_flash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supervisor/stub/internal_flash.c b/supervisor/stub/internal_flash.c index 3a4ba935de..23e843c923 100644 --- a/supervisor/stub/internal_flash.c +++ b/supervisor/stub/internal_flash.c @@ -46,7 +46,8 @@ uint32_t supervisor_flash_get_block_count(void) { return 0; } -void supervisor_flash_flush(void) { +void port_internal_flash_flush(void) { + return; } mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t num_blocks) { From 87f4205ec988c2bd6f1994271f0ab6794f248377 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 4 Jan 2022 12:29:48 -0800 Subject: [PATCH 159/258] Fix Cortex-A MMU init --- ports/broadcom/peripherals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index 4e1632ab1f..efddf1d339 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit 4e1632ab1f15996a9bbe2aa74f92bf138dff691f +Subproject commit efddf1d339f9014ccee44ba24bafb090a65b3029 From f64fede735bf258559355de243f606c720d8cb04 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 4 Jan 2022 16:11:40 -0800 Subject: [PATCH 160/258] Correct board name and fix USB with memory barrier --- ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h | 2 +- ports/broadcom/peripherals | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h index 1141520e06..389868f882 100644 --- a/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h +++ b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Raspberry Pi Zero" +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Zero W" #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index efddf1d339..44622850bf 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit efddf1d339f9014ccee44ba24bafb090a65b3029 +Subproject commit 44622850bf700fd9a1eea87250a020de7f1ead2f From 38d2472683a8c1c09b95aafa68304338fb94d368 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 4 Jan 2022 17:38:29 -0800 Subject: [PATCH 161/258] Fix cache detection on 64 bit --- ports/broadcom/peripherals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index 44622850bf..82c3fbb0d8 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit 44622850bf700fd9a1eea87250a020de7f1ead2f +Subproject commit 82c3fbb0d8622a0108003eb84d8fbdac0ac9d80e From 48d826b15d240f2a194e3aed5128981bf7b1f7c2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 4 Jan 2022 19:08:14 -0800 Subject: [PATCH 162/258] Never reset SD card pins --- ports/broadcom/common-hal/sdioio/SDCard.c | 43 ++++++++++++++++++---- ports/broadcom/common-hal/sdioio/SDCard.h | 1 + ports/broadcom/peripherals | 2 +- ports/broadcom/supervisor/internal_flash.c | 1 + 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/ports/broadcom/common-hal/sdioio/SDCard.c b/ports/broadcom/common-hal/sdioio/SDCard.c index 492d28d6d6..cb65bb1b63 100644 --- a/ports/broadcom/common-hal/sdioio/SDCard.c +++ b/ports/broadcom/common-hal/sdioio/SDCard.c @@ -235,16 +235,22 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, if (clock != NULL) { gpio_set_function(clock->number, GPIO_GPFSEL4_FSEL48_SD1_CLK); gpio_set_pull(clock->number, BP_PULL_NONE); + self->clock_pin = clock->number; gpio_set_function(command->number, GPIO_GPFSEL4_FSEL49_SD1_CMD); gpio_set_pull(command->number, BP_PULL_UP); + self->command_pin = command->number; gpio_set_function(data[0]->number, GPIO_GPFSEL5_FSEL50_SD1_DAT0); gpio_set_pull(data[0]->number, BP_PULL_UP); + self->data_pins[0] = data[0]->number; gpio_set_function(data[1]->number, GPIO_GPFSEL5_FSEL51_SD1_DAT1); gpio_set_pull(data[1]->number, BP_PULL_UP); + self->data_pins[1] = data[1]->number; gpio_set_function(data[2]->number, GPIO_GPFSEL5_FSEL52_SD1_DAT2); gpio_set_pull(data[2]->number, BP_PULL_UP); + self->data_pins[2] = data[2]->number; gpio_set_function(data[3]->number, GPIO_GPFSEL5_FSEL53_SD1_DAT3); gpio_set_pull(data[3]->number, BP_PULL_UP); + self->data_pins[3] = data[3]->number; } else { // Switch the sdcard to use the old arasan interface. GPIO->EXTRA_MUX_b.SDIO = GPIO_EXTRA_MUX_SDIO_ARASAN; @@ -280,7 +286,19 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, // Start clocking the card. _set_card_clk(0, 400); - sdmmc_card_init(&self->host_info, &self->card_info); + sdmmc_err_t err = SDMMC_ERR_INVALID_RESPONSE; + size_t tries = 3; + while (err == SDMMC_ERR_INVALID_RESPONSE && tries > 0) { + err = sdmmc_card_init(&self->host_info, &self->card_info); + if (err != SDMMC_OK) { + mp_printf(&mp_plat_print, "SD card init failed %d\n", err); + } else if (tries < 3) { + mp_printf(&mp_plat_print, "SD card init success\n"); + } + tries--; + } + + self->init = err == SDMMC_OK; self->capacity = self->card_info.csd.capacity; } @@ -297,9 +315,6 @@ uint8_t common_hal_sdioio_sdcard_get_width(sdioio_sdcard_obj_t *self) { return self->num_data; } -STATIC void check_for_deinit(sdioio_sdcard_obj_t *self) { -} - STATIC void check_whole_block(mp_buffer_info_t *bufinfo) { if (bufinfo->len % 512) { mp_raise_ValueError(translate("Buffer length must be a multiple of 512")); @@ -307,11 +322,12 @@ STATIC void check_whole_block(mp_buffer_info_t *bufinfo) { } int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t start_block, mp_buffer_info_t *bufinfo) { - check_for_deinit(self); + if (!self->init) { + return -EIO; + } check_whole_block(bufinfo); self->state_programming = true; - // mp_printf(&mp_plat_print, "write %d %d %d %d\n", start_block, bufinfo->len / 512, self->card_info.csd.capacity, self->card_info.csd.sector_size); sdmmc_err_t error = sdmmc_write_sectors(&self->card_info, bufinfo->buf, start_block, bufinfo->len / 512); @@ -325,7 +341,9 @@ int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t sta } int common_hal_sdioio_sdcard_readblocks(sdioio_sdcard_obj_t *self, uint32_t start_block, mp_buffer_info_t *bufinfo) { - check_for_deinit(self); + if (!self->init) { + return -EIO; + } check_whole_block(bufinfo); sdmmc_err_t error = sdmmc_read_sectors(&self->card_info, bufinfo->buf, start_block, bufinfo->len / 512); @@ -339,7 +357,9 @@ int common_hal_sdioio_sdcard_readblocks(sdioio_sdcard_obj_t *self, uint32_t star } bool common_hal_sdioio_sdcard_configure(sdioio_sdcard_obj_t *self, uint32_t frequency, uint8_t bits) { - check_for_deinit(self); + if (!self->init) { + return false; + } return true; } @@ -361,7 +381,14 @@ void common_hal_sdioio_sdcard_deinit(sdioio_sdcard_obj_t *self) { self->data_pins[1] = COMMON_HAL_MCU_NO_PIN; self->data_pins[2] = COMMON_HAL_MCU_NO_PIN; self->data_pins[3] = COMMON_HAL_MCU_NO_PIN; + self->init = false; } void common_hal_sdioio_sdcard_never_reset(sdioio_sdcard_obj_t *self) { + never_reset_pin_number(self->command_pin); + never_reset_pin_number(self->clock_pin); + never_reset_pin_number(self->data_pins[0]); + never_reset_pin_number(self->data_pins[1]); + never_reset_pin_number(self->data_pins[2]); + never_reset_pin_number(self->data_pins[3]); } diff --git a/ports/broadcom/common-hal/sdioio/SDCard.h b/ports/broadcom/common-hal/sdioio/SDCard.h index ebd8e13f34..d180bc19a2 100644 --- a/ports/broadcom/common-hal/sdioio/SDCard.h +++ b/ports/broadcom/common-hal/sdioio/SDCard.h @@ -37,6 +37,7 @@ typedef struct { uint8_t num_data; bool state_programming; bool has_lock; + bool init; uint8_t command_pin; uint8_t clock_pin; uint8_t data_pins[4]; diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index 82c3fbb0d8..24578e029b 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit 82c3fbb0d8622a0108003eb84d8fbdac0ac9d80e +Subproject commit 24578e029babb1a01ef8641ca6019f1a86992ff4 diff --git a/ports/broadcom/supervisor/internal_flash.c b/ports/broadcom/supervisor/internal_flash.c index 08c10848a8..806d3fb18b 100644 --- a/ports/broadcom/supervisor/internal_flash.c +++ b/ports/broadcom/supervisor/internal_flash.c @@ -60,6 +60,7 @@ void supervisor_flash_init(void) { NULL, NULL, 0, NULL, 8000000); #endif + common_hal_sdioio_sdcard_never_reset(&sd); uint32_t buffer[512 / sizeof(uint32_t)]; mp_buffer_info_t bufinfo; From 2f6ef766ea89c095abe4b0897fd617704305f355 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 5 Jan 2022 12:24:48 +0530 Subject: [PATCH 163/258] remove instance parameter --- shared-bindings/board/__init__.c | 24 +++++++++++++++--------- shared-bindings/board/__init__.h | 6 +++--- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index b9a0bb489a..15953f2475 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -64,9 +64,8 @@ STATIC mp_int_t board_get_instance(size_t n_args, const mp_obj_t *args, const mp } #endif -//| def I2C(instance: Optional[int] = 0) -> busio.I2C: +//| def I2C() -> busio.I2C: //| """Returns the `busio.I2C` object for the board's designated I2C bus(es). -//| If there is more than one default I2C bus, the buses are numbered starting at 0. //| The object created is a singleton, and uses the default parameter values for `busio.I2C`.""" //| ... //| @@ -85,11 +84,13 @@ mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args) { return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_i2c_obj, 0, 1, board_i2c); +STATIC mp_obj_t board_i2c_0(void) { + return board_i2c(0, NULL); +} +MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c_0); -//| def SPI(instance: Optional[int] = 0) -> busio.SPI: +//| def SPI() -> busio.SPI: //| """Returns the `busio.SPI` object for the board's designated SPI bus(es). -//| If there is more than one default SPI bus, the buses are numbered starting at 0. //| The object created is a singleton, and uses the default parameter values for `busio.SPI`.""" //| ... //| @@ -108,11 +109,13 @@ mp_obj_t board_spi(size_t n_args, const mp_obj_t *args) { return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_spi_obj, 0, 1, board_spi); +STATIC mp_obj_t board_spi_0(void) { + return board_spi(0, NULL); +} +MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi_0); -//| def UART(instance: Optional[int] = 0) -> busio.UART: +//| def UART() -> busio.UART: //| """Returns the `busio.UART` object for the board's designated UART bus(es). -//| If there is more than one default UART bus, the buses are numbered starting at 0. //| The object created is a singleton, and uses the default parameter values for `busio.UART`.""" //| ... //| @@ -131,7 +134,10 @@ mp_obj_t board_uart(size_t n_args, const mp_obj_t *args) { return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(board_uart_obj, 0, 1, board_uart); +STATIC mp_obj_t board_uart_0(void) { + return board_uart(0, NULL); +} +MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart_0); const mp_obj_module_t board_module = { .base = { &mp_type_module }, diff --git a/shared-bindings/board/__init__.h b/shared-bindings/board/__init__.h index 8755e78663..240497a639 100644 --- a/shared-bindings/board/__init__.h +++ b/shared-bindings/board/__init__.h @@ -39,19 +39,19 @@ bool common_hal_board_is_i2c(mp_obj_t obj); mp_obj_t common_hal_board_get_i2c(const mp_int_t instance); mp_obj_t common_hal_board_create_i2c(const mp_int_t instance); mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args); -MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_i2c_obj); +MP_DECLARE_CONST_FUN_OBJ_0(board_i2c_obj); bool common_hal_board_is_spi(mp_obj_t obj); mp_obj_t common_hal_board_get_spi(const mp_int_t instance); mp_obj_t common_hal_board_create_spi(const mp_int_t instance); mp_obj_t board_spi(size_t n_args, const mp_obj_t *args); -MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_spi_obj); +MP_DECLARE_CONST_FUN_OBJ_0(board_spi_obj); bool common_hal_board_is_uart(mp_obj_t obj); mp_obj_t common_hal_board_get_uart(const mp_int_t instance); mp_obj_t common_hal_board_create_uart(const mp_int_t instance); mp_obj_t board_uart(size_t n_args, const mp_obj_t *args); -MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(board_uart_obj); +MP_DECLARE_CONST_FUN_OBJ_0(board_uart_obj); #define CIRCUITPY_BOARD_BUS_SINGLETON(name, bus, instance) \ STATIC mp_obj_t board_##name(void) { \ From 6dbb66278717dbb4114ecba7fe7accd3aed97459 Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Wed, 5 Jan 2022 19:28:07 +0100 Subject: [PATCH 164/258] Allow to tailor tinyusb configuration for port specific needs --- py/circuitpy_mpconfig.mk | 7 +++++++ supervisor/shared/usb/tusb_config.h | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 042fedb672..14852580e5 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -463,6 +463,13 @@ CFLAGS += -DCIRCUITPY_WATCHDOG=$(CIRCUITPY_WATCHDOG) CIRCUITPY_WIFI ?= 0 CFLAGS += -DCIRCUITPY_WIFI=$(CIRCUITPY_WIFI) +# tinyusb port tailored configuration +CIRCUITPY_TUSB_MEM_ALIGN ?= 4 +CFLAGS += -DCIRCUITPY_TUSB_MEM_ALIGN=$(CIRCUITPY_TUSB_MEM_ALIGN) + +CIRCUITPY_TUSB_ATTR_USBRAM ?= ".bss.usbram" +CFLAGS += -DCIRCUITPY_TUSB_ATTR_USBRAM=$(CIRCUITPY_TUSB_ATTR_USBRAM) + # Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk # $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. # This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. diff --git a/supervisor/shared/usb/tusb_config.h b/supervisor/shared/usb/tusb_config.h index e75a653244..15d539c450 100644 --- a/supervisor/shared/usb/tusb_config.h +++ b/supervisor/shared/usb/tusb_config.h @@ -96,8 +96,18 @@ extern "C" { // --------------------------------------------------------------------+ // USB RAM PLACEMENT // --------------------------------------------------------------------+ -#define CFG_TUSB_ATTR_USBRAM -#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4))) +#if !defined(CIRCUITPY_TUSB_ATTR_USBRAM) +#define CIRCUITPY_TUSB_ATTR_USBRAM ".bss.usbram" +#endif + +#define CFG_TUSB_ATTR_USBRAM __attribute__((section(CIRCUITPY_TUSB_ATTR_USBRAM))) + + +#if !defined(CIRCUITPY_TUSB_MEM_ALIGN) +#define CIRCUITPY_TUSB_MEM_ALIGN 4 +#endif + +#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(CIRCUITPY_TUSB_MEM_ALIGN))) #ifdef __cplusplus From da58c029a0079db62c2eeb40ac1dfdf1959b4e0a Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Wed, 5 Jan 2022 20:48:44 +0100 Subject: [PATCH 165/258] Introduced ringbuf_init to perform static buffer initialisation --- py/ringbuf.c | 14 +++++++++++++- py/ringbuf.h | 7 +++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/py/ringbuf.c b/py/ringbuf.c index a904a37413..a720abc7d7 100644 --- a/py/ringbuf.c +++ b/py/ringbuf.c @@ -27,11 +27,20 @@ #include "ringbuf.h" +bool ringbuf_init(ringbuf_t *r, uint8_t *buf, size_t capacity) { + r->heap = false; + r->buf = buf; + r->size = capacity + 1; + r->iget = r->iput = 0; + return r->buf != NULL; +} + // Dynamic initialization. This should be accessible from a root pointer. // capacity is the number of bytes the ring buffer can hold. The actual // size of the buffer is one greater than that, due to how the buffer // handles empty and full statuses. bool ringbuf_alloc(ringbuf_t *r, size_t capacity, bool long_lived) { + r->heap = true; r->buf = gc_alloc(capacity + 1, false, long_lived); r->size = capacity + 1; r->iget = r->iput = 0; @@ -39,7 +48,10 @@ bool ringbuf_alloc(ringbuf_t *r, size_t capacity, bool long_lived) { } void ringbuf_free(ringbuf_t *r) { - gc_free(r->buf); + if (r->heap) { + gc_free(r->buf); + } + r->buf = (uint8_t *)NULL; r->size = 0; ringbuf_clear(r); } diff --git a/py/ringbuf.h b/py/ringbuf.h index 35550d7750..6ed72dcf1a 100644 --- a/py/ringbuf.h +++ b/py/ringbuf.h @@ -37,14 +37,13 @@ typedef struct _ringbuf_t { uint32_t size; uint32_t iget; uint32_t iput; + bool heap; } ringbuf_t; // Note that the capacity of the buffer is N-1! -// Static initialization: -// byte buf_array[N]; -// ringbuf_t buf = {buf_array, sizeof(buf_array)}; - +// For static initialization use ringbuf_init() +bool ringbuf_init(ringbuf_t *r, uint8_t *buf, size_t capacity); bool ringbuf_alloc(ringbuf_t *r, size_t capacity, bool long_lived); void ringbuf_free(ringbuf_t *r); size_t ringbuf_capacity(ringbuf_t *r); From 12046323a2f3953d48f1676933116db4ea5724ba Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Thu, 6 Jan 2022 09:27:44 +0100 Subject: [PATCH 166/258] Fixed unit port build issue --- ports/unix/coverage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c index cdab9b8ef4..16287fdc01 100644 --- a/ports/unix/coverage.c +++ b/ports/unix/coverage.c @@ -527,7 +527,8 @@ STATIC mp_obj_t extra_coverage(void) { // ringbuf { byte buf[100]; - ringbuf_t ringbuf = {buf, sizeof(buf), 0, 0}; + ringbuf_t ringbuf; + ringbuf_init(&ringbuf, &buf[0], sizeof(buf)); mp_printf(&mp_plat_print, "# ringbuf\n"); From ee8000050de841272d2be6ca1037c1ef742c20ff Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Thu, 6 Jan 2022 13:00:20 +0100 Subject: [PATCH 167/258] Fixed unix port extra_coverage test failure --- tests/unix/extra_coverage.py.exp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index 4cce80a412..eca4fdc193 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -99,21 +99,21 @@ KeyboardInterrupt: KeyboardInterrupt: 10 # ringbuf -99 0 -98 1 +100 0 +99 1 22 -99 0 -97 2 +100 0 +98 2 aa55 -99 0 -0 99 +100 0 +1 99 -1 -1 98 --1 -2 97 +2 98 0 -cc99 -99 0 +1 99 +-1 +3377 +100 0 0 11bb 0 From f3bd397639134a01c974c090888687aee5c5ba48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20Ko=C3=A7marl=C4=B1?= Date: Wed, 5 Jan 2022 09:45:33 +0000 Subject: [PATCH 168/258] Translated using Weblate (Turkish) Currently translated at 4.4% (46 of 1031 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/tr/ --- locale/tr.po | 100 +++++++++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 42 deletions(-) diff --git a/locale/tr.po b/locale/tr.po index 954c417359..54fc7120a2 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -7,25 +7,31 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2022-01-06 14:54+0000\n" +"Last-Translator: Gökhan Koçmarlı \n" "Language-Team: none\n" "Language: tr\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.10.1\n" #: main.c msgid "" "\n" "Code done running.\n" msgstr "" +"\n" +"Program çalıştırıldı.\n" #: main.c msgid "" "\n" "Code stopped by auto-reload.\n" msgstr "" +"\n" +"Program otomatik yeniden yükleme tarafından sonlandırıldı.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -33,53 +39,59 @@ msgid "" "Please file an issue with the contents of your CIRCUITPY drive at \n" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" +"\n" +"Lütfen, şu adrese CIRCUITPY sürücünüzün içerikleri ile beraber bir hata/konu " +"kaydı ekleyin\n" +"https://github.com/adafruit/circuitpython/issues\n" #: py/obj.c msgid " File \"%q\"" -msgstr "" +msgstr " \"%q\" dosyası" #: py/obj.c msgid " File \"%q\", line %d" -msgstr "" +msgstr " \"%q\" dosyası, %d numaralı satır" #: py/builtinhelp.c msgid " is of type %q\n" -msgstr "" +msgstr " nesnesi, %q tipindedir\n" #: main.c msgid " not found.\n" -msgstr "" +msgstr " bulunamadı.\n" #: main.c msgid " output:\n" -msgstr "" +msgstr " çıktı:\n" #: py/objstr.c #, c-format msgid "%%c requires int or char" -msgstr "" +msgstr "%%c int veya char tipine ihtiyaç duyar" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" +"%d adres pinleri, %d RGB pinleri ve %d döşemeleri %d'nin yüksekliği " +"gösterir, %d'nin değil" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" -msgstr "" +msgstr "%q ve %q yinelenen pinler içeriyor" #: shared-bindings/microcontroller/Pin.c msgid "%q contains duplicate pins" -msgstr "" +msgstr "%q yinelenen pinler içeriyor" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" -msgstr "" +msgstr "%q hata: %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" -msgstr "" +msgstr "%q kullanımda" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -88,35 +100,35 @@ msgstr "" #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" -msgstr "" +msgstr "%q indeksi aralık dışında" #: py/obj.c msgid "%q indices must be integers, not %s" -msgstr "" +msgstr "%q indeksleri integer olmalı, %s değil" #: py/argcheck.c msgid "%q length must be %d-%d" -msgstr "" +msgstr "%q boyutları %d-%d olmalıdır" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" -msgstr "" +msgstr "%q boyutu >=1 olmalıdır" #: py/argcheck.c msgid "%q must be %d-%d" -msgstr "" +msgstr "%q, %d-%d olmalıdır" #: py/argcheck.c shared-bindings/gifio/GifWriter.c msgid "%q must be <= %d" -msgstr "" +msgstr "%q <= %d olmalıdır" #: py/argcheck.c msgid "%q must be >= %d" -msgstr "" +msgstr "%q >= %d olmalıdır" #: py/argcheck.c shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q >= 0 olmalıdır" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -124,86 +136,86 @@ msgstr "" #: shared-bindings/memorymonitor/AllocationAlarm.c #: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c msgid "%q must be >= 1" -msgstr "" +msgstr "%q >= 1 olmalıdır" #: py/argcheck.c msgid "%q must be a string" -msgstr "" +msgstr "%q bir string olmalıdır" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" -msgstr "" +msgstr "%q, boyutu 2 olan bir tuple olmalıdır" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c #: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" -msgstr "" +msgstr "%q, %d ile %d arasında olmalıdır" #: py/argcheck.c msgid "%q must be of type %q" -msgstr "" +msgstr "%q, %q türünde olmalıdır" #: shared-bindings/digitalio/Pull.c msgid "%q must be of type %q or None" -msgstr "" +msgstr "%q, %q ya da None türünde olmalıdır" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" -msgstr "" +msgstr "%q, 2'nin kuvveti olmalıdır" #: shared-bindings/wifi/Monitor.c msgid "%q out of bounds" -msgstr "" +msgstr "%q sınırların dışında" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: shared-bindings/canio/Match.c msgid "%q out of range" -msgstr "" +msgstr "%q aralık dışında" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" -msgstr "" +msgstr "%q pini geçersiz" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" -msgstr "" +msgstr "%q bir int olmalıdır" #: shared-bindings/usb_hid/Device.c msgid "%q with a report ID of 0 must be of length 1" -msgstr "" +msgstr "Rapor kimliği 0 olan %q, 1 uzunluğunda olmalıdır" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" -msgstr "" +msgstr "%q(), %d konumsal argümanını alır ancak %d verildi" #: shared-bindings/usb_hid/Device.c msgid "%q, %q, and %q must all be the same length" -msgstr "" +msgstr "%q, %q ve %q aynı uzunlukta olmalıdır" #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" -msgstr "" +msgstr "%s hatası 0x%x" #: py/argcheck.c msgid "'%q' argument required" -msgstr "" +msgstr "'%q' argümanı gerekli" #: py/proto.c msgid "'%q' object does not support '%q'" -msgstr "" +msgstr "'%q' nesnesi '%q' öğesini desteklemiyor" #: py/runtime.c msgid "'%q' object is not an iterator" -msgstr "" +msgstr "'%q' nesnesi bir iteratör değildir" #: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" -msgstr "" +msgstr "'%q' nesnesi çağrılabilir değil" #: py/runtime.c msgid "'%q' object is not iterable" -msgstr "" +msgstr "'%q' nesnesi iterable değildir" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format @@ -340,7 +352,7 @@ msgstr "" #: py/obj.c msgid ", in %q\n" -msgstr "" +msgstr ", içinde %q\n" #: py/objcomplex.c msgid "0.0 to a complex power" @@ -525,13 +537,15 @@ msgstr "" #: main.c msgid "Auto-reload is off.\n" -msgstr "" +msgstr "Otomatik yeniden yükleme devre dışı.\n" #: main.c msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" +"Otomatik yeniden yükleme aktif. Dosyaları çalıştırmak için USB aracılığı ile " +"kaydedin ya da deaktif etmek için REPL moda girin.\n" #: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" @@ -1947,6 +1961,8 @@ msgstr "" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" +"REPL moda girmek için herhangi bir tuşa basınız. Programı yeniden yüklemek " +"için CTRL+D tuş kombinasyonunu kullanabilirsiniz.\n" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" From 2a2f94df15d9b41eedf6940ec89c4c59334efd52 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 6 Jan 2022 08:52:33 -0800 Subject: [PATCH 169/258] Update tinyusb for zero support --- lib/tinyusb | 2 +- ports/broadcom/common-hal/neopixel_write/__init__.c | 2 +- ports/broadcom/common-hal/sdioio/SDCard.c | 9 ++++++++- ports/broadcom/peripherals | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/tinyusb b/lib/tinyusb index ae73873b5c..3b09b82123 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit ae73873b5cba0eb11c89165f4559964940430d44 +Subproject commit 3b09b82123a50bef6b18cf90c2734ae7581da4a3 diff --git a/ports/broadcom/common-hal/neopixel_write/__init__.c b/ports/broadcom/common-hal/neopixel_write/__init__.c index 5a82797909..0cd76ebca9 100644 --- a/ports/broadcom/common-hal/neopixel_write/__init__.c +++ b/ports/broadcom/common-hal/neopixel_write/__init__.c @@ -49,7 +49,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, } BP_Function_Enum alt_function = GPIO_FUNCTION_OUTPUT; - uint8_t index; + uint8_t index = 0; uint8_t channel = 0; bool found = false; for (size_t i = 0; i < NUM_ALT_FUNC; i++) { diff --git a/ports/broadcom/common-hal/sdioio/SDCard.c b/ports/broadcom/common-hal/sdioio/SDCard.c index cb65bb1b63..85a84ac213 100644 --- a/ports/broadcom/common-hal/sdioio/SDCard.c +++ b/ports/broadcom/common-hal/sdioio/SDCard.c @@ -37,6 +37,7 @@ #include "supervisor/port.h" #include "supervisor/shared/translate.h" +#include "peripherals/broadcom/cpu.h" #include "peripherals/broadcom/defines.h" #include "peripherals/broadcom/gpio.h" @@ -256,6 +257,8 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, GPIO->EXTRA_MUX_b.SDIO = GPIO_EXTRA_MUX_SDIO_ARASAN; } + COMPLETE_MEMORY_READS; + self->host_info = (sdmmc_host_t) { .flags = SDMMC_HOST_FLAG_1BIT | SDMMC_HOST_FLAG_4BIT | SDMMC_HOST_FLAG_DEINIT_ARG, .slot = 0, @@ -301,6 +304,7 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, self->init = err == SDMMC_OK; self->capacity = self->card_info.csd.capacity; + COMPLETE_MEMORY_READS; } uint32_t common_hal_sdioio_sdcard_get_count(sdioio_sdcard_obj_t *self) { @@ -328,9 +332,10 @@ int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t sta check_whole_block(bufinfo); self->state_programming = true; + COMPLETE_MEMORY_READS; sdmmc_err_t error = sdmmc_write_sectors(&self->card_info, bufinfo->buf, start_block, bufinfo->len / 512); - + COMPLETE_MEMORY_READS; if (error != SDMMC_OK) { mp_printf(&mp_plat_print, "write sectors result %d\n", error); @@ -345,8 +350,10 @@ int common_hal_sdioio_sdcard_readblocks(sdioio_sdcard_obj_t *self, uint32_t star return -EIO; } check_whole_block(bufinfo); + COMPLETE_MEMORY_READS; sdmmc_err_t error = sdmmc_read_sectors(&self->card_info, bufinfo->buf, start_block, bufinfo->len / 512); + COMPLETE_MEMORY_READS; if (error != SDMMC_OK) { mp_printf(&mp_plat_print, "read sectors result %d when reading block %d for %d\n", error, start_block, bufinfo->len / 512); diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index 24578e029b..0837008608 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit 24578e029babb1a01ef8641ca6019f1a86992ff4 +Subproject commit 08370086080759ed54ac1136d62d2ad24c6fa267 From fa272f5a706f6fd6080bdef6b1baf414fef7508f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 6 Jan 2022 10:24:02 -0800 Subject: [PATCH 170/258] Fix iMX and zero_w build extension --- ports/mimxrt10xx/Makefile | 2 +- tools/build_board_info.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/mimxrt10xx/Makefile b/ports/mimxrt10xx/Makefile index dd691a12e9..0ac74579a7 100644 --- a/ports/mimxrt10xx/Makefile +++ b/ports/mimxrt10xx/Makefile @@ -156,7 +156,7 @@ SRC_C += \ boards/$(BOARD)/flash_config.c \ boards/$(BOARD)/pins.c \ fatfs_port.c \ - lib/tinyusb/src/portable/nxp/transdimension/dcd_transdimension.c \ + lib/tinyusb/src/portable/chipidea/ci_hs/dcd_ci_hs.c \ mphalport.c \ peripherals/mimxrt10xx/$(CHIP_FAMILY)/clocks.c \ peripherals/mimxrt10xx/$(CHIP_FAMILY)/periph.c \ diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 3ebd799b11..ca080ac9cc 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -32,6 +32,7 @@ DFU = ("dfu",) BIN_DFU = ("bin", "dfu") COMBINED_HEX = ("combined.hex",) KERNEL8_IMG = ("disk.img.zip", "kernel8.img") +KERNEL_IMG = ("disk.img.zip", "kernel.img") # Default extensions extension_by_port = { @@ -70,6 +71,8 @@ extension_by_board = { # esp32c3 "ai_thinker_esp32-c3s": BIN, "microdev_micro_c3": BIN, + # broadcom + "raspberrypi_zero_w": KERNEL_IMG, } language_allow_list = set( From 1fb4f02de27654d15890f317f77602641bafbdb2 Mon Sep 17 00:00:00 2001 From: Brian Dean Date: Thu, 6 Jan 2022 16:32:17 -0500 Subject: [PATCH 171/258] ports/atmel-samd/boards/bdmicro_vina_d51/pins.c: Add LED_AUX pin. --- ports/atmel-samd/boards/bdmicro_vina_d51/pins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index 3a9dbc929c..925c5a525f 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -85,6 +85,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_LED_AUX), MP_ROM_PTR(&pin_PC26) }, { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB15) }, From 5256748b1bd53c19f1b1694fff57069f51f04847 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 6 Jan 2022 14:36:16 -0800 Subject: [PATCH 172/258] Fix up filesystem safe mode comment --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 391107aeb6..555e8fafb4 100644 --- a/main.c +++ b/main.c @@ -812,7 +812,8 @@ int __attribute__((used)) main(void) { // A power brownout here could make it appear as if there's // no SPI flash filesystem, and we might erase the existing one. - // Check whether CIRCUITPY is available. Don't check if it already hasn't been found. + // Check whether CIRCUITPY is available. No need to reset to get safe mode + // since we haven't run user code yet. if (!filesystem_init(safe_mode == NO_SAFE_MODE, false)) { safe_mode = NO_CIRCUITPY; } From 0b5681a310f37fe83d965ec2d1dc9671fd92c00d Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Fri, 7 Jan 2022 09:46:16 +0100 Subject: [PATCH 173/258] Added execution permission for board and memory info python scripts --- tools/build_board_info.py | 0 tools/build_memory_info.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/build_board_info.py mode change 100644 => 100755 tools/build_memory_info.py diff --git a/tools/build_board_info.py b/tools/build_board_info.py old mode 100644 new mode 100755 diff --git a/tools/build_memory_info.py b/tools/build_memory_info.py old mode 100644 new mode 100755 From 990c00209fdddc8bc4a2760310599ecb7960a1b5 Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Fri, 7 Jan 2022 09:47:25 +0100 Subject: [PATCH 174/258] Removed obsolete file. --- tools/uf2conv.py | 369 ----------------------------------------------- 1 file changed, 369 deletions(-) delete mode 100755 tools/uf2conv.py diff --git a/tools/uf2conv.py b/tools/uf2conv.py deleted file mode 100755 index d67a55224c..0000000000 --- a/tools/uf2conv.py +++ /dev/null @@ -1,369 +0,0 @@ -#!/usr/bin/env python3 - -# Microsoft UF2 -# -# The MIT License (MIT) -# -# Copyright (c) Microsoft Corporation -# -# All rights reserved. -# -# 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. - -import sys -import struct -import subprocess -import re -import os -import os.path -import argparse - - -UF2_MAGIC_START0 = 0x0A324655 # "UF2\n" -UF2_MAGIC_START1 = 0x9E5D5157 # Randomly selected -UF2_MAGIC_END = 0x0AB16F30 # Ditto - -families = { - "SAMD21": 0x68ED2B88, - "SAMD51": 0x55114460, - "NRF52": 0x1B57745F, - "STM32F1": 0x5EE21072, - "STM32F4": 0x57755A57, - "ATMEGA32": 0x16573617, -} - -INFO_FILE = "/INFO_UF2.TXT" - -appstartaddr = 0x2000 -familyid = 0x0 - - -def is_uf2(buf): - w = struct.unpack(" 476: - assert False, "Invalid UF2 data size at " + ptr - newaddr = hd[3] - if curraddr == None: - appstartaddr = newaddr - curraddr = newaddr - padding = newaddr - curraddr - if padding < 0: - assert False, "Block out of order at " + ptr - if padding > 10 * 1024 * 1024: - assert False, "More than 10M of padding needed at " + ptr - if padding % 4 != 0: - assert False, "Non-word padding size at " + ptr - while padding > 0: - padding -= 4 - outp += b"\x00\x00\x00\x00" - outp += block[32 : 32 + datalen] - curraddr = newaddr + datalen - return outp - - -def convert_to_carray(file_content): - outp = "const unsigned char bindata[] __attribute__((aligned(16))) = {" - for i in range(len(file_content)): - if i % 16 == 0: - outp += "\n" - outp += "0x%02x, " % ord(file_content[i]) - outp += "\n};\n" - return outp - - -def convert_to_uf2(file_content): - global familyid - datapadding = b"" - while len(datapadding) < 512 - 256 - 32 - 4: - datapadding += b"\x00\x00\x00\x00" - numblocks = (len(file_content) + 255) // 256 - outp = b"" - for blockno in range(numblocks): - ptr = 256 * blockno - chunk = file_content[ptr : ptr + 256] - flags = 0x0 - if familyid: - flags |= 0x2000 - hd = struct.pack( - b"= 3 and words[1] == "2" and words[2] == "FAT": - drives.append(words[0]) - else: - rootpath = "/media" - if sys.platform == "darwin": - rootpath = "/Volumes" - elif sys.platform == "linux": - tmp = rootpath + "/" + os.environ["USER"] - if os.path.isdir(tmp): - rootpath = tmp - for d in os.listdir(rootpath): - drives.append(os.path.join(rootpath, d)) - - def has_info(d): - try: - return os.path.isfile(d + INFO_FILE) - except: - return False - - return list(filter(has_info, drives)) - - -def board_id(path): - with open(path + INFO_FILE, mode="r") as file: - file_content = file.read() - return re.search("Board-ID: ([^\r\n]*)", file_content).group(1) - - -def list_drives(): - for d in get_drives(): - print(d, board_id(d)) - - -def write_file(name, buf): - with open(name, "wb") as f: - f.write(buf) - print("Wrote %d bytes to %s." % (len(buf), name)) - - -def main(): - global appstartaddr, familyid - - def error(msg): - print(msg) - sys.exit(1) - - parser = argparse.ArgumentParser(description="Convert to UF2 or flash directly.") - parser.add_argument( - "input", metavar="INPUT", type=str, nargs="?", help="input file (HEX, BIN or UF2)" - ) - parser.add_argument( - "-b", - "--base", - dest="base", - type=str, - default="0x2000", - help="set base address of application for BIN format (default: 0x2000)", - ) - parser.add_argument( - "-o", - "--output", - metavar="FILE", - dest="output", - type=str, - help='write output to named file; defaults to "flash.uf2" or "flash.bin" where sensible', - ) - parser.add_argument("-d", "--device", dest="device_path", help="select a device path to flash") - parser.add_argument("-l", "--list", action="store_true", help="list connected devices") - parser.add_argument("-c", "--convert", action="store_true", help="do not flash, just convert") - parser.add_argument( - "-f", - "--family", - dest="family", - type=str, - default="0x0", - help="specify familyID - number or name (default: 0x0)", - ) - parser.add_argument( - "-C", "--carray", action="store_true", help="convert binary file to a C array, not UF2" - ) - args = parser.parse_args() - appstartaddr = int(args.base, 0) - - if args.family.upper() in families: - familyid = families[args.family.upper()] - else: - try: - familyid = int(args.family, 0) - except ValueError: - error("Family ID needs to be a number or one of: " + ", ".join(families.keys())) - - if args.list: - list_drives() - else: - if not args.input: - error("Need input file") - with open(args.input, mode="rb") as f: - inpbuf = f.read() - from_uf2 = is_uf2(inpbuf) - ext = "uf2" - if from_uf2: - outbuf = convert_from_uf2(inpbuf) - ext = "bin" - elif is_hex(inpbuf): - outbuf = convert_from_hex_to_uf2(inpbuf.decode("utf-8")) - elif args.carray: - outbuf = convert_to_carray(inpbuf) - ext = "h" - else: - outbuf = convert_to_uf2(inpbuf) - print( - "Converting to %s, output size: %d, start address: 0x%x" - % (ext, len(outbuf), appstartaddr) - ) - if args.convert: - drives = [] - if args.output == None: - args.output = "flash." + ext - else: - drives = get_drives() - - if args.output: - write_file(args.output, outbuf) - else: - if len(drives) == 0: - error("No drive to deploy.") - for d in drives: - print("Flashing %s (%s)" % (d, board_id(d))) - write_file(d + "/NEW.UF2", outbuf) - - -if __name__ == "__main__": - main() From 54065a7719809616e5e9d4f5003cb4ce15541835 Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Fri, 7 Jan 2022 10:04:11 +0100 Subject: [PATCH 175/258] Updated to latest uf2 commit where file permissions are corrected. --- tools/uf2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/uf2 b/tools/uf2 index adbb8c7260..1421ca7fe7 160000 --- a/tools/uf2 +++ b/tools/uf2 @@ -1 +1 @@ -Subproject commit adbb8c7260f938e810eb37f2287f8e1a055ff402 +Subproject commit 1421ca7fe72a2b173b08be05f9042b79409e783a From 5f32d1f34b16c91a520cb8dc48bd3d3cc6230e8d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 14 Dec 2021 18:02:49 -0800 Subject: [PATCH 176/258] Piunora pinout --- .../boards/diodes_delight_piunora/board.c | 56 +++++++++++++++ .../diodes_delight_piunora/mpconfigboard.h | 6 ++ .../diodes_delight_piunora/mpconfigboard.mk | 6 ++ .../boards/diodes_delight_piunora/pins.c | 71 +++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 ports/broadcom/boards/diodes_delight_piunora/board.c create mode 100644 ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h create mode 100644 ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk create mode 100644 ports/broadcom/boards/diodes_delight_piunora/pins.c diff --git a/ports/broadcom/boards/diodes_delight_piunora/board.c b/ports/broadcom/boards/diodes_delight_piunora/board.c new file mode 100644 index 0000000000..80bea7f8b6 --- /dev/null +++ b/ports/broadcom/boards/diodes_delight_piunora/board.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" + +#include "bindings/videocore/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + videocore_framebuffer_obj_t *fb = &allocate_display_bus()->videocore; + fb->base.type = &videocore_framebuffer_type; + common_hal_videocore_framebuffer_construct(fb, 640, 480); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h new file mode 100644 index 0000000000..b833f7f977 --- /dev/null +++ b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h @@ -0,0 +1,6 @@ +#define MICROPY_HW_BOARD_NAME "Diodes Delight Piunora" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +// #define MICROPY_HW_NEOPIXEL (&pin_GPIO12) diff --git a/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk new file mode 100644 index 0000000000..9eed0b6d30 --- /dev/null +++ b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk @@ -0,0 +1,6 @@ +USB_VID = 0x1209 +USB_PID = 0x000D +USB_PRODUCT = "Piunora" +USB_MANUFACTURER = "Diodes Delight" + +CHIP_VARIANT = "bcm2711" diff --git a/ports/broadcom/boards/diodes_delight_piunora/pins.c b/ports/broadcom/boards/diodes_delight_piunora/pins.c new file mode 100644 index 0000000000..c1098d1412 --- /dev/null +++ b/ports/broadcom/boards/diodes_delight_piunora/pins.c @@ -0,0 +1,71 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_GPIO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SDA6),MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_SCL6),MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_SDA4),MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_SCL4),MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_CE1),MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_CE0),MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_MOSI),MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_MISO),MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D13),MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_SCLK),MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SDA1),MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 3238d8364df1b71105c7da994769574200cf136c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 6 Jan 2022 10:53:57 -0800 Subject: [PATCH 177/258] Piunora + full build + high speed usb --- .../diodes_delight_piunora/mpconfigboard.mk | 2 +- ports/broadcom/mpconfigport.mk | 63 +++++-------------- ports/broadcom/mphalport.h | 47 ++++++++++---- 3 files changed, 51 insertions(+), 61 deletions(-) diff --git a/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk index 9eed0b6d30..d05bb16028 100644 --- a/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk +++ b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x1209 -USB_PID = 0x000D +USB_PID = 0xD10D USB_PRODUCT = "Piunora" USB_MANUFACTURER = "Diodes Delight" diff --git a/ports/broadcom/mpconfigport.mk b/ports/broadcom/mpconfigport.mk index 5f3c7cdac0..7296461d1f 100644 --- a/ports/broadcom/mpconfigport.mk +++ b/ports/broadcom/mpconfigport.mk @@ -1,61 +1,26 @@ # All broadcom ports have longints. LONGINT_IMPL = MPZ -# Typically the first module to create -CIRCUITPY_MICROCONTROLLER = 1 -# Typically the second module to create -CIRCUITPY_DIGITALIO = 1 -# Other modules: +CIRCUITPY_FULL_BUILD = 1 + +# Modules in FULL_BUILD that we don't support. CIRCUITPY_ANALOGIO = 0 -CIRCUITPY_BUSIO = 1 -CIRCUITPY_ONEWIREIO = 0 -CIRCUITPY_PWMIO = 0 -CIRCUITPY_COUNTIO = 0 -CIRCUITPY_NEOPIXEL_WRITE = 1 -CIRCUITPY_PULSEIO = 0 -CIRCUITPY_OS = 1 -CIRCUITPY_NVM = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOIO = 0 -CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_RTC = 0 -CIRCUITPY_SDCARDIO = 0 -CIRCUITPY_SDIOIO = 1 -CIRCUITPY_FRAMEBUFFERIO = 1 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 -# Requires SPI, PulseIO (stub ok): -CIRCUITPY_DISPLAYIO = 1 - -# These modules are implemented in shared-module/ - they can be included in -# any port once their prerequisites in common-hal are complete. -# Requires DigitalIO: -CIRCUITPY_BITBANGIO = 1 -# Requires DigitalIO -CIRCUITPY_GAMEPAD = 0 -# Requires neopixel_write or SPI (dotstar) -CIRCUITPY_PIXELBUF = 1 -# Requires OS -CIRCUITPY_RANDOM = 1 -# Requires OS, filesystem -CIRCUITPY_STORAGE = 1 -# Requires Microcontroller -CIRCUITPY_TOUCHIO = 0 -# Requires USB -CIRCUITPY_USB = 1 -CIRCUITPY_USB_MSC = 1 -CIRCUITPY_USB_HID = 1 -CIRCUITPY_USB_MIDI = 1 -USB_NUM_ENDPOINT_PAIRS = 8 -# Does nothing without I2C -CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 -# No requirements, but takes extra flash -CIRCUITPY_ULAB = 0 +CIRCUITPY_NVM = 0 +CIRCUITPY_PARALLELDISPLAY = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_SDIOIO = 1 CIRCUITPY_VIDEOCORE = 1 -CIRCUITPY_ERRNO = 0 - -CIRCUITPY_FULL_BUILD = 0 - INTERNAL_FLASH_FILESYSTEM = 1 + +USB_NUM_ENDPOINT_PAIRS = 8 +USB_HIGHSPEED = 1 diff --git a/ports/broadcom/mphalport.h b/ports/broadcom/mphalport.h index 1efd931974..d67c9f4a50 100644 --- a/ports/broadcom/mphalport.h +++ b/ports/broadcom/mphalport.h @@ -1,26 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 Scott Shawcroft + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_BROADCOM_MPHALPORT_H +#define MICROPY_INCLUDED_BROADCOM_MPHALPORT_H + #include #include "py/obj.h" + +#include "supervisor/shared/tick.h" + void mp_hal_delay_ms(mp_uint_t ms); void mp_hal_delay_us(mp_uint_t us); -mp_uint_t mp_hal_ticks_cpu(void); -mp_uint_t mp_hal_ticks_us(void); -mp_uint_t mp_hal_ticks_ms(void); + +#define mp_hal_ticks_ms() ((mp_uint_t)supervisor_ticks_ms32()) void mp_hal_set_interrupt_char(int c); int mp_hal_stdin_rx_chr(void); void mp_hal_stdout_tx_strn(const char *str, size_t len); -typedef enum std_io_t { - MINI_UART = 0, - UART, - UART_QEMU -} std_io_t; - -void uart_init(std_io_t interface); - #ifdef MICROPY_HW_USBHOST #include "usbkbd.h" void usbkbd_setup(); #endif + +#endif // MICROPY_INCLUDED_BROADCOM_MPHALPORT_H From 39a239113fbf5e66f7657289bd65732c6bfa431c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 6 Jan 2022 14:35:25 -0800 Subject: [PATCH 178/258] Enable neopixel for status --- ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h index b833f7f977..a3e318bb13 100644 --- a/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h +++ b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h @@ -3,4 +3,4 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) -// #define MICROPY_HW_NEOPIXEL (&pin_GPIO12) +#define MICROPY_HW_NEOPIXEL (&pin_GPIO12) From bec36f5c7f3b3679ab5bd90f63bd29775d02b131 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 7 Jan 2022 11:47:31 -0800 Subject: [PATCH 179/258] Add Pi Zero and update PIDs --- .../broadcom/boards/raspberrypi_zero/board.c | 56 +++++++++++++++++ .../boards/raspberrypi_zero/mpconfigboard.h | 6 ++ .../boards/raspberrypi_zero/mpconfigboard.mk | 6 ++ ports/broadcom/boards/raspberrypi_zero/pins.c | 62 +++++++++++++++++++ .../raspberrypi_zero_w/mpconfigboard.mk | 4 +- 5 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 ports/broadcom/boards/raspberrypi_zero/board.c create mode 100644 ports/broadcom/boards/raspberrypi_zero/mpconfigboard.h create mode 100644 ports/broadcom/boards/raspberrypi_zero/mpconfigboard.mk create mode 100644 ports/broadcom/boards/raspberrypi_zero/pins.c diff --git a/ports/broadcom/boards/raspberrypi_zero/board.c b/ports/broadcom/boards/raspberrypi_zero/board.c new file mode 100644 index 0000000000..80bea7f8b6 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero/board.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" + +#include "bindings/videocore/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + videocore_framebuffer_obj_t *fb = &allocate_display_bus()->videocore; + fb->base.type = &videocore_framebuffer_type; + common_hal_videocore_framebuffer_construct(fb, 640, 480); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.h new file mode 100644 index 0000000000..1141520e06 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.h @@ -0,0 +1,6 @@ +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Zero" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO47) diff --git a/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.mk new file mode 100644 index 0000000000..74f8511c2d --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.mk @@ -0,0 +1,6 @@ +USB_VID = 0x2E8A +USB_PID = 0x100E +USB_PRODUCT = "Zero" +USB_MANUFACTURER = "Raspberry Pi" + +CHIP_VARIANT = "bcm2835" diff --git a/ports/broadcom/boards/raspberrypi_zero/pins.c b/ports/broadcom/boards/raspberrypi_zero/pins.c new file mode 100644 index 0000000000..bb6632b923 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero/pins.c @@ -0,0 +1,62 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + // These match the names used in Blinka + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { 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_CE1), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_CE0), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SCLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TXD), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_RXD), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_MISO_1), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_MOSI_1), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCLK_1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCK_1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk index 9e0eb3ba57..24d09e0530 100644 --- a/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x2E8A -USB_PID = 0xf015 -USB_PRODUCT = "Raspberry Pi Zero" +USB_PID = 0x101E +USB_PRODUCT = "Zero W" USB_MANUFACTURER = "Raspberry Pi" CHIP_VARIANT = "bcm2835" From 6b872acab7b74069d6465ee7bec897b8adfe2c6f Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Fri, 7 Jan 2022 21:18:51 +0100 Subject: [PATCH 180/258] Update py/ringbuf.c Co-authored-by: Scott Shawcroft --- py/ringbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/ringbuf.c b/py/ringbuf.c index a720abc7d7..2003cc97d5 100644 --- a/py/ringbuf.c +++ b/py/ringbuf.c @@ -30,7 +30,7 @@ bool ringbuf_init(ringbuf_t *r, uint8_t *buf, size_t capacity) { r->heap = false; r->buf = buf; - r->size = capacity + 1; + r->size = capacity; r->iget = r->iput = 0; return r->buf != NULL; } From d8f18d36a4c812b33a770e7f297e66d5c4c59599 Mon Sep 17 00:00:00 2001 From: Chris Wesseling Date: Fri, 7 Jan 2022 23:20:10 +0100 Subject: [PATCH 181/258] Initial Waveshare RP2040-Zero board definition `board.NEOPIXEL` works. Once you have an LED cycling colours, you're 99% done. :-) --- .../boards/waveshare_rp2040_zero/board.c | 40 ++++++++++++ .../waveshare_rp2040_zero/mpconfigboard.h | 7 +++ .../waveshare_rp2040_zero/mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 1 + .../boards/waveshare_rp2040_zero/pins.c | 63 +++++++++++++++++++ 5 files changed, 122 insertions(+) create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_zero/board.c create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_zero/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/board.c b/ports/raspberrypi/boards/waveshare_rp2040_zero/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.h b/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.h new file mode 100644 index 0000000000..9979e6dcb6 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.h @@ -0,0 +1,7 @@ +#define MICROPY_HW_BOARD_NAME "Waveshare RP2040-Zero" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO16) diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.mk b/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.mk new file mode 100644 index 0000000000..9222a7be7c --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x2E8A +USB_PID = 0x101F +USB_PRODUCT = "RP2040-Zero" +USB_MANUFACTURER = "Waveshare Electronics" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/pico-sdk-configboard.h b/ports/raspberrypi/boards/waveshare_rp2040_zero/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c b/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c new file mode 100644 index 0000000000..bf590dcfef --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c @@ -0,0 +1,63 @@ +#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_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, + /* { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, */ + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 783106545c92f1cc842c7e49494d01bc8831c1b9 Mon Sep 17 00:00:00 2001 From: Chris Wesseling Date: Fri, 7 Jan 2022 23:25:50 +0100 Subject: [PATCH 182/258] Remove LED pin. There's just the NEOPIXEL on this board, no other LED. --- ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c b/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c index bf590dcfef..17d16b449c 100644 --- a/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c @@ -40,7 +40,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, From 44997523e15d8baa472f98ed6e31470e5c850564 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 7 Jan 2022 16:31:21 -0800 Subject: [PATCH 183/258] Fix Pi Zero file extension --- tools/build_board_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index ca080ac9cc..d05b80dde8 100755 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -72,6 +72,7 @@ extension_by_board = { "ai_thinker_esp32-c3s": BIN, "microdev_micro_c3": BIN, # broadcom + "raspberrypi_zero": KERNEL_IMG, "raspberrypi_zero_w": KERNEL_IMG, } From e712e50aed214f9b6c4d902137e26b75f1a3fb0d Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Sat, 8 Jan 2022 11:05:09 +0100 Subject: [PATCH 184/258] Updated extra coverage test corresponding to change from 6b872aca --- tests/unix/extra_coverage.py.exp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index eca4fdc193..4cce80a412 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -99,21 +99,21 @@ KeyboardInterrupt: KeyboardInterrupt: 10 # ringbuf -100 0 -99 1 +99 0 +98 1 22 -100 0 -98 2 +99 0 +97 2 aa55 -100 0 -1 99 +99 0 +0 99 -1 -2 98 +1 98 +-1 +2 97 0 -1 99 --1 -3377 -100 0 +cc99 +99 0 0 11bb 0 From e23b272595bdcbda3977845d561b959bf8b7b20d Mon Sep 17 00:00:00 2001 From: Pontus Oldberg Date: Sat, 8 Jan 2022 16:39:48 +0100 Subject: [PATCH 185/258] Added missing LDO control pin (SARA_PWR) --- ports/raspberrypi/boards/challenger_rp2040_lte/pins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/raspberrypi/boards/challenger_rp2040_lte/pins.c b/ports/raspberrypi/boards/challenger_rp2040_lte/pins.c index 6d1cfbc568..dd2b4d9bda 100644 --- a/ports/raspberrypi/boards/challenger_rp2040_lte/pins.c +++ b/ports/raspberrypi/boards/challenger_rp2040_lte/pins.c @@ -24,6 +24,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_SARA_RTS), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_SARA_PWR), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, // GPIO { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO12) }, From 811715e8cc185cd8063f4b8ec4789066c2a30ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20Ko=C3=A7marl=C4=B1?= Date: Sat, 8 Jan 2022 20:25:17 +0000 Subject: [PATCH 186/258] Translated using Weblate (Turkish) Currently translated at 5.7% (59 of 1031 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/tr/ --- locale/tr.po | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/locale/tr.po b/locale/tr.po index 54fc7120a2..d00d068b42 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2022-01-06 14:54+0000\n" +"PO-Revision-Date: 2022-01-09 21:53+0000\n" "Last-Translator: Gökhan Koçmarlı \n" "Language-Team: none\n" "Language: tr\n" @@ -220,47 +220,47 @@ msgstr "'%q' nesnesi iterable değildir" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" -msgstr "" +msgstr "'%s' bir etiket bekliyor" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a register" -msgstr "" +msgstr "'%s' bir yazmaç bekliyor" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects a special register" -msgstr "" +msgstr "'%s' özel bir yazmaç bekliyor" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects an FPU register" -msgstr "" +msgstr "'%s' bir FPU yazmacı bekliyor" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects an address of the form [a, b]" -msgstr "" +msgstr "'%s', [a, b] biçiminde bir adres bekliyor" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects an integer" -msgstr "" +msgstr "'%s' bir integer bekliyor" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects at most r%d" -msgstr "" +msgstr "'%s' en fazla r%d bekler" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects {r0, r1, ...}" -msgstr "" +msgstr "'%s' {r0, r1, ...} bekliyor" #: py/emitinlinextensa.c #, c-format msgid "'%s' integer %d isn't within range %d..%d" -msgstr "" +msgstr "'%s' integer %d, %d..%d aralığında değil" #: py/emitinlinethumb.c #, c-format @@ -270,21 +270,21 @@ msgstr "" #: py/obj.c #, c-format msgid "'%s' object doesn't support item assignment" -msgstr "" +msgstr "'%s' nesnesi, öğe atamasını desteklemiyor" #: py/obj.c #, c-format msgid "'%s' object doesn't support item deletion" -msgstr "" +msgstr "'%s' nesnesi, öğe silmeyi desteklemiyor" #: py/runtime.c msgid "'%s' object has no attribute '%q'" -msgstr "" +msgstr "'%s' nesnesinin '%q' özelliği yok" #: py/obj.c #, c-format msgid "'%s' object isn't subscriptable" -msgstr "" +msgstr "'%s' nesnesi subscriptable özelliğe sahip değil" #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" From 86a482f5200d2f6bb55e73de831d214b70b6374c Mon Sep 17 00:00:00 2001 From: 0hotpotman0 Date: Mon, 10 Jan 2022 11:05:06 +0800 Subject: [PATCH 187/258] add ble stack 7.3.0 version for complie the uf2 flie --- ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk index d8bd45218a..c280246cc9 100644 --- a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x2886 USB_PID = 0x0045 -USB_PRODUCT = "Seeed XIAO nRF52840 Sense" +USB_PRODUCT = "Seeed XIAO nRF52840 Sense SOFTDEV_VERSION=7.0.1" USB_MANUFACTURER = "Seeed" MCU_CHIP = nrf52840 From 122034619551a065ea2d2acfebe968fb16fa8ad5 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 10 Jan 2022 11:08:29 -0800 Subject: [PATCH 188/258] Enable Turkish language builds --- tools/build_board_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index ca080ac9cc..5c8e889507 100755 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -92,6 +92,7 @@ language_allow_list = set( "pt_BR", "ru", "sv", + "tr", "zh_Latn_pinyin", ] ) From 4efbfca2b07b3b829be9e4ecf20ccb978a09d49e Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Mon, 10 Jan 2022 14:45:54 -0500 Subject: [PATCH 189/258] Fix typo, pin order. --- .../adafruit_feather_esp32s2_tft/pins.c | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c index 1f56d8cf76..b82afd9376 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c @@ -5,18 +5,14 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, - { MP_ROM_QSTR(MP_QSTR_R2), MP_ROM_PTR(&pin_GPIO2) }, { 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_D8), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, @@ -26,40 +22,43 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, - { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO34) }, { MP_ROM_QSTR(MP_QSTR_I2C_TFT_POWER), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, - { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, - { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO39) }, From 2251d0f4b0692ab6c1104ec6b04ff513b3f028fe Mon Sep 17 00:00:00 2001 From: arturo182 Date: Tue, 11 Jan 2022 15:13:36 +0100 Subject: [PATCH 190/258] raspberrypi: Claim UART after checking pins If, for some reason, you mix up TX and RX when calling `busio.UART` (who would do that ;) ), you get `Invalid pins`. When you go to try again, you'll get `All UART peripherals are in use` because the interface was claimed as busy before pins are verified. This should fix that issue. --- ports/raspberrypi/common-hal/busio/UART.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/raspberrypi/common-hal/busio/UART.c b/ports/raspberrypi/common-hal/busio/UART.c index 14935f4046..e698c3701f 100644 --- a/ports/raspberrypi/common-hal/busio/UART.c +++ b/ports/raspberrypi/common-hal/busio/UART.c @@ -118,17 +118,17 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, uint8_t uart_id = ((((tx != NULL) ? tx->number : rx->number) + 4) / 8) % NUM_UARTS; + self->tx_pin = pin_init(uart_id, tx, 0); + self->rx_pin = pin_init(uart_id, rx, 1); + self->cts_pin = pin_init(uart_id, cts, 2); + self->rts_pin = pin_init(uart_id, rts, 3); + if (uart_status[uart_id] != STATUS_FREE) { mp_raise_RuntimeError(translate("All UART peripherals are in use")); } else { uart_status[uart_id] = STATUS_BUSY; } - self->tx_pin = pin_init(uart_id, tx, 0); - self->rx_pin = pin_init(uart_id, rx, 1); - self->cts_pin = pin_init(uart_id, cts, 2); - self->rts_pin = pin_init(uart_id, rts, 3); - self->uart = UART_INST(uart_id); self->uart_id = uart_id; self->baudrate = baudrate; From 0d11e5d76a4dccc24aacd9f8db47fe137ae3932b Mon Sep 17 00:00:00 2001 From: hexthat Date: Mon, 10 Jan 2022 14:56:00 +0000 Subject: [PATCH 191/258] Translated using Weblate (Chinese (Pinyin)) Currently translated at 99.1% (1022 of 1031 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index ba7896bdaf..7b6f03da47 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-01-04 04:27+0000\n" +"PO-Revision-Date: 2022-01-11 14:56+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -69,12 +69,12 @@ msgid "%%c requires int or char" msgstr "%%c xūyào zhěngshù huòzhě zìfú" #: shared-bindings/rgbmatrix/RGBMatrix.c -#, fuzzy, c-format +#, c-format msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" -"%d de zhǐ yǐn jiǎo , %d rgb yǐn jiǎo hé %d qiē piàn biǎo shì %d de gāo dù, " -"ér bù shì %d" +"%d de zhǐ yǐn jiǎo, %d rgb yǐn jiǎo hé %d qiē piàn biǎo shì %d de gāo dù, ér " +"bù shì %d" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" From 9b825869c53fb6c6c57aef05bd3d9e1c5855b4ba Mon Sep 17 00:00:00 2001 From: arturo182 Date: Tue, 11 Jan 2022 22:02:47 +0100 Subject: [PATCH 192/258] raspberrypi : Check UART before claiming pins, claim it after Co-authored-by: Scott Shawcroft --- ports/raspberrypi/common-hal/busio/UART.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/raspberrypi/common-hal/busio/UART.c b/ports/raspberrypi/common-hal/busio/UART.c index e698c3701f..0e25c57297 100644 --- a/ports/raspberrypi/common-hal/busio/UART.c +++ b/ports/raspberrypi/common-hal/busio/UART.c @@ -118,16 +118,16 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, uint8_t uart_id = ((((tx != NULL) ? tx->number : rx->number) + 4) / 8) % NUM_UARTS; + if (uart_status[uart_id] != STATUS_FREE) { + mp_raise_RuntimeError(translate("All UART peripherals are in use")); + } + // These may raise exceptions if pins are already in use. self->tx_pin = pin_init(uart_id, tx, 0); self->rx_pin = pin_init(uart_id, rx, 1); self->cts_pin = pin_init(uart_id, cts, 2); self->rts_pin = pin_init(uart_id, rts, 3); + uart_status[uart_id] = STATUS_BUSY; - if (uart_status[uart_id] != STATUS_FREE) { - mp_raise_RuntimeError(translate("All UART peripherals are in use")); - } else { - uart_status[uart_id] = STATUS_BUSY; - } self->uart = UART_INST(uart_id); self->uart_id = uart_id; From 8226fb8e0b94ddb4be3ad830feaad42ac158845d Mon Sep 17 00:00:00 2001 From: Chris Wesseling Date: Wed, 12 Jan 2022 12:27:54 +0100 Subject: [PATCH 193/258] Bring pins in line with board documentation. This brings the pins in line with the documented [pinouts]. The only "special" pins: - GP0, GP1 are mentioned as the default UART, so we init them as such and give them the TX and RX alternative names. - GP16 is connected to the onboard neopixel DIN line and we assign it the NEOPIXEL name. (Power of the neopixel is connected to the 3.3V rail, not a pin. See [schematic].) - GP26, GP27, GP28, GP29 have unambiguous ADC designations in the [pinouts], so we assign the `A` analogue names as the Pico board definition does. [pinouts]: https://www.waveshare.com/wiki/RP2040-Zero#Pinouts [schematic]: https://www.waveshare.com/w/upload/4/4c/RP2040_Zero.pdf --- .../raspberrypi/boards/waveshare_rp2040_zero/pins.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c b/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c index 17d16b449c..6de9ad478f 100644 --- a/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c @@ -5,11 +5,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, - { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, @@ -25,7 +23,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, - /* { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, */ + { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, @@ -33,13 +31,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - - { MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_GPIO23) }, { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - - { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) }, { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, @@ -54,8 +47,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, - { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; From 46a61e6788e72691c6a7ce9692a07e4de1e4c507 Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Wed, 12 Jan 2022 12:30:24 +0100 Subject: [PATCH 194/258] Provide filesystem stubs to fit in with changes from 41d494df0b35bb845a9 filesystem stub implementation is used when DISABLE_FILESYSTEM is set. --- supervisor/stub/filesystem.c | 31 +++++++++++++++++++++++++++++++ supervisor/supervisor.mk | 7 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/supervisor/stub/filesystem.c b/supervisor/stub/filesystem.c index 3d2bf5e3be..650f4d8346 100644 --- a/supervisor/stub/filesystem.c +++ b/supervisor/stub/filesystem.c @@ -26,6 +26,11 @@ #include "supervisor/filesystem.h" + +void filesystem_background(void) { + return; +} + bool filesystem_init(bool create_allowed, bool force_create) { (void)create_allowed; (void)force_create; @@ -35,11 +40,37 @@ bool filesystem_init(bool create_allowed, bool force_create) { void filesystem_flush(void) { } +void filesystem_set_internal_writable_by_usb(bool writable) { + (void)writable; + return; +} + +void filesystem_set_writable_by_usb(fs_user_mount_t *vfs, bool usb_writable) { + (void)vfs; + (void)usb_writable; + return; +} + bool filesystem_is_writable_by_python(fs_user_mount_t *vfs) { (void)vfs; return true; } +bool filesystem_is_writable_by_usb(fs_user_mount_t *vfs) { + return true; +} + +void filesystem_set_internal_concurrent_write_protection(bool concurrent_write_protection) { + (void)concurrent_write_protection; + return; +} + +void filesystem_set_concurrent_write_protection(fs_user_mount_t *vfs, bool concurrent_write_protection) { + (void)vfs; + (void)concurrent_write_protection; + return; +} + bool filesystem_present(void) { return false; } diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 3270f76ed1..eed9f4dc47 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -5,7 +5,6 @@ SRC_SUPERVISOR = \ supervisor/shared/background_callback.c \ supervisor/shared/board.c \ supervisor/shared/cpu.c \ - supervisor/shared/filesystem.c \ supervisor/shared/flash.c \ supervisor/shared/lock.c \ supervisor/shared/memory.c \ @@ -17,6 +16,12 @@ SRC_SUPERVISOR = \ supervisor/shared/traceback.c \ supervisor/shared/translate.c +ifeq ($(DISABLE_FILESYSTEM),1) +SRC_SUPERVISOR += supervisor/stub/filesystem.c +else +SRC_SUPERVISOR += supervisor/shared/filesystem.c +endif + NO_USB ?= $(wildcard supervisor/usb.c) INTERNAL_FLASH_FILESYSTEM ?= 0 From dd54e8f6571aadfd1b542e22db611de3fc7e754c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 11 Jan 2022 19:04:25 -0500 Subject: [PATCH 195/258] PDMIn: enable IRQ; need a volatile; call pdmin_reset() enable IRQ for PDMIn --- ports/atmel-samd/common-hal/audiobusio/PDMIn.c | 17 ++++++++++++++++- ports/atmel-samd/supervisor/port.c | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c index e6363395a6..e7c00901bf 100644 --- a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c +++ b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -66,7 +66,7 @@ #endif // Set by interrupt handler when DMA block has finished transferring. -static bool pdmin_dma_block_done; +static volatile bool pdmin_dma_block_done; // Event channel used to trigger interrupt. Set to invalid value EVSYS_SYNCH_NUM when not in use. static uint8_t pdmin_event_channel; @@ -77,6 +77,7 @@ void pdmin_evsys_handler(void) { } void pdmin_reset(void) { + pdmin_dma_block_done = false; pdmin_event_channel = EVSYS_SYNCH_NUM; while (I2S->SYNCBUSY.reg & I2S_SYNCBUSY_ENABLE) {} @@ -409,6 +410,20 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se init_event_channel_interrupt(pdmin_event_channel, CORE_GCLK, EVSYS_ID_GEN_DMAC_CH_0 + dma_channel); // Turn on serializer now to get it in sync with DMA. i2s_set_serializer_enable(self->serializer, true); + + #ifdef SAM_D5X_E5X + int irq = pdmin_event_channel < 4 ? EVSYS_0_IRQn + pdmin_event_channel : EVSYS_4_IRQn; + // Only disable and clear on SAMD51 because the SAMD21 shares EVSYS with ticks. + NVIC_DisableIRQ(irq); + NVIC_ClearPendingIRQ(irq); + #endif + + #ifdef SAMD21 + int irq = EVSYS_IRQn; + #endif + + // Don't bother to disable when done. It doesn't hurt to leave it on. + NVIC_EnableIRQ(irq); audio_dma_enable_channel(dma_channel); // Record diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 3298e691ab..7ffe7f574f 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -386,7 +386,7 @@ void reset_port(void) { audioout_reset(); #endif #if CIRCUITPY_AUDIOBUSIO - // pdmin_reset(); + pdmin_reset(); #endif #if CIRCUITPY_AUDIOBUSIO_I2SOUT i2sout_reset(); From fb96c091182c97440b4e9b8db0772122b0615dfa Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Wed, 12 Jan 2022 13:54:56 -0500 Subject: [PATCH 196/258] Add button pin to Feathers, fix pin order on QT Py. --- .../boards/adafruit_feather_esp32s2/pins.c | 2 ++ .../adafruit_feather_esp32s2_tft/pins.c | 3 ++ .../boards/adafruit_qtpy_esp32s2/pins.c | 29 ++++++++++--------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2/pins.c index 06f294ff0f..5029d82231 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/pins.c @@ -3,6 +3,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO3) }, diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c index b82afd9376..cdb2f79f8e 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c @@ -65,6 +65,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c index 302126a4ad..67bc486170 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c @@ -3,54 +3,55 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, - { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, - { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO7) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO38) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO39) }, - { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, - { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, From 8c8997f42a6ae780bfc133b071868ef71c2b4118 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 12 Jan 2022 14:14:21 -0500 Subject: [PATCH 197/258] Push stubs to pypi only on a release --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38d86bae0f..f37df27f45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -241,7 +241,7 @@ jobs: zip -9r circuitpython-stubs.zip circuitpython-stubs [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs/dist/*.tar.gz s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 - name: Upload stubs to PyPi - if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) + if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested') env: TWINE_USERNAME: ${{ secrets.pypi_username }} TWINE_PASSWORD: ${{ secrets.pypi_password }} From 10c3836bc0ac0aa3051fa2787a4488c656b0cfe1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 11 Jan 2022 11:08:47 -0600 Subject: [PATCH 198/258] feather esp32s2 tft: fix sharing of main display bus --- .../boards/adafruit_feather_esp32s2_tft/board.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index 346be34886..68e4171948 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -31,6 +31,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-module/displayio/__init__.h" #include "shared-module/displayio/mipi_constants.h" +#include "shared-bindings/board/__init__.h" displayio_fourwire_obj_t board_display_obj; @@ -81,17 +82,7 @@ void board_init(void) { gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT); gpio_set_level(21, true); - busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; - - common_hal_busio_spi_construct( - spi, - &pin_GPIO36, // CLK - &pin_GPIO35, // MOSI - NULL // MISO not connected - ); - - common_hal_busio_spi_never_reset(spi); - + busio_spi_obj_t *spi = common_hal_board_create_spi(); displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; From 7575cacdc502eca9c4e25e1c1cdd4e57cb50cea9 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Thu, 13 Jan 2022 13:21:39 +1100 Subject: [PATCH 199/258] Add espressif_esp32s3_devkitc_1_n8r8 --- .../espressif_esp32s3_devkitc_1_n8r8/board.c | 67 +++++++++++++++++++ .../mpconfigboard.h | 38 +++++++++++ .../mpconfigboard.mk | 17 +++++ .../espressif_esp32s3_devkitc_1_n8r8/pins.c | 45 +++++++++++++ .../sdkconfig | 38 +++++++++++ 5 files changed, 205 insertions(+) create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c new file mode 100644 index 0000000000..b9558bfbdf --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c @@ -0,0 +1,67 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif + + + // SPI Flash and RAM + common_hal_never_reset_pin(&pin_GPIO26); + common_hal_never_reset_pin(&pin_GPIO27); + common_hal_never_reset_pin(&pin_GPIO28); + common_hal_never_reset_pin(&pin_GPIO29); + common_hal_never_reset_pin(&pin_GPIO30); + common_hal_never_reset_pin(&pin_GPIO31); + common_hal_never_reset_pin(&pin_GPIO32); + common_hal_never_reset_pin(&pin_GPIO33); + common_hal_never_reset_pin(&pin_GPIO34); + common_hal_never_reset_pin(&pin_GPIO35); + common_hal_never_reset_pin(&pin_GPIO36); + common_hal_never_reset_pin(&pin_GPIO37); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h new file mode 100644 index 0000000000..45fd3268b2 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-N8R8" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk new file mode 100644 index 0000000000..4e65fc940d --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-DevKitC-1-N8R8" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=8MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c new file mode 100644 index 0000000000..b1d515c306 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c @@ -0,0 +1,45 @@ +#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_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_TXD0), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_TXD1), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig new file mode 100644 index 0000000000..1a602c9ebc --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig @@ -0,0 +1,38 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +CONFIG_SPIRAM_MODE_OCT=y +CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +CONFIG_SPIRAM_SIZE=8388608 + +# +# PSRAM clock and cs IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + From 212eedc42f6f93ec4b24dd87978161b00caf4d36 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Thu, 13 Jan 2022 13:01:26 +1100 Subject: [PATCH 200/258] Rename espressif_esp32s3_devkitc_1_nopsram to devkitc_1_n8 --- .../board.c | 0 .../mpconfigboard.h | 2 +- .../mpconfigboard.mk | 2 +- .../pins.c | 0 .../sdkconfig | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1_nopsram => espressif_esp32s3_devkitc_1_n8}/board.c (100%) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1_nopsram => espressif_esp32s3_devkitc_1_n8}/mpconfigboard.h (95%) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1_nopsram => espressif_esp32s3_devkitc_1_n8}/mpconfigboard.mk (89%) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1_nopsram => espressif_esp32s3_devkitc_1_n8}/pins.c (100%) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1_nopsram => espressif_esp32s3_devkitc_1_n8}/sdkconfig (100%) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c similarity index 100% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/board.c rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h similarity index 95% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h index c6df735975..b13ccd1ffe 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h @@ -26,7 +26,7 @@ // Micropython setup -#define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-nopsram" +#define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-N8" #define MICROPY_HW_MCU_NAME "ESP32S3" #define MICROPY_HW_NEOPIXEL (&pin_GPIO48) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk similarity index 89% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk index 58b2d2e85c..b6ead37eee 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x303A USB_PID = 0x7003 -USB_PRODUCT = "ESP32-S3-DevKitC-1-nopsram" +USB_PRODUCT = "ESP32-S3-DevKitC-1-N8" USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c similarity index 100% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/pins.c rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig similarity index 100% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/sdkconfig rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig From a878e3377ca8759564ae4a65499b46c87c6d19ce Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Thu, 13 Jan 2022 13:20:34 +1100 Subject: [PATCH 201/258] Rename espressif_esp32s3_devkitc_1 to devkitc_1_n8r2 --- .../board.c | 0 .../mpconfigboard.h | 2 +- .../mpconfigboard.mk | 2 +- .../pins.c | 0 .../sdkconfig | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1 => espressif_esp32s3_devkitc_1_n8r2}/board.c (100%) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1 => espressif_esp32s3_devkitc_1_n8r2}/mpconfigboard.h (96%) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1 => espressif_esp32s3_devkitc_1_n8r2}/mpconfigboard.mk (89%) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1 => espressif_esp32s3_devkitc_1_n8r2}/pins.c (100%) rename ports/espressif/boards/{espressif_esp32s3_devkitc_1 => espressif_esp32s3_devkitc_1_n8r2}/sdkconfig (100%) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c similarity index 100% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1/board.c rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h similarity index 96% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h index df83110453..514ca2e2bc 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h @@ -26,7 +26,7 @@ // Micropython setup -#define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1" +#define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-N8R2" #define MICROPY_HW_MCU_NAME "ESP32S3" #define MICROPY_HW_NEOPIXEL (&pin_GPIO48) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk similarity index 89% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk index b3c18a55fe..7fff66f5d8 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x303A USB_PID = 0x7003 -USB_PRODUCT = "ESP32-S3-DevKitC-1" +USB_PRODUCT = "ESP32-S3-DevKitC-1-N8R2" USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c similarity index 100% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1/pins.c rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig similarity index 100% rename from ports/espressif/boards/espressif_esp32s3_devkitc_1/sdkconfig rename to ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig From 1cd98fed2689ce94a9390b40414ebef93da6a295 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Thu, 13 Jan 2022 13:45:46 +1100 Subject: [PATCH 202/258] Add esp32s3 dev kits to USB ID ignore list --- tools/ci_check_duplicate_usb_vid_pid.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index d1bdb09979..dbd29ad872 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -51,8 +51,9 @@ DEFAULT_IGNORELIST = [ "unexpectedmaker_feathers2_prerelease", "espressif_kaluga_1", "espressif_kaluga_1.3", - "espressif_esp32s3_devkitc_1", - "espressif_esp32s3_devkitc_1_nopsram", + "espressif_esp32s3_devkitc_1_n8", + "espressif_esp32s3_devkitc_1_n8r2", + "espressif_esp32s3_devkitc_1_n8r8", "jpconstantineau_pykey18", "jpconstantineau_pykey44", "jpconstantineau_pykey60", From 5fe23317823b6ed2f61abd803cce1ad3dee29341 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 12 Jan 2022 22:35:18 -0500 Subject: [PATCH 203/258] update regular expressions example the example uses ure instead of re --- docs/library/re.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/library/re.rst b/docs/library/re.rst index 12e640654e..d09ef59ba4 100644 --- a/docs/library/re.rst +++ b/docs/library/re.rst @@ -95,11 +95,11 @@ Supported operators and special sequences are: Example:: - import ure + import re - # As ure doesn't support escapes itself, use of r"" strings is not + # As re doesn't support escapes itself, use of r"" strings is not # recommended. - regex = ure.compile("[\r\n]") + regex = re.compile("[\r\n]") regex.split("line1\rline2\nline3\r\n") From da702b293fd8d8ccd214e27b4171d47dd7758f4a Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 11 Jan 2022 19:04:25 -0500 Subject: [PATCH 204/258] PDMIn: enable IRQ; need a volatile; call pdmin_reset() enable IRQ for PDMIn --- ports/atmel-samd/common-hal/audiobusio/PDMIn.c | 17 ++++++++++++++++- ports/atmel-samd/supervisor/port.c | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c index e6363395a6..e7c00901bf 100644 --- a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c +++ b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -66,7 +66,7 @@ #endif // Set by interrupt handler when DMA block has finished transferring. -static bool pdmin_dma_block_done; +static volatile bool pdmin_dma_block_done; // Event channel used to trigger interrupt. Set to invalid value EVSYS_SYNCH_NUM when not in use. static uint8_t pdmin_event_channel; @@ -77,6 +77,7 @@ void pdmin_evsys_handler(void) { } void pdmin_reset(void) { + pdmin_dma_block_done = false; pdmin_event_channel = EVSYS_SYNCH_NUM; while (I2S->SYNCBUSY.reg & I2S_SYNCBUSY_ENABLE) {} @@ -409,6 +410,20 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se init_event_channel_interrupt(pdmin_event_channel, CORE_GCLK, EVSYS_ID_GEN_DMAC_CH_0 + dma_channel); // Turn on serializer now to get it in sync with DMA. i2s_set_serializer_enable(self->serializer, true); + + #ifdef SAM_D5X_E5X + int irq = pdmin_event_channel < 4 ? EVSYS_0_IRQn + pdmin_event_channel : EVSYS_4_IRQn; + // Only disable and clear on SAMD51 because the SAMD21 shares EVSYS with ticks. + NVIC_DisableIRQ(irq); + NVIC_ClearPendingIRQ(irq); + #endif + + #ifdef SAMD21 + int irq = EVSYS_IRQn; + #endif + + // Don't bother to disable when done. It doesn't hurt to leave it on. + NVIC_EnableIRQ(irq); audio_dma_enable_channel(dma_channel); // Record diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 3298e691ab..7ffe7f574f 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -386,7 +386,7 @@ void reset_port(void) { audioout_reset(); #endif #if CIRCUITPY_AUDIOBUSIO - // pdmin_reset(); + pdmin_reset(); #endif #if CIRCUITPY_AUDIOBUSIO_I2SOUT i2sout_reset(); From 39639ecd17d976416f1b5c0c89093ead708a867d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 12 Jan 2022 11:36:51 -0800 Subject: [PATCH 205/258] Rework configs to take target into account New script will filter settings to different tiers. --- ports/espressif/Makefile | 3 +- .../boards/adafruit_feather_esp32s2/sdkconfig | 10 +- .../adafruit_feather_esp32s2_tft/sdkconfig | 10 +- .../sdkconfig | 6 + .../boards/adafruit_funhouse/sdkconfig | 10 +- .../adafruit_magtag_2.9_grayscale/sdkconfig | 10 +- .../boards/adafruit_metro_esp32s2/sdkconfig | 6 +- .../boards/adafruit_qtpy_esp32s2/sdkconfig | 10 +- .../ai_thinker_esp_12k_nodemcu/sdkconfig | 12 +- .../espressif/boards/artisense_rd00/sdkconfig | 6 +- .../boards/atmegazero_esp32s2/sdkconfig | 6 +- .../boards/crumpspace_crumps2/sdkconfig | 6 +- .../boards/electroniccats_bastwifi/sdkconfig | 6 + .../boards/espressif_esp32s3_box/sdkconfig | 38 +- .../espressif_esp32s3_devkitc_1_n8/sdkconfig | 4 +- .../sdkconfig | 23 +- .../sdkconfig | 18 +- .../boards/espressif_hmi_devkit_1/sdkconfig | 10 +- .../boards/espressif_kaluga_1.3/sdkconfig | 10 +- .../boards/espressif_kaluga_1/sdkconfig | 10 +- .../boards/espressif_saola_1_wroom/sdkconfig | 6 + .../boards/espressif_saola_1_wrover/sdkconfig | 10 +- .../boards/franzininho_wifi_wroom/sdkconfig | 6 + .../boards/franzininho_wifi_wrover/sdkconfig | 10 +- .../boards/gravitech_cucumber_m/sdkconfig | 1 + .../boards/gravitech_cucumber_ms/sdkconfig | 1 + .../boards/gravitech_cucumber_r/sdkconfig | 6 +- .../boards/gravitech_cucumber_rs/sdkconfig | 6 +- .../boards/lilygo_ttgo_t8_s2_st7789/sdkconfig | 20 +- .../espressif/boards/lolin_s2_mini/sdkconfig | 12 +- .../espressif/boards/lolin_s2_pico/sdkconfig | 12 +- .../boards/microdev_micro_s2/sdkconfig | 6 +- .../boards/morpheans_morphesp-240/sdkconfig | 4 +- .../muselab_nanoesp32_s2_wroom/sdkconfig | 6 + .../muselab_nanoesp32_s2_wrover/sdkconfig | 6 + .../boards/odt_pixelwing_esp32_s2/sdkconfig | 6 +- .../targett_module_clip_wroom/sdkconfig | 6 + .../targett_module_clip_wrover/sdkconfig | 10 +- .../unexpectedmaker_feathers2/sdkconfig | 6 +- .../unexpectedmaker_feathers2_neo/sdkconfig | 10 +- .../sdkconfig | 8 +- .../boards/unexpectedmaker_tinys2/sdkconfig | 12 +- .../esp-idf-config/sdkconfig-16MB.defaults | 13 +- .../esp-idf-config/sdkconfig-4MB.defaults | 13 +- .../esp-idf-config/sdkconfig-8MB.defaults | 13 +- .../esp-idf-config/sdkconfig-debug.defaults | 78 +- .../esp-idf-config/sdkconfig-esp32c3.defaults | 139 ++++ .../esp-idf-config/sdkconfig-esp32s2.defaults | 170 ++++ .../esp-idf-config/sdkconfig-esp32s3.defaults | 149 ++++ .../esp-idf-config/sdkconfig-opt.defaults | 88 ++- .../esp-idf-config/sdkconfig.defaults | 747 ++++++++++++++++-- .../espressif/tools/generate_all_sdkconfig.py | 25 + ports/espressif/tools/update_sdkconfig.py | 180 +++++ 53 files changed, 1774 insertions(+), 225 deletions(-) create mode 100644 ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults create mode 100644 ports/espressif/tools/generate_all_sdkconfig.py create mode 100644 ports/espressif/tools/update_sdkconfig.py diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index a1498a5d7c..825663d87b 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -295,7 +295,8 @@ ifeq ($(DEBUG), 1) else DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults endif -SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);boards/$(BOARD)/sdkconfig + +SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);$(TARGET_SDKCONFIG);boards/$(BOARD)/sdkconfig # create the config headers $(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig | $(BUILD)/esp-idf diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_funhouse/sdkconfig b/ports/espressif/boards/adafruit_funhouse/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_funhouse/sdkconfig +++ b/ports/espressif/boards/adafruit_funhouse/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig index 80b9a2cf8e..9ad9e6c3bb 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig index 1a86435efc..49ee336ed4 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -7,12 +6,13 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=4194304 +CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/artisense_rd00/sdkconfig b/ports/espressif/boards/artisense_rd00/sdkconfig index b5bf2411f7..cd57f0d118 100644 --- a/ports/espressif/boards/artisense_rd00/sdkconfig +++ b/ports/espressif/boards/artisense_rd00/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig index f42e0784c4..b528b9f343 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig +++ b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/crumpspace_crumps2/sdkconfig b/ports/espressif/boards/crumpspace_crumps2/sdkconfig index 04b487625d..94158d85c5 100644 --- a/ports/espressif/boards/crumpspace_crumps2/sdkconfig +++ b/ports/espressif/boards/crumpspace_crumps2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig +++ b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig index 73661c9f92..7fcf8ef297 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -1,9 +1,37 @@ CONFIG_ESP32S3_SPIRAM_SUPPORT=y -CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_MEMTEST=y +# +# SPI RAM config +# +# CONFIG_SPIRAM_MODE_QUAD is not set CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y CONFIG_SPIRAM_TYPE_AUTO=y -CONFIG_SPIRAM_USE_MALLOC=n +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=-1 +# end of SPI RAM config + +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +# +# PSRAM Clock and CS IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM Clock and CS IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +# CONFIG_SPIRAM_USE_MEMMAP is not set +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +CONFIG_SPIRAM_USE_MALLOC=y +CONFIG_SPIRAM_MEMTEST=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384 +# CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set +CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768 +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig index a162344cfb..a0a61d8392 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig @@ -1,8 +1,6 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - +# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP - diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig index 085c832318..e3a4d6ce68 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig @@ -1,27 +1,28 @@ CONFIG_ESP32S3_SPIRAM_SUPPORT=y - # # SPI RAM config # +CONFIG_SPIRAM_MODE_QUAD=y +# CONFIG_SPIRAM_MODE_OCT is not set # CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config -# -# PSRAM clock and cs IO for ESP32S3 -# CONFIG_DEFAULT_PSRAM_CLK_IO=30 +# +# PSRAM Clock and CS IO for ESP32S3 +# CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S3 +# end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_120M is not set CONFIG_SPIRAM_SPEED_80M=y # CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set CONFIG_SPIRAM=y CONFIG_SPIRAM_BOOT_INIT=y # CONFIG_SPIRAM_IGNORE_NOTFOUND is not set @@ -29,12 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_CAPS_ALLOC is not set # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP - diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig index 1a602c9ebc..f508f4a67c 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig @@ -1,25 +1,25 @@ CONFIG_ESP32S3_SPIRAM_SUPPORT=y - # # SPI RAM config # +# CONFIG_SPIRAM_MODE_QUAD is not set CONFIG_SPIRAM_MODE_OCT=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config -# -# PSRAM clock and cs IO for ESP32S3 -# CONFIG_DEFAULT_PSRAM_CLK_IO=30 +# +# PSRAM Clock and CS IO for ESP32S3 +# CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S3 +# end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set CONFIG_SPIRAM_SPEED_80M=y # CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set CONFIG_SPIRAM=y CONFIG_SPIRAM_BOOT_INIT=y # CONFIG_SPIRAM_IGNORE_NOTFOUND is not set @@ -27,12 +27,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_CAPS_ALLOC is not set # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP - diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig +++ b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_kaluga_1/sdkconfig b/ports/espressif/boards/espressif_kaluga_1/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/espressif_kaluga_1/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig index af73f6d885..7b07033d7b 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig @@ -1,3 +1,4 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig index cbdd787aa7..b31dd447e1 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig @@ -1,3 +1,4 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig index 3862b27003..fe0857c4fb 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig index bc8328d1f1..23b3eea78d 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig index 5d52cbff44..8c401a6ff3 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig @@ -1,29 +1,37 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # +# CONFIG_SPIRAM_TYPE_AUTO is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set CONFIG_SPIRAM=y CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MALLOC=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-T8-ESP32-S2" -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y # end of LWIP diff --git a/ports/espressif/boards/lolin_s2_mini/sdkconfig b/ports/espressif/boards/lolin_s2_mini/sdkconfig index 126ae31312..deb0dadcb9 100644 --- a/ports/espressif/boards/lolin_s2_mini/sdkconfig +++ b/ports/espressif/boards/lolin_s2_mini/sdkconfig @@ -1,24 +1,24 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # -# CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_26M is not set # CONFIG_SPIRAM_SPEED_20M is not set @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/lolin_s2_pico/sdkconfig b/ports/espressif/boards/lolin_s2_pico/sdkconfig index 36e83d7fb5..5ce352a98d 100644 --- a/ports/espressif/boards/lolin_s2_pico/sdkconfig +++ b/ports/espressif/boards/lolin_s2_pico/sdkconfig @@ -1,24 +1,24 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # -# CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_26M is not set # CONFIG_SPIRAM_SPEED_20M is not set @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/microdev_micro_s2/sdkconfig b/ports/espressif/boards/microdev_micro_s2/sdkconfig index b3c5219972..4b617fee71 100644 --- a/ports/espressif/boards/microdev_micro_s2/sdkconfig +++ b/ports/espressif/boards/microdev_micro_s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig index 36ada0b0c7..6de15d1556 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig +++ b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig @@ -1,6 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="MORPHESP-240" -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y -# end of LWIP \ No newline at end of file +# end of LWIP diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig index f67a257854..17c1995cd3 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig index c9d44460c5..8d785a6004 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig index 453aeb1d2d..4a5990b91d 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig @@ -1,18 +1,18 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # -# CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig index 00e0bb2566..8d785a6004 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,18 +7,17 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 -CONFIG_SPIRAM_SPIWP_SD3_PIN=28 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_USE_AHB_DBUS3 is not set # CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_26M is not set @@ -32,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig index 91447cdc2a..8539cb7519 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig @@ -1,24 +1,24 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # -# CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_26M is not set # CONFIG_SPIRAM_SPEED_20M is not set @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults index 2299feccd8..fac8ba1cad 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults @@ -1,9 +1,18 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Serial flasher config +# # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y CONFIG_ESPTOOLPY_FLASHSIZE="16MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +# end of Serial flasher config + CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-16MB.csv" -CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-16MB.csv" \ No newline at end of file +# +# Partition Table +# +CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-16MB.csv" +# end of Partition Table diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults index 4da90d1bcd..69f15ebe7b 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults @@ -1,9 +1,18 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Serial flasher config +# # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="4MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +# end of Serial flasher config + CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB.csv" -CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB.csv" \ No newline at end of file +# +# Partition Table +# +CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB.csv" +# end of Partition Table diff --git a/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults index af681c5ea8..b1506206df 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults @@ -1,9 +1,18 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Serial flasher config +# # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="8MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +# end of Serial flasher config + CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB.csv" -CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB.csv" \ No newline at end of file +# +# Partition Table +# +CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB.csv" +# end of Partition Table diff --git a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults index b108532aa2..381483a8b9 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults @@ -1,16 +1,78 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Bootloader config +# +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE is not set +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +# end of Bootloader config + +CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# +# Compiler options +# +# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +# end of Compiler options + CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# +# ESP System Settings +# +CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set +# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +# end of ESP System Settings + CONFIG_ESP_CONSOLE_UART_DEFAULT=y # CONFIG_ESP_CONSOLE_USB_CDC is not set # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set # CONFIG_ESP_CONSOLE_NONE is not set CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_MULTIPLE_UART=y CONFIG_ESP_CONSOLE_UART_NUM=0 CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG=y -CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y \ No newline at end of file +# +# FreeRTOS +# +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +# end of FreeRTOS + +CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y +# +# Hardware Abstraction Layer (HAL) and Low Level (LL) +# +# CONFIG_HAL_ASSERTION_DISABLE is not set +# CONFIG_HAL_ASSERTION_SILIENT is not set +# CONFIG_HAL_ASSERTION_ENABLE is not set +CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 +# end of Hardware Abstraction Layer (HAL) and Low Level (LL) + +CONFIG_LWIP_ESP_LWIP_ASSERT=y +# +# Deprecated options for backward compatibility +# +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults new file mode 100644 index 0000000000..a39afeb505 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -0,0 +1,139 @@ +# +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_TARGET_ARCH_RISCV=y +CONFIG_IDF_TARGET="esp32c3" +CONFIG_IDF_TARGET_ESP32C3=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0005 +# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration + +CONFIG_SDK_TOOLPREFIX="riscv32-esp-elf-" +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 +# end of Bootloader config + +# CONFIG_ESP32C3_DEFAULT_CPU_FREQ_80 is not set +# +# ESP32C3-Specific +# +CONFIG_ESP32C3_DEFAULT_CPU_FREQ_160=y +CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ=160 +# CONFIG_ESP32C3_REV_MIN_0 is not set +# CONFIG_ESP32C3_REV_MIN_1 is not set +# CONFIG_ESP32C3_REV_MIN_2 is not set +CONFIG_ESP32C3_REV_MIN_3=y +CONFIG_ESP32C3_REV_MIN=3 +CONFIG_ESP32C3_DEBUG_OCDAWARE=y +# CONFIG_ESP32C3_DEBUG_STUBS_ENABLE is not set +CONFIG_ESP32C3_BROWNOUT_DET=y +CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_7=y +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_2 is not set +CONFIG_ESP32C3_BROWNOUT_DET_LVL=7 +CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER=y +# CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32C3_TIME_SYSCALL_USE_SYSTIMER is not set +# CONFIG_ESP32C3_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32C3_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32C3_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32C3_RTC_CLK_CAL_CYCLES=1024 +# CONFIG_ESP32C3_NO_BLOBS is not set +# end of ESP32C3-Specific + +# CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO is not set +# +# MAC Config +# +CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES=4 +# end of MAC Config + +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +# +# Sleep Config +# +CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y +# end of Sleep Config + +CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y +# +# Memory protection +# +CONFIG_ESP_SYSTEM_MEMPROT_DEPCHECK=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y +CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 +CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=512 +# end of Memory protection + +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +# CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set +# end of Wi-Fi + +CONFIG_FREERTOS_UNICORE=y +# +# FreeRTOS +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +# end of FreeRTOS + +CONFIG_TOOLPREFIX="riscv32-esp-elf-" +# +# Deprecated options for backward compatibility +# +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ESP_SYSTEM_PD_FLASH=y +CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set +CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y +CONFIG_ESP32H2_MEMPROT_FEATURE=y +CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y +# CONFIG_EXTERNAL_COEX_ENABLE is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults new file mode 100644 index 0000000000..9020572ccb --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -0,0 +1,170 @@ +# +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_TARGET_ARCH_XTENSA=y +CONFIG_IDF_TARGET="esp32s2" +CONFIG_IDF_TARGET_ESP32S2=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0002 +# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration + +CONFIG_SDK_TOOLPREFIX="xtensa-esp32s2-elf-" +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 +# end of Bootloader config + +# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_80 is not set +# +# ESP32S2-specific +# +# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_160 is not set +CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ=240 +# end of ESP32S2-specific + +# CONFIG_ESP32S2_INSTRUCTION_CACHE_8KB is not set +# +# Cache config +# +CONFIG_ESP32S2_INSTRUCTION_CACHE_16KB=y +# CONFIG_ESP32S2_INSTRUCTION_CACHE_LINE_16B is not set +CONFIG_ESP32S2_INSTRUCTION_CACHE_LINE_32B=y +# CONFIG_ESP32S2_DATA_CACHE_0KB is not set +# CONFIG_ESP32S2_DATA_CACHE_8KB is not set +CONFIG_ESP32S2_DATA_CACHE_16KB=y +# CONFIG_ESP32S2_DATA_CACHE_LINE_16B is not set +CONFIG_ESP32S2_DATA_CACHE_LINE_32B=y +# CONFIG_ESP32S2_INSTRUCTION_CACHE_WRAP is not set +# CONFIG_ESP32S2_DATA_CACHE_WRAP is not set +# end of Cache config + +# CONFIG_ESP32S2_TRAX is not set +CONFIG_ESP32S2_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ESP32S2_ULP_COPROC_ENABLED is not set +CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=0 +CONFIG_ESP32S2_DEBUG_OCDAWARE=y +# CONFIG_ESP32S2_DEBUG_STUBS_ENABLE is not set +CONFIG_ESP32S2_BROWNOUT_DET=y +CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_7=y +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_1 is not set +CONFIG_ESP32S2_BROWNOUT_DET_LVL=7 +CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC_FRC1=y +# CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32S2_TIME_SYSCALL_USE_FRC1 is not set +# CONFIG_ESP32S2_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32S2_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32S2_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32S2_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32S2_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32S2_RTC_CLK_CAL_CYCLES=576 +# CONFIG_ESP32S2_NO_BLOBS is not set +# CONFIG_ESP32S2_KEEP_USB_ALIVE is not set +# CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM is not set +# CONFIG_ESP32S2_USE_FIXED_STATIC_RAM_SIZE is not set +# +# MAC Config +# +# CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE is not set +CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO=y +CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES=2 +# end of MAC Config + +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +# +# Sleep Config +# +# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set +# end of Sleep Config + +# +# ESP System Settings +# +CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y +# end of ESP System Settings + +CONFIG_ESP_SYSTEM_MEMPROT_DEPCHECK=y +# +# Memory protection +# +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y +CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 +CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=4 +# end of Memory protection + +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +# CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set +# end of Wi-Fi + +CONFIG_FREERTOS_UNICORE=y +# +# FreeRTOS +# +CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER=y +CONFIG_FREERTOS_CORETIMER_0=y +# CONFIG_FREERTOS_CORETIMER_1 is not set +CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +# end of FreeRTOS + +CONFIG_MBEDTLS_HARDWARE_GCM=y +# +# Deprecated options for backward compatibility +# +CONFIG_TOOLPREFIX="xtensa-esp32s2-elf-" +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ESP_SYSTEM_PD_FLASH=y +# CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +CONFIG_ESP32S2_PANIC_PRINT_HALT=y +# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set +# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y +CONFIG_ESP32H2_MEMPROT_FEATURE=y +CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y +# CONFIG_EXTERNAL_COEX_ENABLE is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults new file mode 100644 index 0000000000..d190f0b864 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -0,0 +1,149 @@ +# +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_TARGET_ARCH_XTENSA=y +CONFIG_IDF_TARGET="esp32s3" +CONFIG_IDF_TARGET_ESP32S3=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0009 +# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration + +CONFIG_SDK_TOOLPREFIX="xtensa-esp32s3-elf-" +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 +# end of Bootloader config + +# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_80 is not set +# +# ESP32S3-Specific +# +# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_160 is not set +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=240 +# end of ESP32S3-Specific + +CONFIG_ESP32S3_INSTRUCTION_CACHE_16KB=y +# +# Cache config +# +# CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB is not set +CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE=0x4000 +# CONFIG_ESP32S3_INSTRUCTION_CACHE_4WAYS is not set +CONFIG_ESP32S3_INSTRUCTION_CACHE_8WAYS=y +CONFIG_ESP32S3_ICACHE_ASSOCIATED_WAYS=8 +# CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_16B is not set +CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_32B=y +CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_SIZE=32 +# CONFIG_ESP32S3_INSTRUCTION_CACHE_WRAP is not set +# CONFIG_ESP32S3_DATA_CACHE_16KB is not set +CONFIG_ESP32S3_DATA_CACHE_32KB=y +# CONFIG_ESP32S3_DATA_CACHE_64KB is not set +CONFIG_ESP32S3_DATA_CACHE_SIZE=0x8000 +# CONFIG_ESP32S3_DATA_CACHE_4WAYS is not set +CONFIG_ESP32S3_DATA_CACHE_8WAYS=y +CONFIG_ESP32S3_DCACHE_ASSOCIATED_WAYS=8 +# CONFIG_ESP32S3_DATA_CACHE_LINE_16B is not set +CONFIG_ESP32S3_DATA_CACHE_LINE_32B=y +# CONFIG_ESP32S3_DATA_CACHE_LINE_64B is not set +CONFIG_ESP32S3_DATA_CACHE_LINE_SIZE=32 +# CONFIG_ESP32S3_DATA_CACHE_WRAP is not set +# end of Cache config + +# CONFIG_ESP32S3_TRAX is not set +CONFIG_ESP32S3_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ESP32S3_ULP_COPROC_ENABLED is not set +CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=0 +# CONFIG_ESP32S3_DEBUG_STUBS_ENABLE is not set +CONFIG_ESP32S3_BROWNOUT_DET=y +CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_7=y +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_1 is not set +CONFIG_ESP32S3_BROWNOUT_DET_LVL=7 +CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC_FRC1=y +# CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32S3_TIME_SYSCALL_USE_FRC1 is not set +# CONFIG_ESP32S3_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32S3_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32S3_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32S3_RTC_CLK_CAL_CYCLES=1024 +CONFIG_ESP32S3_DEEP_SLEEP_WAKEUP_DELAY=2000 +# CONFIG_ESP32S3_NO_BLOBS is not set +# CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM is not set +# CONFIG_ESP32S3_USE_FIXED_STATIC_RAM_SIZE is not set +# +# MAC Config +# +# CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 +# end of MAC Config + +CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +# CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED is not set +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y +# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +# end of Wi-Fi + +# CONFIG_FREERTOS_UNICORE is not set +# +# Deprecated options for backward compatibility +# +CONFIG_TOOLPREFIX="xtensa-esp32s3-elf-" +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set +CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults index b24996c0f7..0d0e75af0e 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults @@ -1,10 +1,82 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Bootloader config +# +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +# end of Bootloader config + +# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set +# +# Compiler options +# +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=1 +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +# end of Compiler options + +CONFIG_ESP32S3_DEBUG_OCDAWARE=y +# +# Common ESP-related +# # CONFIG_ESP_ERR_TO_NAME_LOOKUP is not set -# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set -# CONFIG_CONSOLE_UART_DEFAULT is not set -CONFIG_ESP_CONSOLE_UART_NONE=y -CONFIG_ESP_CONSOLE_NONE=y -CONFIG_ESP_CONSOLE_UART_NUM=-1 -CONFIG_CONSOLE_UART_NUM=-1 +# end of Common ESP-related + # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set -CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y \ No newline at end of file +# +# ESP System Settings +# +# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set +CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +# end of ESP System Settings + +# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set +# CONFIG_ESP_CONSOLE_USB_CDC is not set +# CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG is not set +# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set +CONFIG_ESP_CONSOLE_NONE=y +# CONFIG_ESP_CONSOLE_SECONDARY_NONE is not set +CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG=y +CONFIG_ESP_CONSOLE_MULTIPLE_UART=y +CONFIG_ESP_CONSOLE_UART_NUM=-1 +# +# FreeRTOS +# +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +# end of FreeRTOS + +CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y +# +# Hardware Abstraction Layer (HAL) and Low Level (LL) +# +# CONFIG_HAL_ASSERTION_DISABLE is not set +# CONFIG_HAL_ASSERTION_SILIENT is not set +CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=1 +# end of Hardware Abstraction Layer (HAL) and Low Level (LL) + +CONFIG_LWIP_ESP_LWIP_ASSERT=y +# +# Deprecated options for backward compatibility +# +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set +CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y +# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set +CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +CONFIG_OPTIMIZATION_ASSERTION_LEVEL=1 +# CONFIG_CONSOLE_UART_DEFAULT is not set +# CONFIG_CONSOLE_UART_CUSTOM is not set +CONFIG_ESP_CONSOLE_UART_NONE=y +CONFIG_CONSOLE_UART_NUM=-1 +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 67e2594339..f4efac4063 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -1,127 +1,549 @@ # +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_CMAKE=y +# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration + +# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set +# +# Build type +# +CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y +# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set +CONFIG_APP_BUILD_GENERATE_BINARIES=y +CONFIG_APP_BUILD_BOOTLOADER=y +CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y +# end of Build type + +CONFIG_APP_COMPILE_TIME_DATE=y +# +# Application manager +# +# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set +# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set +# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 +# end of Application manager + +# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set +# +# Bootloader config +# +# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set +CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set +CONFIG_BOOTLOADER_LOG_LEVEL=3 +# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +# CONFIG_BOOTLOADER_FACTORY_RESET is not set +# CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_WDT_ENABLE=y +# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set +CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 +# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set +CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y +# end of Bootloader config + +CONFIG_SECURE_BOOT_SUPPORTS_RSA=y +# +# Security features +# +CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y +# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set +# CONFIG_SECURE_BOOT is not set +# CONFIG_SECURE_FLASH_ENC_ENABLED is not set +# end of Security features + +CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y +# +# Boot ROM Behavior +# +# CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set +# CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set +# CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set +# end of Boot ROM Behavior + +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +# # Serial flasher config # +# CONFIG_ESPTOOLPY_NO_STUB is not set +# CONFIG_ESPTOOLPY_OCT_FLASH is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y +CONFIG_ESPTOOLPY_FLASHMODE="dio" +# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_BEFORE_RESET=y +# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +# CONFIG_ESPTOOLPY_AFTER_NORESET is not set +CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 # end of Serial flasher config +# CONFIG_PARTITION_TABLE_SINGLE_APP is not set # # Partition Table # -# CONFIG_PARTITION_TABLE_SINGLE_APP is not set +# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set +# CONFIG_PARTITION_TABLE_TWO_OTA is not set CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y # end of Partition Table +CONFIG_COMPILER_HIDE_PATHS_MACROS=y # # Compiler options # -# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set -CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_COMPILER_CXX_EXCEPTIONS is not set +# CONFIG_COMPILER_CXX_RTTI is not set +CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set +# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set +# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# CONFIG_COMPILER_DUMP_RTL_FILES is not set # end of Compiler options +# CONFIG_APPTRACE_DEST_JTAG is not set +# +# Application Level Tracing +# +CONFIG_APPTRACE_DEST_NONE=y +CONFIG_APPTRACE_LOCK_ENABLE=y +# end of Application Level Tracing + +# CONFIG_ADC_FORCE_XPD_FSM is not set +# +# ADC configuration +# +CONFIG_ADC_DISABLE_DAC=y +# end of ADC configuration + +# CONFIG_MCPWM_ISR_IN_IRAM is not set +# +# SPI configuration +# +# CONFIG_SPI_MASTER_IN_IRAM is not set +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +# CONFIG_SPI_SLAVE_IN_IRAM is not set +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# end of SPI configuration + +# CONFIG_TWAI_ISR_IN_IRAM is not set +# +# UART configuration +# +# CONFIG_UART_ISR_IN_IRAM is not set +# end of UART configuration + +# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set +# +# GDMA Configuration +# +# CONFIG_GDMA_ISR_IRAM_SAFE is not set +# end of GDMA Configuration + +# CONFIG_EFUSE_CUSTOM_TABLE is not set +# +# eFuse Bit Manager +# +# CONFIG_EFUSE_VIRTUAL is not set +CONFIG_EFUSE_MAX_BLK_LEN=256 +# end of eFuse Bit Manager + +CONFIG_ESP_TLS_USING_MBEDTLS=y # # ESP-TLS # +CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y CONFIG_ESP_TLS_SERVER=y +# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_PSK_VERIFICATION is not set +# CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS -# -# ESP32S2-specific -# -# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ=240 -# -# Cache config -# -# CONFIG_ESP32S2_INSTRUCTION_CACHE_8KB is not set -CONFIG_ESP32S2_INSTRUCTION_CACHE_16KB=y -# CONFIG_ESP32S2_DATA_CACHE_8KB is not set -CONFIG_ESP32S2_DATA_CACHE_16KB=y -# end of Cache config -# end of ESP32S2-specific - -# -# ESP32S3-specific -# -# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=240 -# end of ESP32S3-specific - -# -# Common ESP-related -# -CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 -# CONFIG_ESP_TASK_WDT is not set -# end of Common ESP-related - +# CONFIG_ETH_USE_SPI_ETHERNET is not set # # Ethernet # -# CONFIG_ETH_USE_SPI_ETHERNET is not set +# CONFIG_ETH_USE_OPENETH is not set # end of Ethernet +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set +# +# Event Loop Library +# +CONFIG_ESP_EVENT_POST_FROM_ISR=y +CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y +# end of Event Loop Library + +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y +# +# MAC Config +# +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +# end of MAC Config + +CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y +# +# Sleep Config +# +# CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND is not set +# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +# end of Sleep Config + +CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 +# +# IPC (Inter-Processor Call) +# +CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y +CONFIG_ESP_IPC_ISR_ENABLE=y +# end of IPC (Inter-Processor Call) + +CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 # # ESP NETIF Adapter # +CONFIG_ESP_NETIF_TCPIP_LWIP=y +# CONFIG_ESP_NETIF_LOOPBACK is not set # CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER is not set # end of ESP NETIF Adapter +CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y +# +# PHY +# +# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP_PHY_MAX_TX_POWER=20 +# end of PHY + +# CONFIG_PM_ENABLE is not set +# +# Power Management +# +CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y +CONFIG_PM_POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP=y +# end of Power Management + +# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set +# +# ESP System Settings +# +CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y +CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y +# end of ESP System Settings + +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 +CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 +CONFIG_ESP_INT_WDT=y +CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 +CONFIG_ESP_INT_WDT_CHECK_CPU1=y +# CONFIG_ESP_TASK_WDT is not set +# CONFIG_ESP_PANIC_HANDLER_IRAM is not set +CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y +# +# High resolution timer (esp_timer) +# +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y +CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 +# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set +CONFIG_ESP_TIMER_IMPL_SYSTIMER=y +# end of High resolution timer (esp_timer) + +# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set # # Wi-Fi # -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set -# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +# CONFIG_ESP_WIFI_FTM_ENABLE is not set +# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set +# CONFIG_ESP_WIFI_GCMP_SUPPORT is not set +# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # end of Wi-Fi +# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +# +# Core dump +# +# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +# end of Core dump + +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF # # FreeRTOS # +CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER=y +CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1=y +# CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL3 is not set +CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER=y +CONFIG_FREERTOS_HZ=100 +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +# CONFIG_FREERTOS_LEGACY_HOOKS is not set +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y +# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set +# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set +CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y +# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set # end of FreeRTOS +CONFIG_HEAP_POISONING_DISABLED=y +# +# Heap memory debugging +# +# CONFIG_HEAP_POISONING_LIGHT is not set +# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set +CONFIG_HEAP_TRACING_OFF=y +# CONFIG_HEAP_TRACING_STANDALONE is not set +# CONFIG_HEAP_TRACING_TOHOST is not set +# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +# end of Heap memory debugging + +# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set +# +# Log output +# +# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set +# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set +# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set +CONFIG_LOG_MAXIMUM_LEVEL=3 +CONFIG_LOG_COLORS=y +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set +# end of Log output + +# CONFIG_LWIP_NETIF_API is not set # # LWIP # +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# CONFIG_LWIP_L2_TO_L3_COPY is not set +# CONFIG_LWIP_IRAM_OPTIMIZATION is not set +CONFIG_LWIP_TIMERS_ONDEMAND=y CONFIG_LWIP_MAX_SOCKETS=4 +# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y CONFIG_LWIP_SO_RCVBUF=y +# CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP4_REASSEMBLY is not set +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# CONFIG_LWIP_IP_FORWARD is not set +# CONFIG_LWIP_STATS is not set +# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set +CONFIG_LWIP_ESP_GRATUITOUS_ARP=y +CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +# end of LWIP + +CONFIG_LWIP_DHCPS=y +# +# DHCP server +# +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +# end of DHCP server + +# CONFIG_LWIP_AUTOIP is not set +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 # # TCP # CONFIG_LWIP_MAX_ACTIVE_TCP=4 CONFIG_LWIP_MAX_LISTENING_TCP=4 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 CONFIG_LWIP_TCP_SYNMAXRTX=6 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 CONFIG_LWIP_TCP_WND_DEFAULT=2880 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set CONFIG_LWIP_TCP_RTO_TIME=3000 # end of TCP -# end of LWIP +CONFIG_LWIP_MAX_UDP_PCBS=16 +# +# UDP +# +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# end of UDP + +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# CONFIG_LWIP_SLIP_SUPPORT is not set +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +CONFIG_LWIP_MAX_RAW_PCBS=16 +# +# SNTP +# +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +# end of SNTP + +# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set +# +# Hooks +# +CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y +# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set +CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y +# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set +# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set +CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y +# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set +# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set +CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set +# end of Hooks + +# CONFIG_LWIP_DEBUG is not set # # mbedTLS # +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set +# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y +CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 -CONFIG_MBEDTLS_DYNAMIC_BUFFER=y -CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y -CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y -CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT=y +# CONFIG_MBEDTLS_DEBUG is not set +# end of mbedTLS + +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y # # Certificate Bundle # -CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL is not set +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="certificates/nina-fw/data/roots.pem" # end of Certificate Bundle + +# CONFIG_MBEDTLS_ECP_RESTARTABLE is not set +# CONFIG_MBEDTLS_CMAC_C is not set +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_AES_USE_INTERRUPT=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_ROM_MD5=y +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set +CONFIG_MBEDTLS_HAVE_TIME=y +# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set +CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y +CONFIG_MBEDTLS_SHA512_C=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set +# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set +# CONFIG_MBEDTLS_TLS_DISABLED is not set +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y # # TLS Key Exchange Methods # @@ -130,30 +552,243 @@ CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y # end of TLS Key Exchange Methods + +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set # CONFIG_MBEDTLS_SSL_PROTO_TLS1 is not set # CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 is not set +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set CONFIG_MBEDTLS_SSL_PROTO_DTLS=y -# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set -# end of mbedTLS +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y +CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y +CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +# CONFIG_MBEDTLS_CAMELLIA_C is not set +# CONFIG_MBEDTLS_DES_C is not set +CONFIG_MBEDTLS_RC4_DISABLED=y +# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set +# CONFIG_MBEDTLS_RC4_ENABLED is not set +# CONFIG_MBEDTLS_BLOWFISH_C is not set +# CONFIG_MBEDTLS_XTEA_C is not set +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +# CONFIG_MBEDTLS_NIST_KW_C is not set +# end of Symmetric Ciphers +# CONFIG_MBEDTLS_RIPEMD160_C is not set +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# end of Certificates + +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +# CONFIG_MBEDTLS_ECJPAKE_C is not set +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y +# CONFIG_MBEDTLS_POLY1305_C is not set +# CONFIG_MBEDTLS_CHACHA20_C is not set +# CONFIG_MBEDTLS_HKDF_C is not set +# CONFIG_MBEDTLS_THREADING_C is not set +# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set +# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# +# Newlib +# +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set +# end of Newlib + +# CONFIG_OPENTHREAD_ENABLED is not set +# +# PThreads +# +CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y +# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set +# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set +CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of PThreads + +# CONFIG_SPI_FLASH_VERIFY_WRITE is not set # # SPI Flash driver # +# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +# CONFIG_SPI_FLASH_ROM_IMPL is not set +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set +# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set +# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set # CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set +# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set +# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set # end of SPI Flash driver +CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y +# +# Auto-detect flash chips +# +CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP=y +# end of Auto-detect flash chips + +CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y +# +# Virtual file system +# +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +CONFIG_VFS_SUPPORT_SELECT=y +CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_VFS_SUPPORT_TERMIOS=y +# end of Virtual file system + +CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +# +# Host File System I/O (Semihosting) +# +CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Host File System I/O (Semihosting) + +CONFIG_WPA_MBEDTLS_CRYPTO=y +# +# Supplicant +# +# CONFIG_WPA_WAPI_PSK is not set +# CONFIG_WPA_SUITE_B_192 is not set +# CONFIG_WPA_DEBUG_PRINT is not set +# CONFIG_WPA_TESTING_OPTIONS is not set +# CONFIG_WPA_WPS_STRICT is not set +# CONFIG_WPA_11KV_SUPPORT is not set +# end of Supplicant + +# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set # # Deprecated options for backward compatibility # -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set -CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y -# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set -CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set +CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 +# CONFIG_CXX_EXCEPTIONS is not set +CONFIG_STACK_CHECK_NONE=y +# CONFIG_STACK_CHECK_NORM is not set +# CONFIG_STACK_CHECK_STRONG is not set +# CONFIG_STACK_CHECK_ALL is not set +# CONFIG_WARN_WRITE_STRINGS is not set +# CONFIG_DISABLE_GCC8_WARNINGS is not set +CONFIG_ADC2_DISABLE_DAC=y +# CONFIG_EVENT_LOOP_PROFILING is not set +CONFIG_POST_EVENTS_FROM_ISR=y +CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +CONFIG_IPC_TASK_STACK_SIZE=1536 +CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU=y +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 CONFIG_MAIN_TASK_STACK_SIZE=8192 +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y # CONFIG_TASK_WDT is not set +CONFIG_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_L2_TO_L3_COPY is not set +# CONFIG_USE_ONLY_LWIP_SELECT is not set +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_TCP_MAXRTX=12 CONFIG_TCP_SYNMAXRTX=6 +CONFIG_TCP_MSS=1440 +CONFIG_TCP_MSL=60000 CONFIG_TCP_SND_BUF_DEFAULT=2880 CONFIG_TCP_WND_DEFAULT=2880 -# End of deprecated options +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_TCP_OVERSIZE_MSS=y +# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_PPP_SUPPORT is not set +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y +CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/tools/generate_all_sdkconfig.py b/ports/espressif/tools/generate_all_sdkconfig.py new file mode 100644 index 0000000000..a3589c34bb --- /dev/null +++ b/ports/espressif/tools/generate_all_sdkconfig.py @@ -0,0 +1,25 @@ +import pathlib +import sys +import shlex +import shutil +import subprocess + +output_dir = pathlib.Path(sys.argv[-1]) +output_dir.mkdir(parents=True, exist_ok=True) + + +def run(cmd): + subprocess.run(shlex.split(cmd), capture_output=True) + + +for board in pathlib.Path("boards/").glob("*/"): + board = board.name + print(board) + run(f"make BOARD={board} DEBUG=1 build-{board}/esp-idf/config/sdkconfig.h") + shutil.copyfile(f"build-{board}/esp-idf/sdkconfig", output_dir / (board + "-debug.sdkconfig")) + # run(f"python tools/update_sdkconfig.py --board={board} --update_all --debug=1") + run(f"make BOARD={board} DEBUG=1 clean") + run(f"make BOARD={board} build-{board}/esp-idf/config/sdkconfig.h") + shutil.copyfile(f"build-{board}/esp-idf/sdkconfig", output_dir / (board + "-opt.sdkconfig")) + # run(f"python tools/update_sdkconfig.py --board={board} --update_all") + run(f"make BOARD={board} clean") diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py new file mode 100644 index 0000000000..4b6114336e --- /dev/null +++ b/ports/espressif/tools/update_sdkconfig.py @@ -0,0 +1,180 @@ +"""This script updates the sdkconfigs based on the menuconfig results in a given + build.""" + +import pathlib +import click + +OPT_SETTINGS = [ + "CONFIG_ESP_ERR_TO_NAME_LOOKUP", + "CONFIG_ESP_CONSOLE_", + "CONFIG_CONSOLE_UART_", + "CONFIG_ESP_SYSTEM_PANIC_", + "COMPILER_OPTIMIZATION_", + "CONFIG_ESP32S3_DEBUG_OCDAWARE", + "CONFIG_FREERTOS_ASSERT_", + "CONFIG_FREERTOS_DEBUG_OCDAWARE", + "CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER", + "CONFIG_HAL_ASSERTION_", + "CONFIG_LWIP_ESP_LWIP_ASSERT", + "CONFIG_OPTIMIZATION_ASSERTION_LEVEL", + "CONFIG_OPTIMIZATION_ASSERTIONS_", + "CONFIG_HAL_DEFAULT_ASSERTION_LEVEL", +] + +TARGET_SETTINGS = [ + "CONFIG_IDF_TARGET", + "CONFIG_IDF_FIRMWARE_CHIP_ID", + "CONFIG_BOOTLOADER_OFFSET_IN_FLASH", + "CONFIG_ESP32_", + "CONFIG_ESP32C3_", + "CONFIG_ESP32S2_", + "CONFIG_ESP32S3_", + "CONFIG_ESP32H2_", + "CONFIG_ESP_SLEEP_POWER_DOWN_FLASH", + "CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE", + "CONFIG_ESP_SYSTEM_MEMPROT_", + "CONFIG_ESP_MAIN_TASK_AFFINITY", + "CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE", + "CONFIG_FREERTOS_UNICORE", + "CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER", + "CONFIG_FREERTOS_CORETIMER_0", + "CONFIG_FREERTOS_CORETIMER_1", + "CONFIG_FREERTOS_SYSTICK_USES_CCOUNT", + "CONFIG_FREERTOS_OPTIMIZED_SCHEDULER", + "CONFIG_MBEDTLS_HARDWARE_GCM", + "CONFIG_ESP_SYSTEM_PD_FLASH", + "CONFIG_EXTERNAL_COEX_ENABLE", + "CONFIG_SDK_TOOLPREFIX", + "CONFIG_TOOLPREFIX", + "ESP_SLEEP_GPIO_RESET_WORKAROUND", +] + +BOARD_SETTINGS = [ + "PSRAM clock and cs IO for ESP32S3", + "CONFIG_SPIRAM", + "CONFIG_DEFAULT_PSRAM_", + "_SPIRAM_SUPPORT", + "CONFIG_LWIP_LOCAL_HOSTNAME", +] + +FLASH_SETTINGS = [ + "CONFIG_ESPTOOLPY_FLASHSIZE", + "CONFIG_PARTITION_TABLE_CUSTOM_FILENAME", + "CONFIG_PARTITION_TABLE_FILENAME", +] + +# boards/lilygo_ttgo_t8_s2_st7789/sdkconfig +# CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y + +# boards/morpheans_morphesp-240/sdkconfig +# CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y + + +def matches_group(line, group): + for setting in group: + if setting in line: + return True + return False + + +def add_group(lines, last_group, current_group): + if last_group != current_group: + if last_group: + lines.append("# end of " + last_group) + lines.append("") + return None + if current_group: + lines.append("#") + lines.append("# " + current_group) + lines.append("#") + return current_group + return last_group + + +@click.command() +@click.option("--debug") +@click.option("--board") +@click.option( + "--update_all", + is_flag=True, + default=False, + help="Updates the sdkconfigs outside of the board directory.", +) +def update(debug, board, update_all): + """Simple program that greets NAME for a total of COUNT times.""" + + board_make = pathlib.Path(f"boards/{board}/mpconfigboard.mk") + for line in board_make.read_text().split("\n"): + if line.startswith("IDF_TARGET"): + target = line.split("=")[1].strip() + elif line.startswith("CIRCUITPY_ESP_FLASH_SIZE"): + flash = line.split("=")[1].strip() + + input_config = pathlib.Path(f"build-{board}/esp-idf/sdkconfig") + default_config = pathlib.Path("esp-idf-config/sdkconfig.defaults") + if debug: + opt_config = pathlib.Path("esp-idf-config/sdkconfig-debug.defaults") + else: + opt_config = pathlib.Path("esp-idf-config/sdkconfig-opt.defaults") + flash_config = pathlib.Path(f"esp-idf-config/sdkconfig-{flash}.defaults") + target_config = pathlib.Path(f"esp-idf-config/sdkconfig-{target}.defaults") + board_config = pathlib.Path(f"boards/{board}/sdkconfig") + + defaults = default_config.read_text().split("\n") + defaults.extend(opt_config.read_text().split("\n")) + defaults.extend(flash_config.read_text().split("\n")) + defaults.extend(target_config.read_text().split("\n")) + + board_settings = [] + last_board_group = None + flash_settings = [] + last_flash_group = None + opt_settings = [] + last_opt_group = None + target_settings = [] + last_target_group = None + default_settings = [] + last_default_group = None + current_group = None + for line in input_config.read_text().split("\n"): + if line.startswith("# ") and "CONFIG_" not in line and len(line) > 3: + if line.startswith("# end of"): + current_group = None + else: + current_group = line[2:] + + if (not update_all and line not in defaults) or ( + update_all and matches_group(line, BOARD_SETTINGS) + ): + last_board_group = add_group(board_settings, last_board_group, current_group) + board_settings.append(line) + elif update_all: + if matches_group(line, OPT_SETTINGS): + last_opt_group = add_group(opt_settings, last_opt_group, current_group) + opt_settings.append(line) + elif matches_group(line, FLASH_SETTINGS): + last_flash_group = add_group(flash_settings, last_flash_group, current_group) + flash_settings.append(line) + elif matches_group(line, TARGET_SETTINGS): + last_target_group = add_group(target_settings, last_target_group, current_group) + target_settings.append(line) + elif "CONFIG_" in line: + last_default_group = add_group(default_settings, last_default_group, current_group) + default_settings.append(line) + + add_group(board_settings, last_board_group, current_group) + add_group(opt_settings, last_opt_group, current_group) + add_group(flash_settings, last_flash_group, current_group) + add_group(target_settings, last_target_group, current_group) + add_group(default_settings, last_default_group, current_group) + + board_config.write_text("\n".join(board_settings)) + if update_all: + flash_config.write_text("\n".join(flash_settings)) + opt_config.write_text("\n".join(opt_settings)) + default_config.write_text("\n".join(default_settings)) + target_config.write_text("\n".join(target_settings)) + + +if __name__ == "__main__": + update() From 869cf5eba59d084f4cf484fa9ad3bf48cdd28574 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 12 Jan 2022 14:55:22 -0800 Subject: [PATCH 206/258] Run USB on the same core as CP --- ports/espressif/Makefile | 8 +++++--- ports/espressif/supervisor/usb.c | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 825663d87b..36d4726ddf 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -289,6 +289,7 @@ IDF_PATH = $(realpath ./esp-idf) $(BUILD)/esp-idf: $(Q)$(MKDIR) -p $@ +TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults ifeq ($(DEBUG), 1) DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-debug.defaults @@ -317,10 +318,11 @@ $(BUILD)/esp-idf/partition_table/partition-table.bin: $(BUILD)/esp-idf/config/sd IDF_PATH=$(IDF_PATH) ninja -C $(BUILD)/esp-idf partition_table/partition-table.bin # run menuconfig and then remove standard settings -menuconfig: $(BUILD)/esp-idf/config +menuconfig: $(BUILD)/esp-idf/config $(BUILD)/esp-idf/config/sdkconfig.h $(Q)ninja -C $(BUILD)/esp-idf menuconfig - $(Q)diff --old-line-format= --unchanged-line-format= esp-idf-config/sdkconfig.defaults $(BUILD)/esp-idf/sdkconfig > $(BUILD)/sdkconfig.diff || true - $(Q)grep -Fvxf $(DEBUG_SDKCONFIG) -f $(FLASH_SDKCONFIG) $(BUILD)/sdkconfig.diff > boards/$(BOARD)/sdkconfig + # Newer versions of the idf will have save-defconfig that will only include non-default values. + # We should use that when available. For now, we sort out everything. + python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) # qstr builds include headers so we need to make sure they are up to date $(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h diff --git a/ports/espressif/supervisor/usb.c b/ports/espressif/supervisor/usb.c index 7be3e84536..30f9be82a3 100644 --- a/ports/espressif/supervisor/usb.c +++ b/ports/espressif/supervisor/usb.c @@ -109,13 +109,16 @@ void init_usb_hardware(void) { usb_hal_init(&hal); configure_pins(&hal); - (void)xTaskCreateStatic(usb_device_task, + // Pin the USB task to the same core as CircuitPython. This way we leave + // the other core for networking. + (void)xTaskCreateStaticPinnedToCore(usb_device_task, "usbd", USBD_STACK_SIZE, NULL, 5, usb_device_stack, - &usb_device_taskdef); + &usb_device_taskdef, + xPortGetCoreID()); } /** From c87d9c947bb12db9f2664199154ca8f1668a7e94 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 14 Jan 2022 08:53:24 -0600 Subject: [PATCH 207/258] patch esp-idf for i2c crash In theory, this Closes: #5680 -- I didn't test it on HW yet. --- .gitmodules | 2 +- ports/espressif/esp-idf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 9376daebdc..89fbf6b263 100644 --- a/.gitmodules +++ b/.gitmodules @@ -148,7 +148,7 @@ url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git [submodule "ports/espressif/esp-idf"] path = ports/espressif/esp-idf - url = https://github.com/espressif/esp-idf.git + url = https://github.com/adafruit/esp-idf.git branch = release/v4.4 [submodule "ports/espressif/certificates/nina-fw"] path = ports/espressif/certificates/nina-fw diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index 214d62b9ad..2f5ecfd41b 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit 214d62b9ad859318520e38870c828278c2caee2a +Subproject commit 2f5ecfd41b4637dc8d9da6452f9e78824a64a20a From ae8284d2681a2f82812ae4cfb6e3b4cce354c518 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Fri, 14 Jan 2022 11:46:48 -0500 Subject: [PATCH 208/258] Update submodule instructions. --- BUILDING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index f7598dced1..fc7b116595 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -15,7 +15,7 @@ https://learn.adafruit.com/building-circuitpython/ ## Setup -Please ensure you setup your build environment appropriately, as per the guide. You will need: +Please ensure you set up your build environment appropriately, as per the guide. You will need: * Linux: https://learn.adafruit.com/building-circuitpython/linux * MacOS: https://learn.adafruit.com/building-circuitpython/macos @@ -25,8 +25,9 @@ Please ensure you setup your build environment appropriately, as per the guide. This project has a bunch of git submodules. You will need to update them regularly. - git submodule sync - git submodule update --init +In the root folder of the CircuitPython repository, execute the following: + + make fetch-submodules ### Required Python Packages From d54e5c86735ce316a9b8cd9055a4037874c04d3c Mon Sep 17 00:00:00 2001 From: Alec Delaney Date: Fri, 14 Jan 2022 13:26:57 -0500 Subject: [PATCH 209/258] Add breadcrumbs.html to prevent "Edit on Github" link --- docs/templates/breadcrumbs.html | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 docs/templates/breadcrumbs.html diff --git a/docs/templates/breadcrumbs.html b/docs/templates/breadcrumbs.html new file mode 100644 index 0000000000..339f008b94 --- /dev/null +++ b/docs/templates/breadcrumbs.html @@ -0,0 +1,4 @@ +{%- extends "sphinx_rtd_theme/breadcrumbs.html" %} + +{% block breadcrumbs_aside %} +{% endblock %} \ No newline at end of file From 5d6ef60fb4509a09e6012052d930475050cea47b Mon Sep 17 00:00:00 2001 From: Alec Delaney Date: Fri, 14 Jan 2022 13:29:13 -0500 Subject: [PATCH 210/258] Add newline at end of breadcrumbs.html --- docs/templates/breadcrumbs.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/templates/breadcrumbs.html b/docs/templates/breadcrumbs.html index 339f008b94..4ecb013f86 100644 --- a/docs/templates/breadcrumbs.html +++ b/docs/templates/breadcrumbs.html @@ -1,4 +1,4 @@ {%- extends "sphinx_rtd_theme/breadcrumbs.html" %} {% block breadcrumbs_aside %} -{% endblock %} \ No newline at end of file +{% endblock %} From 993e51e5cc0a74bc232c05f9089c2d04886fecf6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 14 Jan 2022 11:52:14 -0800 Subject: [PATCH 211/258] Fix USB when enabling wifi --- ports/espressif/esp-idf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index 2f5ecfd41b..6db2ebd789 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit 2f5ecfd41b4637dc8d9da6452f9e78824a64a20a +Subproject commit 6db2ebd7897be544ad0f169871db4b13b4c0941e From af353c9b59df0a9810c38f5bb6b444451ec305ad Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 14 Jan 2022 14:15:51 -0600 Subject: [PATCH 212/258] update to ulab 4.0.0 --- extmod/ulab | 2 +- locale/circuitpython.pot | 68 +++++++++++++++++++++++++++++++--------- py/circuitpy_mpconfig.h | 4 +++ 3 files changed, 59 insertions(+), 15 deletions(-) diff --git a/extmod/ulab b/extmod/ulab index a99e0b9878..0c7c6b88f3 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit a99e0b98787266369eaa33bdae271de761eca05b +Subproject commit 0c7c6b88f3ec1b1d11d2f7d8b185e28ac657c06d diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 4a90a1437d..121eac2049 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -2624,7 +2624,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2680,11 +2680,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2776,6 +2776,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2870,6 +2874,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3061,6 +3073,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3164,7 +3180,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3229,6 +3245,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3342,7 +3362,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3350,7 +3370,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3358,6 +3378,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3367,18 +3391,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3749,7 +3781,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3807,7 +3843,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3815,7 +3851,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4294,7 +4330,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4495,7 +4531,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4503,7 +4539,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 6efc341fce..7ffb5b7e13 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -337,6 +337,10 @@ extern const struct _mp_obj_module_t nvm_module; #endif #endif +#ifndef ULAB_SUPPORTS_COMPLEX +#define ULAB_SUPPORTS_COMPLEX (0) +#endif + #if CIRCUITPY_ULAB // ulab requires reverse special methods #if defined(MICROPY_PY_REVERSE_SPECIAL_METHODS) && !MICROPY_PY_REVERSE_SPECIAL_METHODS From f6cf15de434e77a4eb2f2846ef57da174372e62b Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 14 Jan 2022 12:22:12 -0800 Subject: [PATCH 213/258] Switch CP to core 1 on S3 --- ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults | 6 +++--- ports/espressif/esp-idf-config/sdkconfig.defaults | 1 + ports/espressif/tools/update_sdkconfig.py | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index d190f0b864..4f3614692b 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -86,10 +86,10 @@ CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 # end of MAC Config CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y -CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set +# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0 is not set +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y # CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +CONFIG_ESP_MAIN_TASK_AFFINITY=0x1 # # Wi-Fi # diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index f4efac4063..3bf9a09c26 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -246,6 +246,7 @@ CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP_PHY_MAX_TX_POWER=20 +CONFIG_ESP_PHY_ENABLE_USB=y # end of PHY # CONFIG_PM_ENABLE is not set diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 4b6114336e..a9d61532bb 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -9,6 +9,7 @@ OPT_SETTINGS = [ "CONFIG_ESP_CONSOLE_", "CONFIG_CONSOLE_UART_", "CONFIG_ESP_SYSTEM_PANIC_", + "CONFIG_ESP32S2_PANIC_", "COMPILER_OPTIMIZATION_", "CONFIG_ESP32S3_DEBUG_OCDAWARE", "CONFIG_FREERTOS_ASSERT_", @@ -142,8 +143,7 @@ def update(debug, board, update_all): current_group = None else: current_group = line[2:] - - if (not update_all and line not in defaults) or ( + elif (not update_all and line not in defaults) or ( update_all and matches_group(line, BOARD_SETTINGS) ): last_board_group = add_group(board_settings, last_board_group, current_group) From c70c8a93906085d61ab7346a7cf0826c72606cd8 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 15 Jan 2022 19:28:00 -0500 Subject: [PATCH 214/258] fix espressif open-drain --- ports/espressif/common-hal/digitalio/DigitalInOut.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/espressif/common-hal/digitalio/DigitalInOut.c b/ports/espressif/common-hal/digitalio/DigitalInOut.c index 24c5d5110d..b5199672b1 100644 --- a/ports/espressif/common-hal/digitalio/DigitalInOut.c +++ b/ports/espressif/common-hal/digitalio/DigitalInOut.c @@ -108,11 +108,9 @@ digitalinout_result_t common_hal_digitalio_digitalinout_set_drive_mode( digitalio_digitalinout_obj_t *self, digitalio_drive_mode_t drive_mode) { gpio_num_t number = self->pin->number; - gpio_mode_t mode; + gpio_mode_t mode = GPIO_MODE_DEF_OUTPUT; if (drive_mode == DRIVE_MODE_OPEN_DRAIN) { - mode = GPIO_MODE_DEF_OD; - } else { - mode = GPIO_MODE_DEF_OUTPUT; + mode |= GPIO_MODE_DEF_OD; } esp_err_t result = gpio_set_direction(number, mode); if (result != ESP_OK) { From 11848b1826f81ee5cd2d01e0f7339c21e34618f3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 15 Jan 2022 23:05:33 -0500 Subject: [PATCH 215/258] use GPIO_MODE_ instead of GPIO_MODE_DEF --- ports/espressif/common-hal/digitalio/DigitalInOut.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/espressif/common-hal/digitalio/DigitalInOut.c b/ports/espressif/common-hal/digitalio/DigitalInOut.c index b5199672b1..bf52965d28 100644 --- a/ports/espressif/common-hal/digitalio/DigitalInOut.c +++ b/ports/espressif/common-hal/digitalio/DigitalInOut.c @@ -71,7 +71,7 @@ void common_hal_digitalio_digitalinout_deinit(digitalio_digitalinout_obj_t *self void common_hal_digitalio_digitalinout_switch_to_input( digitalio_digitalinout_obj_t *self, digitalio_pull_t pull) { common_hal_digitalio_digitalinout_set_pull(self, pull); - gpio_set_direction(self->pin->number, GPIO_MODE_DEF_INPUT); + gpio_set_direction(self->pin->number, GPIO_MODE_INPUT); } digitalinout_result_t common_hal_digitalio_digitalinout_switch_to_output( @@ -108,9 +108,9 @@ digitalinout_result_t common_hal_digitalio_digitalinout_set_drive_mode( digitalio_digitalinout_obj_t *self, digitalio_drive_mode_t drive_mode) { gpio_num_t number = self->pin->number; - gpio_mode_t mode = GPIO_MODE_DEF_OUTPUT; + gpio_mode_t mode = GPIO_MODE_OUTPUT; if (drive_mode == DRIVE_MODE_OPEN_DRAIN) { - mode |= GPIO_MODE_DEF_OD; + mode |= GPIO_MODE_OUTPUT_OD; } esp_err_t result = gpio_set_direction(number, mode); if (result != ESP_OK) { From 2d0590643015d217eb09f119709fc84e42ce4942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20Ko=C3=A7marl=C4=B1?= Date: Sat, 15 Jan 2022 12:33:29 +0000 Subject: [PATCH 216/258] Translated using Weblate (Turkish) Currently translated at 10.8% (112 of 1031 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/tr/ --- locale/tr.po | 109 ++++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/locale/tr.po b/locale/tr.po index d00d068b42..8b3ef762cf 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2022-01-09 21:53+0000\n" +"PO-Revision-Date: 2022-01-16 13:56+0000\n" "Last-Translator: Gökhan Koçmarlı \n" "Language-Team: none\n" "Language: tr\n" @@ -265,7 +265,7 @@ msgstr "'%s' integer %d, %d..%d aralığında değil" #: py/emitinlinethumb.c #, c-format msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" -msgstr "" +msgstr "'%s' integer 0x%x, 0x%x maskesine uymuyor" #: py/obj.c #, c-format @@ -287,64 +287,66 @@ msgid "'%s' object isn't subscriptable" msgstr "'%s' nesnesi subscriptable özelliğe sahip değil" #: py/objstr.c +#, fuzzy msgid "'=' alignment not allowed in string format specifier" -msgstr "" +msgstr "'=' hizalamasına string biçiminde izin verilmez" #: shared-module/struct/__init__.c msgid "'S' and 'O' are not supported format types" -msgstr "" +msgstr "'S' ve 'O' desteklenen biçim türlerinden değildir" #: py/compile.c msgid "'align' requires 1 argument" -msgstr "" +msgstr "'align' 1 argümana ihtiyaç duyar" #: py/compile.c msgid "'await' outside function" -msgstr "" +msgstr "fonksiyon dışında 'await'" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" msgstr "" +"asenkron fonksiyon dışında kullanılan 'await', 'async for' ya da 'async with'" #: py/compile.c msgid "'break' outside loop" -msgstr "" +msgstr "döngü dışında 'break'" #: py/compile.c msgid "'continue' outside loop" -msgstr "" +msgstr "döngü dışında 'continue'" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "'coroutine' nesnesi bir iteratör değildir" #: py/compile.c msgid "'data' requires at least 2 arguments" -msgstr "" +msgstr "'data' en az 2 argümana ihtiyaç duyar" #: py/compile.c msgid "'data' requires integer arguments" -msgstr "" +msgstr "'data' integer tipinde argümanlara ihtiyaç duyar" #: py/compile.c msgid "'label' requires 1 argument" -msgstr "" +msgstr "'label' 1 argümana ihtiyaç duyar" #: py/compile.c msgid "'return' outside function" -msgstr "" +msgstr "fonksiyon dışında 'return'" #: py/compile.c msgid "'yield from' inside async function" -msgstr "" +msgstr "asenkron fonksiyon içinde 'yield from'" #: py/compile.c msgid "'yield' outside function" -msgstr "" +msgstr "fonksiyon dışında 'yield'" #: shared-module/vectorio/VectorShape.c msgid "(x,y) integers required" -msgstr "" +msgstr "(x, y) integerları gereklidir" #: py/compile.c msgid "*x must be assignment target" @@ -356,89 +358,89 @@ msgstr ", içinde %q\n" #: py/objcomplex.c msgid "0.0 to a complex power" -msgstr "" +msgstr "0.0'dan bir karmaşık güce" #: py/modbuiltins.c msgid "3-arg pow() not supported" -msgstr "" +msgstr "3-argümanlı pow() desteklenmemektedir" #: shared-module/msgpack/__init__.c msgid "64 bit types" -msgstr "" +msgstr "64 bit tipler" #: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" -msgstr "" +msgstr "Bir donanım kesme kanalı halihazırda kullanılmaktadır" #: ports/espressif/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" -msgstr "" +msgstr "ADC2, WiFi tarafından kullanılmaktadır" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" -msgstr "" +msgstr "Adres %d byte uzunluğunda olmalıdır" #: shared-bindings/_bleio/Address.c msgid "Address type out of range" -msgstr "" +msgstr "Adres tipi beklenen aralığın dışında" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" -msgstr "" +msgstr "Tüm CAN çevre birimleri kullanımda" #: ports/espressif/common-hal/busio/I2C.c #: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c #: ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" -msgstr "" +msgstr "Tüm I2C çevre birimleri kullanımda" #: ports/espressif/common-hal/countio/Counter.c #: ports/espressif/common-hal/frequencyio/FrequencyIn.c #: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" -msgstr "" +msgstr "Tüm PCNT birimleri kullanımda" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/espressif/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" -msgstr "" +msgstr "Tüm RX FIFO'ları kullanımda" #: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" -msgstr "" +msgstr "Tüm SPI çevre birimleri kullanımda" #: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c msgid "All UART peripherals are in use" -msgstr "" +msgstr "Tüm UART çevre birimleri kullanımda" #: ports/nrf/common-hal/countio/Counter.c #: ports/nrf/common-hal/pulseio/PulseIn.c #: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c #: shared-bindings/pwmio/PWMOut.c msgid "All channels in use" -msgstr "" +msgstr "Tüm kanallar kullanımda" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" -msgstr "" +msgstr "Tüm olay kanalları kullanımda" #: ports/raspberrypi/common-hal/pulseio/PulseIn.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "All state machines in use" -msgstr "" +msgstr "Tüm durum makineleri kullanımda" #: ports/atmel-samd/audio_dma.c msgid "All sync event channels in use" -msgstr "" +msgstr "Tüm asenkron olay kanalları kullanımda" #: shared-bindings/pwmio/PWMOut.c msgid "All timers for this pin are in use" -msgstr "" +msgstr "Bu pin için tüm zamanlayıcılar kullanımda" #: ports/atmel-samd/common-hal/_pew/PewPew.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -455,11 +457,11 @@ msgstr "" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c #: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c msgid "All timers in use" -msgstr "" +msgstr "Tüm zamanlayıcılar kullanımda" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Already advertising." -msgstr "" +msgstr "Halihazırda duyuruluyor." #: ports/atmel-samd/common-hal/canio/Listener.c msgid "Already have all-matches listener" @@ -468,47 +470,47 @@ msgstr "" #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "Halihazırda çalışıyor" #: ports/espressif/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" -msgstr "" +msgstr "Halihazırda wifi ağları için tarama yapılıyor" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" -msgstr "" +msgstr "Verilen pin için AnalogIn desteklenmemektedir" #: ports/cxd56/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/nrf/common-hal/analogio/AnalogOut.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c msgid "AnalogOut functionality not supported" -msgstr "" +msgstr "AnalogOut işlevi desteklenmemektedir" #: shared-bindings/analogio/AnalogOut.c msgid "AnalogOut is only 16 bits. Value must be less than 65536." -msgstr "" +msgstr "AnalogOut yalnızca 16 bitlik. Değer 65536'dan küçük olmalıdır." #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "AnalogOut not supported on given pin" -msgstr "" +msgstr "Verilen pin için AnalogOut desteklenmemektedir" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" -msgstr "" +msgstr "Başka bir PWMAudioOut zaten aktif durumda" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c msgid "Another send is already active" -msgstr "" +msgstr "Başka bir gönderme zaten aktif" #: shared-bindings/pulseio/PulseOut.c msgid "Array must contain halfwords (type 'H')" -msgstr "" +msgstr "Dizi yarımsözcüklere sahip olmalıdır (tip 'H')" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Array values should be single bytes." -msgstr "" +msgstr "Dizi değerleri tekil bytelar olmalıdır." #: shared-bindings/microcontroller/Pin.c msgid "At most %d %q may be specified (not %d)" @@ -517,23 +519,23 @@ msgstr "" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "%d bloğun ayrılması girişimi" #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when VM not running." -msgstr "" +msgstr "VM çalışmazken heap'ten alan tahsis edilmeye çalışıldı." #: ports/raspberrypi/audio_dma.c msgid "Audio conversion not implemented" -msgstr "" +msgstr "Ses dönüşümü implemente edilmedi" #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" -msgstr "" +msgstr "AuthMode.OPEN bir şifre ile kullanılmadı" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" -msgstr "" +msgstr "Kimlik doğrulama hatası" #: main.c msgid "Auto-reload is off.\n" @@ -549,12 +551,12 @@ msgstr "" #: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" -msgstr "" +msgstr "Baudhızı, çevre birimi tarafından desteklenmiyor" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" -msgstr "" +msgstr "Minimum kare hızından altında" #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must be sequential pins" @@ -1967,6 +1969,7 @@ msgstr "" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" +"Alarma, CTRL-C'ye veya dosya yazana kadar derin uyku moduna geçiliyor.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does IN without loading ISR" From 784a5edc4bc7d9d7c9b4119c8d5e4c52962cf1c4 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Mon, 17 Jan 2022 06:52:08 +0100 Subject: [PATCH 217/258] Define default SPI pins on kb2040 Fixes #5875 --- ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h index c01f713e48..e1bfbb01e7 100644 --- a/ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h @@ -8,3 +8,7 @@ #define DEFAULT_UART_BUS_TX (&pin_GPIO0) #define DEFAULT_UART_BUS_RX (&pin_GPIO1) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO18) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO19) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) From 9b9dd97e00b88083f51e0646c5c25385b5d2b146 Mon Sep 17 00:00:00 2001 From: 0hotpotman0 Date: Mon, 17 Jan 2022 14:49:11 +0800 Subject: [PATCH 218/258] add softdev_version 7.0.1 --- ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk index c280246cc9..228c5698f0 100644 --- a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk @@ -1,6 +1,7 @@ USB_VID = 0x2886 USB_PID = 0x0045 -USB_PRODUCT = "Seeed XIAO nRF52840 Sense SOFTDEV_VERSION=7.0.1" +USB_PRODUCT = "Seeed XIAO nRF52840 Sense" +SOFTDEV_VERSION=7.0.1 USB_MANUFACTURER = "Seeed" MCU_CHIP = nrf52840 From d0a1a7d380061230d7e270506d402195764b9bcb Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 17 Jan 2022 22:08:58 +0100 Subject: [PATCH 219/258] 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 | 68 +++++++++++++++++++++++++++++++--------- locale/cs.po | 68 +++++++++++++++++++++++++++++++--------- locale/de_DE.po | 68 +++++++++++++++++++++++++++++++--------- locale/el.po | 68 +++++++++++++++++++++++++++++++--------- locale/en_GB.po | 68 +++++++++++++++++++++++++++++++--------- locale/es.po | 68 +++++++++++++++++++++++++++++++--------- locale/fil.po | 68 +++++++++++++++++++++++++++++++--------- locale/fr.po | 68 +++++++++++++++++++++++++++++++--------- locale/hi.po | 68 +++++++++++++++++++++++++++++++--------- locale/it_IT.po | 68 +++++++++++++++++++++++++++++++--------- locale/ja.po | 68 +++++++++++++++++++++++++++++++--------- locale/ko.po | 68 +++++++++++++++++++++++++++++++--------- locale/nl.po | 68 +++++++++++++++++++++++++++++++--------- locale/pl.po | 68 +++++++++++++++++++++++++++++++--------- locale/pt_BR.po | 68 +++++++++++++++++++++++++++++++--------- locale/ru.po | 68 +++++++++++++++++++++++++++++++--------- locale/sv.po | 68 +++++++++++++++++++++++++++++++--------- locale/tr.po | 68 +++++++++++++++++++++++++++++++--------- locale/zh_Latn_pinyin.po | 68 +++++++++++++++++++++++++++++++--------- 19 files changed, 1026 insertions(+), 266 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 9e529e3204..8e9ffa9e40 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -2661,7 +2661,7 @@ msgstr "berusaha mendapatkan argmin/argmax dari urutan kosong" msgid "attributes not supported yet" msgstr "atribut belum didukung" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2717,11 +2717,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2813,6 +2813,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2907,6 +2911,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3098,6 +3110,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3201,7 +3217,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3266,6 +3282,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3379,7 +3399,7 @@ msgstr "inline assembler harus sebuah fungsi" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3387,7 +3407,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3395,6 +3415,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3404,18 +3428,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3786,7 +3818,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3844,7 +3880,7 @@ msgstr "" msgid "odd-length string" msgstr "panjang data string memiliki keganjilan (odd-length)" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3852,7 +3888,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4332,7 +4368,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4533,7 +4569,7 @@ msgstr "jendela harus <= interval" msgid "wrong axis index" msgstr "indeks sumbu salah" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "sumbu yang ditentukan salah" @@ -4541,7 +4577,11 @@ msgstr "sumbu yang ditentukan salah" msgid "wrong input type" msgstr "tipe input salah" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "jumlah argumen salah" diff --git a/locale/cs.po b/locale/cs.po index f0744403ab..25fb7a2dfd 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -2635,7 +2635,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2691,11 +2691,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2787,6 +2787,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2881,6 +2885,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3072,6 +3084,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3175,7 +3191,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3240,6 +3256,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3353,7 +3373,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3361,7 +3381,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3369,6 +3389,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3378,18 +3402,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3760,7 +3792,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3818,7 +3854,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3826,7 +3862,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4305,7 +4341,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4506,7 +4542,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4514,7 +4550,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index b670e96ea6..b57b2bc6c2 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -2666,7 +2666,7 @@ msgstr "Sie haben versucht argmin/argmax einer leeren Sequenz zu erhalten" msgid "attributes not supported yet" msgstr "Attribute werden noch nicht unterstützt" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "Achse außerhalb des Wertebereichs" @@ -2722,11 +2722,11 @@ msgstr "Es müssen 8 oder 16 bits_per_sample sein" msgid "branch not in range" msgstr "Zweig ist außerhalb der Reichweite" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "Der Puffer ist kleiner als die angefragte Größe" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "Die Puffergröße muss ein vielfaches der Elementgröße sein" @@ -2820,6 +2820,10 @@ msgstr "kann %s nicht nach complex konvertieren" msgid "can't convert '%q' object to %q implicitly" msgstr "Kann '%q' Objekt nicht implizit nach %q konvertieren" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "kann nicht zu %q konvertieren" @@ -2920,6 +2924,14 @@ msgstr "Kann neue shape nicht zuweisen" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "Kann '%q' Instanzen nicht erstellen" @@ -3115,6 +3127,10 @@ msgstr "Division durch Null" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "leer" @@ -3218,7 +3234,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3283,6 +3299,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3398,7 +3418,7 @@ msgstr "inline assembler muss eine function sein" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "das Eingabeargument muss ein Integer, Tupel oder eine Liste sein" @@ -3406,7 +3426,7 @@ msgstr "das Eingabeargument muss ein Integer, Tupel oder eine Liste sein" msgid "input array length must be power of 2" msgstr "Die Länge des Eingabearrays muss eine Potenz von 2 sein" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "Eingabe-Arrays sind nicht kompatibel" @@ -3414,6 +3434,10 @@ msgstr "Eingabe-Arrays sind nicht kompatibel" msgid "input data must be an iterable" msgstr "Eingabedaten müssen iterierbar sein" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "Eingabematrix ist asymmetrisch" @@ -3423,18 +3447,26 @@ msgstr "Eingabematrix ist asymmetrisch" msgid "input matrix is singular" msgstr "Eingabematrix ist singulär" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "die Eingabe muss ein-Dimensional sein" @@ -3812,7 +3844,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "Nicht genügend Argumente für den Formatierungs-String" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "Die Anzahl der Punkte muss mindestens 2 betragen" @@ -3870,7 +3906,7 @@ msgstr "Objekt mit Pufferprotokoll (buffer protocol) erforderlich" msgid "odd-length string" msgstr "String mit ungerader Länge" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3878,7 +3914,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4363,7 +4399,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "zu viele Argumente mit dem angegebenen Format" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "zu viele Dimensionen" @@ -4566,7 +4602,7 @@ msgstr "Fenster muss <= Intervall sein" msgid "wrong axis index" msgstr "falscher Achsenindex" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "falsche Achse gewählt" @@ -4574,7 +4610,11 @@ msgstr "falsche Achse gewählt" msgid "wrong input type" msgstr "falscher Eingabetyp" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "falsche Anzahl an Argumenten" diff --git a/locale/el.po b/locale/el.po index 0f32b9174c..aec64bb7cf 100644 --- a/locale/el.po +++ b/locale/el.po @@ -2624,7 +2624,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2680,11 +2680,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2776,6 +2776,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2870,6 +2874,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3061,6 +3073,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3164,7 +3180,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3229,6 +3245,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3342,7 +3362,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3350,7 +3370,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3358,6 +3378,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3367,18 +3391,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3749,7 +3781,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3807,7 +3843,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3815,7 +3851,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4294,7 +4330,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4495,7 +4531,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4503,7 +4539,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index c7113ab877..5e54a91d83 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -2658,7 +2658,7 @@ msgstr "attempt to get argmin/argmax of an empty sequence" msgid "attributes not supported yet" msgstr "attributes not supported yet" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "axis is out of bounds" @@ -2714,11 +2714,11 @@ msgstr "bits_per_sample must be 8 or 16" msgid "branch not in range" msgstr "Branch not in range" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "Buffer is smaller than requested size" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "Buffer size must be a multiple of element size" @@ -2810,6 +2810,10 @@ msgstr "can't convert %s to complex" msgid "can't convert '%q' object to %q implicitly" msgstr "Can't convert '%q' object to %q implicitly" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "Can't convert to %q" @@ -2906,6 +2910,14 @@ msgstr "cannot assign new shape" msgid "cannot cast output with casting rule" msgstr "can't cast output with casting rule" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "can't create '%q' instances" @@ -3098,6 +3110,10 @@ msgstr "division by zero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "empty" @@ -3201,7 +3217,7 @@ msgstr "first argument must be a callable" msgid "first argument must be a function" msgstr "first argument must be a function" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "first argument must be a tuple of ndarrays" @@ -3266,6 +3282,10 @@ msgstr "function has the same sign at the ends of interval" msgid "function is defined for ndarrays only" msgstr "function is defined for ndarrays only" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3379,7 +3399,7 @@ msgstr "inline assembler must be a function" msgid "input and output shapes are not compatible" msgstr "input and output shapes are not compatible" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "input argument must be an integer, a tuple, or a list" @@ -3387,7 +3407,7 @@ msgstr "input argument must be an integer, a tuple, or a list" msgid "input array length must be power of 2" msgstr "input array length must be power of 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "input arrays are not compatible" @@ -3395,6 +3415,10 @@ msgstr "input arrays are not compatible" msgid "input data must be an iterable" msgstr "input data must be an iterable" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "input matrix is asymmetric" @@ -3404,18 +3428,26 @@ msgstr "input matrix is asymmetric" msgid "input matrix is singular" msgstr "input matrix is singular" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "input must be a dense ndarray" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "input must be a tensor of rank 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "input must be an ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "input must be one-dimensional" @@ -3786,7 +3818,11 @@ msgstr "not all arguments converted during string formatting" msgid "not enough arguments for format string" msgstr "not enough arguments for format string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "number of points must be at least 2" @@ -3844,7 +3880,7 @@ msgstr "object with buffer protocol required" msgid "odd-length string" msgstr "odd-length string" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset is too large" @@ -3852,7 +3888,7 @@ msgstr "offset is too large" msgid "offset must be >= 0" msgstr "offset must be >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "offset must be non-negative and not greater than buffer length" @@ -4333,7 +4369,7 @@ msgstr "tobytes can be invoked for dense arrays only" msgid "too many arguments provided with the given format" msgstr "too many arguments provided with the given format" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "too many dimensions" @@ -4534,7 +4570,7 @@ msgstr "window must be <= interval" msgid "wrong axis index" msgstr "wrong axis index" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "wrong axis specified" @@ -4542,7 +4578,11 @@ msgstr "wrong axis specified" msgid "wrong input type" msgstr "wrong input type" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "wrong number of arguments" diff --git a/locale/es.po b/locale/es.po index 0d9c53db5d..15b32afa1d 100644 --- a/locale/es.po +++ b/locale/es.po @@ -2693,7 +2693,7 @@ msgstr "intento de obtener argmin/argmax de una secuencia vacía" msgid "attributes not supported yet" msgstr "atributos aún no soportados" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "Eje está fuera de sus límites" @@ -2749,11 +2749,11 @@ msgstr "bits_per_sample debe ser 8 ó 16" msgid "branch not in range" msgstr "la rama no está dentro del rango" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "El buffer es mas pequeño que el requerido" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "El tamaño del buffer debe ser un múltiplo del tamaño del elemento" @@ -2845,6 +2845,10 @@ msgstr "no se puede convertir %s a complejo" msgid "can't convert '%q' object to %q implicitly" msgstr "no se puede convertir el objeto '%q' a %q implícitamente" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "no puede convertir a %q" @@ -2944,6 +2948,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "No se puede realizar cast de la salida sin una regla de cast" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "no se pueden crear '%q' instancias" @@ -3137,6 +3149,10 @@ msgstr "división por cero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "vacío" @@ -3240,7 +3256,7 @@ msgstr "se debe poder llamar al primer argumento" msgid "first argument must be a function" msgstr "el primer argumento debe ser una función" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "Primer argumento tiene que ser una tupla de ndarrays" @@ -3305,6 +3321,10 @@ msgstr "la función tiene el mismo signo a extremos del intervalo" msgid "function is defined for ndarrays only" msgstr "Función solo definida para ndarrays" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3418,7 +3438,7 @@ msgstr "ensamblador en línea debe ser una función" msgid "input and output shapes are not compatible" msgstr "Formas de entrada y salida no son compatibles" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "argumento de entrada debe ser un entero, una tupla o una lista" @@ -3426,7 +3446,7 @@ msgstr "argumento de entrada debe ser un entero, una tupla o una lista" msgid "input array length must be power of 2" msgstr "el tamaño del arreglo de entrada debe ser potencia de 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "Arrays de entrada no son compactibles" @@ -3434,6 +3454,10 @@ msgstr "Arrays de entrada no son compactibles" msgid "input data must be an iterable" msgstr "los datos de entrada deben ser iterables" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "la matriz de entrada es asimétrica" @@ -3443,18 +3467,26 @@ msgstr "la matriz de entrada es asimétrica" msgid "input matrix is singular" msgstr "la matriz de entrada es singular" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "Entrada tiene que ser un ndarray denso" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "Entrada tiene que ser un tensor de rango 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "Entrada tiene que ser un ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "Entrada tiene que ser unidimensional" @@ -3832,7 +3864,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "no suficientes argumentos para format string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "el número de puntos debe ser al menos 2" @@ -3890,7 +3926,7 @@ msgstr "objeto con protocolo de buffer requerido" msgid "odd-length string" msgstr "string de longitud impar" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset es demasiado grande" @@ -3898,7 +3934,7 @@ msgstr "offset es demasiado grande" msgid "offset must be >= 0" msgstr "offset debe ser >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "offset debe ser non-negative y no mayo que la longitud del buffer" @@ -4380,7 +4416,7 @@ msgstr "tobytes solo pueden ser invocados por arrays densos" msgid "too many arguments provided with the given format" msgstr "demasiados argumentos provistos con el formato dado" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "demasiadas dimensiones" @@ -4581,7 +4617,7 @@ msgstr "la ventana debe ser <= intervalo" msgid "wrong axis index" msgstr "indice de eje erróneo" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "eje especificado erróneo" @@ -4589,7 +4625,11 @@ msgstr "eje especificado erróneo" msgid "wrong input type" msgstr "tipo de entrada incorrecta" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "numero erroneo de argumentos" diff --git a/locale/fil.po b/locale/fil.po index ee707c460a..5d2a737d7f 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -2646,7 +2646,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "attributes hindi sinusuportahan" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2702,11 +2702,11 @@ msgstr "bits_per_sample ay dapat 8 o 16" msgid "branch not in range" msgstr "branch wala sa range" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2800,6 +2800,10 @@ msgstr "hindi ma-convert %s sa complex" msgid "can't convert '%q' object to %q implicitly" msgstr "hindi maaaring i-convert ang '%q' na bagay sa %q nang walang pahiwatig" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2899,6 +2903,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "hindi magawa '%q' instances" @@ -3094,6 +3106,10 @@ msgstr "dibisyon ng zero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "walang laman" @@ -3198,7 +3214,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3263,6 +3279,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3377,7 +3397,7 @@ msgstr "inline assembler ay dapat na function" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3385,7 +3405,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3393,6 +3413,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3402,18 +3426,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3788,7 +3820,11 @@ msgstr "hindi lahat ng arguments na i-convert habang string formatting" msgid "not enough arguments for format string" msgstr "kulang sa arguments para sa format string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3846,7 +3882,7 @@ msgstr "object na may buffer protocol kinakailangan" msgid "odd-length string" msgstr "odd-length string" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3854,7 +3890,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4339,7 +4375,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4540,7 +4576,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4548,7 +4584,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "mali ang bilang ng argumento" diff --git a/locale/fr.po b/locale/fr.po index b8b968a4fe..dd9b524aed 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -2716,7 +2716,7 @@ msgstr "tenter d'obtenir argmin / argmax d'une séquence vide" msgid "attributes not supported yet" msgstr "attribut pas encore supporté" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "axis est hors limites" @@ -2772,11 +2772,11 @@ msgstr "'bits_per_sample' doivent être 8 ou 16" msgid "branch not in range" msgstr "branche hors-bornes" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "tampon est plus petit que la taille demandée" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "taille du tampon doit être un multiple de la taille de l'élement" @@ -2869,6 +2869,10 @@ msgstr "ne peut convertir %s en nombre complexe" msgid "can't convert '%q' object to %q implicitly" msgstr "impossible de convertir l'objet '%q' en '%q' implicitement" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "impossible de convertir en %q" @@ -2969,6 +2973,14 @@ msgstr "ne peut assigner une nouvelle forme" msgid "cannot cast output with casting rule" msgstr "output ne peut être projeté sans règle de projection" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "ne peut pas créer une instance de '%q'" @@ -3164,6 +3176,10 @@ msgstr "division par zéro" msgid "divisor must be 4" msgstr "le diviseur doit être 4" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "vide" @@ -3267,7 +3283,7 @@ msgstr "le premier argument doit être un appelable" msgid "first argument must be a function" msgstr "le premier argument doit être une fonction" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "le premier paramêtre doit être un tuple de ndarrays" @@ -3332,6 +3348,10 @@ msgstr "la fonction a le même signe aux extrémités de l’intervalle" msgid "function is defined for ndarrays only" msgstr "fonction définie que pour les ndarrays" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3446,7 +3466,7 @@ msgstr "l'assembleur doit être une fonction" msgid "input and output shapes are not compatible" msgstr "les formes d'entrée et de sortie ne sont pas compatibles" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "Paramètre entrant doit être un chiffre entier, un tuple, ou une liste" @@ -3454,7 +3474,7 @@ msgstr "Paramètre entrant doit être un chiffre entier, un tuple, ou une liste" msgid "input array length must be power of 2" msgstr "longueur de la matrice d'entrée doit être une puissance de 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "les matrices d'entrée ne sont pas compatibles" @@ -3462,6 +3482,10 @@ msgstr "les matrices d'entrée ne sont pas compatibles" msgid "input data must be an iterable" msgstr "les données d'entrée doivent être un itérable" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "la matrice d'entrée est asymétrique" @@ -3471,18 +3495,26 @@ msgstr "la matrice d'entrée est asymétrique" msgid "input matrix is singular" msgstr "la matrice d'entrée est singulière" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "l'entrée doit être un ndarray dense" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "l'entrée doit être un tenseur de rang 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "l'entrée doit être un ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "l'entrée doit être uni-dimensionelle" @@ -3860,7 +3892,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "pas assez d'arguments pour la chaîne de format" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "le nombre de points doit être d'au moins 2" @@ -3918,7 +3954,7 @@ msgstr "un objet avec un protocole de tampon est nécessaire" msgid "odd-length string" msgstr "chaîne de longueur impaire" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset est trop large" @@ -3926,7 +3962,7 @@ msgstr "offset est trop large" msgid "offset must be >= 0" msgstr "offset doit être >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "offset doit être non-négatif, et au plus la taille du tampon" @@ -4411,7 +4447,7 @@ msgstr "tobytes ne peut être appelée que pour des matrices dense" msgid "too many arguments provided with the given format" msgstr "trop d'arguments fournis avec ce format" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "Trop de dimensions" @@ -4612,7 +4648,7 @@ msgstr "la fenêtre (window) doit être <= intervalle (interval)" msgid "wrong axis index" msgstr "index d'axe incorrecte" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "axe incorrecte spécifiée" @@ -4620,7 +4656,11 @@ msgstr "axe incorrecte spécifiée" msgid "wrong input type" msgstr "type d'entrée incorrect" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "mauvais nombres d'arguments" diff --git a/locale/hi.po b/locale/hi.po index be5f5347ff..7b2ad4a3ef 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -2624,7 +2624,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2680,11 +2680,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2776,6 +2776,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2870,6 +2874,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3061,6 +3073,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3164,7 +3180,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3229,6 +3245,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3342,7 +3362,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3350,7 +3370,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3358,6 +3378,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3367,18 +3391,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3749,7 +3781,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3807,7 +3843,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3815,7 +3851,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4294,7 +4330,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4495,7 +4531,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4503,7 +4539,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 4196da915c..6c5007f00c 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -2665,7 +2665,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "attributi non ancora supportati" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2723,11 +2723,11 @@ msgstr "i bit devono essere 7, 8 o 9" msgid "branch not in range" msgstr "argomento di chr() non è in range(256)" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2821,6 +2821,10 @@ msgstr "non è possibile convertire a complex" msgid "can't convert '%q' object to %q implicitly" msgstr "impossibile convertire l'oggetto '%q' implicitamente in %q" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2915,6 +2919,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "creare '%q' istanze" @@ -3111,6 +3123,10 @@ msgstr "divisione per zero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "vuoto" @@ -3215,7 +3231,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3280,6 +3296,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3394,7 +3414,7 @@ msgstr "inline assembler deve essere una funzione" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3402,7 +3422,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3410,6 +3430,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3419,18 +3443,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3808,7 +3840,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "argomenti non sufficienti per la stringa di formattazione" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3866,7 +3902,7 @@ msgstr "" msgid "odd-length string" msgstr "stringa di lunghezza dispari" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3874,7 +3910,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4361,7 +4397,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "troppi argomenti forniti con il formato specificato" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4562,7 +4598,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4570,7 +4606,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "numero di argomenti errato" diff --git a/locale/ja.po b/locale/ja.po index 8912a4c0ed..56e524a99d 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -2639,7 +2639,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "属性は未対応です" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2695,11 +2695,11 @@ msgstr "bits_per_sampleは8または16でなければなりません" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2791,6 +2791,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "オブジェクト '%q' を %q に暗黙に変換できません" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "%q に変換できません" @@ -2885,6 +2889,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3080,6 +3092,10 @@ msgstr "ゼロ除算 (division by zero)" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3183,7 +3199,7 @@ msgstr "1つ目の引数は呼び出し可能でなければなりません" msgid "first argument must be a function" msgstr "1つ目の引数は関数でなければなりません" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3248,6 +3264,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3362,7 +3382,7 @@ msgstr "インラインアセンブラは関数でなければなりません" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3370,7 +3390,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "入力array長は2の累乗でなければなりません" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3378,6 +3398,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "入力行列が非対称" @@ -3387,18 +3411,26 @@ msgstr "入力行列が非対称" msgid "input matrix is singular" msgstr "入力が非正則行列" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3769,7 +3801,11 @@ msgstr "文字列書式化で全ての引数が使われていません" msgid "not enough arguments for format string" msgstr "書式化文字列への引数が足りません" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3827,7 +3863,7 @@ msgstr "" msgid "odd-length string" msgstr "奇数長の文字列" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3835,7 +3871,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4317,7 +4353,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "指定された書式に対して引数が多すぎます" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4518,7 +4554,7 @@ msgstr "windowはinterval以下でなければなりません" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4526,7 +4562,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 4b7d06bcf7..fc35104af5 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -2628,7 +2628,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2684,11 +2684,11 @@ msgstr "bits_per_sample은 8 또는 16이어야합니다." msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2780,6 +2780,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2874,6 +2878,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3065,6 +3077,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3168,7 +3184,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3233,6 +3249,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3346,7 +3366,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3354,7 +3374,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3362,6 +3382,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3371,18 +3395,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3753,7 +3785,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3811,7 +3847,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3819,7 +3855,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4298,7 +4334,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4499,7 +4535,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4507,7 +4543,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index a83b35c007..e83c1e2618 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -2656,7 +2656,7 @@ msgstr "poging om argmin/argmax van een lege sequentie te krijgen" msgid "attributes not supported yet" msgstr "attributen nog niet ondersteund" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "as is buiten bereik" @@ -2712,11 +2712,11 @@ msgstr "bits_per_sample moet 8 of 16 zijn" msgid "branch not in range" msgstr "pad (branch) niet binnen bereik" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2809,6 +2809,10 @@ msgstr "kan %s niet converteren naar een complex" msgid "can't convert '%q' object to %q implicitly" msgstr "kan '%q' object niet omzetten naar %q impliciet" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "kan niet naar %q converteren" @@ -2903,6 +2907,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "kan uitvoer niet converteren zonder conversieregel" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "kan geen instanties van '%q' creëren" @@ -3097,6 +3109,10 @@ msgstr "deling door nul" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "leeg" @@ -3200,7 +3216,7 @@ msgstr "eerste argument moet een aanroepbare (callable) zijn" msgid "first argument must be a function" msgstr "eerste argument moet een functie zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "eerste argument moet een tupel van ndarrays zijn" @@ -3265,6 +3281,10 @@ msgstr "functie heeft hetzelfde teken aan beide uiteinden van het interval" msgid "function is defined for ndarrays only" msgstr "functie is alleen gedefinieerd voor ndarrays" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3379,7 +3399,7 @@ msgstr "inline assembler moet een functie zijn" msgid "input and output shapes are not compatible" msgstr "in- en uitvoervormen zijn niet compatibel" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3387,7 +3407,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "invoer array lengte moet een macht van 2 zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "input arrays zijn niet compatibel" @@ -3395,6 +3415,10 @@ msgstr "input arrays zijn niet compatibel" msgid "input data must be an iterable" msgstr "invoerdata moet itereerbaar zijn" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "invoermatrix is asymmetrisch" @@ -3404,18 +3428,26 @@ msgstr "invoermatrix is asymmetrisch" msgid "input matrix is singular" msgstr "invoermatrix is singulier" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "invoer moet een gesloten ndarray zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "invoer moet een tensor van rang 2 zijn" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "invoer moet een ndarray zijn" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "invoer moet eendimensionaal zijn" @@ -3789,7 +3821,11 @@ msgstr "niet alle argumenten omgezet bij formattering van string" msgid "not enough arguments for format string" msgstr "niet genoeg argumenten om string te formatteren" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "aantal punten moet minimaal 2 zijn" @@ -3847,7 +3883,7 @@ msgstr "object met buffer protocol vereist" msgid "odd-length string" msgstr "string met oneven lengte" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "compensatie is te groot" @@ -3855,7 +3891,7 @@ msgstr "compensatie is te groot" msgid "offset must be >= 0" msgstr "compensatie moet groter of gelijk 0 zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4337,7 +4373,7 @@ msgstr "tobytes kunnen alleen ingeroepen worden voor gesloten arrays" msgid "too many arguments provided with the given format" msgstr "te veel argumenten opgegeven bij dit formaat" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4538,7 +4574,7 @@ msgstr "window moet <= interval zijn" msgid "wrong axis index" msgstr "foute index voor as" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "onjuiste as gespecificeerd" @@ -4546,7 +4582,11 @@ msgstr "onjuiste as gespecificeerd" msgid "wrong input type" msgstr "onjuist invoertype" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "onjuist aantal argumenten" diff --git a/locale/pl.po b/locale/pl.po index f440f4cac6..a9f4460ba8 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -2635,7 +2635,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "atrybuty nie są jeszcze obsługiwane" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2691,11 +2691,11 @@ msgstr "bits_per_sample musi być 8 lub 16" msgid "branch not in range" msgstr "skok poza zakres" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2787,6 +2787,10 @@ msgstr "nie można skonwertować %s do complex" msgid "can't convert '%q' object to %q implicitly" msgstr "nie można automatycznie skonwertować '%q' do '%q'" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2881,6 +2885,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "nie można tworzyć instancji '%q'" @@ -3073,6 +3085,10 @@ msgstr "dzielenie przez zero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "puste" @@ -3176,7 +3192,7 @@ msgstr "" msgid "first argument must be a function" msgstr "pierwszy argument musi być funkcją" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3241,6 +3257,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3354,7 +3374,7 @@ msgstr "wtrącony asembler musi być funkcją" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3362,7 +3382,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "długość tablicy wejściowej musi być potęgą 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3370,6 +3390,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3379,18 +3403,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3761,7 +3793,11 @@ msgstr "nie wszystkie argumenty wykorzystane w formatowaniu" msgid "not enough arguments for format string" msgstr "nie dość argumentów przy formatowaniu" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "liczba punktów musi wynosić co najmniej 2" @@ -3819,7 +3855,7 @@ msgstr "wymagany obiekt z protokołem buforu" msgid "odd-length string" msgstr "łańcuch o nieparzystej długości" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3827,7 +3863,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4308,7 +4344,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "zbyt wiele argumentów podanych dla tego formatu" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4509,7 +4545,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4517,7 +4553,11 @@ msgstr "" msgid "wrong input type" msgstr "nieprawidłowy typ wejścia" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "zła liczba argumentów" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 69e237d5aa..317b409726 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -2708,7 +2708,7 @@ msgstr "tente obter argmin/argmax de uma sequência vazia" msgid "attributes not supported yet" msgstr "atributos ainda não suportados" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "o eixo está fora dos limites" @@ -2764,11 +2764,11 @@ msgstr "bits_per_sample deve ser 8 ou 16" msgid "branch not in range" msgstr "ramo fora do alcance" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "o tamanho do buffer é menor do que o tamanho que foi solicitado" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "o tamanho do buffer deve ser um múltiplo do tamanho do elemento" @@ -2860,6 +2860,10 @@ msgstr "Não é possível converter %s para complex" msgid "can't convert '%q' object to %q implicitly" msgstr "não é possível converter implicitamente o objeto '%q' para %q" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "não é possível converter para %q" @@ -2958,6 +2962,14 @@ msgstr "não é possível atribuir uma nova forma" msgid "cannot cast output with casting rule" msgstr "não pode lançar a saída com a regra de fundição" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "não é possível criar instâncias '%q'" @@ -3154,6 +3166,10 @@ msgstr "divisão por zero" msgid "divisor must be 4" msgstr "o divisor deve ser 4" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "vazio" @@ -3257,7 +3273,7 @@ msgstr "o primeiro argumento deve ser chamável" msgid "first argument must be a function" msgstr "o primeiro argumento deve ser uma função" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "o primeiro argumento deve ser um tuple de ndarrays" @@ -3322,6 +3338,10 @@ msgstr "a função tem o mesmo sinal nas extremidades do intervalo" msgid "function is defined for ndarrays only" msgstr "A função é definida apenas para ndarrays" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3435,7 +3455,7 @@ msgstr "o assembler em linha deve ser uma função" msgid "input and output shapes are not compatible" msgstr "as formas de entrada e saída não são compatíveis" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" "argumento da entrada deve ser um número inteiro, uma tupla ou uma lista" @@ -3444,7 +3464,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "comprimento da matriz da entrada deve ter potência de 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "as matrizes da entrada não são compatíveis" @@ -3452,6 +3472,10 @@ msgstr "as matrizes da entrada não são compatíveis" msgid "input data must be an iterable" msgstr "os dados da entrada devem ser iteráveis" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "a matriz da entrada é assimétrica" @@ -3461,18 +3485,26 @@ msgstr "a matriz da entrada é assimétrica" msgid "input matrix is singular" msgstr "a matriz da entrada é singular" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "a entrada deve ser um ndarray denso" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "a entrada dos dados deve ser um tensor de nível 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "a entrada deve ser um ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "a entrada deve ser unidimensional" @@ -3848,7 +3880,11 @@ msgstr "nem todos os argumentos são convertidos durante a formatação da strin msgid "not enough arguments for format string" msgstr "argumentos insuficientes para o formato da string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "a quantidade dos pontos deve ser pelo menos 2" @@ -3906,7 +3942,7 @@ msgstr "é necessário objeto com protocolo do buffer" msgid "odd-length string" msgstr "sequência com comprimento ímpar" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "o offset é muito grande" @@ -3914,7 +3950,7 @@ msgstr "o offset é muito grande" msgid "offset must be >= 0" msgstr "o offset deve ser >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "o offset deve ser positivo e não maior do que o comprimento do buffer" @@ -4400,7 +4436,7 @@ msgstr "os tobytes podem ser invocados apenas nas matrizes densas" msgid "too many arguments provided with the given format" msgstr "Muitos argumentos fornecidos com o formato dado" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "dimensões demais" @@ -4601,7 +4637,7 @@ msgstr "a janela deve ser <= intervalo" msgid "wrong axis index" msgstr "índice do eixo errado" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "um eixo errado foi definido" @@ -4609,7 +4645,11 @@ msgstr "um eixo errado foi definido" msgid "wrong input type" msgstr "tipo da entrada incorreta" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "quantidade errada dos argumentos" diff --git a/locale/ru.po b/locale/ru.po index cbd2d6634c..af6e5c3822 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -2679,7 +2679,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2735,11 +2735,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2831,6 +2831,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2925,6 +2929,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3116,6 +3128,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3219,7 +3235,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3284,6 +3300,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3397,7 +3417,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3405,7 +3425,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3413,6 +3433,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3422,18 +3446,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3804,7 +3836,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3862,7 +3898,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3870,7 +3906,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4349,7 +4385,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4550,7 +4586,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4558,7 +4594,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index a93e7ad753..74c57e7946 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -2676,7 +2676,7 @@ msgstr "försök att få argmin/argmax för en tom sekvens" msgid "attributes not supported yet" msgstr "attribut stöds inte än" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "axis är utanför gränsen" @@ -2732,11 +2732,11 @@ msgstr "bits_per_sample måste vara 8 eller 16" msgid "branch not in range" msgstr "branch utanför räckvidd" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "bufferten är mindre än begärd storlek" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "buffertstorlek måste vara en multipel av elementstorlek" @@ -2828,6 +2828,10 @@ msgstr "kan inte konvertera %s till komplex" msgid "can't convert '%q' object to %q implicitly" msgstr "kan inte konvertera '%q' objekt implicit till %q" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "kan inte konvertera till %q" @@ -2924,6 +2928,14 @@ msgstr "kan inte tilldela en ny form" msgid "cannot cast output with casting rule" msgstr "kan inte casta utdata med regel" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "kan inte skapa instanser av '%q'" @@ -3118,6 +3130,10 @@ msgstr "division med noll" msgid "divisor must be 4" msgstr "divisor måste vara 4" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "tom" @@ -3221,7 +3237,7 @@ msgstr "första argumentet måste vara en callable" msgid "first argument must be a function" msgstr "första argumentet måste vara en funktion" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "första argumentet måste vara en tupel av ndarray" @@ -3286,6 +3302,10 @@ msgstr "funktionen har samma teckenvärden vid slutet av intervall" msgid "function is defined for ndarrays only" msgstr "funktionen är enbart definierad för ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3399,7 +3419,7 @@ msgstr "inline assembler måste vara en funktion" msgid "input and output shapes are not compatible" msgstr "indata- och utdataformer är inte kompatibla" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "indataargument måste vara integer, en tuple eller list" @@ -3407,7 +3427,7 @@ msgstr "indataargument måste vara integer, en tuple eller list" msgid "input array length must be power of 2" msgstr "indataarraylängden måste vara en multipel av 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "indatamatriser är inte kompatibla" @@ -3415,6 +3435,10 @@ msgstr "indatamatriser är inte kompatibla" msgid "input data must be an iterable" msgstr "indata måste vara en iterable" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "indatamatrisen är asymmetrisk" @@ -3424,18 +3448,26 @@ msgstr "indatamatrisen är asymmetrisk" msgid "input matrix is singular" msgstr "indatamatrisen är singulär" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "indata måste vara en dense ndarray" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "indata måste vara en tensor av rank 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "indata måste vara en ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "indata måste vara endimensionell" @@ -3809,7 +3841,11 @@ msgstr "inte alla argument omvandlade under strängformatering" msgid "not enough arguments for format string" msgstr "inte tillräckligt med argument för formatsträng" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "antal punkter måste vara minst 2" @@ -3867,7 +3903,7 @@ msgstr "objekt med buffertprotokoll krävs" msgid "odd-length string" msgstr "sträng har udda längd" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset är för stor" @@ -3875,7 +3911,7 @@ msgstr "offset är för stor" msgid "offset must be >= 0" msgstr "offset måste vara >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "offset måste vara icke-negativt och inte längre än buffertlängd" @@ -4357,7 +4393,7 @@ msgstr "tobyte kan enbart anropas för täta matriser" msgid "too many arguments provided with the given format" msgstr "för många argument för det givna formatet" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "för många dimensioner" @@ -4558,7 +4594,7 @@ msgstr "window måste vara <= interval" msgid "wrong axis index" msgstr "fel axelindex" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "fel axel angiven" @@ -4566,7 +4602,11 @@ msgstr "fel axel angiven" msgid "wrong input type" msgstr "fel indatatyp" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "fel antal argument" diff --git a/locale/tr.po b/locale/tr.po index 8b3ef762cf..2ff9f016bf 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -2642,7 +2642,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2698,11 +2698,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2794,6 +2794,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2888,6 +2892,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3079,6 +3091,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3182,7 +3198,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3247,6 +3263,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3360,7 +3380,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3368,7 +3388,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3376,6 +3396,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3385,18 +3409,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3767,7 +3799,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3825,7 +3861,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3833,7 +3869,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4312,7 +4348,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4513,7 +4549,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4521,7 +4557,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 7b6f03da47..ec39c2cba6 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -2688,7 +2688,7 @@ msgstr "chángshì huòqǔ kōng xùliè de argmin/ argmax" msgid "attributes not supported yet" msgstr "shǔxìng shàngwèi zhīchí" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "zhóu chāo chū biān jiè" @@ -2744,11 +2744,11 @@ msgstr "měi jiàn yàngběn bìxū wèi 8 huò 16" msgid "branch not in range" msgstr "fēnzhī bùzài fànwéi nèi" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "huǎn chōng qū xiǎo yú qǐng qiú de dà xiǎo" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "huǎn chōng qū dà xiǎo bì xū shì yuán sù dà xiǎo de bèi shù" @@ -2840,6 +2840,10 @@ msgstr "wúfǎ zhuǎnhuàn%s dào fùzá" msgid "can't convert '%q' object to %q implicitly" msgstr "wúfǎ jiāng '%q' duìxiàng zhuǎnhuàn wèi %q yǐn hán" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "wúfǎ zhuǎnhuàn wèi %q" @@ -2935,6 +2939,14 @@ msgid "cannot cast output with casting rule" msgstr "" "wú fǎ shǐ yòng qiáng zhì zhuǎn huàn guī zé qiáng zhì zhuǎn huàn shū chū" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "wúfǎ chuàngjiàn '%q' ' shílì" @@ -3131,6 +3143,10 @@ msgstr "bèi líng chú" msgid "divisor must be 4" msgstr "èr chóng zòu bì xū shì 4" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "kòngxián" @@ -3234,7 +3250,7 @@ msgstr "dì yī gè cānshù bìxū shì kě tiáo yòng de" msgid "first argument must be a function" msgstr "dì yīgè cānshù bìxū shì yī gè hánshù" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "dì yī gè cān shù bì xū shì yí gè yuán zǔ ndarrays" @@ -3299,6 +3315,10 @@ msgstr "hánshù zài jiàngé mòwěi jùyǒu xiāngtóng de fúhào" msgid "function is defined for ndarrays only" msgstr "hán shù jǐn wéi ndarrays dìng yì" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3412,7 +3432,7 @@ msgstr "nèi lián jíhé bìxū shì yīgè hánshù" msgid "input and output shapes are not compatible" msgstr "shū rù hé shū chū xíng zhuàng bù jiān róng" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "shū rù cān shù bì xū shì zhěng shù, yuán zǔ huò liè biǎo" @@ -3420,7 +3440,7 @@ msgstr "shū rù cān shù bì xū shì zhěng shù, yuán zǔ huò liè biǎo" msgid "input array length must be power of 2" msgstr "shūrù shùzǔ de chángdù bìxū shì 2 de mì" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "shū rù shù zǔ bù jiān róng" @@ -3428,6 +3448,10 @@ msgstr "shū rù shù zǔ bù jiān róng" msgid "input data must be an iterable" msgstr "shūrù shùjù bìxū shì kě diédài de" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "shūrù jǔzhèn bù duìchèn" @@ -3437,18 +3461,26 @@ msgstr "shūrù jǔzhèn bù duìchèn" msgid "input matrix is singular" msgstr "shūrù jǔzhèn shì qíyì de" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "shū rù bì xū shì mì jí de ndarray" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "shū rù bì xū shì děng jí 2 de zhāng liàng" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "shū rù bì xū shì ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "shū rù bì xū shì yì wéi de" @@ -3820,7 +3852,11 @@ msgstr "bùshì zì chuàn géshì huà guòchéng zhōng zhuǎnhuàn de suǒyǒ msgid "not enough arguments for format string" msgstr "géshì zìfú chuàn cān shǔ bùzú" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "diǎnshù bìxū zhìshǎo wèi 2" @@ -3878,7 +3914,7 @@ msgstr "xūyào huǎnchōng qū xiéyì de duìxiàng" msgid "odd-length string" msgstr "jīshù zìfú chuàn" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "piān yí tài dà" @@ -3886,7 +3922,7 @@ msgstr "piān yí tài dà" msgid "offset must be >= 0" msgstr "piān yí liàng bì xū >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "piān yí liàng bì xū wéi fēi fù shù qiě bù dà yú huǎn chōng qū cháng dù" @@ -4370,7 +4406,7 @@ msgstr "tobytes zhǐ néng duì mì jí shù zǔ diào yòng" msgid "too many arguments provided with the given format" msgstr "tígōng jǐ dìng géshì de cānshù tài duō" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "chǐ cùn tài duō" @@ -4571,7 +4607,7 @@ msgstr "Chuāngkǒu bìxū shì <= jiàngé" msgid "wrong axis index" msgstr "cuò wù de zhóu suǒ yǐn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "zhǐ dìng de zhóu cuò wù" @@ -4579,7 +4615,11 @@ msgstr "zhǐ dìng de zhóu cuò wù" msgid "wrong input type" msgstr "shūrù lèixíng cuòwù" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "cānshù shù cuòwù" From 49b8579bcd1bd2dc914ba89a7ed94e302ed2f900 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 17 Jan 2022 17:14:31 -0600 Subject: [PATCH 220/258] Request UF2 bootloader when resetting using the 'serial trick' --- ports/espressif/supervisor/port.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index c8cb344aae..d4c935d71d 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -51,6 +51,8 @@ #include "supervisor/background_callback.h" #include "supervisor/memory.h" #include "supervisor/shared/tick.h" +#include "shared-bindings/microcontroller/__init__.h" +#include "shared-bindings/microcontroller/RunMode.h" #include "shared-bindings/rtc/__init__.h" #include "peripherals/rmt.h" @@ -263,6 +265,7 @@ void reset_port(void) { } void reset_to_bootloader(void) { + common_hal_mcu_on_next_reset(RUNMODE_UF2); esp_restart(); } From 679f4b30ba8b55a79fd1e77b27e9542575ad37df Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 18 Jan 2022 15:23:19 -0800 Subject: [PATCH 221/258] Tweak heap sizes for different targets --- ports/espressif/supervisor/port.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index c8cb344aae..d6eb32b395 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -81,7 +81,17 @@ #include "esp32/spiram.h" #endif +// Heap sizes for when there is no external RAM for CircuitPython to use +// exclusively. +#ifdef CONFIG_IDF_TARGET_ESP32S2 #define HEAP_SIZE (48 * 1024) +#endif +#ifdef CONFIG_IDF_TARGET_ESP32S3 +#define HEAP_SIZE (176 * 1024) +#endif +#ifdef CONFIG_IDF_TARGET_ESP32C3 +#define HEAP_SIZE (88 * 1024) +#endif uint32_t *heap; uint32_t heap_size; From c839d9b3ccd70c01fa855a9caff49620e0fe035f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 18 Jan 2022 15:50:32 -0800 Subject: [PATCH 222/258] Fix S2 builds by not turning on USB with wifi --- .../esp-idf-config/sdkconfig-esp32s2.defaults | 12 ++++-------- .../esp-idf-config/sdkconfig-esp32s3.defaults | 6 ++---- .../espressif/esp-idf-config/sdkconfig-opt.defaults | 4 ++++ ports/espressif/esp-idf-config/sdkconfig.defaults | 1 - ports/espressif/tools/update_sdkconfig.py | 1 + 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index 9020572ccb..ac3e909dfc 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -83,12 +83,12 @@ CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y # end of Sleep Config # -# ESP System Settings +# PHY # -CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y -# end of ESP System Settings +# CONFIG_ESP_PHY_ENABLE_USB is not set +# end of PHY -CONFIG_ESP_SYSTEM_MEMPROT_DEPCHECK=y +CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y # # Memory protection # @@ -151,10 +151,6 @@ CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32S2_PANIC_PRINT_HALT=y -# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set -# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP32S2_PANIC_GDBSTUB is not set CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y CONFIG_ESP32H2_MEMPROT_FEATURE=y CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index 4f3614692b..e655f4ceb1 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -86,6 +86,8 @@ CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 # end of MAC Config CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y + +CONFIG_ESP_PHY_ENABLE_USB=y # CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0 is not set CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y # CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set @@ -130,10 +132,6 @@ CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP32_PHY_MAX_TX_POWER=20 -# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set -# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set -CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y -# CONFIG_ESP32S2_PANIC_GDBSTUB is not set CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults index 0d0e75af0e..273303446e 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults @@ -75,6 +75,10 @@ CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y # CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set CONFIG_OPTIMIZATION_ASSERTION_LEVEL=1 +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set +CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set # CONFIG_CONSOLE_UART_DEFAULT is not set # CONFIG_CONSOLE_UART_CUSTOM is not set CONFIG_ESP_CONSOLE_UART_NONE=y diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 3bf9a09c26..f4efac4063 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -246,7 +246,6 @@ CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP_PHY_MAX_TX_POWER=20 -CONFIG_ESP_PHY_ENABLE_USB=y # end of PHY # CONFIG_PM_ENABLE is not set diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index a9d61532bb..ce174fd12a 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -48,6 +48,7 @@ TARGET_SETTINGS = [ "CONFIG_SDK_TOOLPREFIX", "CONFIG_TOOLPREFIX", "ESP_SLEEP_GPIO_RESET_WORKAROUND", + "CONFIG_ESP_PHY_ENABLE_USB", ] BOARD_SETTINGS = [ From 9c933558b554a564e68673f9ecab5f3fe2fd44fa Mon Sep 17 00:00:00 2001 From: lady ada Date: Thu, 23 Dec 2021 18:19:34 -0500 Subject: [PATCH 223/258] enable I2C by default --- ports/espressif/boards/adafruit_feather_esp32s2/board.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index 93aff5067d..71c7663fdc 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -33,6 +33,10 @@ void board_init(void) { // USB common_hal_never_reset_pin(&pin_GPIO19); common_hal_never_reset_pin(&pin_GPIO20); + + // Turn on I2C + gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(7, false); } bool board_requests_safe_mode(void) { From 647b894e7b015accae6c1ea7e3e4d0bd52b099c1 Mon Sep 17 00:00:00 2001 From: lady ada Date: Thu, 23 Dec 2021 18:57:33 -0500 Subject: [PATCH 224/258] ?? some include needed --- ports/espressif/boards/adafruit_feather_esp32s2/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index 71c7663fdc..13f2a751c3 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -28,6 +28,8 @@ #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" #include "components/driver/include/driver/gpio.h" +#include "components/hal/include/hal/gpio_hal.h" +#include "common-hal/microcontroller/Pin.h" void board_init(void) { // USB From 8b26f594c9d4a7f108d3bd9a6bf70df13e7096cf Mon Sep 17 00:00:00 2001 From: lady ada Date: Thu, 23 Dec 2021 19:40:46 -0500 Subject: [PATCH 225/258] try not resetting i2c power --- ports/espressif/boards/adafruit_feather_esp32s2/board.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index 13f2a751c3..be678c23ab 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -37,6 +37,7 @@ void board_init(void) { common_hal_never_reset_pin(&pin_GPIO20); // Turn on I2C + common_hal_never_reset_pin(&pin_GPIO7); gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); gpio_set_level(7, false); } From 4400124efefa7d48dc5a940ee5c74f113d326693 Mon Sep 17 00:00:00 2001 From: lady ada Date: Sat, 25 Dec 2021 02:16:25 -0500 Subject: [PATCH 226/258] snappysnap --- .../boards/adafruit_esp32s2_camera/board.c | 117 ++++++++++++++++++ .../adafruit_esp32s2_camera/mpconfigboard.h | 46 +++++++ .../adafruit_esp32s2_camera/mpconfigboard.mk | 19 +++ .../boards/adafruit_esp32s2_camera/pins.c | 49 ++++++++ .../boards/adafruit_esp32s2_camera/sdkconfig | 33 +++++ 5 files changed, 264 insertions(+) create mode 100644 ports/espressif/boards/adafruit_esp32s2_camera/board.c create mode 100644 ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h create mode 100644 ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk create mode 100644 ports/espressif/boards/adafruit_esp32s2_camera/pins.c create mode 100644 ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/board.c b/ports/espressif/boards/adafruit_esp32s2_camera/board.c new file mode 100644 index 0000000000..1686f531e2 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/board.c @@ -0,0 +1,117 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" + +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" + +#include "esp_log.h" + +displayio_fourwire_obj_t board_display_obj; + +#define DELAY 0x80 + +uint8_t display_init_sequence[] = { + 0x01, 0 | DELAY, 150, // SWRESET + 0x11, 0 | DELAY, 255, // SLPOUT + 0x36, 1, 0b10100000, // _MADCTL for rotation 0 + 0x3a, 1, 0x55, // COLMOD - 16bit color + 0x21, 0 | DELAY, 10, // _INVON + 0x13, 0 | DELAY, 10, // _NORON + 0x29, 0 | DELAY, 255, // _DISPON +}; + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; + common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL); + common_hal_busio_spi_never_reset(spi); + + displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + spi, + &pin_GPIO39, // TFT_DC Command or data + &pin_GPIO40, // TFT_CS Chip select + &pin_GPIO41, // TFT_RESET Reset + 5000000, // Baudrate + 0, // Polarity + 0); // Phase + + // workaround as board_init() is called before reset_port() in main.c + pwmout_reset(); + + displayio_display_obj_t *display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct( + display, + bus, + 240, // Width (after rotation) + 240, // Height (after rotation) + 80, // column start + 0, // row start + 270, // rotation + 16, // Color depth + false, // Grayscale + false, // Pixels in a byte share a row. Only used for depth < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_pixels_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO38, // backlight pin + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false, // data_as_commands + true, // auto_refresh + 60, // native_frames_per_second + true, // backlight_on_high + false); // not SH1107 +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { + common_hal_displayio_release_displays(); +} diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h new file mode 100644 index 0000000000..dc90510981 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h @@ -0,0 +1,46 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Adafruit Camera" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO21) +#define MICROPY_HW_NEOPIXEL_COUNT (6) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO33) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO34) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk new file mode 100644 index 0000000000..d99a431599 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk @@ -0,0 +1,19 @@ +USB_VID = 0x239A +USB_PID = 0x8118 +USB_PRODUCT = "Camera" +USB_MANUFACTURER = "Adafruit" + +IDF_TARGET = esp32s2 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c new file mode 100644 index 0000000000..aef4bc5685 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c @@ -0,0 +1,49 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_ROM_QSTR(MP_QSTR_CARD_CS), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_IRQ), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO45) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_ROM_QSTR(MP_QSTR_CAMERA_VSYNC), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_HSYNC), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA9), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_XCLK), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA8), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA7), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_PCLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA6), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA2), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA5), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA3), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA4), MP_ROM_PTR(&pin_GPIO16) }, + + + { 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_DISPLAY), MP_ROM_PTR(&displays[0].display)}, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig b/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig new file mode 100644 index 0000000000..9d8bbde967 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig @@ -0,0 +1,33 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config From e9f0c1796ea02ac56078dab79e9fd25398101660 Mon Sep 17 00:00:00 2001 From: lady ada Date: Tue, 11 Jan 2022 01:11:09 -0500 Subject: [PATCH 227/258] oof fix i2c lines! --- .../boards/adafruit_esp32s2_camera/mpconfigboard.h | 6 +++--- ports/espressif/boards/adafruit_esp32s2_camera/pins.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h index dc90510981..25b2f2aa54 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h @@ -38,9 +38,9 @@ #define AUTORESET_DELAY_MS 500 -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO33) -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO34) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO34) -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) #define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c index aef4bc5685..958ed2dcd5 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c +++ b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c @@ -25,8 +25,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO34) }, { MP_ROM_QSTR(MP_QSTR_CAMERA_VSYNC), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_CAMERA_HSYNC), MP_ROM_PTR(&pin_GPIO6) }, @@ -41,7 +41,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA3), MP_ROM_PTR(&pin_GPIO15) }, { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA4), MP_ROM_PTR(&pin_GPIO16) }, - { 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_DISPLAY), MP_ROM_PTR(&displays[0].display)}, From 13b319c43074feacffd588a291dda9b72f88f17a Mon Sep 17 00:00:00 2001 From: lady ada Date: Tue, 11 Jan 2022 01:35:54 -0500 Subject: [PATCH 228/258] try rotation 0 --- ports/espressif/boards/adafruit_esp32s2_camera/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/board.c b/ports/espressif/boards/adafruit_esp32s2_camera/board.c index 1686f531e2..d056d6f629 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/board.c +++ b/ports/espressif/boards/adafruit_esp32s2_camera/board.c @@ -81,7 +81,7 @@ void board_init(void) { 240, // Height (after rotation) 80, // column start 0, // row start - 270, // rotation + 0, // rotation 16, // Color depth false, // Grayscale false, // Pixels in a byte share a row. Only used for depth < 8 From 3381ac149e9c256ad123c65a0a008af11d49eb9e Mon Sep 17 00:00:00 2001 From: lady ada Date: Wed, 12 Jan 2022 23:08:10 -0500 Subject: [PATCH 229/258] fix camera display io to use default spi bus --- ports/espressif/boards/adafruit_esp32s2_camera/board.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/board.c b/ports/espressif/boards/adafruit_esp32s2_camera/board.c index d056d6f629..15f573ea96 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/board.c +++ b/ports/espressif/boards/adafruit_esp32s2_camera/board.c @@ -32,6 +32,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-module/displayio/__init__.h" #include "shared-module/displayio/mipi_constants.h" +#include "shared-bindings/board/__init__.h" #include "esp_log.h" @@ -54,10 +55,7 @@ void board_init(void) { common_hal_never_reset_pin(&pin_GPIO19); common_hal_never_reset_pin(&pin_GPIO20); - busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; - common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL); - common_hal_busio_spi_never_reset(spi); - + busio_spi_obj_t *spi = common_hal_board_create_spi(); displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; common_hal_displayio_fourwire_construct(bus, From 1d44bf1c0cc2f337fc3498b73dc09cd91cd19427 Mon Sep 17 00:00:00 2001 From: lady ada Date: Wed, 12 Jan 2022 23:14:41 -0500 Subject: [PATCH 230/258] add camera data port --- .../boards/adafruit_esp32s2_camera/pins.c | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c index 958ed2dcd5..7b5581e314 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c +++ b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c @@ -1,7 +1,22 @@ #include "shared-bindings/board/__init__.h" - #include "shared-module/displayio/__init__.h" +STATIC const mp_rom_obj_tuple_t camera_data_tuple = { + {&mp_type_tuple}, + 8, + { + MP_ROM_PTR(&pin_GPIO13), + MP_ROM_PTR(&pin_GPIO15), + MP_ROM_PTR(&pin_GPIO16), + MP_ROM_PTR(&pin_GPIO14), + MP_ROM_PTR(&pin_GPIO12), + MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO9), + MP_ROM_PTR(&pin_GPIO7), + } +}; + + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS @@ -28,8 +43,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA), MP_ROM_PTR(&camera_data_tuple) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_VSYNC), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_CAMERA_HSYNC), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_HREF), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA9), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_CAMERA_XCLK), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA8), MP_ROM_PTR(&pin_GPIO9) }, From c1cee63c5a13fab613fcf1c14130cee559c17c4b Mon Sep 17 00:00:00 2001 From: lady ada Date: Mon, 17 Jan 2022 00:11:55 -0500 Subject: [PATCH 231/258] fix tuplecompile --- ports/espressif/boards/adafruit_esp32s2_camera/pins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c index 7b5581e314..0c899840f4 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c +++ b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c @@ -1,3 +1,4 @@ +#include "py/objtuple.h" #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" From d4dab792340364b8125c350aa10833ee3fb2132f Mon Sep 17 00:00:00 2001 From: lady ada Date: Mon, 17 Jan 2022 00:31:19 -0500 Subject: [PATCH 232/258] add buttonpin --- ports/espressif/boards/adafruit_esp32s2_camera/pins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c index 0c899840f4..63e656d4ed 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c +++ b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c @@ -36,6 +36,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, From 71c792d6084cd0fb7624bc947f81c6f8a6b77a01 Mon Sep 17 00:00:00 2001 From: lady ada Date: Mon, 17 Jan 2022 22:18:40 -0500 Subject: [PATCH 233/258] try initial esp32s3 qtpy def --- .../adafruit_qtpy_esp32s3_nopsram/board.c | 61 +++++++++++++++++++ .../mpconfigboard.h | 50 +++++++++++++++ .../mpconfigboard.mk | 18 ++++++ .../adafruit_qtpy_esp32s3_nopsram/pins.c | 59 ++++++++++++++++++ .../adafruit_qtpy_esp32s3_nopsram/sdkconfig | 8 +++ 5 files changed, 196 insertions(+) create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c new file mode 100644 index 0000000000..dd24db581b --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif + + // SPI Flash and RAM + common_hal_never_reset_pin(&pin_GPIO26); + common_hal_never_reset_pin(&pin_GPIO27); + common_hal_never_reset_pin(&pin_GPIO28); + common_hal_never_reset_pin(&pin_GPIO29); + common_hal_never_reset_pin(&pin_GPIO30); + common_hal_never_reset_pin(&pin_GPIO31); + common_hal_never_reset_pin(&pin_GPIO32); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h new file mode 100644 index 0000000000..0d6438615e --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h @@ -0,0 +1,50 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Adafruit QT Py ESP32-S3 no psram" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO38) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO37) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO6) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO7) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO34) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO36) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO16) +#define DEFAULT_UART_BUS_TX (&pin_GPIO5) + diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk new file mode 100644 index 0000000000..273032d516 --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk @@ -0,0 +1,18 @@ +USB_VID = 0x239A +USB_PID = 0x811A + +USB_PRODUCT = "QT Py ESP32S3 no psram" +USB_MANUFACTURER = "Adafruit" + +IDF_TARGET = esp32s3 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=8MB diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c new file mode 100644 index 0000000000..56cf4a24e8 --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c @@ -0,0 +1,59 @@ +#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_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, + + { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, + + { 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); diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig new file mode 100644 index 0000000000..a162344cfb --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig @@ -0,0 +1,8 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=n + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + From de45a20b086a6f4088edf0ffb6577a01b59fb059 Mon Sep 17 00:00:00 2001 From: lady ada Date: Mon, 17 Jan 2022 22:20:38 -0500 Subject: [PATCH 234/258] EOF --- .../boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h index 0d6438615e..90d65ea71e 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h @@ -47,4 +47,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO16) #define DEFAULT_UART_BUS_TX (&pin_GPIO5) - From 09cf95a51cf6cca0afd84b8e28e5fdb2e5d81c7f Mon Sep 17 00:00:00 2001 From: lady ada Date: Tue, 18 Jan 2022 01:47:21 -0500 Subject: [PATCH 235/258] no psram :( --- .../boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk index 273032d516..e46768f1cb 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk @@ -16,3 +16,8 @@ CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=8MB + +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register \ No newline at end of file From 7ee5c01cf85118c58a053d9a06e8c9bfdee9368e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 18 Jan 2022 17:39:09 -0800 Subject: [PATCH 236/258] Add Espressif C3 dev board --- .../espressif_esp32c3_devkitm_1_n4/board.c | 58 ++++++++++++++++++ .../mpconfigboard.h | 47 ++++++++++++++ .../mpconfigboard.mk | 10 +++ .../espressif_esp32c3_devkitm_1_n4/pins.c | 61 +++++++++++++++++++ .../espressif_esp32c3_devkitm_1_n4/sdkconfig | 5 ++ 5 files changed, 181 insertions(+) create mode 100644 ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c create mode 100644 ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/pins.c create mode 100644 ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c new file mode 100644 index 0000000000..76353e4ff9 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c @@ -0,0 +1,58 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/microcontroller/Pin.h" +#include "supervisor/board.h" + +void board_init(void) { + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO20); + common_hal_never_reset_pin(&pin_GPIO21); + #endif + + // SPI Flash + common_hal_never_reset_pin(&pin_GPIO11); + common_hal_never_reset_pin(&pin_GPIO12); + common_hal_never_reset_pin(&pin_GPIO13); + common_hal_never_reset_pin(&pin_GPIO14); + common_hal_never_reset_pin(&pin_GPIO15); + common_hal_never_reset_pin(&pin_GPIO16); + common_hal_never_reset_pin(&pin_GPIO17); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +#if CIRCUITPY_ALARM +void board_deinit(void) { +} +#endif diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h new file mode 100644 index 0000000000..28c2ea11eb --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Board setup +#define MICROPY_HW_BOARD_NAME "ESP32-C3-DevKitM-1" +#define MICROPY_HW_MCU_NAME "ESP32-C3N4" + +// Status LED +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) +#define MICROPY_HW_NEOPIXEL_COUNT (1) + +// Default bus pins +#define DEFAULT_UART_BUS_RX (&pin_GPIO20) +#define DEFAULT_UART_BUS_TX (&pin_GPIO21) + +// Serial over UART +#define DEBUG_UART_RX DEFAULT_UART_BUS_RX +#define DEBUG_UART_TX DEFAULT_UART_BUS_TX + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO2) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk new file mode 100644 index 0000000000..b952dacef7 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk @@ -0,0 +1,10 @@ +CIRCUITPY_CREATOR_ID = 0x000C303A +CIRCUITPY_CREATION_ID = 0x00C30001 + +IDF_TARGET = esp32c3 + +INTERNAL_FLASH_FILESYSTEM = 1 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=4MB diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/pins.c b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/pins.c new file mode 100644 index 0000000000..e948ae3fc8 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/pins.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "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_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_MTMS), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_MTDI), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_MTCK), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_MTDO), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig new file mode 100644 index 0000000000..0e24f8dc77 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig @@ -0,0 +1,5 @@ +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="ESP32-C3-DevKitM-1" +# end of LWIP From 6d7472357d956a9046bf18ded29f376c8146092f Mon Sep 17 00:00:00 2001 From: lady ada Date: Tue, 18 Jan 2022 20:46:09 -0500 Subject: [PATCH 237/258] newline --- .../boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk index e46768f1cb..1156b1b915 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk @@ -20,4 +20,4 @@ CIRCUITPY_ESP_FLASH_SIZE=8MB FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register \ No newline at end of file +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register From ce3f1dda16300b92c53aa02d04f6a5321276aec6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 Jan 2022 10:16:04 -0800 Subject: [PATCH 238/258] C3s are bin only --- tools/build_board_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 9f3d09bd88..9058c733ab 100755 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -70,6 +70,7 @@ extension_by_board = { "meowbit_v121": UF2, # esp32c3 "ai_thinker_esp32-c3s": BIN, + "espressif_esp32c3_devkitm_1_n4": BIN, "microdev_micro_c3": BIN, # broadcom "raspberrypi_zero": KERNEL_IMG, From f13ea93fe6a642984e154cad40e7c314ae0f4a1f Mon Sep 17 00:00:00 2001 From: lady ada Date: Wed, 19 Jan 2022 14:22:01 -0500 Subject: [PATCH 239/258] fix A5 pin name --- ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c index 56cf4a24e8..be7fb21a3e 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c @@ -23,7 +23,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO5) }, From 78942112c7f353872e6a1695a7a9f96d28ff4dd9 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 Jan 2022 11:36:15 -0800 Subject: [PATCH 240/258] Ensure supervisor_tick is run on the same core as CP --- ports/espressif/Makefile | 1 + ports/espressif/supervisor/port.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 36d4726ddf..acc8ec5720 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -94,6 +94,7 @@ INC += \ -isystem esp-idf/components/esp_event/include \ -isystem esp-idf/components/esp_hw_support/include \ -isystem esp-idf/components/esp_hw_support/include/soc \ + -isystem esp-idf/components/esp_ipc/include \ -isystem esp-idf/components/esp_netif/include \ -isystem esp-idf/components/esp_pm/include \ -isystem esp-idf/components/esp_ringbuf/include \ diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index d6eb32b395..dde3c92f10 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -77,6 +77,8 @@ #include "esp_debug_helpers.h" +#include "esp_ipc.h" + #ifdef CONFIG_SPIRAM #include "esp32/spiram.h" #endif @@ -103,7 +105,7 @@ TaskHandle_t circuitpython_task = NULL; extern void esp_restart(void) NORETURN; -STATIC void tick_timer_cb(void *arg) { +STATIC void tick_on_cp_core(void *arg) { supervisor_tick(); // CircuitPython's VM is run in a separate FreeRTOS task from timer callbacks. So, we have to @@ -111,6 +113,18 @@ STATIC void tick_timer_cb(void *arg) { xTaskNotifyGive(circuitpython_task); } +// This function may happen on the PRO core when CP is on the APP core. So, make +// sure we run on the CP core. +STATIC void tick_timer_cb(void *arg) { + #if defined(CONFIG_FREERTOS_UNICORE) && CONFIG_FREERTOS_UNICORE + tick_on_cp_core(arg); + #else + // This only blocks until the start of the function. That's ok since the PRO + // core shouldn't care what we do. + esp_ipc_call(CONFIG_ESP_MAIN_TASK_AFFINITY, tick_on_cp_core, NULL); + #endif +} + void sleep_timer_cb(void *arg); safe_mode_t port_init(void) { From 880d43a4f7d6dde9463d03abb3d688311c6275c8 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Wed, 19 Jan 2022 17:04:30 -0500 Subject: [PATCH 241/258] Fix pin typo. --- ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c index 67bc486170..6ed30e9a73 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c @@ -25,7 +25,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, From 46731c9b258212bf81fc17636d3158ec949b6948 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 18 Jan 2022 23:14:17 +0000 Subject: [PATCH 242/258] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1041 of 1041 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 317b409726..02276388a1 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-01-03 05:53+0000\n" +"PO-Revision-Date: 2022-01-19 23:56+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.10.1\n" +"X-Generator: Weblate 4.11-dev\n" #: main.c msgid "" @@ -2862,7 +2862,7 @@ msgstr "não é possível converter implicitamente o objeto '%q' para %q" #: extmod/ulab/code/numpy/vector.c msgid "can't convert complex to float" -msgstr "" +msgstr "não foi possível converter complexo em flutuante" #: py/obj.c msgid "can't convert to %q" @@ -2964,11 +2964,11 @@ msgstr "não pode lançar a saída com a regra de fundição" #: extmod/ulab/code/ndarray.c msgid "cannot convert complex to dtype" -msgstr "" +msgstr "não foi possível converter complexo em dtype" #: extmod/ulab/code/ndarray.c msgid "cannot convert complex type" -msgstr "" +msgstr "não foi possível converter o tipo complexo" #: py/objtype.c msgid "cannot create '%q' instances" @@ -3168,7 +3168,7 @@ msgstr "o divisor deve ser 4" #: extmod/ulab/code/numpy/vector.c msgid "dtype must be float, or complex" -msgstr "" +msgstr "dtype deve ser flutuante ou complexo" #: py/objdeque.c msgid "empty" @@ -3340,7 +3340,7 @@ msgstr "A função é definida apenas para ndarrays" #: extmod/ulab/code/numpy/carray/carray.c msgid "function is implemented for ndarrays only" -msgstr "" +msgstr "a função está implementada apenas para ndarrays" #: py/argcheck.c #, c-format @@ -3474,7 +3474,7 @@ msgstr "os dados da entrada devem ser iteráveis" #: extmod/ulab/code/numpy/vector.c msgid "input dtype must be float or complex" -msgstr "" +msgstr "o tipo da entrada dtype deve ser flutuante ou complexo" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" @@ -3487,7 +3487,7 @@ msgstr "a matriz da entrada é singular" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be a 1D ndarray" -msgstr "" +msgstr "a entrada deve ser um 1D ndarray" #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" @@ -3503,7 +3503,7 @@ msgstr "a entrada deve ser um ndarray" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be an ndarray, or a scalar" -msgstr "" +msgstr "a entrada deve ser um ndarray ou um escalar" #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" @@ -3882,7 +3882,7 @@ msgstr "argumentos insuficientes para o formato da string" #: extmod/ulab/code/numpy/carray/carray_tools.c msgid "not implemented for complex dtype" -msgstr "" +msgstr "não foi implementado para dtype complexo" #: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" @@ -4647,7 +4647,7 @@ msgstr "tipo da entrada incorreta" #: extmod/ulab/code/numpy/transform.c msgid "wrong length of condition array" -msgstr "" +msgstr "comprimento errado na condição da matriz" #: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" From e16cf12505e484b8aa5772e52d1c03b8be5e0bae Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 18 Jan 2022 07:22:22 +0000 Subject: [PATCH 243/258] Translated using Weblate (Swedish) Currently translated at 100.0% (1041 of 1041 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 74c57e7946..73551bb75e 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-01-03 05:53+0000\n" +"PO-Revision-Date: 2022-01-19 23:56+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.10.1\n" +"X-Generator: Weblate 4.11-dev\n" #: main.c msgid "" @@ -2830,7 +2830,7 @@ msgstr "kan inte konvertera '%q' objekt implicit till %q" #: extmod/ulab/code/numpy/vector.c msgid "can't convert complex to float" -msgstr "" +msgstr "kan inte konvertera complex till float" #: py/obj.c msgid "can't convert to %q" @@ -2930,11 +2930,11 @@ msgstr "kan inte casta utdata med regel" #: extmod/ulab/code/ndarray.c msgid "cannot convert complex to dtype" -msgstr "" +msgstr "kan inte konvertera komplex till dtype" #: extmod/ulab/code/ndarray.c msgid "cannot convert complex type" -msgstr "" +msgstr "kan inte konvertera complex typer" #: py/objtype.c msgid "cannot create '%q' instances" @@ -3132,7 +3132,7 @@ msgstr "divisor måste vara 4" #: extmod/ulab/code/numpy/vector.c msgid "dtype must be float, or complex" -msgstr "" +msgstr "dtype måste vara float eller complex" #: py/objdeque.c msgid "empty" @@ -3304,7 +3304,7 @@ msgstr "funktionen är enbart definierad för ndarray" #: extmod/ulab/code/numpy/carray/carray.c msgid "function is implemented for ndarrays only" -msgstr "" +msgstr "funktionen är bara implementerad för ndarrays" #: py/argcheck.c #, c-format @@ -3437,7 +3437,7 @@ msgstr "indata måste vara en iterable" #: extmod/ulab/code/numpy/vector.c msgid "input dtype must be float or complex" -msgstr "" +msgstr "indatatyp måste vara float eller complex" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" @@ -3450,7 +3450,7 @@ msgstr "indatamatrisen är singulär" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be a 1D ndarray" -msgstr "" +msgstr "indata måste vara en 1D ndarray" #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" @@ -3466,7 +3466,7 @@ msgstr "indata måste vara en ndarray" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be an ndarray, or a scalar" -msgstr "" +msgstr "indata måste vara en ndarray eller en scalar" #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" @@ -3843,7 +3843,7 @@ msgstr "inte tillräckligt med argument för formatsträng" #: extmod/ulab/code/numpy/carray/carray_tools.c msgid "not implemented for complex dtype" -msgstr "" +msgstr "inte implementerat för complex dtype" #: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" @@ -4604,7 +4604,7 @@ msgstr "fel indatatyp" #: extmod/ulab/code/numpy/transform.c msgid "wrong length of condition array" -msgstr "" +msgstr "fel längd på villkorsmatrisen" #: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" From 13db65566d590fea872121d51eeacfc5d2d612a2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 Jan 2022 16:19:13 -0800 Subject: [PATCH 244/258] ESP NeoPixel fixes This tweaks the RMT timing to better match the 1/3 and 2/3 of 800khz guideline for timing. It also ensures a delay of 300 microseconds with the line low before reset. Pin reset is now changed to the IDF default which pulls the pin up rather than CircuitPython's old behavior of floating the pin. Fixes #5679 --- .../common-hal/neopixel_write/__init__.c | 2 +- .../common-hal/microcontroller/Pin.c | 18 ++--------- .../common-hal/neopixel_write/__init__.c | 31 +++++++++++++------ .../common-hal/neopixel_write/__init__.c | 4 +-- supervisor/shared/status_leds.c | 7 ++++- 5 files changed, 32 insertions(+), 30 deletions(-) diff --git a/ports/atmel-samd/common-hal/neopixel_write/__init__.c b/ports/atmel-samd/common-hal/neopixel_write/__init__.c index 754bc97fdf..182b8eee14 100644 --- a/ports/atmel-samd/common-hal/neopixel_write/__init__.c +++ b/ports/atmel-samd/common-hal/neopixel_write/__init__.c @@ -100,7 +100,7 @@ static void neopixel_send_buffer_core(volatile uint32_t *clraddr, uint32_t pinMa ""); } -uint64_t next_start_raw_ticks = 0; +STATIC uint64_t next_start_raw_ticks = 0; void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, uint8_t *pixels, uint32_t numBytes) { // This is adapted directly from the Adafruit NeoPixel library SAMD21G18A code: diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 4648fec64d..37a235d0b3 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -36,20 +36,6 @@ STATIC uint32_t never_reset_pins[2]; STATIC uint32_t in_use[2]; -STATIC void floating_gpio_reset(gpio_num_t pin_number) { - // This is the same as gpio_reset_pin(), but without the pullup. - // Note that gpio_config resets the iomatrix to GPIO_FUNC as well. - gpio_config_t cfg = { - .pin_bit_mask = BIT64(pin_number), - .mode = GPIO_MODE_DISABLE, - .pull_up_en = false, - .pull_down_en = false, - .intr_type = GPIO_INTR_DISABLE, - }; - gpio_config(&cfg); - PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[pin_number], 0); -} - void never_reset_pin_number(gpio_num_t pin_number) { if (pin_number == NO_PIN) { return; @@ -72,7 +58,7 @@ void reset_pin_number(gpio_num_t pin_number) { never_reset_pins[pin_number / 32] &= ~(1 << pin_number % 32); in_use[pin_number / 32] &= ~(1 << pin_number % 32); - floating_gpio_reset(pin_number); + gpio_reset_pin(pin_number); } void common_hal_mcu_pin_reset_number(uint8_t i) { @@ -93,7 +79,7 @@ void reset_all_pins(void) { (never_reset_pins[i / 32] & (1 << i % 32)) != 0) { continue; } - floating_gpio_reset(i); + gpio_reset_pin(i); } in_use[0] = never_reset_pins[0]; in_use[1] = never_reset_pins[1]; diff --git a/ports/espressif/common-hal/neopixel_write/__init__.c b/ports/espressif/common-hal/neopixel_write/__init__.c index b63390f155..a5040725e7 100644 --- a/ports/espressif/common-hal/neopixel_write/__init__.c +++ b/ports/espressif/common-hal/neopixel_write/__init__.c @@ -43,20 +43,23 @@ #include "py/mphal.h" #include "py/runtime.h" #include "shared-bindings/neopixel_write/__init__.h" +#include "supervisor/port.h" #include "components/driver/include/driver/rmt.h" #include "peripherals/rmt.h" -#define WS2812_T0H_NS (350) -#define WS2812_T0L_NS (1000) -#define WS2812_T1H_NS (1000) -#define WS2812_T1L_NS (350) -#define WS2812_RESET_US (280) +// 416 ns is 1/3 of the 1250ns period of a 800khz signal. +#define WS2812_T0H_NS (416) +#define WS2812_T0L_NS (416 * 2) +#define WS2812_T1H_NS (416 * 2) +#define WS2812_T1L_NS (416) static uint32_t ws2812_t0h_ticks = 0; static uint32_t ws2812_t1h_ticks = 0; static uint32_t ws2812_t0l_ticks = 0; static uint32_t ws2812_t1l_ticks = 0; +static uint64_t next_start_raw_ticks = 0; + static void IRAM_ATTR ws2812_rmt_adapter(const void *src, rmt_item32_t *dest, size_t src_size, size_t wanted_num, size_t *translated_size, size_t *item_num) { if (src == NULL || dest == NULL) { @@ -107,21 +110,29 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, if (rmt_get_counter_clock(config.channel, &counter_clk_hz) != ESP_OK) { mp_raise_RuntimeError(translate("Could not retrieve clock")); } - float ratio = (float)counter_clk_hz / 1e9; - ws2812_t0h_ticks = (uint32_t)(ratio * WS2812_T0H_NS); - ws2812_t0l_ticks = (uint32_t)(ratio * WS2812_T0L_NS); - ws2812_t1h_ticks = (uint32_t)(ratio * WS2812_T1H_NS); - ws2812_t1l_ticks = (uint32_t)(ratio * WS2812_T1L_NS); + size_t ns_per_tick = 1e9 / counter_clk_hz; + ws2812_t0h_ticks = WS2812_T0H_NS / ns_per_tick; + ws2812_t0l_ticks = WS2812_T0L_NS / ns_per_tick; + ws2812_t1h_ticks = WS2812_T1H_NS / ns_per_tick; + ws2812_t1l_ticks = WS2812_T1L_NS / ns_per_tick; // Initialize automatic timing translator rmt_translator_init(config.channel, ws2812_rmt_adapter); + // Wait to make sure we don't append onto the last transmission. This should only be a tick or + // two. + while (port_get_raw_ticks(NULL) < next_start_raw_ticks) { + } + // Write and wait to finish if (rmt_write_sample(config.channel, pixels, (size_t)numBytes, true) != ESP_OK) { mp_raise_RuntimeError(translate("Input/output error")); } rmt_wait_tx_done(config.channel, pdMS_TO_TICKS(100)); + // Update the next start to +2 ticks. It ensures that we've gone 300+ us. + next_start_raw_ticks = port_get_raw_ticks(NULL) + 2; + // Free channel again peripherals_free_rmt(config.channel); // Swap pin back to GPIO mode diff --git a/ports/raspberrypi/common-hal/neopixel_write/__init__.c b/ports/raspberrypi/common-hal/neopixel_write/__init__.c index da7bf7c19f..09388af481 100644 --- a/ports/raspberrypi/common-hal/neopixel_write/__init__.c +++ b/ports/raspberrypi/common-hal/neopixel_write/__init__.c @@ -98,6 +98,6 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, gpio_init(digitalinout->pin->number); common_hal_digitalio_digitalinout_switch_to_output((digitalio_digitalinout_obj_t *)digitalinout, false, DRIVE_MODE_PUSH_PULL); - // Update the next start. - next_start_raw_ticks = port_get_raw_ticks(NULL) + 1; + // Update the next start to +2 ticks. This ensures we give it at least 300us. + next_start_raw_ticks = port_get_raw_ticks(NULL) + 2; } diff --git a/supervisor/shared/status_leds.c b/supervisor/shared/status_leds.c index 0c433271fc..6c7cde28cc 100644 --- a/supervisor/shared/status_leds.c +++ b/supervisor/shared/status_leds.c @@ -48,6 +48,7 @@ uint8_t rgb_status_brightness = 63; #define MICROPY_HW_NEOPIXEL_COUNT (1) #endif +static uint64_t next_start_raw_ticks; static uint8_t status_neopixel_color[3 * MICROPY_HW_NEOPIXEL_COUNT]; static digitalio_digitalinout_obj_t status_neopixel; @@ -218,6 +219,10 @@ void status_led_init() { void status_led_deinit() { #ifdef MICROPY_HW_NEOPIXEL + // Make sure the pin stays low for the reset period. The pin reset may pull + // it up and stop the reset period. + while (port_get_raw_ticks(NULL) < next_start_raw_ticks) { + } common_hal_reset_pin(MICROPY_HW_NEOPIXEL); #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) @@ -265,7 +270,7 @@ void new_status_color(uint32_t rgb) { status_neopixel_color[3 * i + 2] = rgb_adjusted & 0xff; } common_hal_neopixel_write(&status_neopixel, status_neopixel_color, 3 * MICROPY_HW_NEOPIXEL_COUNT); - + next_start_raw_ticks = port_get_raw_ticks(NULL) + 2; #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) for (size_t i = 0; i < MICROPY_HW_APA102_COUNT; i++) { // Skip 4 + offset to skip the header bytes too. From 30c0891fba8b87299a66426511068f4ddd26f760 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 20 Jan 2022 20:00:02 +0530 Subject: [PATCH 245/258] cleanup post instance parameter removal --- shared-bindings/board/__init__.c | 55 ++++++-------------------------- shared-bindings/board/__init__.h | 3 +- shared-module/board/__init__.c | 15 +++++++++ 3 files changed, 25 insertions(+), 48 deletions(-) diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index 15953f2475..8b2738a248 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -51,42 +51,21 @@ //| circuitpython, as well as on circuitpython.org. //| Example: "hallowing_m0_express".""" -#if CIRCUITPY_BOARD_I2C || CIRCUITPY_BOARD_SPI || CIRCUITPY_BOARD_UART -STATIC mp_int_t board_get_instance(size_t n_args, const mp_obj_t *args, const mp_int_t bus_in) { - if (n_args == 0) { - return 0; - } - const mp_int_t instance = mp_obj_get_int(args[0]); - if (instance >= bus_in || instance < 0) { - mp_raise_ValueError_varg(translate("No default %q bus"), MP_QSTR_UART); - } - return instance; -} -#endif - //| def I2C() -> busio.I2C: //| """Returns the `busio.I2C` object for the board's designated I2C bus(es). //| The object created is a singleton, and uses the default parameter values for `busio.I2C`.""" //| ... //| #if CIRCUITPY_BOARD_I2C -mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args) { - const mp_int_t instance = board_get_instance(n_args, args, CIRCUITPY_BOARD_I2C); - const mp_obj_t singleton = common_hal_board_get_i2c(instance); - if (singleton != NULL && !common_hal_busio_i2c_deinited(singleton)) { - return singleton; - } - return common_hal_board_create_i2c(instance); +STATIC mp_obj_t board_i2c_0(void) { + return common_hal_board_create_i2c(0); } #else -mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args) { +STATIC mp_obj_t board_i2c_0(void) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_I2C); return MP_ROM_NONE; } #endif -STATIC mp_obj_t board_i2c_0(void) { - return board_i2c(0, NULL); -} MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c_0); //| def SPI() -> busio.SPI: @@ -95,23 +74,15 @@ MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c_0); //| ... //| #if CIRCUITPY_BOARD_SPI -mp_obj_t board_spi(size_t n_args, const mp_obj_t *args) { - const mp_int_t instance = board_get_instance(n_args, args, CIRCUITPY_BOARD_SPI); - const mp_obj_t singleton = common_hal_board_get_spi(instance); - if (singleton != NULL && !common_hal_busio_spi_deinited(singleton)) { - return singleton; - } - return common_hal_board_create_spi(instance); +STATIC mp_obj_t board_spi_0(void) { + return common_hal_board_create_spi(0); } #else -mp_obj_t board_spi(size_t n_args, const mp_obj_t *args) { +STATIC mp_obj_t board_spi_0(void) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_SPI); return MP_ROM_NONE; } #endif -STATIC mp_obj_t board_spi_0(void) { - return board_spi(0, NULL); -} MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi_0); //| def UART() -> busio.UART: @@ -120,23 +91,15 @@ MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi_0); //| ... //| #if CIRCUITPY_BOARD_UART -mp_obj_t board_uart(size_t n_args, const mp_obj_t *args) { - const mp_int_t instance = board_get_instance(n_args, args, CIRCUITPY_BOARD_UART); - const mp_obj_t singleton = common_hal_board_get_uart(instance); - if (singleton != NULL && !common_hal_busio_uart_deinited(singleton)) { - return singleton; - } - return common_hal_board_create_uart(instance); +STATIC mp_obj_t board_uart_0(void) { + return common_hal_board_create_uart(0); } #else -mp_obj_t board_uart(size_t n_args, const mp_obj_t *args) { +STATIC mp_obj_t board_uart_0(void) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_UART); return MP_ROM_NONE; } #endif -STATIC mp_obj_t board_uart_0(void) { - return board_uart(0, NULL); -} MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart_0); const mp_obj_module_t board_module = { diff --git a/shared-bindings/board/__init__.h b/shared-bindings/board/__init__.h index 240497a639..b668e0a04b 100644 --- a/shared-bindings/board/__init__.h +++ b/shared-bindings/board/__init__.h @@ -55,8 +55,7 @@ MP_DECLARE_CONST_FUN_OBJ_0(board_uart_obj); #define CIRCUITPY_BOARD_BUS_SINGLETON(name, bus, instance) \ STATIC mp_obj_t board_##name(void) { \ - const mp_obj_t inst = mp_obj_new_int_from_uint(instance); \ - return board_##bus(1, &inst); \ + return common_hal_board_create_##bus(instance); \ } \ MP_DEFINE_CONST_FUN_OBJ_0(board_##name##_obj, board_##name); diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c index f062531978..cd599e7448 100644 --- a/shared-module/board/__init__.c +++ b/shared-module/board/__init__.c @@ -72,6 +72,11 @@ mp_obj_t common_hal_board_get_i2c(const mp_int_t instance) { } mp_obj_t common_hal_board_create_i2c(const mp_int_t instance) { + const mp_obj_t singleton = common_hal_board_get_i2c(instance); + if (singleton != NULL && !common_hal_busio_i2c_deinited(singleton)) { + return singleton; + } + busio_i2c_obj_t *self = &i2c_obj[instance]; self->base.type = &busio_i2c_type; @@ -111,6 +116,11 @@ mp_obj_t common_hal_board_get_spi(const mp_int_t instance) { } mp_obj_t common_hal_board_create_spi(const mp_int_t instance) { + const mp_obj_t singleton = common_hal_board_get_spi(instance); + if (singleton != NULL && !common_hal_busio_spi_deinited(singleton)) { + return singleton; + } + busio_spi_obj_t *self = &spi_obj[instance]; self->base.type = &busio_spi_type; @@ -148,6 +158,11 @@ mp_obj_t common_hal_board_get_uart(const mp_int_t instance) { } mp_obj_t common_hal_board_create_uart(const mp_int_t instance) { + const mp_obj_t singleton = common_hal_board_get_uart(instance); + if (singleton != NULL && !common_hal_busio_uart_deinited(singleton)) { + return singleton; + } + busio_uart_obj_t *self = &uart_obj[instance]; self->base.type = &busio_uart_type; From d99847b4106bfb767029e81eda810168ab5a5d03 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 20 Jan 2022 12:40:41 -0800 Subject: [PATCH 246/258] Refactor pin reset on ESP This makes it easier to blanket never reset flash and USB pins. It also allows us to set a custom state after reset. The first case is for the double tap reset that needs to be pulled low. Fixes #5893 --- .../boards/adafruit_esp32s2_camera/board.c | 4 -- .../adafruit_esp32s2_camera/mpconfigboard.h | 2 + .../boards/adafruit_feather_esp32s2/board.c | 4 -- .../adafruit_feather_esp32s2/mpconfigboard.h | 2 + .../adafruit_feather_esp32s2_tft/board.c | 4 -- .../mpconfigboard.h | 2 + .../board.c | 4 -- .../mpconfigboard.h | 2 + .../boards/adafruit_funhouse/board.c | 4 -- .../boards/adafruit_funhouse/mpconfigboard.h | 2 + .../adafruit_magtag_2.9_grayscale/board.c | 4 -- .../mpconfigboard.h | 2 + .../boards/adafruit_metro_esp32s2/board.c | 3 -- .../adafruit_metro_esp32s2/mpconfigboard.h | 2 + .../boards/adafruit_qtpy_esp32s2/board.c | 3 -- .../adafruit_qtpy_esp32s2/mpconfigboard.h | 5 +++ .../adafruit_qtpy_esp32s3_nopsram/board.c | 13 ------ .../mpconfigboard.h | 2 + .../boards/ai_thinker_esp32-c3s/board.c | 10 ----- .../boards/ai_thinker_esp_12k_nodemcu/board.c | 4 -- ports/espressif/boards/artisense_rd00/board.c | 7 ---- .../boards/atmegazero_esp32s2/board.c | 13 ------ .../boards/crumpspace_crumps2/board.c | 4 -- .../boards/electroniccats_bastwifi/board.c | 4 -- .../espressif_esp32c3_devkitm_1_n4/board.c | 10 ----- .../boards/espressif_esp32s3_box/board.c | 18 -------- .../espressif_esp32s3_devkitc_1_n8/board.c | 13 ------ .../espressif_esp32s3_devkitc_1_n8r2/board.c | 13 ------ .../espressif_esp32s3_devkitc_1_n8r8/board.c | 19 --------- .../boards/espressif_hmi_devkit_1/board.c | 4 -- .../boards/espressif_kaluga_1.3/board.c | 4 -- .../boards/espressif_kaluga_1/board.c | 4 -- .../boards/espressif_saola_1_wroom/board.c | 4 -- .../boards/espressif_saola_1_wrover/board.c | 4 -- .../boards/franzininho_wifi_wroom/board.c | 4 -- .../boards/franzininho_wifi_wrover/board.c | 4 -- .../boards/gravitech_cucumber_m/board.c | 4 -- .../boards/gravitech_cucumber_ms/board.c | 4 -- .../boards/gravitech_cucumber_r/board.c | 4 -- .../boards/gravitech_cucumber_rs/board.c | 4 -- .../boards/lilygo_ttgo_t8_s2_st7789/board.c | 4 -- ports/espressif/boards/lolin_s2_mini/board.c | 13 ------ ports/espressif/boards/lolin_s2_pico/board.c | 13 ------ .../boards/microdev_micro_c3/board.c | 13 ------ .../boards/microdev_micro_s2/board.c | 13 ------ .../boards/morpheans_morphesp-240/board.c | 4 -- .../boards/muselab_nanoesp32_s2_wroom/board.c | 4 -- .../muselab_nanoesp32_s2_wrover/board.c | 4 -- .../boards/odt_pixelwing_esp32_s2/board.c | 3 -- .../boards/targett_module_clip_wroom/board.c | 4 -- .../boards/targett_module_clip_wrover/board.c | 4 -- .../boards/unexpectedmaker_feathers2/board.c | 13 ------ .../unexpectedmaker_feathers2_neo/board.c | 13 ------ .../board.c | 13 ------ .../boards/unexpectedmaker_tinys2/board.c | 13 ------ .../common-hal/microcontroller/Pin.c | 41 ++++++++++++++++++- .../esp-idf-config/sdkconfig-debug.defaults | 8 ++-- 57 files changed, 64 insertions(+), 339 deletions(-) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/board.c b/ports/espressif/boards/adafruit_esp32s2_camera/board.c index 15f573ea96..38e7c0458c 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/board.c +++ b/ports/espressif/boards/adafruit_esp32s2_camera/board.c @@ -51,10 +51,6 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - busio_spi_obj_t *spi = common_hal_board_create_spi(); displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h index 25b2f2aa54..f7f988b861 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h @@ -44,3 +44,5 @@ #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) #define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) #define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DOUBLE_TAP_PIN (&pin_GPIO42) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index be678c23ab..8918870a8e 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -32,10 +32,6 @@ #include "common-hal/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Turn on I2C common_hal_never_reset_pin(&pin_GPIO7); gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h index fcd4a2cf60..2eb3344029 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h @@ -47,3 +47,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO38) #define DEFAULT_UART_BUS_TX (&pin_GPIO39) + +#define DOUBLE_TAP_PIN (&pin_GPIO34) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index 68e4171948..f6c5c856e3 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -71,10 +71,6 @@ uint8_t display_init_sequence[] = { void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // I2C/TFT power pin common_hal_never_reset_pin(&pin_GPIO21); diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h index b850b85e01..a68593a308 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h @@ -47,3 +47,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO2) #define DEFAULT_UART_BUS_TX (&pin_GPIO1) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c index 943d91feda..71b381616f 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c @@ -50,10 +50,6 @@ uint8_t display_init_sequence[] = { */ void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h index d2cd01a681..9c759ac1ca 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -44,3 +44,5 @@ #define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) #define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DOUBLE_TAP_PIN (&pin_GPIO34) diff --git a/ports/espressif/boards/adafruit_funhouse/board.c b/ports/espressif/boards/adafruit_funhouse/board.c index a4a1d07947..34e74c45f9 100644 --- a/ports/espressif/boards/adafruit_funhouse/board.c +++ b/ports/espressif/boards/adafruit_funhouse/board.c @@ -50,10 +50,6 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO37); diff --git a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h index 6379147c30..a268020b7c 100644 --- a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h @@ -41,3 +41,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO33) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO34) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c index 020e6f6a1f..4a8234aa41 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c @@ -110,10 +110,6 @@ const uint8_t display_stop_sequence[] = { }; void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h index 343bb525f1..ad81cc2ca7 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h @@ -42,3 +42,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO34) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/board.c b/ports/espressif/boards/adafruit_metro_esp32s2/board.c index 5abd1ce1b3..6772768da5 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_metro_esp32s2/board.c @@ -29,9 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h index ec992383aa..51d93224a4 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h @@ -46,3 +46,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO5) #define DEFAULT_UART_BUS_TX (&pin_GPIO6) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s2/board.c index 5abd1ce1b3..6772768da5 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/board.c @@ -29,9 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h index dd8b1a2ac8..62766631c3 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h @@ -47,3 +47,8 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO16) #define DEFAULT_UART_BUS_TX (&pin_GPIO5) + +#define DOUBLE_TAP_PIN (&pin_GPIO10) + +#define DEBUG_UART_RX DEFAULT_UART_BUS_RX +#define DEBUG_UART_TX DEFAULT_UART_BUS_TX diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c index dd24db581b..ff9418ec86 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h index 90d65ea71e..a08fe9e45b 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h @@ -47,3 +47,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO16) #define DEFAULT_UART_BUS_TX (&pin_GPIO5) + +#define DOUBLE_TAP_PIN (&pin_GPIO10) diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c index 83ef690007..f9cb98aa8f 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c @@ -29,21 +29,11 @@ #include "supervisor/board.h" void board_init(void) { - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO20); common_hal_never_reset_pin(&pin_GPIO21); #endif - - // SPI Flash - common_hal_never_reset_pin(&pin_GPIO11); - common_hal_never_reset_pin(&pin_GPIO12); - common_hal_never_reset_pin(&pin_GPIO13); - common_hal_never_reset_pin(&pin_GPIO14); - common_hal_never_reset_pin(&pin_GPIO15); - common_hal_never_reset_pin(&pin_GPIO16); - common_hal_never_reset_pin(&pin_GPIO17); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/artisense_rd00/board.c b/ports/espressif/boards/artisense_rd00/board.c index 2b18dd7592..ea363f6b54 100644 --- a/ports/espressif/boards/artisense_rd00/board.c +++ b/ports/espressif/boards/artisense_rd00/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); @@ -42,9 +38,6 @@ void board_init(void) { // Crystal common_hal_never_reset_pin(&pin_GPIO15); common_hal_never_reset_pin(&pin_GPIO16); - - // PSRAM - common_hal_never_reset_pin(&pin_GPIO26); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/atmegazero_esp32s2/board.c b/ports/espressif/boards/atmegazero_esp32s2/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/board.c +++ b/ports/espressif/boards/atmegazero_esp32s2/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif /* DEBUG */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/crumpspace_crumps2/board.c b/ports/espressif/boards/crumpspace_crumps2/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/crumpspace_crumps2/board.c +++ b/ports/espressif/boards/crumpspace_crumps2/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/electroniccats_bastwifi/board.c b/ports/espressif/boards/electroniccats_bastwifi/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/board.c +++ b/ports/espressif/boards/electroniccats_bastwifi/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c index 76353e4ff9..e3b71f4832 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c @@ -28,21 +28,11 @@ #include "supervisor/board.h" void board_init(void) { - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO20); common_hal_never_reset_pin(&pin_GPIO21); #endif - - // SPI Flash - common_hal_never_reset_pin(&pin_GPIO11); - common_hal_never_reset_pin(&pin_GPIO12); - common_hal_never_reset_pin(&pin_GPIO13); - common_hal_never_reset_pin(&pin_GPIO14); - common_hal_never_reset_pin(&pin_GPIO15); - common_hal_never_reset_pin(&pin_GPIO16); - common_hal_never_reset_pin(&pin_GPIO17); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/espressif_esp32s3_box/board.c b/ports/espressif/boards/espressif_esp32s3_box/board.c index c425c5c24e..ad76c60ddd 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/board.c +++ b/ports/espressif/boards/espressif_esp32s3_box/board.c @@ -90,29 +90,11 @@ void board_init(void) { true, // backlight_on_high false); // SH1107_addressing - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); - common_hal_never_reset_pin(&pin_GPIO33); - common_hal_never_reset_pin(&pin_GPIO34); - common_hal_never_reset_pin(&pin_GPIO35); - common_hal_never_reset_pin(&pin_GPIO36); - common_hal_never_reset_pin(&pin_GPIO37); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c index dd24db581b..ff9418ec86 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c index dd24db581b..ff9418ec86 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c index b9558bfbdf..ff9418ec86 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c @@ -29,30 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif - - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); - common_hal_never_reset_pin(&pin_GPIO33); - common_hal_never_reset_pin(&pin_GPIO34); - common_hal_never_reset_pin(&pin_GPIO35); - common_hal_never_reset_pin(&pin_GPIO36); - common_hal_never_reset_pin(&pin_GPIO37); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/board.c b/ports/espressif/boards/espressif_hmi_devkit_1/board.c index ff5d9cfb6c..93aa1c0436 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/board.c +++ b/ports/espressif/boards/espressif_hmi_devkit_1/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); diff --git a/ports/espressif/boards/espressif_kaluga_1.3/board.c b/ports/espressif/boards/espressif_kaluga_1.3/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/board.c +++ b/ports/espressif/boards/espressif_kaluga_1.3/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/espressif_kaluga_1/board.c b/ports/espressif/boards/espressif_kaluga_1/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/espressif_kaluga_1/board.c +++ b/ports/espressif/boards/espressif_kaluga_1/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/espressif_saola_1_wroom/board.c b/ports/espressif/boards/espressif_saola_1_wroom/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/board.c +++ b/ports/espressif/boards/espressif_saola_1_wroom/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/espressif_saola_1_wrover/board.c b/ports/espressif/boards/espressif_saola_1_wrover/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/board.c +++ b/ports/espressif/boards/espressif_saola_1_wrover/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/franzininho_wifi_wroom/board.c b/ports/espressif/boards/franzininho_wifi_wroom/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/board.c +++ b/ports/espressif/boards/franzininho_wifi_wroom/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/franzininho_wifi_wrover/board.c b/ports/espressif/boards/franzininho_wifi_wrover/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/board.c +++ b/ports/espressif/boards/franzininho_wifi_wrover/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/gravitech_cucumber_m/board.c b/ports/espressif/boards/gravitech_cucumber_m/board.c index ec84d3209c..16a6af0742 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/board.c +++ b/ports/espressif/boards/gravitech_cucumber_m/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/gravitech_cucumber_ms/board.c b/ports/espressif/boards/gravitech_cucumber_ms/board.c index ec84d3209c..16a6af0742 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/board.c +++ b/ports/espressif/boards/gravitech_cucumber_ms/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/gravitech_cucumber_r/board.c b/ports/espressif/boards/gravitech_cucumber_r/board.c index ec84d3209c..16a6af0742 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/board.c +++ b/ports/espressif/boards/gravitech_cucumber_r/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/gravitech_cucumber_rs/board.c b/ports/espressif/boards/gravitech_cucumber_rs/board.c index ec84d3209c..16a6af0742 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/board.c +++ b/ports/espressif/boards/gravitech_cucumber_rs/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c index b00a1ed8ed..38fba815e5 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c @@ -131,10 +131,6 @@ static void display_init(void) { } void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/lolin_s2_mini/board.c b/ports/espressif/boards/lolin_s2_mini/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/lolin_s2_mini/board.c +++ b/ports/espressif/boards/lolin_s2_mini/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif /* DEBUG */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/lolin_s2_pico/board.c b/ports/espressif/boards/lolin_s2_pico/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/lolin_s2_pico/board.c +++ b/ports/espressif/boards/lolin_s2_pico/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif /* DEBUG */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/microdev_micro_c3/board.c b/ports/espressif/boards/microdev_micro_c3/board.c index 7ffd406cfe..e3b71f4832 100644 --- a/ports/espressif/boards/microdev_micro_c3/board.c +++ b/ports/espressif/boards/microdev_micro_c3/board.c @@ -28,24 +28,11 @@ #include "supervisor/board.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO18); - common_hal_never_reset_pin(&pin_GPIO19); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO20); common_hal_never_reset_pin(&pin_GPIO21); #endif - - // SPI Flash - common_hal_never_reset_pin(&pin_GPIO11); - common_hal_never_reset_pin(&pin_GPIO12); - common_hal_never_reset_pin(&pin_GPIO13); - common_hal_never_reset_pin(&pin_GPIO14); - common_hal_never_reset_pin(&pin_GPIO15); - common_hal_never_reset_pin(&pin_GPIO16); - common_hal_never_reset_pin(&pin_GPIO17); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/microdev_micro_s2/board.c b/ports/espressif/boards/microdev_micro_s2/board.c index 52d640618c..6ba5d975d7 100644 --- a/ports/espressif/boards/microdev_micro_s2/board.c +++ b/ports/espressif/boards/microdev_micro_s2/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/morpheans_morphesp-240/board.c b/ports/espressif/boards/morpheans_morphesp-240/board.c index aad2f0257a..ace1778766 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/board.c +++ b/ports/espressif/boards/morpheans_morphesp-240/board.c @@ -139,10 +139,6 @@ uint8_t display_init_sequence[] = { void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO6); diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c b/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c index 5abd1ce1b3..6772768da5 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c @@ -29,9 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/targett_module_clip_wroom/board.c b/ports/espressif/boards/targett_module_clip_wroom/board.c index 00b94a0259..66aea4bdd5 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/board.c +++ b/ports/espressif/boards/targett_module_clip_wroom/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/targett_module_clip_wrover/board.c b/ports/espressif/boards/targett_module_clip_wrover/board.c index 00b94a0259..66aea4bdd5 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/board.c +++ b/ports/espressif/boards/targett_module_clip_wrover/board.c @@ -29,10 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/board.c b/ports/espressif/boards/unexpectedmaker_feathers2/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif /* DEBUG */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif /* DEBUG */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif /* DEBUG */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/board.c b/ports/espressif/boards/unexpectedmaker_tinys2/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinys2/board.c @@ -29,24 +29,11 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif /* DEBUG */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 37a235d0b3..dbc1045cc8 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -50,6 +50,43 @@ void common_hal_never_reset_pin(const mcu_pin_obj_t *pin) { never_reset_pin_number(pin->number); } +STATIC void _reset_pin(gpio_num_t pin_number) { + #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 + // Never ever reset pins used for flash and RAM. + if (26 <= pin_number && pin_number <= 32) { + return; + } + #ifdef CONFIG_SPIRAM_MODE_OCT + // Octal DQ4-DQ7 and DQS/DM + if (33 <= pin_number && pin_number <= 37) { + return; + } + #endif + + #if CIRCUITPY_USB + // Never reset USB pins. + if (pin_number == 19 || pin_number == 20) { + return; + } + #endif + #elif CONFIG_IDF_TARGET_ESP32C3 + // Never ever reset pins used for flash and RAM. + if (11 <= pin_number && pin_number <= 17) { + return; + } + #endif + + gpio_reset_pin(pin_number); + + #ifdef DOUBLE_TAP_PIN + // Pull the double tap pin down so that resets come back to CircuitPython. + if (pin_number == DOUBLE_TAP_PIN->number) { + gpio_pullup_dis(pin_number); + gpio_pulldown_en(pin_number); + } + #endif +} + // Mark pin as free and return it to a quiescent state. void reset_pin_number(gpio_num_t pin_number) { if (pin_number == NO_PIN) { @@ -58,7 +95,7 @@ void reset_pin_number(gpio_num_t pin_number) { never_reset_pins[pin_number / 32] &= ~(1 << pin_number % 32); in_use[pin_number / 32] &= ~(1 << pin_number % 32); - gpio_reset_pin(pin_number); + _reset_pin(pin_number); } void common_hal_mcu_pin_reset_number(uint8_t i) { @@ -79,7 +116,7 @@ void reset_all_pins(void) { (never_reset_pins[i / 32] & (1 << i % 32)) != 0) { continue; } - gpio_reset_pin(i); + _reset_pin(i); } in_use[0] = never_reset_pins[0]; in_use[1] = never_reset_pins[1]; diff --git a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults index 381483a8b9..9d02c62445 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults @@ -1,17 +1,17 @@ # # Bootloader config # -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE is not set -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set # end of Bootloader config -CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set # # Compiler options # -# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set +CONFIG_COMPILER_OPTIMIZATION_SIZE=y # CONFIG_COMPILER_OPTIMIZATION_PERF is not set # CONFIG_COMPILER_OPTIMIZATION_NONE is not set CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y From 35175715f952b87642605ab0a786c4a6d4fdb645 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 20 Jan 2022 14:11:33 -0800 Subject: [PATCH 247/258] Check target defined --- ports/espressif/common-hal/microcontroller/Pin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index dbc1045cc8..1683ea6acc 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -51,7 +51,7 @@ void common_hal_never_reset_pin(const mcu_pin_obj_t *pin) { } STATIC void _reset_pin(gpio_num_t pin_number) { - #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 + #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) // Never ever reset pins used for flash and RAM. if (26 <= pin_number && pin_number <= 32) { return; @@ -69,7 +69,7 @@ STATIC void _reset_pin(gpio_num_t pin_number) { return; } #endif - #elif CONFIG_IDF_TARGET_ESP32C3 + #elif defined(CONFIG_IDF_TARGET_ESP32C3) // Never ever reset pins used for flash and RAM. if (11 <= pin_number && pin_number <= 17) { return; From 8eddce6f428cf6fd23afd6b5611f0d67aebe2d6b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 20 Jan 2022 17:21:51 -0500 Subject: [PATCH 248/258] Validate open() mode --- extmod/vfs_fat_file.c | 22 +++++++++++++++++++++- locale/circuitpython.pot | 12 ++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 17b142b95a..4da497f5b8 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -139,39 +139,59 @@ STATIC const mp_arg_t file_open_args[] = { STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_arg_val_t *args) { int mode = 0; const char *mode_s = mp_obj_str_get_str(args[1].u_obj); - // TODO make sure only one of r, w, x, a, and b, t are specified + uint32_t rwxa_count = 0; + uint32_t bt_count = 0; + uint32_t plus_count = 0; + bool bad_mode = false; while (*mode_s) { switch (*mode_s++) { case 'r': mode |= FA_READ; + rwxa_count++; break; case 'w': mode |= FA_WRITE | FA_CREATE_ALWAYS; + rwxa_count++; break; case 'x': mode |= FA_WRITE | FA_CREATE_NEW; + rwxa_count++; break; case 'a': mode |= FA_WRITE | FA_OPEN_ALWAYS; + rwxa_count++; break; case '+': mode |= FA_READ | FA_WRITE; + plus_count++; break; #if MICROPY_PY_IO_FILEIO case 'b': + bt_count++; type = &mp_type_vfs_fat_fileio; break; #endif case 't': + bt_count++; type = &mp_type_vfs_fat_textio; break; + default: + bad_mode = true; + mp_raise_ValueError(translate("Invalid mode")); + break; } } + + if (rwxa_count != 1 || plus_count > 1 || bt_count > 1 || bad_mode) { + mp_raise_ValueError(translate("Invalid mode")); + } + assert(vfs != NULL); if ((mode & FA_WRITE) != 0 && !filesystem_is_writable_by_python(vfs)) { mp_raise_OSError(MP_EROFS); } + pyb_file_obj_t *o = m_new_obj_with_finaliser(pyb_file_obj_t); o->base.type = type; diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 121eac2049..cfab5d02e2 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1370,6 +1370,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -3992,6 +3996,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -3999,15 +4004,18 @@ msgstr "" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h From ab57299bd69a32edc1766480a3a8b4d38a9caafb Mon Sep 17 00:00:00 2001 From: George Waters Date: Thu, 20 Jan 2022 17:37:51 -0500 Subject: [PATCH 249/258] Update the io module's __name__ --- py/modio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/modio.c b/py/modio.c index 18918cf3ce..23374578cf 100644 --- a/py/modio.c +++ b/py/modio.c @@ -257,7 +257,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(resource_stream_obj, resource_stream); #endif STATIC const mp_rom_map_elem_t mp_module_io_globals_table[] = { + #if CIRCUITPY + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_io) }, + #else { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uio) }, + #endif // Note: mp_builtin_open_obj should be defined by port, it's not // part of the core. { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, From eb08c83ae29b08c86abb0f97a898b8a5c5247f66 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 20 Jan 2022 18:17:38 -0500 Subject: [PATCH 250/258] fix typo --- extmod/vfs_fat_file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 4da497f5b8..65ee5f9024 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -177,7 +177,6 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar break; default: bad_mode = true; - mp_raise_ValueError(translate("Invalid mode")); break; } } From ea30a8ac0460a91fd4fe5d69db540fb08c58a2be Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jan 2022 18:50:50 -0600 Subject: [PATCH 251/258] Reboot into the ROM bootloader from 1200 baud Per Scott, the purpose of this trick is to make the board programmable from Arduino even when CP is installed, so my convenience of escaping into UF2 is not going to work out. --- ports/espressif/supervisor/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 05125cf4ec..2ca48db777 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -275,7 +275,7 @@ void reset_port(void) { } void reset_to_bootloader(void) { - common_hal_mcu_on_next_reset(RUNMODE_UF2); + common_hal_mcu_on_next_reset(RUNMODE_BOOTLOADER); esp_restart(); } From fed5227de9af87f7d2aba30c93008f9871a4ab4b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 20 Jan 2022 20:34:04 -0500 Subject: [PATCH 252/258] shrink stringcar_m0_express --- ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk index 8821f4793a..8274c71243 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk @@ -13,5 +13,6 @@ LONGINT_IMPL = MPZ CIRCUITPY_KEYPAD = 0 CIRCUITPY_ONEWIREIO = 0 +CIRCUITPY_USB_MIDI = 0 CIRCUITPY_BITBANG_APA102 = 1 From 3970aa5a5e33825d26eba82e5920d5d786e7ec56 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Fri, 21 Jan 2022 10:11:33 +0530 Subject: [PATCH 253/258] fix build failure on two boards --- ports/espressif/boards/adafruit_esp32s2_camera/board.c | 2 +- ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/board.c b/ports/espressif/boards/adafruit_esp32s2_camera/board.c index 38e7c0458c..e9eef0dcbc 100644 --- a/ports/espressif/boards/adafruit_esp32s2_camera/board.c +++ b/ports/espressif/boards/adafruit_esp32s2_camera/board.c @@ -51,7 +51,7 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - busio_spi_obj_t *spi = common_hal_board_create_spi(); + busio_spi_obj_t *spi = common_hal_board_create_spi(0); displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; common_hal_displayio_fourwire_construct(bus, diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index f6c5c856e3..ce1aa4ae98 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -78,7 +78,7 @@ void board_init(void) { gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT); gpio_set_level(21, true); - busio_spi_obj_t *spi = common_hal_board_create_spi(); + busio_spi_obj_t *spi = common_hal_board_create_spi(0); displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; From c598ede84e5f33864b8cc44225f2f4ecfee61c0f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 21 Jan 2022 10:34:38 -0800 Subject: [PATCH 254/258] Add winbond to Feather RP2040 --- .../raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk index 84c4adabb7..c77d2d2c13 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "GD25Q64C" +EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ" From 1b8c41ea4d6091bbc67157e76a79f44431ac8687 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 21 Jan 2022 19:50:54 +0100 Subject: [PATCH 255/258] 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 | 12 ++++++++++-- locale/cs.po | 12 ++++++++++-- locale/de_DE.po | 12 ++++++++++-- locale/el.po | 12 ++++++++++-- locale/en_GB.po | 12 ++++++++++-- locale/es.po | 12 ++++++++++-- locale/fil.po | 12 ++++++++++-- locale/fr.po | 12 ++++++++++-- locale/hi.po | 12 ++++++++++-- locale/it_IT.po | 12 ++++++++++-- locale/ja.po | 12 ++++++++++-- locale/ko.po | 12 ++++++++++-- locale/nl.po | 12 ++++++++++-- locale/pl.po | 12 ++++++++++-- locale/pt_BR.po | 12 ++++++++++-- locale/ru.po | 12 ++++++++++-- locale/sv.po | 12 ++++++++++-- locale/tr.po | 12 ++++++++++-- locale/zh_Latn_pinyin.po | 12 ++++++++++-- 19 files changed, 190 insertions(+), 38 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 8e9ffa9e40..d93756faef 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1391,6 +1391,10 @@ msgstr "Ukuran potongan format tidak valid" msgid "Invalid memory access." msgstr "Akses memori tidak valid." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4030,6 +4034,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4037,15 +4042,18 @@ msgstr "" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/cs.po b/locale/cs.po index 25fb7a2dfd..b25302e388 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1379,6 +1379,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4003,6 +4007,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4010,15 +4015,18 @@ msgstr "" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/de_DE.po b/locale/de_DE.po index b57b2bc6c2..1d2c2437f9 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1390,6 +1390,10 @@ msgstr "Ungültige format chunk size" msgid "Invalid memory access." msgstr "Ungültiger Speicherzugriff." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4058,6 +4062,7 @@ msgstr "pow() drittes Argument darf nicht 0 sein" msgid "pow() with 3 arguments requires integers" msgstr "pow() mit 3 Argumenten erfordert Integer" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4065,15 +4070,18 @@ msgstr "pow() mit 3 Argumenten erfordert Integer" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/el.po b/locale/el.po index aec64bb7cf..216679c9bc 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1370,6 +1370,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -3992,6 +3996,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -3999,15 +4004,18 @@ msgstr "" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/en_GB.po b/locale/en_GB.po index 5e54a91d83..0e3612c41f 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -1385,6 +1385,10 @@ msgstr "Invalid format chunk size" msgid "Invalid memory access." msgstr "Invalid memory access." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4029,6 +4033,7 @@ msgstr "pow() 3rd argument cannot be 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() with 3 arguments requires integers" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4036,15 +4041,18 @@ msgstr "pow() with 3 arguments requires integers" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/es.po b/locale/es.po index 15b32afa1d..8eb3848fcd 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1403,6 +1403,10 @@ msgstr "Formato de fragmento de formato no válido" msgid "Invalid memory access." msgstr "Acceso a memoria no válido." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4075,6 +4079,7 @@ msgstr "el 3er argumento de pow() no puede ser 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() con 3 argumentos requiere enteros" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4082,15 +4087,18 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/fil.po b/locale/fil.po index 5d2a737d7f..f6dbe03030 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1385,6 +1385,10 @@ msgstr "Mali ang format ng chunk size" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4033,6 +4037,7 @@ msgstr "pow() 3rd argument ay hindi maaring 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() na may 3 argumento kailangan ng integers" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4040,15 +4045,18 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/fr.po b/locale/fr.po index dd9b524aed..8c4a077157 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1416,6 +1416,10 @@ msgstr "Taille de bloc de formatage invalide" msgid "Invalid memory access." msgstr "Accès à la mémoire invalide." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "Adresse MAC multicast invalide" @@ -4106,6 +4110,7 @@ msgstr "le 3e argument de pow() ne peut être 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() avec 3 arguments nécessite des entiers" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4113,15 +4118,18 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/hi.po b/locale/hi.po index 7b2ad4a3ef..4030db6510 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1370,6 +1370,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -3992,6 +3996,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -3999,15 +4004,18 @@ msgstr "" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/it_IT.po b/locale/it_IT.po index 6c5007f00c..c97b1f8910 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1394,6 +1394,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4055,6 +4059,7 @@ msgstr "il terzo argomento di pow() non può essere 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() con 3 argomenti richiede interi" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4062,15 +4067,18 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/ja.po b/locale/ja.po index 56e524a99d..abd69060ea 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1381,6 +1381,10 @@ msgstr "フォーマットチャンクのサイズが不正" msgid "Invalid memory access." msgstr "不正なメモリアクセス" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4014,6 +4018,7 @@ msgstr "pow()の3つ目の引数は0にできません" msgid "pow() with 3 arguments requires integers" msgstr "pow()の第3引数には整数が必要" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4021,15 +4026,18 @@ msgstr "pow()の第3引数には整数が必要" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/ko.po b/locale/ko.po index fc35104af5..0de21ab65f 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1373,6 +1373,10 @@ msgstr "형식 청크 크기가 잘못되었습니다" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -3996,6 +4000,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4003,15 +4008,18 @@ msgstr "" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/nl.po b/locale/nl.po index e83c1e2618..9a0b40799f 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1382,6 +1382,10 @@ msgstr "Ongeldig formaat stuk grootte" msgid "Invalid memory access." msgstr "Ongeldig geheugen adres." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4033,6 +4037,7 @@ msgstr "derde argument van pow() mag geen 0 zijn" msgid "pow() with 3 arguments requires integers" msgstr "pow() met 3 argumenten vereist integers" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4040,15 +4045,18 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/pl.po b/locale/pl.po index a9f4460ba8..4c2b1782ce 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1381,6 +1381,10 @@ msgstr "Zła wielkość fragmentu formatu" msgid "Invalid memory access." msgstr "Nieprawidłowy dostęp do pamięci." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4005,6 +4009,7 @@ msgstr "trzeci argument pow() nie może być 0" msgid "pow() with 3 arguments requires integers" msgstr "trzyargumentowe pow() wymaga liczb całkowitych" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4012,15 +4017,18 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 02276388a1..92ffd3ffcf 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -1407,6 +1407,10 @@ msgstr "Tamanho do pedaço de formato inválido" msgid "Invalid memory access." msgstr "O acesso da memória é inválido." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "Endereço MAC multicast inválido" @@ -4096,6 +4100,7 @@ msgstr "O terceiro argumento pow() não pode ser 0" msgid "pow() with 3 arguments requires integers" msgstr "o pow() com 3 argumentos requer números inteiros" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4103,15 +4108,18 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/ru.po b/locale/ru.po index af6e5c3822..5a6bbc5626 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -1413,6 +1413,10 @@ msgstr "Неверный размер блока формата" msgid "Invalid memory access." msgstr "Неправильный доступ к памяти." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "Неверный MAC-адрес multicast" @@ -4047,6 +4051,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4054,15 +4059,18 @@ msgstr "" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/sv.po b/locale/sv.po index 73551bb75e..dcbc7ae8f8 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -1389,6 +1389,10 @@ msgstr "Ogiltig formatsegmentstorlek" msgid "Invalid memory access." msgstr "Ogiltig minnesåtkomst." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "Ogiltig MAC-adress för multicast" @@ -4053,6 +4057,7 @@ msgstr "pow() 3: e argument kan inte vara 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() med 3 argument kräver heltal" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4060,15 +4065,18 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/tr.po b/locale/tr.po index 2ff9f016bf..d7b6067b80 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -1385,6 +1385,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -4010,6 +4014,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4017,15 +4022,18 @@ msgstr "" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index ec39c2cba6..2547284021 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -1403,6 +1403,10 @@ msgstr "Géshì kuài dàxiǎo wúxiào" msgid "Invalid memory access." msgstr "Wúxiào de nèicún fǎngwèn." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "wú xiào de duō bō MAC dì zhǐ" @@ -4063,6 +4067,7 @@ msgstr "pow() 3 cān shǔ bùnéng wéi 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -4070,15 +4075,18 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h #: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s3_devkitc_1_nopsram/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h From 4df083a961ab11290808549ac1f356a467d70d4d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 21 Jan 2022 12:37:10 -0800 Subject: [PATCH 256/258] Only make CIRCUITPY readonly with USB CIRCUITPY will be writable from CP on all non-USB boards now. This includes micro:bit v2 and C3 boards. It should allow it to work with serial file loading programs. Fixes #5901 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 9bda03f844..b4537b1d69 100644 --- a/main.c +++ b/main.c @@ -838,7 +838,7 @@ int __attribute__((used)) main(void) { // By default our internal flash is readonly to local python code and // writable over USB. Set it here so that boot.py can change it. filesystem_set_internal_concurrent_write_protection(true); - filesystem_set_internal_writable_by_usb(true); + filesystem_set_internal_writable_by_usb(CIRCUITPY_USB == 1); run_boot_py(safe_mode); From 4d78e3401c9548e03dc12db04c27c460ac2953e5 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Sat, 22 Jan 2022 15:19:37 +1100 Subject: [PATCH 257/258] Fix esp32s3 devkitc uart naming and add board.UART --- .../espressif_esp32s3_devkitc_1_n8/mpconfigboard.h | 9 ++++++--- .../boards/espressif_esp32s3_devkitc_1_n8/pins.c | 7 +++++-- .../espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h | 9 ++++++--- .../boards/espressif_esp32s3_devkitc_1_n8r2/pins.c | 7 +++++-- .../espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h | 9 ++++++--- .../boards/espressif_esp32s3_devkitc_1_n8r8/pins.c | 7 +++++-- 6 files changed, 33 insertions(+), 15 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h index b13ccd1ffe..4c584e96cd 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h @@ -29,10 +29,13 @@ #define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-N8" #define MICROPY_HW_MCU_NAME "ESP32S3" -#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) -#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") -#define AUTORESET_DELAY_MS 500 +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c index b1d515c306..21b445f393 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c @@ -33,13 +33,16 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, - { MP_ROM_QSTR(MP_QSTR_TXD0), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, - { MP_ROM_QSTR(MP_QSTR_TXD1), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h index 514ca2e2bc..eb6cae949f 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h @@ -29,10 +29,13 @@ #define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-N8R2" #define MICROPY_HW_MCU_NAME "ESP32S3" -#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) -#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") -#define AUTORESET_DELAY_MS 500 +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c index b1d515c306..21b445f393 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c @@ -33,13 +33,16 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, - { MP_ROM_QSTR(MP_QSTR_TXD0), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, - { MP_ROM_QSTR(MP_QSTR_TXD1), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h index 45fd3268b2..f3a2941655 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h @@ -29,10 +29,13 @@ #define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-N8R8" #define MICROPY_HW_MCU_NAME "ESP32S3" -#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) -#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") -#define AUTORESET_DELAY_MS 500 +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c index b1d515c306..21b445f393 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c @@ -33,13 +33,16 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, - { MP_ROM_QSTR(MP_QSTR_TXD0), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, - { MP_ROM_QSTR(MP_QSTR_TXD1), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 048ccbcdb2603665705ef7d946f81d9d8dd93d7d Mon Sep 17 00:00:00 2001 From: Neradoc Date: Sat, 22 Jan 2022 20:39:26 +0100 Subject: [PATCH 258/258] pulseio doc example little fix --- shared-bindings/pulseio/PulseOut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/pulseio/PulseOut.c b/shared-bindings/pulseio/PulseOut.c index bf2aaf54ff..ac568231b9 100644 --- a/shared-bindings/pulseio/PulseOut.c +++ b/shared-bindings/pulseio/PulseOut.c @@ -59,7 +59,7 @@ //| import board //| //| # 50% duty cycle at 38kHz. -//| pwm = pulseio.PulseOut(board.LED, frequency=38000, duty_cycle=32768) +//| pulse = pulseio.PulseOut(board.LED, frequency=38000, duty_cycle=32768) //| # on off on off on //| pulses = array.array('H', [65000, 1000, 65000, 65000, 1000]) //| pulse.send(pulses)