From ce7cd221166f9b9999b878eac16f270a74ce06a7 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Sun, 14 Nov 2021 21:56:18 -0600 Subject: [PATCH 01/52] 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 02/52] 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 03/52] 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 a043f65352598e345912ba49d0b1f9c4abb3fa73 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 9 Dec 2021 23:25:48 -0600 Subject: [PATCH 04/52] 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 02dca8b66af3373db64e8e7df2fae61ed8e5b6d0 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 10 Dec 2021 08:35:40 -0500 Subject: [PATCH 05/52] update frozen libraries for 7.1.x-beta.2 --- frozen/Adafruit_CircuitPython_BLE | 2 +- frozen/Adafruit_CircuitPython_DS3231 | 2 +- frozen/Adafruit_CircuitPython_Display_Shapes | 2 +- frozen/Adafruit_CircuitPython_ESP32SPI | 2 +- frozen/Adafruit_CircuitPython_LC709203F | 2 +- frozen/Adafruit_CircuitPython_LIS3DH | 2 +- frozen/Adafruit_CircuitPython_ProgressBar | 2 +- frozen/Adafruit_CircuitPython_RFM69 | 2 +- frozen/Adafruit_CircuitPython_RFM9x | 2 +- frozen/Adafruit_CircuitPython_SimpleMath | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_BLE b/frozen/Adafruit_CircuitPython_BLE index 781f46b73f..434e367cc7 160000 --- a/frozen/Adafruit_CircuitPython_BLE +++ b/frozen/Adafruit_CircuitPython_BLE @@ -1 +1 @@ -Subproject commit 781f46b73f71817b709d2e279fc188a7c1e69423 +Subproject commit 434e367cc7da4c2836affdbf92b8932ca59a25b0 diff --git a/frozen/Adafruit_CircuitPython_DS3231 b/frozen/Adafruit_CircuitPython_DS3231 index 92a6ce1da7..4fc5a32763 160000 --- a/frozen/Adafruit_CircuitPython_DS3231 +++ b/frozen/Adafruit_CircuitPython_DS3231 @@ -1 +1 @@ -Subproject commit 92a6ce1da70c0c4f69ef34fc0d7ec7155cc2441f +Subproject commit 4fc5a32763c4a6eac3a9446e296a9e925cc29a5c diff --git a/frozen/Adafruit_CircuitPython_Display_Shapes b/frozen/Adafruit_CircuitPython_Display_Shapes index 313c17cbb5..bafa35c18a 160000 --- a/frozen/Adafruit_CircuitPython_Display_Shapes +++ b/frozen/Adafruit_CircuitPython_Display_Shapes @@ -1 +1 @@ -Subproject commit 313c17cbb590ef8d505845369eb3b78c25c97fae +Subproject commit bafa35c18a610660bdce68784195c4a7fbdf1189 diff --git a/frozen/Adafruit_CircuitPython_ESP32SPI b/frozen/Adafruit_CircuitPython_ESP32SPI index e25c1801c5..de4829a027 160000 --- a/frozen/Adafruit_CircuitPython_ESP32SPI +++ b/frozen/Adafruit_CircuitPython_ESP32SPI @@ -1 +1 @@ -Subproject commit e25c1801c5428598f543873bb846851b78efb329 +Subproject commit de4829a027a45882ae5477e50a75985e0e59f759 diff --git a/frozen/Adafruit_CircuitPython_LC709203F b/frozen/Adafruit_CircuitPython_LC709203F index ed41dd4460..8fc5eaecb3 160000 --- a/frozen/Adafruit_CircuitPython_LC709203F +++ b/frozen/Adafruit_CircuitPython_LC709203F @@ -1 +1 @@ -Subproject commit ed41dd44605110f1d1411ed694ec2b5676dd8d9c +Subproject commit 8fc5eaecb3e24e4109bcc788f41461f1c45c3719 diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH index daff8cdca7..ebbe69667d 160000 --- a/frozen/Adafruit_CircuitPython_LIS3DH +++ b/frozen/Adafruit_CircuitPython_LIS3DH @@ -1 +1 @@ -Subproject commit daff8cdca78637915bea2f3a120cc84578516195 +Subproject commit ebbe69667d53ae76bc6d82e5296f87520ffbb5ae diff --git a/frozen/Adafruit_CircuitPython_ProgressBar b/frozen/Adafruit_CircuitPython_ProgressBar index e4f7cd083d..4ac4328893 160000 --- a/frozen/Adafruit_CircuitPython_ProgressBar +++ b/frozen/Adafruit_CircuitPython_ProgressBar @@ -1 +1 @@ -Subproject commit e4f7cd083dea8eb103954e7703bbb487491b433f +Subproject commit 4ac43288938abb4c3db127eeb79ef0d4ea4c16ea diff --git a/frozen/Adafruit_CircuitPython_RFM69 b/frozen/Adafruit_CircuitPython_RFM69 index 70ef86dc1a..9ac4909058 160000 --- a/frozen/Adafruit_CircuitPython_RFM69 +++ b/frozen/Adafruit_CircuitPython_RFM69 @@ -1 +1 @@ -Subproject commit 70ef86dc1a42138efcab01945d5a421e45f2408e +Subproject commit 9ac490905834466319279a3390c914f1fd83733f diff --git a/frozen/Adafruit_CircuitPython_RFM9x b/frozen/Adafruit_CircuitPython_RFM9x index 379209dd7e..0df4521b4a 160000 --- a/frozen/Adafruit_CircuitPython_RFM9x +++ b/frozen/Adafruit_CircuitPython_RFM9x @@ -1 +1 @@ -Subproject commit 379209dd7e4374c262b84256778d7895693e7fb6 +Subproject commit 0df4521b4a04ca1236960ff889ede118ec4305b5 diff --git a/frozen/Adafruit_CircuitPython_SimpleMath b/frozen/Adafruit_CircuitPython_SimpleMath index 5b699a6091..755784b6ac 160000 --- a/frozen/Adafruit_CircuitPython_SimpleMath +++ b/frozen/Adafruit_CircuitPython_SimpleMath @@ -1 +1 @@ -Subproject commit 5b699a609197fb42aa059788c7c824c346d57c4e +Subproject commit 755784b6acc8ba419a085bee2d2dc4374f0d0030 From 74fa2e9edd5ebfaefc1a7a87ebe303457f59ae02 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 10 Dec 2021 10:20:36 -0800 Subject: [PATCH 06/52] 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 07/52] 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 08/52] 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 c3a90e38f761f3b921f25bb8c74c9ee42ff287ae Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 11 Dec 2021 18:02:55 -0500 Subject: [PATCH 09/52] 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 c06eee98418a40e7edbeb4b5386135a819d3df79 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 12 Dec 2021 22:00:08 -0500 Subject: [PATCH 10/52] Clear TAMPER interrupt properly; make keypad module table const --- ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c | 2 +- shared-bindings/keypad/__init__.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c b/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c index cfd4a9f893..da99863e4c 100644 --- a/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +++ b/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c @@ -164,7 +164,7 @@ void alarm_pin_pinalarm_reset(void) { woke_up = false; SAMD_ALARM_FLAG &= ~SAMD_ALARM_FLAG_PIN; // clear flag // Disable TAMPER interrupt - RTC->MODE0.INTENCLR.bit.TAMPER = 1; + RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_TAMPER; // Disable TAMPER control common_hal_mcu_disable_interrupts(); RTC->MODE0.CTRLA.bit.ENABLE = 0; // Disable the RTC diff --git a/shared-bindings/keypad/__init__.c b/shared-bindings/keypad/__init__.c index e12992ec5f..4450e892ca 100644 --- a/shared-bindings/keypad/__init__.c +++ b/shared-bindings/keypad/__init__.c @@ -42,7 +42,7 @@ //| """ //| -STATIC mp_map_elem_t keypad_module_globals_table[] = { +STATIC mp_rom_map_elem_t keypad_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_keypad) }, { MP_ROM_QSTR(MP_QSTR_Event), MP_OBJ_FROM_PTR(&keypad_event_type) }, { MP_ROM_QSTR(MP_QSTR_EventQueue), MP_OBJ_FROM_PTR(&keypad_eventqueue_type) }, @@ -51,7 +51,7 @@ STATIC mp_map_elem_t keypad_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ShiftRegisterKeys), MP_OBJ_FROM_PTR(&keypad_shiftregisterkeys_type) }, }; -STATIC MP_DEFINE_MUTABLE_DICT(keypad_module_globals, keypad_module_globals_table); +STATIC MP_DEFINE_CONST_DICT(keypad_module_globals, keypad_module_globals_table); const mp_obj_module_t keypad_module = { .base = { &mp_type_module }, From bbe30514efdf14443726a237da86461b31690891 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 12 Dec 2021 22:21:38 -0500 Subject: [PATCH 11/52] Fix other INTENCLR and INTENSET to write whole reg --- ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c | 4 ++-- ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c index 0bc0bc214e..4e06b77b56 100644 --- a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +++ b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c @@ -185,13 +185,13 @@ static void frequencyin_reference_tc_init(void) { #ifdef SAMD21 tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1; - tc->COUNT16.INTENSET.bit.OVF = 1; + tc->COUNT16.INTENSET.reg = TC_INTENSET_OVF; NVIC_EnableIRQ(TC3_IRQn + reference_tc); #endif #ifdef SAM_D5X_E5X tc->COUNT16.CTRLA.reg = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1; - tc->COUNT16.INTENSET.bit.OVF = 1; + tc->COUNT16.INTENSET.reg = TC_INTENSET_OVF; NVIC_EnableIRQ(TC0_IRQn + reference_tc); #endif } diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c index 2091b7d302..65d238ce75 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c @@ -58,7 +58,7 @@ STATIC void setup_wdt(watchdog_watchdogtimer_obj_t *self, int setting) { while (WDT->SYNCBUSY.reg) { // Sync CTRL write } - WDT->INTENCLR.bit.EW = 1; // Disable early warning interrupt + WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt WDT->CONFIG.bit.PER = setting; // Set period for chip reset WDT->CTRLA.bit.WEN = 0; // Disable window mode while (WDT->SYNCBUSY.reg) { // Sync CTRL write From 17b53c7ebe03c08c23ae3c1a774ebfdba25abc31 Mon Sep 17 00:00:00 2001 From: Kenny Date: Sun, 12 Dec 2021 19:50:00 -0800 Subject: [PATCH 12/52] 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 13/52] 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 1dce9de4807681a8eee101b438b94431fb2790e3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 13 Dec 2021 07:58:26 -0600 Subject: [PATCH 14/52] reflect that the default branch of circuitpython-org is updated --- tools/build_board_info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build_board_info.py b/tools/build_board_info.py index dde59e7e43..3ebd799b11 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -160,10 +160,10 @@ def get_version_info(): def get_current_info(): - response = github.get("/repos/adafruit/circuitpython-org/git/refs/heads/master") + response = github.get("/repos/adafruit/circuitpython-org/git/refs/heads/main") if not response.ok: print(response.text) - raise RuntimeError("cannot get master sha") + raise RuntimeError("cannot get main sha") commit_sha = response.json()["object"]["sha"] response = github.get( @@ -235,7 +235,7 @@ def create_pr(changes, updated, git_info, user): pr_info = { "title": pr_title, "head": user + ":" + branch_name, - "base": "master", + "base": "main", "body": message, "maintainer_can_modify": True, } 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 15/52] 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 16/52] 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 17/52] 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 18/52] 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 9f0c0720f958d6f3485f0aab90f412496d8b2551 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 10 Dec 2021 10:20:36 -0800 Subject: [PATCH 19/52] 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 d14868d540e4bae47d5b9986b48b054a7276af7b Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 10 Dec 2021 10:28:49 -0800 Subject: [PATCH 20/52] 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 dcc61d35325a2b730b398a376f94e0a8c8b3387a Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 11 Dec 2021 18:02:55 -0500 Subject: [PATCH 21/52] 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 8ef24afe7a2274c14b6fa9032af52033ea5d478a Mon Sep 17 00:00:00 2001 From: Tim Hawes Date: Sat, 27 Nov 2021 12:43:29 +0000 Subject: [PATCH 22/52] 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 23/52] 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 24/52] 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 25/52] 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 26/52] 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 27/52] 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 28/52] 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 8b7c90c3736d8a350d05820ce264fbd4edd27ef6 Mon Sep 17 00:00:00 2001 From: dronecz Date: Wed, 15 Dec 2021 00:54:23 +0000 Subject: [PATCH 29/52] 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 30/52] 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 31/52] 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 32/52] 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 33/52] 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 34/52] 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 35/52] 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 36/52] 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 37/52] 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 38/52] 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 39/52] 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 40/52] 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 2cdd73f79378611b63fa02f99374639ebfcedbb4 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 15 Dec 2021 22:01:57 +0000 Subject: [PATCH 41/52] 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 42/52] 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 43/52] 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 44/52] 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 45/52] 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 46/52] 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 47/52] 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 48/52] 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 49/52] 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 50/52] 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 51/52] 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 c615daff30cc8e555c8df39562373afd8b604825 Mon Sep 17 00:00:00 2001 From: George Waters Date: Fri, 17 Dec 2021 16:23:58 -0500 Subject: [PATCH 52/52] 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;